kubernetes.client.models.v1_container_state_terminated module

Kubernetes

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)

The version of the OpenAPI document: release-1.36 Generated by OpenAPI Generator (https://openapi-generator.tech)

Do not edit the class manually.

class kubernetes.client.models.v1_container_state_terminated.V1ContainerStateTerminated(*, container_id: Annotated[str, Strict(strict=True)] | None = None, exit_code: Annotated[int, Strict(strict=True)], finished_at: datetime | None = None, message: Annotated[str, Strict(strict=True)] | None = None, reason: Annotated[str, Strict(strict=True)] | None = None, signal: Annotated[int, Strict(strict=True)] | None = None, started_at: datetime | None = None)

Bases: BaseModel

ContainerStateTerminated is a terminated state of a container.

Attributes:
openapi_types (dict): The key is attribute name

and the value is attribute type.

attribute_map (dict): The key is attribute name

and the value is json key in definition.

attribute_map: ClassVar[Dict[str, str]] = {'container_id': 'containerID', 'exit_code': 'exitCode', 'finished_at': 'finishedAt', 'message': 'message', 'reason': 'reason', 'signal': 'signal', 'started_at': 'startedAt'}
container_id: StrictStr | None
exit_code: StrictInt
finished_at: datetime | None
classmethod from_dict(obj: Dict[str, Any] | None) Self | None

Create an instance of V1ContainerStateTerminated from a dict

classmethod from_json(json_str: str) Self | None

Create an instance of V1ContainerStateTerminated from a JSON string

message: StrictStr | None
model_config = {'extra': 'forbid', 'protected_namespaces': (), 'validate_assignment': True, 'validate_by_alias': True, 'validate_by_name': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

openapi_types: ClassVar[Dict[str, str]] = {'container_id': 'str', 'exit_code': 'int', 'finished_at': 'datetime', 'message': 'str', 'reason': 'str', 'signal': 'int', 'started_at': 'datetime'}
reason: StrictStr | None
signal: StrictInt | None
started_at: datetime | None
to_dict(serialize: bool = False) Dict[str, Any]

Return all declared model fields using public or wire names.

to_json() str

Returns the JSON representation of the model using alias

to_str() str

Returns the string representation of the model