ruạṛ
a ���f� � @ sD d dl mZ ddlmZmZmZ ddlmZ eG dd� de��ZdS )� )�SecurityContext� )�formatted_flat_dict� NONE_SENTINEL�#value_allowed_none_or_none_sentinel)�init_model_state_from_kwargsc @ s� e Zd ZdZdd� Zedd� �Zejdd� �Zedd� �Zejd d� �Zed d� �Z e jdd� �Z ed d� �Z e jdd� �Z edd� �Zejdd� �Zdd� Zdd� Z dd� ZdS )�LinuxSecurityContextz/ Security context for Linux container. c K sV ddddddd�| _ dddd d dd�| _d| _d| _d| _d| _d| _d| _d | _dS )a Initializes a new LinuxSecurityContext object with values from keyword arguments. The default value of the :py:attr:`~oci.container_instances.models.LinuxSecurityContext.security_context_type` attribute of this class is ``LINUX`` and it should not be changed. The following keyword arguments are supported (corresponding to the getters/setters of this class): :param security_context_type: The value to assign to the security_context_type property of this LinuxSecurityContext. Allowed values for this property are: "LINUX" :type security_context_type: str :param run_as_user: The value to assign to the run_as_user property of this LinuxSecurityContext. :type run_as_user: int :param run_as_group: The value to assign to the run_as_group property of this LinuxSecurityContext. :type run_as_group: int :param is_non_root_user_check_enabled: The value to assign to the is_non_root_user_check_enabled property of this LinuxSecurityContext. :type is_non_root_user_check_enabled: bool :param is_root_file_system_readonly: The value to assign to the is_root_file_system_readonly property of this LinuxSecurityContext. :type is_root_file_system_readonly: bool :param capabilities: The value to assign to the capabilities property of this LinuxSecurityContext. :type capabilities: oci.container_instances.models.ContainerCapabilities �str�int�boolZContainerCapabilities)Zsecurity_context_type�run_as_user�run_as_group�is_non_root_user_check_enabled�is_root_file_system_readonly�capabilitiesZsecurityContextTypeZ runAsUserZ runAsGroupZisNonRootUserCheckEnabledZisRootFileSystemReadonlyr NZLINUX)Z swagger_typesZ attribute_mapZ_security_context_type�_run_as_user� _run_as_group�_is_non_root_user_check_enabled�_is_root_file_system_readonly� _capabilities)�self�kwargs� r �Y/usr/lib/python3.9/site-packages/oci/container_instances/models/linux_security_context.py�__init__ s* !� � zLinuxSecurityContext.__init__c C s | j S )a` Gets the run_as_user of this LinuxSecurityContext. The user ID (UID) to run the entrypoint process of the container. Defaults to user specified UID in container image metadata if not provided. This must be provided if runAsGroup is provided. :return: The run_as_user of this LinuxSecurityContext. :rtype: int �r �r r r r r L s z LinuxSecurityContext.run_as_userc C s || _ dS )aj Sets the run_as_user of this LinuxSecurityContext. The user ID (UID) to run the entrypoint process of the container. Defaults to user specified UID in container image metadata if not provided. This must be provided if runAsGroup is provided. :param run_as_user: The run_as_user of this LinuxSecurityContext. :type: int Nr )r r r r r r X s c C s | j S )a Gets the run_as_group of this LinuxSecurityContext. The group ID (GID) to run the entrypoint process of the container. Uses runtime default if not provided. :return: The run_as_group of this LinuxSecurityContext. :rtype: int �r r r r r r d s z!LinuxSecurityContext.run_as_groupc C s || _ dS )a Sets the run_as_group of this LinuxSecurityContext. The group ID (GID) to run the entrypoint process of the container. Uses runtime default if not provided. :param run_as_group: The run_as_group of this LinuxSecurityContext. :type: int Nr )r r r r r r p s c C s | j S )a� Gets the is_non_root_user_check_enabled of this LinuxSecurityContext. Indicates if the container must run as a non-root user. If true, the service validates the container image at runtime to ensure that it is not going to run with UID 0 (root) and fails the container instance creation if the validation fails. :return: The is_non_root_user_check_enabled of this LinuxSecurityContext. :rtype: bool �r r r r r r | s z3LinuxSecurityContext.is_non_root_user_check_enabledc C s || _ dS )a� Sets the is_non_root_user_check_enabled of this LinuxSecurityContext. Indicates if the container must run as a non-root user. If true, the service validates the container image at runtime to ensure that it is not going to run with UID 0 (root) and fails the container instance creation if the validation fails. :param is_non_root_user_check_enabled: The is_non_root_user_check_enabled of this LinuxSecurityContext. :type: bool Nr )r r r r r r � s c C s | j S )a Gets the is_root_file_system_readonly of this LinuxSecurityContext. Determines if the container will have a read-only root file system. Default value is false. :return: The is_root_file_system_readonly of this LinuxSecurityContext. :rtype: bool �r r r r r r � s z1LinuxSecurityContext.is_root_file_system_readonlyc C s || _ dS )a; Sets the is_root_file_system_readonly of this LinuxSecurityContext. Determines if the container will have a read-only root file system. Default value is false. :param is_root_file_system_readonly: The is_root_file_system_readonly of this LinuxSecurityContext. :type: bool Nr )r r r r r r � s c C s | j S )z� Gets the capabilities of this LinuxSecurityContext. :return: The capabilities of this LinuxSecurityContext. :rtype: oci.container_instances.models.ContainerCapabilities �r r r r r r � s z!LinuxSecurityContext.capabilitiesc C s || _ dS )z� Sets the capabilities of this LinuxSecurityContext. :param capabilities: The capabilities of this LinuxSecurityContext. :type: oci.container_instances.models.ContainerCapabilities Nr )r r r r r r � s c C s t | �S �N)r r r r r �__repr__� s zLinuxSecurityContext.__repr__c C s |d u rdS | j |j kS )NF)�__dict__�r �otherr r r �__eq__� s zLinuxSecurityContext.__eq__c C s | |k S r! r r$ r r r �__ne__� s zLinuxSecurityContext.__ne__N)�__name__� __module__�__qualname__�__doc__r �propertyr �setterr r r r r"