tbapi.api.models.metadata

 1from __future__ import annotations
 2from typing import TYPE_CHECKING
 3from tbapi.common.decorators import tb_class, tb_interface
 4from tbapi.common.converters import to_python_datetime, to_net_datetime
 5from datetime import datetime
 6from Tickblaze.Scripts.Api.Models import Metadata as _Metadata
 7from typing import Any, overload
 8from abc import ABC, abstractmethod
 9
10@tb_class(_Metadata)
11class Metadata():
12    """Represents metadata about a given object, including its name, type, assembly, and version."""
13
14    @overload
15    @staticmethod
16    def new() -> "Metadata":
17        """Constructor overload with arguments: """
18        ...
19    @staticmethod
20    def new(*args, **kwargs):
21        """Generic factory method for Metadata. Use overloads for IDE type hints."""
22        return Metadata(*args, **kwargs)
23
24    @property
25    def name(self) -> str:
26        """The name of the metadata."""
27        val = self._value.Name
28        return val
29    @name.setter
30    def name(self, val: str):
31        tmp = self._value
32        tmp.Name = val
33        self._value = tmp
34    @property
35    def short_name(self) -> str:
36        """The short name of the metadata, typically consisting of uppercase characters from the name."""
37        val = self._value.ShortName
38        return val
39    @short_name.setter
40    def short_name(self, val: str):
41        tmp = self._value
42        tmp.ShortName = val
43        self._value = tmp
44    @property
45    def description(self) -> str:
46        """A description of the metadata."""
47        val = self._value.Description
48        return val
49    @description.setter
50    def description(self, val: str):
51        tmp = self._value
52        tmp.Description = val
53        self._value = tmp
54    @property
55    def type(self) -> str:
56        """The full type name of the metadata."""
57        val = self._value.Type
58        return val
59    @property
60    def assembly(self) -> str:
61        """The assembly name containing the metadata."""
62        val = self._value.Assembly
63        return val
64    @property
65    def version(self) -> str:
66        """The version of the metadata."""
67        val = self._value.Version
68        return val
69    @property
70    def resource_id(self) -> int:
71        """The resource ID associated with the metadata."""
72        val = self._value.ResourceId
73        return val
74    @property
75    def script_version(self) -> Version:
76        """The version of the script."""
77        val = self._value.ScriptVersion
78        return val
@tb_class(_Metadata)
class Metadata:
18@tb_class(_Metadata)
19class Metadata():
20    """Represents metadata about a given object, including its name, type, assembly, and version."""
21
22    @overload
23    @staticmethod
24    def new() -> "Metadata":
25        """Constructor overload with arguments: """
26        ...
27    @staticmethod
28    def new(*args, **kwargs):
29        """Generic factory method for Metadata. Use overloads for IDE type hints."""
30        return Metadata(*args, **kwargs)
31
32    @property
33    def name(self) -> str:
34        """The name of the metadata."""
35        val = self._value.Name
36        return val
37    @name.setter
38    def name(self, val: str):
39        tmp = self._value
40        tmp.Name = val
41        self._value = tmp
42    @property
43    def short_name(self) -> str:
44        """The short name of the metadata, typically consisting of uppercase characters from the name."""
45        val = self._value.ShortName
46        return val
47    @short_name.setter
48    def short_name(self, val: str):
49        tmp = self._value
50        tmp.ShortName = val
51        self._value = tmp
52    @property
53    def description(self) -> str:
54        """A description of the metadata."""
55        val = self._value.Description
56        return val
57    @description.setter
58    def description(self, val: str):
59        tmp = self._value
60        tmp.Description = val
61        self._value = tmp
62    @property
63    def type(self) -> str:
64        """The full type name of the metadata."""
65        val = self._value.Type
66        return val
67    @property
68    def assembly(self) -> str:
69        """The assembly name containing the metadata."""
70        val = self._value.Assembly
71        return val
72    @property
73    def version(self) -> str:
74        """The version of the metadata."""
75        val = self._value.Version
76        return val
77    @property
78    def resource_id(self) -> int:
79        """The resource ID associated with the metadata."""
80        val = self._value.ResourceId
81        return val
82    @property
83    def script_version(self) -> Version:
84        """The version of the script."""
85        val = self._value.ScriptVersion
86        return val

Represents metadata about a given object, including its name, type, assembly, and version.

Metadata(*args, **kwargs)
162        def __init__(self, *args, **kwargs):
163            pass
@staticmethod
def new(*args, **kwargs):
27    @staticmethod
28    def new(*args, **kwargs):
29        """Generic factory method for Metadata. Use overloads for IDE type hints."""
30        return Metadata(*args, **kwargs)

Generic factory method for Metadata. Use overloads for IDE type hints.

name: str
32    @property
33    def name(self) -> str:
34        """The name of the metadata."""
35        val = self._value.Name
36        return val

The name of the metadata.

short_name: str
42    @property
43    def short_name(self) -> str:
44        """The short name of the metadata, typically consisting of uppercase characters from the name."""
45        val = self._value.ShortName
46        return val

The short name of the metadata, typically consisting of uppercase characters from the name.

description: str
52    @property
53    def description(self) -> str:
54        """A description of the metadata."""
55        val = self._value.Description
56        return val

A description of the metadata.

type: str
62    @property
63    def type(self) -> str:
64        """The full type name of the metadata."""
65        val = self._value.Type
66        return val

The full type name of the metadata.

assembly: str
67    @property
68    def assembly(self) -> str:
69        """The assembly name containing the metadata."""
70        val = self._value.Assembly
71        return val

The assembly name containing the metadata.

version: str
72    @property
73    def version(self) -> str:
74        """The version of the metadata."""
75        val = self._value.Version
76        return val

The version of the metadata.

resource_id: int
77    @property
78    def resource_id(self) -> int:
79        """The resource ID associated with the metadata."""
80        val = self._value.ResourceId
81        return val

The resource ID associated with the metadata.

script_version: 'Version'
82    @property
83    def script_version(self) -> Version:
84        """The version of the script."""
85        val = self._value.ScriptVersion
86        return val

The version of the script.