Code Duplication    Length = 28-33 lines in 2 locations

opcua/ua/uaprotocol_auto.py 2 locations

@@ 6140-6172 (lines=33) @@
6137
6138
    def __init__(self):
6139
        self.TypeId = FourByteNodeId(ObjectIds.DeleteReferencesRequest_Encoding_DefaultBinary)
6140
        self.RequestHeader = RequestHeader()
6141
        self.Parameters = DeleteReferencesParameters()
6142
        self._freeze = True
6143
6144
    def __str__(self):
6145
        return 'DeleteReferencesRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \
6146
               'RequestHeader:' + str(self.RequestHeader) + ', ' + \
6147
               'Parameters:' + str(self.Parameters) + ')'
6148
6149
    __repr__ = __str__
6150
6151
6152
class DeleteReferencesResult(FrozenClass):
6153
    '''
6154
    :ivar Results:
6155
    :vartype Results: StatusCode
6156
    :ivar DiagnosticInfos:
6157
    :vartype DiagnosticInfos: DiagnosticInfo
6158
    '''
6159
6160
    ua_types = [
6161
        ('Results', 'ListOfStatusCode'),
6162
        ('DiagnosticInfos', 'ListOfDiagnosticInfo'),
6163
               ]
6164
6165
    def __init__(self):
6166
        self.Results = []
6167
        self.DiagnosticInfos = []
6168
        self._freeze = True
6169
6170
    def __str__(self):
6171
        return 'DeleteReferencesResult(' + 'Results:' + str(self.Results) + ', ' + \
6172
               'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')'
6173
6174
    __repr__ = __str__
6175
@@ 6080-6107 (lines=28) @@
6077
        ('IsForward', 'Boolean'),
6078
        ('TargetNodeId', 'ExpandedNodeId'),
6079
        ('DeleteBidirectional', 'Boolean'),
6080
               ]
6081
6082
    def __init__(self):
6083
        self.SourceNodeId = NodeId()
6084
        self.ReferenceTypeId = NodeId()
6085
        self.IsForward = True
6086
        self.TargetNodeId = ExpandedNodeId()
6087
        self.DeleteBidirectional = True
6088
        self._freeze = True
6089
6090
    def __str__(self):
6091
        return 'DeleteReferencesItem(' + 'SourceNodeId:' + str(self.SourceNodeId) + ', ' + \
6092
               'ReferenceTypeId:' + str(self.ReferenceTypeId) + ', ' + \
6093
               'IsForward:' + str(self.IsForward) + ', ' + \
6094
               'TargetNodeId:' + str(self.TargetNodeId) + ', ' + \
6095
               'DeleteBidirectional:' + str(self.DeleteBidirectional) + ')'
6096
6097
    __repr__ = __str__
6098
6099
6100
class DeleteReferencesParameters(FrozenClass):
6101
    '''
6102
    :ivar ReferencesToDelete:
6103
    :vartype ReferencesToDelete: DeleteReferencesItem
6104
    '''
6105
6106
    ua_types = [
6107
        ('ReferencesToDelete', 'ListOfDeleteReferencesItem'),
6108
               ]
6109
6110
    def __init__(self):