Code Duplication    Length = 29-31 lines in 6 locations

opcua/ua/uaprotocol_auto.py 6 locations

@@ 2379-2409 (lines=31) @@
2376
    __repr__ = __str__
2377
2378
2379
class DiscoveryConfiguration(FrozenClass):
2380
    '''
2381
    A base type for discovery configuration information.
2382
2383
    '''
2384
2385
    ua_types = {
2386
               }
2387
2388
    def __init__(self, binary=None):
2389
        if binary is not None:
2390
            self._binary_init(binary)
2391
            self._freeze = True
2392
            return
2393
        self._freeze = True
2394
2395
    def to_binary(self):
2396
        packet = []
2397
        return b''.join(packet)
2398
2399
    @staticmethod
2400
    def from_binary(data):
2401
        return DiscoveryConfiguration(data)
2402
2403
    def _binary_init(self, data):
2404
        pass
2405
2406
    def __str__(self):
2407
        return 'DiscoveryConfiguration(' +  + ')'
2408
2409
    __repr__ = __str__
2410
2411
2412
class MdnsDiscoveryConfiguration(FrozenClass):
@@ 1077-1107 (lines=31) @@
1074
    __repr__ = __str__
1075
1076
1077
class Union(FrozenClass):
1078
    '''
1079
    This abstract DataType is the base DataType for all union DataTypes.
1080
1081
    '''
1082
1083
    ua_types = {
1084
               }
1085
1086
    def __init__(self, binary=None):
1087
        if binary is not None:
1088
            self._binary_init(binary)
1089
            self._freeze = True
1090
            return
1091
        self._freeze = True
1092
1093
    def to_binary(self):
1094
        packet = []
1095
        return b''.join(packet)
1096
1097
    @staticmethod
1098
    def from_binary(data):
1099
        return Union(data)
1100
1101
    def _binary_init(self, data):
1102
        pass
1103
1104
    def __str__(self):
1105
        return 'Union(' +  + ')'
1106
1107
    __repr__ = __str__
1108
1109
1110
class TimeZoneDataType(FrozenClass):
@@ 13190-13218 (lines=29) @@
13187
    __repr__ = __str__
13188
13189
13190
class NotificationData(FrozenClass):
13191
    '''
13192
    '''
13193
13194
    ua_types = {
13195
               }
13196
13197
    def __init__(self, binary=None):
13198
        if binary is not None:
13199
            self._binary_init(binary)
13200
            self._freeze = True
13201
            return
13202
        self._freeze = True
13203
13204
    def to_binary(self):
13205
        packet = []
13206
        return b''.join(packet)
13207
13208
    @staticmethod
13209
    def from_binary(data):
13210
        return NotificationData(data)
13211
13212
    def _binary_init(self, data):
13213
        pass
13214
13215
    def __str__(self):
13216
        return 'NotificationData(' +  + ')'
13217
13218
    __repr__ = __str__
13219
13220
13221
class DataChangeNotification(FrozenClass):
@@ 11082-11110 (lines=29) @@
11079
    __repr__ = __str__
11080
11081
11082
class MonitoringFilterResult(FrozenClass):
11083
    '''
11084
    '''
11085
11086
    ua_types = {
11087
               }
11088
11089
    def __init__(self, binary=None):
11090
        if binary is not None:
11091
            self._binary_init(binary)
11092
            self._freeze = True
11093
            return
11094
        self._freeze = True
11095
11096
    def to_binary(self):
11097
        packet = []
11098
        return b''.join(packet)
11099
11100
    @staticmethod
11101
    def from_binary(data):
11102
        return MonitoringFilterResult(data)
11103
11104
    def _binary_init(self, data):
11105
        pass
11106
11107
    def __str__(self):
11108
        return 'MonitoringFilterResult(' +  + ')'
11109
11110
    __repr__ = __str__
11111
11112
11113
class EventFilterResult(FrozenClass):
@@ 10830-10858 (lines=29) @@
10827
    __repr__ = __str__
10828
10829
10830
class MonitoringFilter(FrozenClass):
10831
    '''
10832
    '''
10833
10834
    ua_types = {
10835
               }
10836
10837
    def __init__(self, binary=None):
10838
        if binary is not None:
10839
            self._binary_init(binary)
10840
            self._freeze = True
10841
            return
10842
        self._freeze = True
10843
10844
    def to_binary(self):
10845
        packet = []
10846
        return b''.join(packet)
10847
10848
    @staticmethod
10849
    def from_binary(data):
10850
        return MonitoringFilter(data)
10851
10852
    def _binary_init(self, data):
10853
        pass
10854
10855
    def __str__(self):
10856
        return 'MonitoringFilter(' +  + ')'
10857
10858
    __repr__ = __str__
10859
10860
10861
class DataChangeFilter(FrozenClass):
@@ 9075-9103 (lines=29) @@
9072
    __repr__ = __str__
9073
9074
9075
class HistoryReadDetails(FrozenClass):
9076
    '''
9077
    '''
9078
9079
    ua_types = {
9080
               }
9081
9082
    def __init__(self, binary=None):
9083
        if binary is not None:
9084
            self._binary_init(binary)
9085
            self._freeze = True
9086
            return
9087
        self._freeze = True
9088
9089
    def to_binary(self):
9090
        packet = []
9091
        return b''.join(packet)
9092
9093
    @staticmethod
9094
    def from_binary(data):
9095
        return HistoryReadDetails(data)
9096
9097
    def _binary_init(self, data):
9098
        pass
9099
9100
    def __str__(self):
9101
        return 'HistoryReadDetails(' +  + ')'
9102
9103
    __repr__ = __str__
9104
9105
9106
class ReadEventDetails(FrozenClass):