o
    ɶdR|                     @   s8   d dl mZmZmZ d dlmZ eG dd deZdS )    )formatted_flat_dictNONE_SENTINEL#value_allowed_none_or_none_sentinel)init_model_state_from_kwargsc                   @   s  e Zd ZdZdZdZdZdZdZdZ	dZ
d	d
 Zedd Zejdd Zedd Zejdd Zedd Zejdd Zedd Zejdd Zedd Zejdd Zedd Zejdd Zedd Zejdd Zed d! Zejd"d! Zed#d$ Zejd%d$ Zed&d' Zejd(d' Zed)d* Zejd+d* Zed,d- Zejd.d- Zed/d0 Zejd1d0 Zed2d3 Zejd4d3 Zed5d6 Zejd7d6 Zed8d9 Zejd:d9 Zed;d< Zejd=d< Zed>d? Zejd@d? ZedAdB Z e jdCdB Z edDdE Z!e!jdFdE Z!edGdH Z"e"jdIdH Z"edJdK Z#e#jdLdK Z#edMdN Z$e$jdOdN Z$edPdQ Z%e%jdRdQ Z%edSdT Z&e&jdUdT Z&dVdW Z'dXdY Z(dZd[ Z)d\S )]	Containerz
    A single container on a container instance.

    If you delete a container, the record remains visible for a short period
    of time before being permanently removed.
    CREATINGUPDATINGACTIVEINACTIVEDELETINGDELETEDFAILEDc              
   K   s  i ddddddddddd	dd
dddddddddddddddddddddddddddddd| _ i dddddddddd d	d!d
d"dd#dd$dd%dd&dd'dd(dd)dd*dd+ddd,d-d.d/d0d1d2d3d| _d4| _d4| _d4| _d4| _d4| _d4| _d4| _d4| _	d4| _
d4| _d4| _d4| _d4| _d4| _d4| _d4| _d4| _d4| _d4| _d4| _d4| _d4| _d4| _d4| _d4| _d4S )5aM  
        Initializes a new Container object with values from keyword arguments.
        The following keyword arguments are supported (corresponding to the getters/setters of this class):

        :param id:
            The value to assign to the id property of this Container.
        :type id: str

        :param display_name:
            The value to assign to the display_name property of this Container.
        :type display_name: str

        :param compartment_id:
            The value to assign to the compartment_id property of this Container.
        :type compartment_id: str

        :param freeform_tags:
            The value to assign to the freeform_tags property of this Container.
        :type freeform_tags: dict(str, str)

        :param defined_tags:
            The value to assign to the defined_tags property of this Container.
        :type defined_tags: dict(str, dict(str, object))

        :param system_tags:
            The value to assign to the system_tags property of this Container.
        :type system_tags: dict(str, dict(str, object))

        :param availability_domain:
            The value to assign to the availability_domain property of this Container.
        :type availability_domain: str

        :param fault_domain:
            The value to assign to the fault_domain property of this Container.
        :type fault_domain: str

        :param lifecycle_state:
            The value to assign to the lifecycle_state property of this Container.
            Allowed values for this property are: "CREATING", "UPDATING", "ACTIVE", "INACTIVE", "DELETING", "DELETED", "FAILED", 'UNKNOWN_ENUM_VALUE'.
            Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
        :type lifecycle_state: str

        :param lifecycle_details:
            The value to assign to the lifecycle_details property of this Container.
        :type lifecycle_details: str

        :param exit_code:
            The value to assign to the exit_code property of this Container.
        :type exit_code: int

        :param time_terminated:
            The value to assign to the time_terminated property of this Container.
        :type time_terminated: datetime

        :param time_created:
            The value to assign to the time_created property of this Container.
        :type time_created: datetime

        :param time_updated:
            The value to assign to the time_updated property of this Container.
        :type time_updated: datetime

        :param container_instance_id:
            The value to assign to the container_instance_id property of this Container.
        :type container_instance_id: str

        :param image_url:
            The value to assign to the image_url property of this Container.
        :type image_url: str

        :param command:
            The value to assign to the command property of this Container.
        :type command: list[str]

        :param arguments:
            The value to assign to the arguments property of this Container.
        :type arguments: list[str]

        :param working_directory:
            The value to assign to the working_directory property of this Container.
        :type working_directory: str

        :param environment_variables:
            The value to assign to the environment_variables property of this Container.
        :type environment_variables: dict(str, str)

        :param volume_mounts:
            The value to assign to the volume_mounts property of this Container.
        :type volume_mounts: list[oci.container_instances.models.VolumeMount]

        :param health_checks:
            The value to assign to the health_checks property of this Container.
        :type health_checks: list[oci.container_instances.models.ContainerHealthCheck]

        :param is_resource_principal_disabled:
            The value to assign to the is_resource_principal_disabled property of this Container.
        :type is_resource_principal_disabled: bool

        :param resource_config:
            The value to assign to the resource_config property of this Container.
        :type resource_config: oci.container_instances.models.ContainerResourceConfig

        :param container_restart_attempt_count:
            The value to assign to the container_restart_attempt_count property of this Container.
        :type container_restart_attempt_count: int

        idstrdisplay_namecompartment_idfreeform_tagszdict(str, str)defined_tagszdict(str, dict(str, object))system_tagsavailability_domainfault_domainlifecycle_statelifecycle_details	exit_codeinttime_terminateddatetimetime_createdtime_updatedcontainer_instance_id	image_urlcommandz	list[str]zlist[VolumeMount]zlist[ContainerHealthCheck]boolZContainerResourceConfig)	argumentsworking_directoryenvironment_variablesvolume_mountshealth_checksis_resource_principal_disabledresource_configcontainer_restart_attempt_countZdisplayNameZcompartmentIdZfreeformTagsZdefinedTagsZ
systemTagsZavailabilityDomainZfaultDomainZlifecycleStateZlifecycleDetailsZexitCodeZtimeTerminatedZtimeCreatedZtimeUpdatedZcontainerInstanceIdZimageUrlr#   ZworkingDirectoryZenvironmentVariablesZvolumeMountsZhealthChecksZisResourcePrincipalDisabledZresourceConfigZcontainerRestartAttemptCountN)Zswagger_typesZattribute_map_id_display_name_compartment_id_freeform_tags_defined_tags_system_tags_availability_domain_fault_domain_lifecycle_state_lifecycle_details
_exit_code_time_terminated_time_created_time_updated_container_instance_id
_image_url_command
_arguments_working_directory_environment_variables_volume_mounts_health_checks_is_resource_principal_disabled_resource_config _container_restart_attempt_count)selfkwargs rF   Lusr/lib/python3.10/site-packages/oci/container_instances/models/container.py__init__1   s   l	

	


zContainer.__init__c                 C      | j S )z
        **[Required]** Gets the id of this Container.
        The `OCID`__ of the container.

        __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm


        :return: The id of this Container.
        :rtype: str
        r+   rD   rF   rF   rG   r         zContainer.idc                 C   
   || _ dS )z
        Sets the id of this Container.
        The `OCID`__ of the container.

        __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm


        :param id: The id of this Container.
        :type: str
        NrJ   )rD   r   rF   rF   rG   r         
c                 C   rI   )a  
        **[Required]** Gets the display_name of this Container.
        A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.


        :return: The display_name of this Container.
        :rtype: str
        r,   rK   rF   rF   rG   r        
zContainer.display_namec                 C   rM   )a  
        Sets the display_name of this Container.
        A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.


        :param display_name: The display_name of this Container.
        :type: str
        NrO   )rD   r   rF   rF   rG   r        

c                 C   rI   )z
        **[Required]** Gets the compartment_id of this Container.
        The OCID of the compartment that contains the container.


        :return: The compartment_id of this Container.
        :rtype: str
        r-   rK   rF   rF   rG   r   #  rP   zContainer.compartment_idc                 C   rM   )z
        Sets the compartment_id of this Container.
        The OCID of the compartment that contains the container.


        :param compartment_id: The compartment_id of this Container.
        :type: str
        NrR   )rD   r   rF   rF   rG   r   /  rQ   c                 C   rI   )a9  
        Gets the freeform_tags of this Container.
        Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only.
        Example: `{"bar-key": "value"}`


        :return: The freeform_tags of this Container.
        :rtype: dict(str, str)
        r.   rK   rF   rF   rG   r   ;     zContainer.freeform_tagsc                 C   rM   )aE  
        Sets the freeform_tags of this Container.
        Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only.
        Example: `{"bar-key": "value"}`


        :param freeform_tags: The freeform_tags of this Container.
        :type: dict(str, str)
        NrS   )rD   r   rF   rF   rG   r   H     
c                 C   rI   )a4  
        Gets the defined_tags of this Container.
        Defined tags for this resource. Each key is predefined and scoped to a namespace.
        Example: `{"foo-namespace": {"bar-key": "value"}}`.


        :return: The defined_tags of this Container.
        :rtype: dict(str, dict(str, object))
        r/   rK   rF   rF   rG   r   U  rT   zContainer.defined_tagsc                 C   rM   )a?  
        Sets the defined_tags of this Container.
        Defined tags for this resource. Each key is predefined and scoped to a namespace.
        Example: `{"foo-namespace": {"bar-key": "value"}}`.


        :param defined_tags: The defined_tags of this Container.
        :type: dict(str, dict(str, object))
        NrV   )rD   r   rF   rF   rG   r   b  rU   c                 C   rI   )a1  
        Gets the system_tags of this Container.
        Usage of system tag keys. These predefined keys are scoped to namespaces.
        Example: `{"orcl-cloud": {"free-tier-retained": "true"}}`.


        :return: The system_tags of this Container.
        :rtype: dict(str, dict(str, object))
        r0   rK   rF   rF   rG   r   o  rT   zContainer.system_tagsc                 C   rM   )a;  
        Sets the system_tags of this Container.
        Usage of system tag keys. These predefined keys are scoped to namespaces.
        Example: `{"orcl-cloud": {"free-tier-retained": "true"}}`.


        :param system_tags: The system_tags of this Container.
        :type: dict(str, dict(str, object))
        NrW   )rD   r   rF   rF   rG   r   |  rU   c                 C   rI   )z
        **[Required]** Gets the availability_domain of this Container.
        The availability domain where the container instance that hosts the container runs.


        :return: The availability_domain of this Container.
        :rtype: str
        r1   rK   rF   rF   rG   r     rP   zContainer.availability_domainc                 C   rM   )a  
        Sets the availability_domain of this Container.
        The availability domain where the container instance that hosts the container runs.


        :param availability_domain: The availability_domain of this Container.
        :type: str
        NrX   )rD   r   rF   rF   rG   r     rQ   c                 C   rI   )z
        Gets the fault_domain of this Container.
        The fault domain of the container instance that hosts the container runs.


        :return: The fault_domain of this Container.
        :rtype: str
        r2   rK   rF   rF   rG   r     rP   zContainer.fault_domainc                 C   rM   )z
        Sets the fault_domain of this Container.
        The fault domain of the container instance that hosts the container runs.


        :param fault_domain: The fault_domain of this Container.
        :type: str
        NrY   )rD   r   rF   rF   rG   r     rQ   c                 C   rI   )a  
        **[Required]** Gets the lifecycle_state of this Container.
        The current state of the container.

        Allowed values for this property are: "CREATING", "UPDATING", "ACTIVE", "INACTIVE", "DELETING", "DELETED", "FAILED", 'UNKNOWN_ENUM_VALUE'.
        Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.


        :return: The lifecycle_state of this Container.
        :rtype: str
        )r3   rK   rF   rF   rG   r        zContainer.lifecycle_statec                 C   s    g d}t ||sd}|| _dS )z
        Sets the lifecycle_state of this Container.
        The current state of the container.


        :param lifecycle_state: The lifecycle_state of this Container.
        :type: str
        )r   r   r	   r
   r   r   r   ZUNKNOWN_ENUM_VALUEN)r   r3   )rD   r   Zallowed_valuesrF   rF   rG   r     s   


c                 C   rI   )a  
        Gets the lifecycle_details of this Container.
        A message that describes the current state of the container in more detail. Can be used to provide
        actionable information.


        :return: The lifecycle_details of this Container.
        :rtype: str
        r4   rK   rF   rF   rG   r     rT   zContainer.lifecycle_detailsc                 C   rM   )a*  
        Sets the lifecycle_details of this Container.
        A message that describes the current state of the container in more detail. Can be used to provide
        actionable information.


        :param lifecycle_details: The lifecycle_details of this Container.
        :type: str
        Nr[   )rD   r   rF   rF   rG   r     rU   c                 C   rI   )z
        Gets the exit_code of this Container.
        The exit code of the container process when it stopped running.


        :return: The exit_code of this Container.
        :rtype: int
        r5   rK   rF   rF   rG   r     rP   zContainer.exit_codec                 C   rM   )z
        Sets the exit_code of this Container.
        The exit code of the container process when it stopped running.


        :param exit_code: The exit_code of this Container.
        :type: int
        Nr\   )rD   r   rF   rF   rG   r     rQ   c                 C   rI   )a%  
        Gets the time_terminated of this Container.
        The time when the container last deleted (terminated), in the format defined by `RFC 3339`__.

        __ https://tools.ietf.org/rfc/rfc3339


        :return: The time_terminated of this Container.
        :rtype: datetime
        r6   rK   rF   rF   rG   r   	  rL   zContainer.time_terminatedc                 C   rM   )a3  
        Sets the time_terminated of this Container.
        The time when the container last deleted (terminated), in the format defined by `RFC 3339`__.

        __ https://tools.ietf.org/rfc/rfc3339


        :param time_terminated: The time_terminated of this Container.
        :type: datetime
        Nr]   )rD   r   rF   rF   rG   r     rN   c                 C   rI   )a  
        **[Required]** Gets the time_created of this Container.
        The time the container was created, in the format defined by `RFC 3339`__.

        __ https://tools.ietf.org/rfc/rfc3339


        :return: The time_created of this Container.
        :rtype: datetime
        r7   rK   rF   rF   rG   r   %  rL   zContainer.time_createdc                 C   rM   )a  
        Sets the time_created of this Container.
        The time the container was created, in the format defined by `RFC 3339`__.

        __ https://tools.ietf.org/rfc/rfc3339


        :param time_created: The time_created of this Container.
        :type: datetime
        Nr^   )rD   r   rF   rF   rG   r   3  rN   c                 C   rI   )a  
        Gets the time_updated of this Container.
        The time the container was updated, in the format defined by `RFC 3339`__.

        __ https://tools.ietf.org/rfc/rfc3339


        :return: The time_updated of this Container.
        :rtype: datetime
        r8   rK   rF   rF   rG   r   A  rL   zContainer.time_updatedc                 C   rM   )a  
        Sets the time_updated of this Container.
        The time the container was updated, in the format defined by `RFC 3339`__.

        __ https://tools.ietf.org/rfc/rfc3339


        :param time_updated: The time_updated of this Container.
        :type: datetime
        Nr_   )rD   r   rF   rF   rG   r   O  rN   c                 C   rI   )aO  
        **[Required]** Gets the container_instance_id of this Container.
        The `OCID`__ of the container instance that the container is running on.

        __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm


        :return: The container_instance_id of this Container.
        :rtype: str
        r9   rK   rF   rF   rG   r   ]  rL   zContainer.container_instance_idc                 C   rM   )aT  
        Sets the container_instance_id of this Container.
        The `OCID`__ of the container instance that the container is running on.

        __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm


        :param container_instance_id: The container_instance_id of this Container.
        :type: str
        Nr`   )rD   r   rF   rF   rG   r   k  rN   c                 C   rI   )a|  
        **[Required]** Gets the image_url of this Container.
        The container image information. Currently only supports public Docker registry.

        You can provide either the image name (containerImage), image name with version (containerImagev1), or complete Docker image URL
        `docker.io/library/containerImage:latest`.

        If you do not provide a registry, the registry defaults to public Docker hub `docker.io/library`.
        The registry used for the container image must be reachable over the VNIC of the container instance.


        :return: The image_url of this Container.
        :rtype: str
        r:   rK   rF   rF   rG   r    y  s   zContainer.image_urlc                 C   rM   )au  
        Sets the image_url of this Container.
        The container image information. Currently only supports public Docker registry.

        You can provide either the image name (containerImage), image name with version (containerImagev1), or complete Docker image URL
        `docker.io/library/containerImage:latest`.

        If you do not provide a registry, the registry defaults to public Docker hub `docker.io/library`.
        The registry used for the container image must be reachable over the VNIC of the container instance.


        :param image_url: The image_url of this Container.
        :type: str
        Nra   )rD   r    rF   rF   rG   r      s   
c                 C   rI   )a6  
        Gets the command of this Container.
        This command overrides ENTRYPOINT process of the container.
        If you do not specify this command, the existing ENTRYPOINT process defined in the image is the default.


        :return: The command of this Container.
        :rtype: list[str]
        r;   rK   rF   rF   rG   r!     rT   zContainer.commandc                 C   rM   )a<  
        Sets the command of this Container.
        This command overrides ENTRYPOINT process of the container.
        If you do not specify this command, the existing ENTRYPOINT process defined in the image is the default.


        :param command: The command of this Container.
        :type: list[str]
        Nrb   )rD   r!   rF   rF   rG   r!     rU   c                 C   rI   )a  
        Gets the arguments of this Container.
        A list of string arguments for the ENTRYPOINT process of the container.

        Many containers use an ENTRYPOINT process pointing to a shell
        `/bin/bash`. For those containers, you can use the argument list to specify the main command in the container process.


        :return: The arguments of this Container.
        :rtype: list[str]
        r<   rK   rF   rF   rG   r#     rZ   zContainer.argumentsc                 C   rM   )a  
        Sets the arguments of this Container.
        A list of string arguments for the ENTRYPOINT process of the container.

        Many containers use an ENTRYPOINT process pointing to a shell
        `/bin/bash`. For those containers, you can use the argument list to specify the main command in the container process.


        :param arguments: The arguments of this Container.
        :type: list[str]
        Nrc   )rD   r#   rF   rF   rG   r#        
c                 C   rI   )aB  
        Gets the working_directory of this Container.
        The working directory within the container's filesystem for
        the container process. If not specified, the default
        working directory from the image is used.


        :return: The working_directory of this Container.
        :rtype: str
        r=   rK   rF   rF   rG   r$     rL   zContainer.working_directoryc                 C   rM   )aR  
        Sets the working_directory of this Container.
        The working directory within the container's filesystem for
        the container process. If not specified, the default
        working directory from the image is used.


        :param working_directory: The working_directory of this Container.
        :type: str
        Nre   )rD   r$   rF   rF   rG   r$     rN   c                 C   rI   )a  
        Gets the environment_variables of this Container.
        A map of additional environment variables to set in the environment of the
        ENTRYPOINT process of the container. These variables are in addition to any variables already defined
        in the container's image.


        :return: The environment_variables of this Container.
        :rtype: dict(str, str)
        r>   rK   rF   rF   rG   r%     rL   zContainer.environment_variablesc                 C   rM   )a  
        Sets the environment_variables of this Container.
        A map of additional environment variables to set in the environment of the
        ENTRYPOINT process of the container. These variables are in addition to any variables already defined
        in the container's image.


        :param environment_variables: The environment_variables of this Container.
        :type: dict(str, str)
        Nrf   )rD   r%   rF   rF   rG   r%     rN   c                 C   rI   )z
        Gets the volume_mounts of this Container.
        List of the volume mounts.


        :return: The volume_mounts of this Container.
        :rtype: list[oci.container_instances.models.VolumeMount]
        r?   rK   rF   rF   rG   r&     rP   zContainer.volume_mountsc                 C   rM   )z
        Sets the volume_mounts of this Container.
        List of the volume mounts.


        :param volume_mounts: The volume_mounts of this Container.
        :type: list[oci.container_instances.models.VolumeMount]
        Nrg   )rD   r&   rF   rF   rG   r&     rQ   c                 C   rI   )z
        Gets the health_checks of this Container.
        List of container health checks


        :return: The health_checks of this Container.
        :rtype: list[oci.container_instances.models.ContainerHealthCheck]
        r@   rK   rF   rF   rG   r'   %  rP   zContainer.health_checksc                 C   rM   )z
        Sets the health_checks of this Container.
        List of container health checks


        :param health_checks: The health_checks of this Container.
        :type: list[oci.container_instances.models.ContainerHealthCheck]
        Nrh   )rD   r'   rF   rF   rG   r'   1  rQ   c                 C   rI   )a)  
        Gets the is_resource_principal_disabled of this Container.
        Determines if the container will have access to the container instance resource principal.

        This method utilizes resource principal version 2.2. For more information on how to use the exposed resource principal elements, see
        https://docs.oracle.com/en-us/iaas/Content/API/Concepts/sdk_authentication_methods.htm#sdk_authentication_methods_resource_principal.


        :return: The is_resource_principal_disabled of this Container.
        :rtype: bool
        rA   rK   rF   rF   rG   r(   =  rZ   z(Container.is_resource_principal_disabledc                 C   rM   )aF  
        Sets the is_resource_principal_disabled of this Container.
        Determines if the container will have access to the container instance resource principal.

        This method utilizes resource principal version 2.2. For more information on how to use the exposed resource principal elements, see
        https://docs.oracle.com/en-us/iaas/Content/API/Concepts/sdk_authentication_methods.htm#sdk_authentication_methods_resource_principal.


        :param is_resource_principal_disabled: The is_resource_principal_disabled of this Container.
        :type: bool
        Nri   )rD   r(   rF   rF   rG   r(   L  rd   c                 C   rI   )z
        Gets the resource_config of this Container.

        :return: The resource_config of this Container.
        :rtype: oci.container_instances.models.ContainerResourceConfig
        rB   rK   rF   rF   rG   r)   [  s   zContainer.resource_configc                 C   rM   )z
        Sets the resource_config of this Container.

        :param resource_config: The resource_config of this Container.
        :type: oci.container_instances.models.ContainerResourceConfig
        Nrj   )rD   r)   rF   rF   rG   r)   e  s   
c                 C   rI   )aM  
        Gets the container_restart_attempt_count of this Container.
        The number of container restart attempts. Depending on the restart policy, a restart might be attempted after a health check failure or a container exit.


        :return: The container_restart_attempt_count of this Container.
        :rtype: int
        rC   rK   rF   rF   rG   r*   o  rP   z)Container.container_restart_attempt_countc                 C   rM   )ak  
        Sets the container_restart_attempt_count of this Container.
        The number of container restart attempts. Depending on the restart policy, a restart might be attempted after a health check failure or a container exit.


        :param container_restart_attempt_count: The container_restart_attempt_count of this Container.
        :type: int
        Nrk   )rD   r*   rF   rF   rG   r*   {  rQ   c                 C   s   t | S N)r   rK   rF   rF   rG   __repr__  s   zContainer.__repr__c                 C   s   |d u rdS | j |j kS )NF)__dict__rD   otherrF   rF   rG   __eq__  s   zContainer.__eq__c                 C   s
   | |k S rl   rF   ro   rF   rF   rG   __ne__  s   
zContainer.__ne__N)*__name__
__module____qualname____doc__ZLIFECYCLE_STATE_CREATINGZLIFECYCLE_STATE_UPDATINGZLIFECYCLE_STATE_ACTIVEZLIFECYCLE_STATE_INACTIVEZLIFECYCLE_STATE_DELETINGZLIFECYCLE_STATE_DELETEDZLIFECYCLE_STATE_FAILEDrH   propertyr   setterr   r   r   r   r   r   r   r   r   r   r   r   r   r   r    r!   r#   r$   r%   r&   r'   r(   r)   r*   rm   rq   rr   rF   rF   rF   rG   r      s    	 ?














































	
	

r   N)Zoci.utilr   r   r   Zoci.decoratorsr   objectr   rF   rF   rF   rG   <module>   s   