tbapi.api.models.size

 1from __future__ import annotations
 2from typing import TYPE_CHECKING
 3from tbapi.common.decorators import tb_class
 4from tbapi.common.converters import to_python_datetime, to_net_datetime
 5from datetime import datetime
 6from Tickblaze.Scripts.Api.Models import Size as _Size
 7from typing import Any, overload
 8from tbapi.api.interfaces.isize import ISize
 9
10@tb_class(_Size)
11class Size():
12    """Represents the size of an object with width and height."""
13
14    @overload
15    @staticmethod
16    def new() -> "Size":
17        """Constructor overload with arguments: """
18        ...
19    @overload
20    @staticmethod
21    def new(width: float, height: float) -> "Size":
22        """Constructor overload with arguments: width, height"""
23        ...
24    @staticmethod
25    def new(*args, **kwargs):
26        """Generic factory method for Size. Use overloads for IDE type hints."""
27        return Size(*args, **kwargs)
28
29    @property
30    def height(self) -> float:
31        """The height of the size."""
32        val = self._value.Height
33        return val
34    @height.setter
35    def height(self, val: float):
36        tmp = self._value
37        tmp.Height = val
38        self._value = tmp
39    @property
40    def width(self) -> float:
41        """The width of the size."""
42        val = self._value.Width
43        return val
44    @width.setter
45    def width(self, val: float):
46        tmp = self._value
47        tmp.Width = val
48        self._value = tmp
@tb_class(_Size)
class Size:
17@tb_class(_Size)
18class Size():
19    """Represents the size of an object with width and height."""
20
21    @overload
22    @staticmethod
23    def new() -> "Size":
24        """Constructor overload with arguments: """
25        ...
26    @overload
27    @staticmethod
28    def new(width: float, height: float) -> "Size":
29        """Constructor overload with arguments: width, height"""
30        ...
31    @staticmethod
32    def new(*args, **kwargs):
33        """Generic factory method for Size. Use overloads for IDE type hints."""
34        return Size(*args, **kwargs)
35
36    @property
37    def height(self) -> float:
38        """The height of the size."""
39        val = self._value.Height
40        return val
41    @height.setter
42    def height(self, val: float):
43        tmp = self._value
44        tmp.Height = val
45        self._value = tmp
46    @property
47    def width(self) -> float:
48        """The width of the size."""
49        val = self._value.Width
50        return val
51    @width.setter
52    def width(self, val: float):
53        tmp = self._value
54        tmp.Width = val
55        self._value = tmp

Represents the size of an object with width and height.

Size(*args, **kwargs)
162        def __init__(self, *args, **kwargs):
163            pass
@staticmethod
def new(*args, **kwargs):
31    @staticmethod
32    def new(*args, **kwargs):
33        """Generic factory method for Size. Use overloads for IDE type hints."""
34        return Size(*args, **kwargs)

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

height: float
36    @property
37    def height(self) -> float:
38        """The height of the size."""
39        val = self._value.Height
40        return val

The height of the size.

width: float
46    @property
47    def width(self) -> float:
48        """The width of the size."""
49        val = self._value.Width
50        return val

The width of the size.