o
    ɶd9                     @   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                   @   sH  e 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d'd( Zd)d* Zd+d, Zd-S ).DynamicGroupaJ  
    A dynamic group defines a matching rule. Every bare metal or virtual machine instance is deployed with an instance certificate.
    The certificate contains metadata about the instance. This includes the instance OCID and the compartment OCID, along
    with a few other optional properties. When an API call is made using this instance certificate as the authenticator,
    the certificate can be matched to one or multiple dynamic groups. The instance can then get access to the API
    based on the permissions granted in policies written for the dynamic groups.

    This works like regular user/group membership. But in that case, the membership is a static relationship, whereas
    in a dynamic group, the membership of an instance certificate to a dynamic group is determined during runtime.
    For more information, see `Managing Dynamic Groups`__.

    **Warning:** Oracle recommends that you avoid using any confidential information when you supply string values using
    the API.

    __ https://docs.cloud.oracle.com/Content/Identity/dynamicgroups/managingdynamicgroups.htm
    CREATINGACTIVEINACTIVEDELETINGDELETEDc                 K   sx   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S )ac  
        Initializes a new DynamicGroup 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 DynamicGroup.
        :type id: str

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

        :param name:
            The value to assign to the name property of this DynamicGroup.
        :type name: str

        :param description:
            The value to assign to the description property of this DynamicGroup.
        :type description: str

        :param matching_rule:
            The value to assign to the matching_rule property of this DynamicGroup.
        :type matching_rule: str

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

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

        :param inactive_status:
            The value to assign to the inactive_status property of this DynamicGroup.
        :type inactive_status: int

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

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

        strdatetimeintzdict(str, str)zdict(str, dict(str, object)))
idcompartment_idnamedescriptionmatching_ruletime_createdlifecycle_stateinactive_statusfreeform_tagsdefined_tagsr   ZcompartmentIdr   r   ZmatchingRuleZtimeCreatedZlifecycleStateZinactiveStatusZfreeformTagsZdefinedTagsN)Zswagger_typesZattribute_map_id_compartment_id_name_description_matching_rule_time_created_lifecycle_state_inactive_status_freeform_tags_defined_tags)selfkwargs r%   Eusr/lib/python3.10/site-packages/oci/identity/models/dynamic_group.py__init__3   s@   1
zDynamicGroup.__init__c                 C      | j S )z
        **[Required]** Gets the id of this DynamicGroup.
        The OCID of the group.


        :return: The id of this DynamicGroup.
        :rtype: str
        r   r#   r%   r%   r&   r         
zDynamicGroup.idc                 C   
   || _ dS )z
        Sets the id of this DynamicGroup.
        The OCID of the group.


        :param id: The id of this DynamicGroup.
        :type: str
        Nr)   )r#   r   r%   r%   r&   r         

c                 C   r(   )z
        **[Required]** Gets the compartment_id of this DynamicGroup.
        The OCID of the tenancy containing the group.


        :return: The compartment_id of this DynamicGroup.
        :rtype: str
        r   r*   r%   r%   r&   r      r+   zDynamicGroup.compartment_idc                 C   r,   )z
        Sets the compartment_id of this DynamicGroup.
        The OCID of the tenancy containing the group.


        :param compartment_id: The compartment_id of this DynamicGroup.
        :type: str
        Nr.   )r#   r   r%   r%   r&   r      r-   c                 C   r(   )a  
        **[Required]** Gets the name of this DynamicGroup.
        The name you assign to the group during creation. The name must be unique across all groups in
        the tenancy and cannot be changed.


        :return: The name of this DynamicGroup.
        :rtype: str
        r   r*   r%   r%   r&   r      s   zDynamicGroup.namec                 C   r,   )a  
        Sets the name of this DynamicGroup.
        The name you assign to the group during creation. The name must be unique across all groups in
        the tenancy and cannot be changed.


        :param name: The name of this DynamicGroup.
        :type: str
        Nr/   )r#   r   r%   r%   r&   r      s   
c                 C   r(   )aT  
        **[Required]** Gets the description of this DynamicGroup.
        The description you assign to the group. Does not have to be unique, and it's changeable.

        (For tenancies that support identity domains) You can have an empty description.


        :return: The description of this DynamicGroup.
        :rtype: str
        r   r*   r%   r%   r&   r         zDynamicGroup.descriptionc                 C   r,   )aO  
        Sets the description of this DynamicGroup.
        The description you assign to the group. Does not have to be unique, and it's changeable.

        (For tenancies that support identity domains) You can have an empty description.


        :param description: The description of this DynamicGroup.
        :type: str
        Nr0   )r#   r   r%   r%   r&   r         
c                 C   r(   )a  
        **[Required]** Gets the matching_rule of this DynamicGroup.
        A rule string that defines which instance certificates will be matched.
        For syntax, see `Managing Dynamic Groups`__.

        __ https://docs.cloud.oracle.com/Content/Identity/dynamicgroups/managingdynamicgroups.htm


        :return: The matching_rule of this DynamicGroup.
        :rtype: str
        r   r*   r%   r%   r&   r      s   zDynamicGroup.matching_rulec                 C   r,   )a  
        Sets the matching_rule of this DynamicGroup.
        A rule string that defines which instance certificates will be matched.
        For syntax, see `Managing Dynamic Groups`__.

        __ https://docs.cloud.oracle.com/Content/Identity/dynamicgroups/managingdynamicgroups.htm


        :param matching_rule: The matching_rule of this DynamicGroup.
        :type: str
        Nr3   )r#   r   r%   r%   r&   r      s   
c                 C   r(   )a  
        **[Required]** Gets the time_created of this DynamicGroup.
        Date and time the group was created, in the format defined by RFC3339.

        Example: `2016-08-25T21:10:29.600Z`


        :return: The time_created of this DynamicGroup.
        :rtype: datetime
        r   r*   r%   r%   r&   r     r1   zDynamicGroup.time_createdc                 C   r,   )a  
        Sets the time_created of this DynamicGroup.
        Date and time the group was created, in the format defined by RFC3339.

        Example: `2016-08-25T21:10:29.600Z`


        :param time_created: The time_created of this DynamicGroup.
        :type: datetime
        Nr4   )r#   r   r%   r%   r&   r     r2   c                 C   r(   )a  
        **[Required]** Gets the lifecycle_state of this DynamicGroup.
        The group's current state. After creating a group, make sure its `lifecycleState` changes from CREATING to
        ACTIVE before using it.

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


        :return: The lifecycle_state of this DynamicGroup.
        :rtype: str
        )r   r*   r%   r%   r&   r   (     zDynamicGroup.lifecycle_statec                 C   s    g d}t ||sd}|| _dS )a2  
        Sets the lifecycle_state of this DynamicGroup.
        The group's current state. After creating a group, make sure its `lifecycleState` changes from CREATING to
        ACTIVE before using it.


        :param lifecycle_state: The lifecycle_state of this DynamicGroup.
        :type: str
        )r   r   r	   r
   r   ZUNKNOWN_ENUM_VALUEN)r   r   )r#   r   Zallowed_valuesr%   r%   r&   r   8  s   

c                 C   r(   )z
        Gets the inactive_status of this DynamicGroup.
        The detailed status of INACTIVE lifecycleState.


        :return: The inactive_status of this DynamicGroup.
        :rtype: int
        r    r*   r%   r%   r&   r   H  r+   zDynamicGroup.inactive_statusc                 C   r,   )z
        Sets the inactive_status of this DynamicGroup.
        The detailed status of INACTIVE lifecycleState.


        :param inactive_status: The inactive_status of this DynamicGroup.
        :type: int
        Nr6   )r#   r   r%   r%   r&   r   T  r-   c                 C   r(   )a  
        Gets the freeform_tags of this DynamicGroup.
        Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace.
        For more information, see `Resource Tags`__.
        Example: `{"Department": "Finance"}`

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


        :return: The freeform_tags of this DynamicGroup.
        :rtype: dict(str, str)
        r!   r*   r%   r%   r&   r   `  r5   zDynamicGroup.freeform_tagsc                 C   r,   )a  
        Sets the freeform_tags of this DynamicGroup.
        Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace.
        For more information, see `Resource Tags`__.
        Example: `{"Department": "Finance"}`

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


        :param freeform_tags: The freeform_tags of this DynamicGroup.
        :type: dict(str, str)
        Nr7   )r#   r   r%   r%   r&   r   p     
c                 C   r(   )a  
        Gets the defined_tags of this DynamicGroup.
        Defined tags for this resource. Each key is predefined and scoped to a namespace.
        For more information, see `Resource Tags`__.
        Example: `{"Operations": {"CostCenter": "42"}}`

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


        :return: The defined_tags of this DynamicGroup.
        :rtype: dict(str, dict(str, object))
        r"   r*   r%   r%   r&   r     r5   zDynamicGroup.defined_tagsc                 C   r,   )a  
        Sets the defined_tags of this DynamicGroup.
        Defined tags for this resource. Each key is predefined and scoped to a namespace.
        For more information, see `Resource Tags`__.
        Example: `{"Operations": {"CostCenter": "42"}}`

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


        :param defined_tags: The defined_tags of this DynamicGroup.
        :type: dict(str, dict(str, object))
        Nr9   )r#   r   r%   r%   r&   r     r8   c                 C   s   t | S N)r   r*   r%   r%   r&   __repr__  s   zDynamicGroup.__repr__c                 C   s   |d u rdS | j |j kS )NF)__dict__r#   otherr%   r%   r&   __eq__  s   zDynamicGroup.__eq__c                 C   s
   | |k S r:   r%   r=   r%   r%   r&   __ne__  s   
zDynamicGroup.__ne__N)__name__
__module____qualname____doc__ZLIFECYCLE_STATE_CREATINGZLIFECYCLE_STATE_ACTIVEZLIFECYCLE_STATE_INACTIVEZLIFECYCLE_STATE_DELETINGZLIFECYCLE_STATE_DELETEDr'   propertyr   setterr   r   r   r   r   r   r   r   r   r;   r?   r@   r%   r%   r%   r&   r      sf    U



















r   N)Zoci.utilr   r   r   Zoci.decoratorsr   objectr   r%   r%   r%   r&   <module>   s   