wallaroo.wallaroo_ml_ops_api_client.models.models_upload_stream_response_200 API documentation

# wallaroo.wallaroo_ml_ops_api_client.models.models_upload_stream_response_200

View Source

     1from typing import Any, Dict, List, Type, TypeVar, Union
     2
     3import attr
     4
     5from ..models.models_upload_stream_response_200_insert_models import \
     6    ModelsUploadStreamResponse200InsertModels
     7from ..types import UNSET, Unset
     8
     9T = TypeVar("T", bound="ModelsUploadStreamResponse200")
    10
    11@attr.s(auto_attribs=True)
    12class ModelsUploadStreamResponse200:
    13    """ Successful response to model upload.
    14
    15    Attributes:
    16        insert_models (Union[Unset, None, ModelsUploadStreamResponse200InsertModels]):  Response payload wrapper.
    17    """
    18
    19    insert_models: Union[Unset, None, ModelsUploadStreamResponse200InsertModels] = UNSET
    20    additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
    21
    22
    23    def to_dict(self) -> Dict[str, Any]:
    24        insert_models: Union[Unset, None, Dict[str, Any]] = UNSET
    25        if not isinstance(self.insert_models, Unset):
    26            insert_models = self.insert_models.to_dict() if self.insert_models else None
    27
    28
    29        field_dict: Dict[str, Any] = {}
    30        field_dict.update(self.additional_properties)
    31        field_dict.update({
    32        })
    33        if insert_models is not UNSET:
    34            field_dict["insert_models"] = insert_models
    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        _insert_models = d.pop("insert_models", UNSET)
    44        insert_models: Union[Unset, None, ModelsUploadStreamResponse200InsertModels]
    45        if _insert_models is None:
    46            insert_models = None
    47        elif isinstance(_insert_models,  Unset):
    48            insert_models = UNSET
    49        else:
    50            insert_models = ModelsUploadStreamResponse200InsertModels.from_dict(_insert_models)
    51
    52
    53
    54
    55        models_upload_stream_response_200 = cls(
    56            insert_models=insert_models,
    57        )
    58
    59        models_upload_stream_response_200.additional_properties = d
    60        return models_upload_stream_response_200
    61
    62    @property
    63    def additional_keys(self) -> List[str]:
    64        return list(self.additional_properties.keys())
    65
    66    def __getitem__(self, key: str) -> Any:
    67        return self.additional_properties[key]
    68
    69    def __setitem__(self, key: str, value: Any) -> None:
    70        self.additional_properties[key] = value
    71
    72    def __delitem__(self, key: str) -> None:
    73        del self.additional_properties[key]
    74
    75    def __contains__(self, key: str) -> bool:
    76        return key in self.additional_properties

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

    12@attr.s(auto_attribs=True)
    13class ModelsUploadStreamResponse200:
    14    """ Successful response to model upload.
    15
    16    Attributes:
    17        insert_models (Union[Unset, None, ModelsUploadStreamResponse200InsertModels]):  Response payload wrapper.
    18    """
    19
    20    insert_models: Union[Unset, None, ModelsUploadStreamResponse200InsertModels] = UNSET
    21    additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
    22
    23
    24    def to_dict(self) -> Dict[str, Any]:
    25        insert_models: Union[Unset, None, Dict[str, Any]] = UNSET
    26        if not isinstance(self.insert_models, Unset):
    27            insert_models = self.insert_models.to_dict() if self.insert_models else None
    28
    29
    30        field_dict: Dict[str, Any] = {}
    31        field_dict.update(self.additional_properties)
    32        field_dict.update({
    33        })
    34        if insert_models is not UNSET:
    35            field_dict["insert_models"] = insert_models
    36
    37        return field_dict
    38
    39
    40
    41    @classmethod
    42    def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
    43        d = src_dict.copy()
    44        _insert_models = d.pop("insert_models", UNSET)
    45        insert_models: Union[Unset, None, ModelsUploadStreamResponse200InsertModels]
    46        if _insert_models is None:
    47            insert_models = None
    48        elif isinstance(_insert_models,  Unset):
    49            insert_models = UNSET
    50        else:
    51            insert_models = ModelsUploadStreamResponse200InsertModels.from_dict(_insert_models)
    52
    53
    54
    55
    56        models_upload_stream_response_200 = cls(
    57            insert_models=insert_models,
    58        )
    59
    60        models_upload_stream_response_200.additional_properties = d
    61        return models_upload_stream_response_200
    62
    63    @property
    64    def additional_keys(self) -> List[str]:
    65        return list(self.additional_properties.keys())
    66
    67    def __getitem__(self, key: str) -> Any:
    68        return self.additional_properties[key]
    69
    70    def __setitem__(self, key: str, value: Any) -> None:
    71        self.additional_properties[key] = value
    72
    73    def __delitem__(self, key: str) -> None:
    74        del self.additional_properties[key]
    75
    76    def __contains__(self, key: str) -> bool:
    77        return key in self.additional_properties

Successful response to model upload.

Attributes: insert_models (Union[Unset, None, ModelsUploadStreamResponse200InsertModels]): Response payload wrapper.

ModelsUploadStreamResponse200( insert_models: Union[wallaroo.wallaroo_ml_ops_api_client.types.Unset, NoneType, wallaroo.wallaroo_ml_ops_api_client.models.models_upload_stream_response_200_insert_models.ModelsUploadStreamResponse200InsertModels] = <wallaroo.wallaroo_ml_ops_api_client.types.Unset object>) View Source

    2def __init__(self, insert_models=attr_dict['insert_models'].default):
    3    self.insert_models = insert_models
    4    self.additional_properties = __attr_factory_additional_properties()

Method generated by attrs for class ModelsUploadStreamResponse200.

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

    24    def to_dict(self) -> Dict[str, Any]:
    25        insert_models: Union[Unset, None, Dict[str, Any]] = UNSET
    26        if not isinstance(self.insert_models, Unset):
    27            insert_models = self.insert_models.to_dict() if self.insert_models else None
    28
    29
    30        field_dict: Dict[str, Any] = {}
    31        field_dict.update(self.additional_properties)
    32        field_dict.update({
    33        })
    34        if insert_models is not UNSET:
    35            field_dict["insert_models"] = insert_models
    36
    37        return field_dict

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

    41    @classmethod
    42    def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
    43        d = src_dict.copy()
    44        _insert_models = d.pop("insert_models", UNSET)
    45        insert_models: Union[Unset, None, ModelsUploadStreamResponse200InsertModels]
    46        if _insert_models is None:
    47            insert_models = None
    48        elif isinstance(_insert_models,  Unset):
    49            insert_models = UNSET
    50        else:
    51            insert_models = ModelsUploadStreamResponse200InsertModels.from_dict(_insert_models)
    52
    53
    54
    55
    56        models_upload_stream_response_200 = cls(
    57            insert_models=insert_models,
    58        )
    59
    60        models_upload_stream_response_200.additional_properties = d
    61        return models_upload_stream_response_200

additional_keys: List[str]