Code Duplication    Length = 29-29 lines in 2 locations

opcua/ua/uaprotocol_auto.py 2 locations

@@ 8752-8780 (lines=29) @@
8749
    __repr__ = __str__
8750
8751
8752
class HistoryUpdateDetails(FrozenClass):
8753
    '''
8754
    :ivar NodeId:
8755
    :vartype NodeId: NodeId
8756
    '''
8757
    def __init__(self, binary=None):
8758
        if binary is not None:
8759
            self._binary_init(binary)
8760
            self._freeze = True
8761
            return
8762
        self.NodeId = NodeId()
8763
        self._freeze = True
8764
8765
    def to_binary(self):
8766
        packet = []
8767
        packet.append(self.NodeId.to_binary())
8768
        return b''.join(packet)
8769
8770
    @staticmethod
8771
    def from_binary(data):
8772
        return HistoryUpdateDetails(data)
8773
8774
    def _binary_init(self, data):
8775
        self.NodeId = NodeId.from_binary(data)
8776
8777
    def __str__(self):
8778
        return 'HistoryUpdateDetails(' + 'NodeId:' + str(self.NodeId) + ')'
8779
8780
    __repr__ = __str__
8781
8782
8783
class UpdateDataDetails(FrozenClass):
@@ 7000-7028 (lines=29) @@
6997
    __repr__ = __str__
6998
6999
7000
class LiteralOperand(FrozenClass):
7001
    '''
7002
    :ivar Value:
7003
    :vartype Value: Variant
7004
    '''
7005
    def __init__(self, binary=None):
7006
        if binary is not None:
7007
            self._binary_init(binary)
7008
            self._freeze = True
7009
            return
7010
        self.Value = Variant()
7011
        self._freeze = True
7012
7013
    def to_binary(self):
7014
        packet = []
7015
        packet.append(self.Value.to_binary())
7016
        return b''.join(packet)
7017
7018
    @staticmethod
7019
    def from_binary(data):
7020
        return LiteralOperand(data)
7021
7022
    def _binary_init(self, data):
7023
        self.Value = Variant.from_binary(data)
7024
7025
    def __str__(self):
7026
        return 'LiteralOperand(' + 'Value:' + str(self.Value) + ')'
7027
7028
    __repr__ = __str__
7029
7030
7031
class AttributeOperand(FrozenClass):