o
    ɶdb                     @   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                   @   sF  e Zd ZdZd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/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#dGdH Z$dIdJ Z%dKdL Z&dMS )NFunctionz
    A function resource defines the code (Docker image) and configuration for a specific function. Functions are defined in applications. Avoid entering confidential information.
    CREATINGACTIVEINACTIVEUPDATINGDELETINGDELETEDFAILEDGENERIC_X86GENERIC_ARMGENERIC_X86_ARMc                 K   sb  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| _ 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*| _d*| _d*| _	d*| _
d*| _d*| _d*| _d*| _d*| _d*| _d*| _d*| _d*| _d*| _d*S )+a  
        Initializes a new Function 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 Function.
        :type id: str

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

        :param lifecycle_state:
            The value to assign to the lifecycle_state property of this Function.
            Allowed values for this property are: "CREATING", "ACTIVE", "INACTIVE", "UPDATING", "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 application_id:
            The value to assign to the application_id property of this Function.
        :type application_id: str

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

        :param image:
            The value to assign to the image property of this Function.
        :type image: str

        :param image_digest:
            The value to assign to the image_digest property of this Function.
        :type image_digest: str

        :param source_details:
            The value to assign to the source_details property of this Function.
        :type source_details: oci.functions.models.FunctionSourceDetails

        :param shape:
            The value to assign to the shape property of this Function.
            Allowed values for this property are: "GENERIC_X86", "GENERIC_ARM", "GENERIC_X86_ARM", 'UNKNOWN_ENUM_VALUE'.
            Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
        :type shape: str

        :param memory_in_mbs:
            The value to assign to the memory_in_mbs property of this Function.
        :type memory_in_mbs: int

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

        :param timeout_in_seconds:
            The value to assign to the timeout_in_seconds property of this Function.
        :type timeout_in_seconds: int

        :param provisioned_concurrency_config:
            The value to assign to the provisioned_concurrency_config property of this Function.
        :type provisioned_concurrency_config: oci.functions.models.FunctionProvisionedConcurrencyConfig

        :param trace_config:
            The value to assign to the trace_config property of this Function.
        :type trace_config: oci.functions.models.FunctionTraceConfig

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

        :param invoke_endpoint:
            The value to assign to the invoke_endpoint property of this Function.
        :type invoke_endpoint: str

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

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

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

        idstrdisplay_namelifecycle_stateapplication_idcompartment_idimageimage_digestsource_detailsZFunctionSourceDetailsshapememory_in_mbsintconfigzdict(str, str)timeout_in_secondsprovisioned_concurrency_configZ$FunctionProvisionedConcurrencyConfigtrace_configZFunctionTraceConfigfreeform_tagsinvoke_endpointdefined_tagszdict(str, dict(str, object))datetime)time_createdtime_updatedZdisplayNameZlifecycleStateZapplicationIdZcompartmentIdZimageDigestZsourceDetailsZmemoryInMBsZtimeoutInSecondsZprovisionedConcurrencyConfigZtraceConfigZfreeformTagsZinvokeEndpointZdefinedTagsZtimeCreatedZtimeUpdatedN)Zswagger_typesZattribute_map_id_display_name_lifecycle_state_application_id_compartment_id_image_image_digest_source_details_shape_memory_in_mbs_config_timeout_in_seconds_provisioned_concurrency_config_trace_config_freeform_tags_invoke_endpoint_defined_tags_time_created_time_updated)selfkwargs r<   Ausr/lib/python3.10/site-packages/oci/functions/models/function.py__init__:   s   V	

	


zFunction.__init__c                 C      | j S )z
        **[Required]** Gets the id of this Function.
        The `OCID`__ of the function.

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


        :return: The id of this Function.
        :rtype: str
        r'   r:   r<   r<   r=   r         zFunction.idc                 C   
   || _ dS )z
        Sets the id of this Function.
        The `OCID`__ of the function.

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


        :param id: The id of this Function.
        :type: str
        Nr@   )r:   r   r<   r<   r=   r         
c                 C   r?   )z
        Gets the display_name of this Function.
        The display name of the function. The display name is unique within the application containing the function.


        :return: The display_name of this Function.
        :rtype: str
        r(   rA   r<   r<   r=   r         
zFunction.display_namec                 C   rC   )a  
        Sets the display_name of this Function.
        The display name of the function. The display name is unique within the application containing the function.


        :param display_name: The display_name of this Function.
        :type: str
        NrE   )r:   r   r<   r<   r=   r         

c                 C   r?   )a  
        Gets the lifecycle_state of this Function.
        The current state of the function.

        Allowed values for this property are: "CREATING", "ACTIVE", "INACTIVE", "UPDATING", "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 Function.
        :rtype: str
        )r)   rA   r<   r<   r=   r        zFunction.lifecycle_statec                 C       g d}t ||sd}|| _dS )z
        Sets the lifecycle_state of this Function.
        The current state of the function.


        :param lifecycle_state: The lifecycle_state of this Function.
        :type: str
        )r   r   r	   r
   r   r   r   UNKNOWN_ENUM_VALUEN)r   r)   )r:   r   allowed_valuesr<   r<   r=   r        


c                 C   r?   )z
        Gets the application_id of this Function.
        The OCID of the application the function belongs to.


        :return: The application_id of this Function.
        :rtype: str
        r*   rA   r<   r<   r=   r   "  rF   zFunction.application_idc                 C   rC   )z
        Sets the application_id of this Function.
        The OCID of the application the function belongs to.


        :param application_id: The application_id of this Function.
        :type: str
        NrM   )r:   r   r<   r<   r=   r   .  rG   c                 C   r?   )z
        Gets the compartment_id of this Function.
        The OCID of the compartment that contains the function.


        :return: The compartment_id of this Function.
        :rtype: str
        r+   rA   r<   r<   r=   r   :  rF   zFunction.compartment_idc                 C   rC   )z
        Sets the compartment_id of this Function.
        The OCID of the compartment that contains the function.


        :param compartment_id: The compartment_id of this Function.
        :type: str
        NrN   )r:   r   r<   r<   r=   r   F  rG   c                 C   r?   )at  
        Gets the image of this Function.
        The qualified name of the Docker image to use in the function, including the image tag.
        The image should be in the OCI Registry that is in the same region as the function itself.
        Example: `phx.ocir.io/ten/functions/function:0.0.1`


        :return: The image of this Function.
        :rtype: str
        r,   rA   r<   r<   r=   r   R  rB   zFunction.imagec                 C   rC   )ax  
        Sets the image of this Function.
        The qualified name of the Docker image to use in the function, including the image tag.
        The image should be in the OCI Registry that is in the same region as the function itself.
        Example: `phx.ocir.io/ten/functions/function:0.0.1`


        :param image: The image of this Function.
        :type: str
        NrO   )r:   r   r<   r<   r=   r   `  rD   c                 C   r?   )a  
        Gets the image_digest of this Function.
        The image digest for the version of the image that will be pulled when invoking this function.
        If no value is specified, the digest currently associated with the image in the OCI Registry will be used.
        Example: `sha256:ca0eeb6fb05351dfc8759c20733c91def84cb8007aa89a5bf606bc8b315b9fc7`


        :return: The image_digest of this Function.
        :rtype: str
        r-   rA   r<   r<   r=   r   n  rB   zFunction.image_digestc                 C   rC   )a  
        Sets the image_digest of this Function.
        The image digest for the version of the image that will be pulled when invoking this function.
        If no value is specified, the digest currently associated with the image in the OCI Registry will be used.
        Example: `sha256:ca0eeb6fb05351dfc8759c20733c91def84cb8007aa89a5bf606bc8b315b9fc7`


        :param image_digest: The image_digest of this Function.
        :type: str
        NrP   )r:   r   r<   r<   r=   r   |  rD   c                 C   r?   )z
        Gets the source_details of this Function.

        :return: The source_details of this Function.
        :rtype: oci.functions.models.FunctionSourceDetails
        r.   rA   r<   r<   r=   r        zFunction.source_detailsc                 C   rC   )z
        Sets the source_details of this Function.

        :param source_details: The source_details of this Function.
        :type: oci.functions.models.FunctionSourceDetails
        NrQ   )r:   r   r<   r<   r=   r        
c                 C   r?   )a  
        Gets the shape of this Function.
        The processor shape (`GENERIC_X86`/`GENERIC_ARM`) on which to run functions in the application, extracted from the image manifest.

        Allowed values for this property are: "GENERIC_X86", "GENERIC_ARM", "GENERIC_X86_ARM", 'UNKNOWN_ENUM_VALUE'.
        Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.


        :return: The shape of this Function.
        :rtype: str
        )r/   rA   r<   r<   r=   r     rH   zFunction.shapec                 C   rI   )a  
        Sets the shape of this Function.
        The processor shape (`GENERIC_X86`/`GENERIC_ARM`) on which to run functions in the application, extracted from the image manifest.


        :param shape: The shape of this Function.
        :type: str
        )r   r   r   rJ   N)r   r/   )r:   r   rK   r<   r<   r=   r     rL   c                 C   r?   )z
        Gets the memory_in_mbs of this Function.
        Maximum usable memory for the function (MiB).


        :return: The memory_in_mbs of this Function.
        :rtype: int
        r0   rA   r<   r<   r=   r     rF   zFunction.memory_in_mbsc                 C   rC   )z
        Sets the memory_in_mbs of this Function.
        Maximum usable memory for the function (MiB).


        :param memory_in_mbs: The memory_in_mbs of this Function.
        :type: int
        NrT   )r:   r   r<   r<   r=   r     rG   c                 C   r?   )ar  
        Gets the config of this Function.
        Function configuration. Overrides application configuration.
        Keys must be ASCII strings consisting solely of letters, digits, and the '_' (underscore) character, and must not begin with a digit. Values should be limited to printable unicode characters.

        Example: `{"MY_FUNCTION_CONFIG": "ConfVal"}`

        The maximum size for all configuration keys and values is limited to 4KB. This is measured as the sum of octets necessary to represent each key and value in UTF-8.


        :return: The config of this Function.
        :rtype: dict(str, str)
        r1   rA   r<   r<   r=   r        zFunction.configc                 C   rC   )aw  
        Sets the config of this Function.
        Function configuration. Overrides application configuration.
        Keys must be ASCII strings consisting solely of letters, digits, and the '_' (underscore) character, and must not begin with a digit. Values should be limited to printable unicode characters.

        Example: `{"MY_FUNCTION_CONFIG": "ConfVal"}`

        The maximum size for all configuration keys and values is limited to 4KB. This is measured as the sum of octets necessary to represent each key and value in UTF-8.


        :param config: The config of this Function.
        :type: dict(str, str)
        NrU   )r:   r   r<   r<   r=   r        
c                 C   r?   )z
        Gets the timeout_in_seconds of this Function.
        Timeout for executions of the function. Value in seconds.


        :return: The timeout_in_seconds of this Function.
        :rtype: int
        r2   rA   r<   r<   r=   r     rF   zFunction.timeout_in_secondsc                 C   rC   )z
        Sets the timeout_in_seconds of this Function.
        Timeout for executions of the function. Value in seconds.


        :param timeout_in_seconds: The timeout_in_seconds of this Function.
        :type: int
        NrX   )r:   r   r<   r<   r=   r     rG   c                 C   r?   )z
        Gets the provisioned_concurrency_config of this Function.

        :return: The provisioned_concurrency_config of this Function.
        :rtype: oci.functions.models.FunctionProvisionedConcurrencyConfig
        r3   rA   r<   r<   r=   r     rR   z'Function.provisioned_concurrency_configc                 C   rC   )z
        Sets the provisioned_concurrency_config of this Function.

        :param provisioned_concurrency_config: The provisioned_concurrency_config of this Function.
        :type: oci.functions.models.FunctionProvisionedConcurrencyConfig
        NrY   )r:   r   r<   r<   r=   r     rS   c                 C   r?   )z
        Gets the trace_config of this Function.

        :return: The trace_config of this Function.
        :rtype: oci.functions.models.FunctionTraceConfig
        r4   rA   r<   r<   r=   r    "  rR   zFunction.trace_configc                 C   rC   )z
        Sets the trace_config of this Function.

        :param trace_config: The trace_config of this Function.
        :type: oci.functions.models.FunctionTraceConfig
        NrZ   )r:   r    r<   r<   r=   r    ,  rS   c                 C   r?   )a  
        Gets the freeform_tags of this Function.
        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/iaas/Content/General/Concepts/resourcetags.htm


        :return: The freeform_tags of this Function.
        :rtype: dict(str, str)
        r5   rA   r<   r<   r=   r!   6  rV   zFunction.freeform_tagsc                 C   rC   )a  
        Sets the freeform_tags of this Function.
        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/iaas/Content/General/Concepts/resourcetags.htm


        :param freeform_tags: The freeform_tags of this Function.
        :type: dict(str, str)
        Nr[   )r:   r!   r<   r<   r=   r!   G  rW   c                 C   r?   )a-  
        Gets the invoke_endpoint of this Function.
        The base https invoke URL to set on a client in order to invoke a function. This URL will never change over the lifetime of the function and can be cached.


        :return: The invoke_endpoint of this Function.
        :rtype: str
        r6   rA   r<   r<   r=   r"   X  rF   zFunction.invoke_endpointc                 C   rC   )a;  
        Sets the invoke_endpoint of this Function.
        The base https invoke URL to set on a client in order to invoke a function. This URL will never change over the lifetime of the function and can be cached.


        :param invoke_endpoint: The invoke_endpoint of this Function.
        :type: str
        Nr\   )r:   r"   r<   r<   r=   r"   d  rG   c                 C   r?   )a  
        Gets the defined_tags of this Function.
        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/iaas/Content/General/Concepts/resourcetags.htm


        :return: The defined_tags of this Function.
        :rtype: dict(str, dict(str, object))
        r7   rA   r<   r<   r=   r#   p  s   zFunction.defined_tagsc                 C   rC   )a  
        Sets the defined_tags of this Function.
        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/iaas/Content/General/Concepts/resourcetags.htm


        :param defined_tags: The defined_tags of this Function.
        :type: dict(str, dict(str, object))
        Nr]   )r:   r#   r<   r<   r=   r#     s   
c                 C   r?   )aD  
        Gets the time_created of this Function.
        The time the function was created, expressed in `RFC 3339`__
        timestamp format.

        Example: `2018-09-12T22:47:12.613Z`

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


        :return: The time_created of this Function.
        :rtype: datetime
        r8   rA   r<   r<   r=   r%     rV   zFunction.time_createdc                 C   rC   )aO  
        Sets the time_created of this Function.
        The time the function was created, expressed in `RFC 3339`__
        timestamp format.

        Example: `2018-09-12T22:47:12.613Z`

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


        :param time_created: The time_created of this Function.
        :type: datetime
        Nr^   )r:   r%   r<   r<   r=   r%     rW   c                 C   r?   )aD  
        Gets the time_updated of this Function.
        The time the function was updated, expressed in `RFC 3339`__
        timestamp format.

        Example: `2018-09-12T22:47:12.613Z`

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


        :return: The time_updated of this Function.
        :rtype: datetime
        r9   rA   r<   r<   r=   r&     rV   zFunction.time_updatedc                 C   rC   )aO  
        Sets the time_updated of this Function.
        The time the function was updated, expressed in `RFC 3339`__
        timestamp format.

        Example: `2018-09-12T22:47:12.613Z`

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


        :param time_updated: The time_updated of this Function.
        :type: datetime
        Nr_   )r:   r&   r<   r<   r=   r&     rW   c                 C   s   t | S N)r   rA   r<   r<   r=   __repr__  s   zFunction.__repr__c                 C   s   |d u rdS | j |j kS )NF)__dict__r:   otherr<   r<   r=   __eq__  s   zFunction.__eq__c                 C   s
   | |k S r`   r<   rc   r<   r<   r=   __ne__  s   
zFunction.__ne__N)'__name__
__module____qualname____doc__ZLIFECYCLE_STATE_CREATINGZLIFECYCLE_STATE_ACTIVEZLIFECYCLE_STATE_INACTIVEZLIFECYCLE_STATE_UPDATINGZLIFECYCLE_STATE_DELETINGZLIFECYCLE_STATE_DELETEDZLIFECYCLE_STATE_FAILEDZSHAPE_GENERIC_X86ZSHAPE_GENERIC_ARMZSHAPE_GENERIC_X86_ARMr>   propertyr   setterr   r   r   r   r   r   r   r   r   r   r   r   r    r!   r"   r#   r%   r&   ra   re   rf   r<   r<   r<   r=   r      s     














	
	








	
	
	
	









r   N)Zoci.utilr   r   r   Zoci.decoratorsr   objectr   r<   r<   r<   r=   <module>   s   