wallaroo.wallaroo_ml_ops_api_client.models.pipelines_deploy_json_body_models_item API documentation

# wallaroo.wallaroo_ml_ops_api_client.models.pipelines_deploy_json_body_models_item

View Source

     1from typing import Any, Dict, List, Type, TypeVar
     2
     3import attr
     4
     5T = TypeVar("T", bound="PipelinesDeployJsonBodyModelsItem")
     6
     7@attr.s(auto_attribs=True)
     8class PipelinesDeployJsonBodyModelsItem:
     9    """
    10    Attributes:
    11        name (str):
    12        version (str):
    13        sha (str):
    14    """
    15
    16    name: str
    17    version: str
    18    sha: str
    19    additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
    20
    21
    22    def to_dict(self) -> Dict[str, Any]:
    23        name = self.name
    24        version = self.version
    25        sha = self.sha
    26
    27        field_dict: Dict[str, Any] = {}
    28        field_dict.update(self.additional_properties)
    29        field_dict.update({
    30            "name": name,
    31            "version": version,
    32            "sha": sha,
    33        })
    34
    35        return field_dict
    36
    37
    38
    39    @classmethod
    40    def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
    41        d = src_dict.copy()
    42        name = d.pop("name")
    43
    44        version = d.pop("version")
    45
    46        sha = d.pop("sha")
    47
    48        pipelines_deploy_json_body_models_item = cls(
    49            name=name,
    50            version=version,
    51            sha=sha,
    52        )
    53
    54        pipelines_deploy_json_body_models_item.additional_properties = d
    55        return pipelines_deploy_json_body_models_item
    56
    57    @property
    58    def additional_keys(self) -> List[str]:
    59        return list(self.additional_properties.keys())
    60
    61    def __getitem__(self, key: str) -> Any:
    62        return self.additional_properties[key]
    63
    64    def __setitem__(self, key: str, value: Any) -> None:
    65        self.additional_properties[key] = value
    66
    67    def __delitem__(self, key: str) -> None:
    68        del self.additional_properties[key]
    69
    70    def __contains__(self, key: str) -> bool:
    71        return key in self.additional_properties

@attr.s(auto_attribs=True)
class PipelinesDeployJsonBodyModelsItem: View Source

     8@attr.s(auto_attribs=True)
     9class PipelinesDeployJsonBodyModelsItem:
    10    """
    11    Attributes:
    12        name (str):
    13        version (str):
    14        sha (str):
    15    """
    16
    17    name: str
    18    version: str
    19    sha: str
    20    additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
    21
    22
    23    def to_dict(self) -> Dict[str, Any]:
    24        name = self.name
    25        version = self.version
    26        sha = self.sha
    27
    28        field_dict: Dict[str, Any] = {}
    29        field_dict.update(self.additional_properties)
    30        field_dict.update({
    31            "name": name,
    32            "version": version,
    33            "sha": sha,
    34        })
    35
    36        return field_dict
    37
    38
    39
    40    @classmethod
    41    def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
    42        d = src_dict.copy()
    43        name = d.pop("name")
    44
    45        version = d.pop("version")
    46
    47        sha = d.pop("sha")
    48
    49        pipelines_deploy_json_body_models_item = cls(
    50            name=name,
    51            version=version,
    52            sha=sha,
    53        )
    54
    55        pipelines_deploy_json_body_models_item.additional_properties = d
    56        return pipelines_deploy_json_body_models_item
    57
    58    @property
    59    def additional_keys(self) -> List[str]:
    60        return list(self.additional_properties.keys())
    61
    62    def __getitem__(self, key: str) -> Any:
    63        return self.additional_properties[key]
    64
    65    def __setitem__(self, key: str, value: Any) -> None:
    66        self.additional_properties[key] = value
    67
    68    def __delitem__(self, key: str) -> None:
    69        del self.additional_properties[key]
    70
    71    def __contains__(self, key: str) -> bool:
    72        return key in self.additional_properties

Attributes: name (str): version (str): sha (str):

PipelinesDeployJsonBodyModelsItem(name: str, version: str, sha: str) View Source

    2def __init__(self, name, version, sha):
    3    self.name = name
    4    self.version = version
    5    self.sha = sha
    6    self.additional_properties = __attr_factory_additional_properties()

Method generated by attrs for class PipelinesDeployJsonBodyModelsItem.

def to_dict(self) -> Dict[str, Any]: View Source

    23    def to_dict(self) -> Dict[str, Any]:
    24        name = self.name
    25        version = self.version
    26        sha = self.sha
    27
    28        field_dict: Dict[str, Any] = {}
    29        field_dict.update(self.additional_properties)
    30        field_dict.update({
    31            "name": name,
    32            "version": version,
    33            "sha": sha,
    34        })
    35
    36        return field_dict

@classmethod
def from_dict(cls: Type[~T], src_dict: Dict[str, Any]) -> ~T: View Source

    40    @classmethod
    41    def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
    42        d = src_dict.copy()
    43        name = d.pop("name")
    44
    45        version = d.pop("version")
    46
    47        sha = d.pop("sha")
    48
    49        pipelines_deploy_json_body_models_item = cls(
    50            name=name,
    51            version=version,
    52            sha=sha,
    53        )
    54
    55        pipelines_deploy_json_body_models_item.additional_properties = d
    56        return pipelines_deploy_json_body_models_item

additional_keys: List[str]