
    ^6                     >    d Z ddlmZ ddlmZ ddlZ G d de      Zy)z
    Kubernetes

    No description provided (generated by Swagger Codegen
    https://github.com/swagger-api/swagger-codegen)

    OpenAPI spec version: v1.14.4

    Generated by: https://github.com/swagger-api/swagger-codegen.git
    )pformat)	iteritemsNc            
       N   e Zd ZdZ	 dddddddddd	Zdd	d
ddddddd	Z	 	 	 	 	 	 	 	 	 d*dZed        Zej                  d        Zed        Z
e
j                  d        Z
ed        Zej                  d        Zed        Zej                  d        Zed        Zej                  d        Zed        Zej                  d        Zed        Zej                  d         Zed!        Zej                  d"        Zed#        Zej                  d$        Zd% Zd& Zd' Zd( Zd) Zy)+V1SecurityContextzw
    NOTE: This class is auto generated by the swagger code generator program.
    Do not edit the class manually.
    boolV1CapabilitiesstrintV1SELinuxOptions)	allow_privilege_escalationcapabilities
privileged
proc_mountread_only_root_filesystemrun_as_grouprun_as_non_rootrun_as_userse_linux_optionsallowPrivilegeEscalationr   r   	procMountreadOnlyRootFilesystem
runAsGrouprunAsNonRoot	runAsUserseLinuxOptionsNc
                 4   d| _         d| _        d| _        d| _        d| _        d| _        d| _        d| _        d| _        d| _	        ||| _
        ||| _        ||| _        ||| _        ||| _        ||| _        ||| _        ||| _        |	|	| _        yy)z@
        V1SecurityContext - a model defined in Swagger
        N)_allow_privilege_escalation_capabilities_privileged_proc_mount_read_only_root_filesystem_run_as_group_run_as_non_root_run_as_user_se_linux_optionsdiscriminatorr   r   r   r   r   r   r   r   r   )
selfr   r   r   r   r   r   r   r   r   s
             ?lib/third_party/kubernetes/client/models/v1_security_context.py__init__zV1SecurityContext.__init__6   s     (,D$DDD&*D#D DD!DD!-(Bd%&d"do"do ,'@d$&d",d$d#.d $    c                     | j                   S )a  
        Gets the allow_privilege_escalation of this V1SecurityContext.
        AllowPrivilegeEscalation controls whether a process can gain more
        privileges than its parent process. This bool directly controls if the
        no_new_privs flag will be set on the container process.
        AllowPrivilegeEscalation is true always when the container is: 1) run as
        Privileged 2) has CAP_SYS_ADMIN

        :return: The allow_privilege_escalation of this V1SecurityContext.
        :rtype: bool
        r   r'   s    r(   r   z,V1SecurityContext.allow_privilege_escalationb   s     +++r*   c                     || _         y)a$  
        Sets the allow_privilege_escalation of this V1SecurityContext.
        AllowPrivilegeEscalation controls whether a process can gain more
        privileges than its parent process. This bool directly controls if the
        no_new_privs flag will be set on the container process.
        AllowPrivilegeEscalation is true always when the container is: 1) run as
        Privileged 2) has CAP_SYS_ADMIN

        :param allow_privilege_escalation: The allow_privilege_escalation of
        this V1SecurityContext.
        :type: bool
        Nr,   )r'   r   s     r(   r   z,V1SecurityContext.allow_privilege_escalationq   s     (BD$r*   c                     | j                   S )a3  
        Gets the capabilities of this V1SecurityContext.
        The capabilities to add/drop when running containers. Defaults to the
        default set of capabilities granted by the container runtime.

        :return: The capabilities of this V1SecurityContext.
        :rtype: V1Capabilities
        r   r-   s    r(   r   zV1SecurityContext.capabilities   s     r*   c                     || _         y)a>  
        Sets the capabilities of this V1SecurityContext.
        The capabilities to add/drop when running containers. Defaults to the
        default set of capabilities granted by the container runtime.

        :param capabilities: The capabilities of this V1SecurityContext.
        :type: V1Capabilities
        Nr0   )r'   r   s     r(   r   zV1SecurityContext.capabilities   s     &Dr*   c                     | j                   S )a)  
        Gets the privileged of this V1SecurityContext.
        Run container in privileged mode. Processes in privileged containers are
        essentially equivalent to root on the host. Defaults to false.

        :return: The privileged of this V1SecurityContext.
        :rtype: bool
        r   r-   s    r(   r   zV1SecurityContext.privileged   s     r*   c                     || _         y)a2  
        Sets the privileged of this V1SecurityContext.
        Run container in privileged mode. Processes in privileged containers are
        essentially equivalent to root on the host. Defaults to false.

        :param privileged: The privileged of this V1SecurityContext.
        :type: bool
        Nr3   )r'   r   s     r(   r   zV1SecurityContext.privileged   s     "Dr*   c                     | j                   S )a  
        Gets the proc_mount of this V1SecurityContext.
        procMount denotes the type of proc mount to use for the containers. The
        default is DefaultProcMount which uses the container runtime defaults
        for readonly paths and masked paths. This requires the ProcMountType
        feature flag to be enabled.

        :return: The proc_mount of this V1SecurityContext.
        :rtype: str
        r    r-   s    r(   r   zV1SecurityContext.proc_mount   s     r*   c                     || _         y)a  
        Sets the proc_mount of this V1SecurityContext.
        procMount denotes the type of proc mount to use for the containers. The
        default is DefaultProcMount which uses the container runtime defaults
        for readonly paths and masked paths. This requires the ProcMountType
        feature flag to be enabled.

        :param proc_mount: The proc_mount of this V1SecurityContext.
        :type: str
        Nr6   )r'   r   s     r(   r   zV1SecurityContext.proc_mount   s     "Dr*   c                     | j                   S )a	  
        Gets the read_only_root_filesystem of this V1SecurityContext.
        Whether this container has a read-only root filesystem. Default is
        false.

        :return: The read_only_root_filesystem of this V1SecurityContext.
        :rtype: bool
        r!   r-   s    r(   r   z+V1SecurityContext.read_only_root_filesystem   s     ***r*   c                     || _         y)a)  
        Sets the read_only_root_filesystem of this V1SecurityContext.
        Whether this container has a read-only root filesystem. Default is
        false.

        :param read_only_root_filesystem: The read_only_root_filesystem of this
        V1SecurityContext.
        :type: bool
        Nr9   )r'   r   s     r(   r   z+V1SecurityContext.read_only_root_filesystem   s     '@D#r*   c                     | j                   S )a  
        Gets the run_as_group of this V1SecurityContext.
        The GID to run the entrypoint of the container process. Uses runtime
        default if unset. May also be set in PodSecurityContext.  If set in both
        SecurityContext and PodSecurityContext, the value specified in
        SecurityContext takes precedence.

        :return: The run_as_group of this V1SecurityContext.
        :rtype: int
        r"   r-   s    r(   r   zV1SecurityContext.run_as_group   s     r*   c                     || _         y)a  
        Sets the run_as_group of this V1SecurityContext.
        The GID to run the entrypoint of the container process. Uses runtime
        default if unset. May also be set in PodSecurityContext.  If set in both
        SecurityContext and PodSecurityContext, the value specified in
        SecurityContext takes precedence.

        :param run_as_group: The run_as_group of this V1SecurityContext.
        :type: int
        Nr<   )r'   r   s     r(   r   zV1SecurityContext.run_as_group   s     &Dr*   c                     | j                   S )aq  
        Gets the run_as_non_root of this V1SecurityContext.
        Indicates that the container must run as a non-root user. If true, the
        Kubelet will validate the image at runtime to ensure that it does not
        run as UID 0 (root) and fail to start the container if it does. If unset
        or false, no such validation will be performed. May also be set in
        PodSecurityContext.  If set in both SecurityContext and
        PodSecurityContext, the value specified in SecurityContext takes
        precedence.

        :return: The run_as_non_root of this V1SecurityContext.
        :rtype: bool
        r#   r-   s    r(   r   z!V1SecurityContext.run_as_non_root  s        r*   c                     || _         y)a  
        Sets the run_as_non_root of this V1SecurityContext.
        Indicates that the container must run as a non-root user. If true, the
        Kubelet will validate the image at runtime to ensure that it does not
        run as UID 0 (root) and fail to start the container if it does. If unset
        or false, no such validation will be performed. May also be set in
        PodSecurityContext.  If set in both SecurityContext and
        PodSecurityContext, the value specified in SecurityContext takes
        precedence.

        :param run_as_non_root: The run_as_non_root of this V1SecurityContext.
        :type: bool
        Nr?   )r'   r   s     r(   r   z!V1SecurityContext.run_as_non_root  s      ,Dr*   c                     | j                   S )a  
        Gets the run_as_user of this V1SecurityContext.
        The UID to run the entrypoint of the container process. Defaults to user
        specified in image metadata if unspecified. May also be set in
        PodSecurityContext.  If set in both SecurityContext and
        PodSecurityContext, the value specified in SecurityContext takes
        precedence.

        :return: The run_as_user of this V1SecurityContext.
        :rtype: int
        r$   r-   s    r(   r   zV1SecurityContext.run_as_user+  s     r*   c                     || _         y)a  
        Sets the run_as_user of this V1SecurityContext.
        The UID to run the entrypoint of the container process. Defaults to user
        specified in image metadata if unspecified. May also be set in
        PodSecurityContext.  If set in both SecurityContext and
        PodSecurityContext, the value specified in SecurityContext takes
        precedence.

        :param run_as_user: The run_as_user of this V1SecurityContext.
        :type: int
        NrB   )r'   r   s     r(   r   zV1SecurityContext.run_as_user:  s     $Dr*   c                     | j                   S )a  
        Gets the se_linux_options of this V1SecurityContext.
        The SELinux context to be applied to the container. If unspecified, the
        container runtime will allocate a random SELinux context for each
        container.  May also be set in PodSecurityContext.  If set in both
        SecurityContext and PodSecurityContext, the value specified in
        SecurityContext takes precedence.

        :return: The se_linux_options of this V1SecurityContext.
        :rtype: V1SELinuxOptions
        r%   r-   s    r(   r   z"V1SecurityContext.se_linux_optionsJ  s     !!!r*   c                     || _         y)a  
        Sets the se_linux_options of this V1SecurityContext.
        The SELinux context to be applied to the container. If unspecified, the
        container runtime will allocate a random SELinux context for each
        container.  May also be set in PodSecurityContext.  If set in both
        SecurityContext and PodSecurityContext, the value specified in
        SecurityContext takes precedence.

        :param se_linux_options: The se_linux_options of this V1SecurityContext.
        :type: V1SELinuxOptions
        NrE   )r'   r   s     r(   r   z"V1SecurityContext.se_linux_optionsY  s     .Dr*   c                 j   i }t        | j                        D ]  \  }}t        | |      }t        |t              rt	        t        d |            ||<   <t        |d      r|j                         ||<   \t        |t              r(t        t        d |j                                     ||<   |||<    |S )z8
        Returns the model properties as a dict
        c                 >    t        | d      r| j                         S | S )Nto_dicthasattrrI   )xs    r(   <lambda>z+V1SecurityContext.to_dict.<locals>.<lambda>s  s    I)>!))+EAEr*   rI   c                 T    t        | d   d      r| d   | d   j                         fS | S )N   rI   r   rJ   )items    r(   rM   z+V1SecurityContext.to_dict.<locals>.<lambda>y  s6    47I. #1gtAw'89 9489r*   )
r   swagger_typesgetattr
isinstancelistmaprK   rI   dictitems)r'   resultattr_values        r(   rI   zV1SecurityContext.to_dicti  s     FT//0adD!e	E4	 EuMOt5)$}}teT"9:?++-IJt
 t 1 Mr*   c                 4    t        | j                               S )z@
        Returns the string representation of the model
        )r   rI   r-   s    r(   to_strzV1SecurityContext.to_str  s     4<<>""r*   c                 "    | j                         S )z*
        For `print` and `pprint`
        )r]   r-   s    r(   __repr__zV1SecurityContext.__repr__  s     ;;=r*   c                 V    t        |t              sy| j                  |j                  k(  S )z8
        Returns true if both objects are equal
        F)rS   r   __dict__r'   others     r(   __eq__zV1SecurityContext.__eq__  s%     e./==ENN**r*   c                     | |k(   S )z<
        Returns true if both objects are not equal
         rb   s     r(   __ne__zV1SecurityContext.__ne__  s     u}r*   )	NNNNNNNNN)__name__
__module____qualname____doc__rQ   attribute_mapr)   propertyr   setterr   r   r   r   r   r   r   r   rI   r]   r_   rd   rg   rf   r*   r(   r   r      s2    %+&#),
- %?$ #;"' *
- +/ )- # $*/X , , $$B %B  	 	 
& 
& 	 	 
" 
"   " " 	+ 	+ ##@ $@   & & ! !  , ,"   $ $ " " . ..#+r*   r   )rk   pprintr   sixr   reobjectr   rf   r*   r(   <module>rs      s#   	   	G Gr*   