Code Duplication    Length = 54-62 lines in 2 locations

asyncua/ua/uaprotocol_auto.py 2 locations

@@ 11235-11296 (lines=62) @@
11232
    __repr__ = __str__
11233
11234
11235
class ProgramDiagnostic2DataType(FrozenClass):
11236
    """
11237
    :ivar CreateSessionId:
11238
    :vartype CreateSessionId: NodeId
11239
    :ivar CreateClientName:
11240
    :vartype CreateClientName: String
11241
    :ivar InvocationCreationTime:
11242
    :vartype InvocationCreationTime: DateTime
11243
    :ivar LastTransitionTime:
11244
    :vartype LastTransitionTime: DateTime
11245
    :ivar LastMethodCall:
11246
    :vartype LastMethodCall: String
11247
    :ivar LastMethodSessionId:
11248
    :vartype LastMethodSessionId: NodeId
11249
    :ivar LastMethodInputArguments:
11250
    :vartype LastMethodInputArguments: Argument
11251
    :ivar LastMethodOutputArguments:
11252
    :vartype LastMethodOutputArguments: Argument
11253
    :ivar LastMethodInputValues:
11254
    :vartype LastMethodInputValues: Variant
11255
    :ivar LastMethodOutputValues:
11256
    :vartype LastMethodOutputValues: Variant
11257
    :ivar LastMethodCallTime:
11258
    :vartype LastMethodCallTime: DateTime
11259
    :ivar LastMethodReturnStatus:
11260
    :vartype LastMethodReturnStatus: StatusResult
11261
    """
11262
11263
    ua_types = [
11264
        ('CreateSessionId', 'NodeId'),
11265
        ('CreateClientName', 'String'),
11266
        ('InvocationCreationTime', 'DateTime'),
11267
        ('LastTransitionTime', 'DateTime'),
11268
        ('LastMethodCall', 'String'),
11269
        ('LastMethodSessionId', 'NodeId'),
11270
        ('LastMethodInputArguments', 'ListOfArgument'),
11271
        ('LastMethodOutputArguments', 'ListOfArgument'),
11272
        ('LastMethodInputValues', 'ListOfVariant'),
11273
        ('LastMethodOutputValues', 'ListOfVariant'),
11274
        ('LastMethodCallTime', 'DateTime'),
11275
        ('LastMethodReturnStatus', 'StatusResult'),
11276
               ]
11277
11278
    def __init__(self):
11279
        self.CreateSessionId = NodeId()
11280
        self.CreateClientName = None
11281
        self.InvocationCreationTime = datetime.utcnow()
11282
        self.LastTransitionTime = datetime.utcnow()
11283
        self.LastMethodCall = None
11284
        self.LastMethodSessionId = NodeId()
11285
        self.LastMethodInputArguments = []
11286
        self.LastMethodOutputArguments = []
11287
        self.LastMethodInputValues = []
11288
        self.LastMethodOutputValues = []
11289
        self.LastMethodCallTime = datetime.utcnow()
11290
        self.LastMethodReturnStatus = StatusResult()
11291
        self._freeze = True
11292
11293
    def __str__(self):
11294
        return f'ProgramDiagnostic2DataType(CreateSessionId:{self.CreateSessionId}, CreateClientName:{self.CreateClientName}, InvocationCreationTime:{self.InvocationCreationTime}, LastTransitionTime:{self.LastTransitionTime}, LastMethodCall:{self.LastMethodCall}, LastMethodSessionId:{self.LastMethodSessionId}, LastMethodInputArguments:{self.LastMethodInputArguments}, LastMethodOutputArguments:{self.LastMethodOutputArguments}, LastMethodInputValues:{self.LastMethodInputValues}, LastMethodOutputValues:{self.LastMethodOutputValues}, LastMethodCallTime:{self.LastMethodCallTime}, LastMethodReturnStatus:{self.LastMethodReturnStatus})'
11295
11296
    __repr__ = __str__
11297
11298
11299
class Annotation(FrozenClass):
@@ 11179-11232 (lines=54) @@
11176
    __repr__ = __str__
11177
11178
11179
class ProgramDiagnosticDataType(FrozenClass):
11180
    """
11181
    :ivar CreateSessionId:
11182
    :vartype CreateSessionId: NodeId
11183
    :ivar CreateClientName:
11184
    :vartype CreateClientName: String
11185
    :ivar InvocationCreationTime:
11186
    :vartype InvocationCreationTime: DateTime
11187
    :ivar LastTransitionTime:
11188
    :vartype LastTransitionTime: DateTime
11189
    :ivar LastMethodCall:
11190
    :vartype LastMethodCall: String
11191
    :ivar LastMethodSessionId:
11192
    :vartype LastMethodSessionId: NodeId
11193
    :ivar LastMethodInputArguments:
11194
    :vartype LastMethodInputArguments: Argument
11195
    :ivar LastMethodOutputArguments:
11196
    :vartype LastMethodOutputArguments: Argument
11197
    :ivar LastMethodCallTime:
11198
    :vartype LastMethodCallTime: DateTime
11199
    :ivar LastMethodReturnStatus:
11200
    :vartype LastMethodReturnStatus: StatusResult
11201
    """
11202
11203
    ua_types = [
11204
        ('CreateSessionId', 'NodeId'),
11205
        ('CreateClientName', 'String'),
11206
        ('InvocationCreationTime', 'DateTime'),
11207
        ('LastTransitionTime', 'DateTime'),
11208
        ('LastMethodCall', 'String'),
11209
        ('LastMethodSessionId', 'NodeId'),
11210
        ('LastMethodInputArguments', 'ListOfArgument'),
11211
        ('LastMethodOutputArguments', 'ListOfArgument'),
11212
        ('LastMethodCallTime', 'DateTime'),
11213
        ('LastMethodReturnStatus', 'StatusResult'),
11214
               ]
11215
11216
    def __init__(self):
11217
        self.CreateSessionId = NodeId()
11218
        self.CreateClientName = None
11219
        self.InvocationCreationTime = datetime.utcnow()
11220
        self.LastTransitionTime = datetime.utcnow()
11221
        self.LastMethodCall = None
11222
        self.LastMethodSessionId = NodeId()
11223
        self.LastMethodInputArguments = []
11224
        self.LastMethodOutputArguments = []
11225
        self.LastMethodCallTime = datetime.utcnow()
11226
        self.LastMethodReturnStatus = StatusResult()
11227
        self._freeze = True
11228
11229
    def __str__(self):
11230
        return f'ProgramDiagnosticDataType(CreateSessionId:{self.CreateSessionId}, CreateClientName:{self.CreateClientName}, InvocationCreationTime:{self.InvocationCreationTime}, LastTransitionTime:{self.LastTransitionTime}, LastMethodCall:{self.LastMethodCall}, LastMethodSessionId:{self.LastMethodSessionId}, LastMethodInputArguments:{self.LastMethodInputArguments}, LastMethodOutputArguments:{self.LastMethodOutputArguments}, LastMethodCallTime:{self.LastMethodCallTime}, LastMethodReturnStatus:{self.LastMethodReturnStatus})'
11231
11232
    __repr__ = __str__
11233
11234
11235
class ProgramDiagnostic2DataType(FrozenClass):