HEX
Server: Apache
System: Linux box5936.bluehost.com 5.14.0-162.23.1.9991722448259.nf.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Jul 31 18:11:45 UTC 2024 x86_64
User: aviatjd3 (1318)
PHP: 8.3.32
Disabled: NONE
Upload Files
File: //usr/libexec/oracle-cloud-agent/plugins/osms/oci/visual_builder/vb_instance_client.pyc
a

O��f�,�@s�ddlmZddlmZddlmZddlmZmZddlm	Z	ddl
mZmZddl
mZddlmZmZmZd	d
lmZed�ZGdd
�d
e�ZdS)�)�absolute_import)�requests)�six)�retry�circuit_breaker)�
BaseClient)�get_config_value_or_default�validate_config)�Signer)�Sentinel�#get_signer_from_authentication_type�AUTHENTICATION_TYPE_FIELD_NAME�)�visual_builder_type_mapping�Missingc@s�eZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�ZdS)�VbInstanceClienta�
    Oracle Visual Builder enables developers to quickly build web and mobile applications. With a visual development environment that makes it easy to connect to Oracle data and third-party REST services, developers can build modern, consumer-grade applications in a fraction of the time it would take in other tools.
    The Visual Builder Instance Management API allows users to create and manage a Visual Builder instance.
    c	Ks
t||�d�d�d|vr$|d}nDt|vr6t|�}n2t|d|d|d|�d�t|d�|�d�d	�}d
|�d�dd
|�dd�|�dtj�d�}d|vr�|�d�|d<|�d�dur�tj|d<d|vr�|�d�|d<t	d||t
fi|��|_|�d�|_|�d�|_
dS)a�
        Creates a new service client

        :param dict config:
            Configuration keys and values as per `SDK and Tool Configuration <https://docs.cloud.oracle.com/Content/API/Concepts/sdkconfig.htm>`__.
            The :py:meth:`~oci.config.from_file` method can be used to load configuration from a file. Alternatively, a ``dict`` can be passed. You can validate_config
            the dict using :py:meth:`~oci.config.validate_config`

        :param str service_endpoint: (optional)
            The endpoint of the service to call using this client. For example ``https://iaas.us-ashburn-1.oraclecloud.com``. If this keyword argument is
            not provided then it will be derived using the region in the config parameter. You should only provide this keyword argument if you have an explicit
            need to specify a service endpoint.

        :param timeout: (optional)
            The connection and read timeouts for the client. The default values are connection timeout 10 seconds and read timeout 60 seconds. This keyword argument can be provided
            as a single float, in which case the value provided is used for both the read and connection timeouts, or as a tuple of two floats. If
            a tuple is provided then the first value is used as the connection timeout and the second value as the read timeout.
        :type timeout: float or tuple(float, float)

        :param signer: (optional)
            The signer to use when signing requests made by the service client. The default is to use a :py:class:`~oci.signer.Signer` based on the values
            provided in the config parameter.

            One use case for this parameter is for `Instance Principals authentication <https://docs.cloud.oracle.com/Content/Identity/Tasks/callingservicesfrominstances.htm>`__
            by passing an instance of :py:class:`~oci.auth.signers.InstancePrincipalsSecurityTokenSigner` as the value for this keyword argument
        :type signer: :py:class:`~oci.signer.AbstractBaseSigner`

        :param obj retry_strategy: (optional)
            A retry strategy to apply to all calls made by this service client (i.e. at the client level). There is no retry strategy applied by default.
            Retry strategies can also be applied at the operation level by passing a ``retry_strategy`` keyword argument as part of calling the operation.
            Any value provided at the operation level will override whatever is specified at the client level.

            This should be one of the strategies available in the :py:mod:`~oci.retry` module. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY`
            is also available. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.

        :param obj circuit_breaker_strategy: (optional)
            A circuit breaker strategy to apply to all calls made by this service client (i.e. at the client level).
            This client uses :py:data:`~oci.circuit_breaker.DEFAULT_CIRCUIT_BREAKER_STRATEGY` as default if no circuit breaker strategy is provided.
            The specifics of circuit breaker strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/circuit_breakers.html>`__.

        :param function circuit_breaker_callback: (optional)
            Callback function to receive any exceptions triggerred by the circuit breaker.

        :param allow_control_chars: (optional)
            allow_control_chars is a boolean to indicate whether or not this client should allow control characters in the response object. By default, the client will not
            allow control characters to be in the response object.
        �signer)r�tenancy�user�fingerprint�key_file�pass_phrase�key_content)rrr�private_key_file_locationr�private_key_contentT�service_endpointz	/20210601z6https://visualbuilder.{region}.ocp.{secondLevelDomain}�skip_deserializationF�circuit_breaker_strategy)�regional_clientr�	base_path�service_endpoint_templaterr�timeoutN�allow_control_chars�vb_instance�retry_strategy�circuit_breaker_callback)r	�getr
rr
rr�GLOBAL_CIRCUIT_BREAKER_STRATEGY� DEFAULT_CIRCUIT_BREAKER_STRATEGYrr�base_clientr$r%)�self�config�kwargsr�base_client_init_kwargs�r.��/sparta/input/_build_configuration/image_build+validate/lib/bmcenv/lib64/python3.9/site-packages/oci/visual_builder/vb_instance_client.py�__init__s:0

�

�
zVbInstanceClient.__init__cs|d}d}d}d}gd���fdd�t�|�D�}|rBtd�|���d	|i}	d
d�t�|	�D�}	t�|	�D]:\}
}|dus�t|tj�rht|���d
krhtd�|
���qhdd|�	dt
�|�	dt
�|�	dt
�d�}dd�t�|�D�}|jj|�	d�|j
d�}
|
�rVt|
tj��s0|j�|�|j�|�|
�|j�|
j|jj|||	|||�	d�||d�	S|jj|||	|||�	d�||d�SdS)a�

        Change the compartment for an vb instance


        :param str vb_instance_id: (required)
            Unique Vb Instance identifier.

        :param oci.visual_builder.models.ChangeVbInstanceCompartmentDetails change_vb_instance_compartment_details: (required)
            Details for the update vb instance

        :param str if_match: (optional)
            For optimistic concurrency control. In the PUT or DELETE call
            for a resource, set the `if-match` parameter to the value of the
            etag from a previous GET or POST response for that resource.
            The resource will be updated or deleted only if the etag you
            provide matches the resource's current etag value.

        :param str opc_request_id: (optional)
            The client request ID for tracing.

        :param str opc_retry_token: (optional)
            A token that uniquely identifies a request so it can be retried in case
            of a timeout or server error without risk of executing that same action
            again. Retry tokens expire after 24 hours, but can be invalidated before
            then due to conflicting operations. For example, if a resource has been
            deleted and purged from the system, then a retry of the original creation
            request might be rejected.

        :param obj retry_strategy: (optional)
            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.

            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.

        :param bool allow_control_chars: (optional)
            allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
            By default, the response will not allow control characters in strings

        :return: A :class:`~oci.response.Response` object with data of type None
        :rtype: :class:`~oci.response.Response`

        :example:
        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.90.0/visualbuilder/change_vb_instance_compartment.py.html>`__ to see an example of how to use change_vb_instance_compartment API.
        z5/vbInstances/{vbInstanceId}/actions/changeCompartment�POST�change_vb_instance_compartmentzdhttps://docs.oracle.com/iaas/api/#/en/visual-builder/20210601/VbInstance/ChangeVbInstanceCompartment�r"r$�if_match�opc_request_id�opc_retry_tokencsg|]}|�vr|�qSr.r.��.0�_key��expected_kwargsr.r/�
<listcomp>��zCVbInstanceClient.change_vb_instance_compartment.<locals>.<listcomp>z7change_vb_instance_compartment got unknown kwargs: {!r}�vbInstanceIdcSsi|]\}}|tur||�qSr.��missing�r8�k�vr.r.r/�
<dictcomp>�r=zCVbInstanceClient.change_vb_instance_compartment.<locals>.<dictcomp>Nr�7Parameter {} cannot be None, whitespace or empty string�application/jsonr4r5r6��accept�content-type�if-match�opc-request-id�opc-retry-tokencSs&i|]\}}|tur|dur||�qS�Nr?rAr.r.r/rD�r=r$��operation_retry_strategy�client_retry_strategyr"��
resource_path�method�path_params�
header_params�bodyr"�operation_name�api_reference_link�r�iterkeys�
ValueError�format�	iteritems�
isinstance�string_types�len�stripr&r@r)�get_preferred_retry_strategyr$r�NoneRetryStrategy�add_opc_retry_token_if_needed�add_opc_client_retries_header�add_circuit_breaker_callbackr%�make_retrying_call�call_api)r*�vb_instance_id�&change_vb_instance_compartment_detailsr,rRrSrWrX�extra_kwargsrTrBrCrUr$r.r:r/r2lsj/��$


����z/VbInstanceClient.change_vb_instance_compartmentc

sd}d}d}d}gd���fdd�t�|�D�}|rBtd�|���d	d	|�d
t�|�dt�d�}d
d�t�|�D�}|jj|�d�|j	d�}	|	r�t
|	tj�s�|j�
|�|j�|�|	�|j�|	j|jj|||||�d�||d�S|jj|||||�d�||d�SdS)ar
        Creates a new Vb Instance.


        :param oci.visual_builder.models.CreateVbInstanceDetails create_vb_instance_details: (required)
            Details for the new Vb Instance.

        :param str opc_retry_token: (optional)
            A token that uniquely identifies a request so it can be retried in case
            of a timeout or server error without risk of executing that same action
            again. Retry tokens expire after 24 hours, but can be invalidated before
            then due to conflicting operations. For example, if a resource has been
            deleted and purged from the system, then a retry of the original creation
            request might be rejected.

        :param str opc_request_id: (optional)
            The client request ID for tracing.

        :param obj retry_strategy: (optional)
            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.

            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.

        :param bool allow_control_chars: (optional)
            allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
            By default, the response will not allow control characters in strings

        :return: A :class:`~oci.response.Response` object with data of type None
        :rtype: :class:`~oci.response.Response`

        :example:
        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.90.0/visualbuilder/create_vb_instance.py.html>`__ to see an example of how to use create_vb_instance API.
        �/vbInstancesr1�create_vb_instancezYhttps://docs.oracle.com/iaas/api/#/en/visual-builder/20210601/VbInstance/CreateVbInstance)r"r$r6r5csg|]}|�vr|�qSr.r.r7r:r.r/r<r=z7VbInstanceClient.create_vb_instance.<locals>.<listcomp>z+create_vb_instance got unknown kwargs: {!r}rFr6r5)rHrIrLrKcSs&i|]\}}|tur|dur||�qSrMr?rAr.r.r/rDr=z7VbInstanceClient.create_vb_instance.<locals>.<dictcomp>r$rNr")rRrSrUrVr"rWrXN)rrZr[r\r&r@r]r)rbr$r^rrcrdrerfr%rgrh)
r*�create_vb_instance_detailsr,rRrSrWrXrkrUr$r.r:r/rm�sX%�

���
�z#VbInstanceClient.create_vb_instancec

sbd}d}d}d}gd���fdd�t�|�D�}|rBtd�|���d	|i}d
d�t�|�D�}t�|�D]:\}	}
|
dus�t|
tj�rht|
���d
krhtd�|	���qhdd|�	dt
�|�	dt
�d�}dd�t�|�D�}|jj|�	d�|j
d�}|�r>t|tj��s|j�|�|�|j�|j|jj|||||�	d�||d�S|jj|||||�	d�||d�SdS)a�
        Deletes an Vb Instance resource by identifier.


        :param str vb_instance_id: (required)
            Unique Vb Instance identifier.

        :param str if_match: (optional)
            For optimistic concurrency control. In the PUT or DELETE call
            for a resource, set the `if-match` parameter to the value of the
            etag from a previous GET or POST response for that resource.
            The resource will be updated or deleted only if the etag you
            provide matches the resource's current etag value.

        :param str opc_request_id: (optional)
            The client request ID for tracing.

        :param obj retry_strategy: (optional)
            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.

            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.

        :param bool allow_control_chars: (optional)
            allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
            By default, the response will not allow control characters in strings

        :return: A :class:`~oci.response.Response` object with data of type None
        :rtype: :class:`~oci.response.Response`

        :example:
        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.90.0/visualbuilder/delete_vb_instance.py.html>`__ to see an example of how to use delete_vb_instance API.
        �/vbInstances/{vbInstanceId}�DELETE�delete_vb_instancezYhttps://docs.oracle.com/iaas/api/#/en/visual-builder/20210601/VbInstance/DeleteVbInstance�r"r$r4r5csg|]}|�vr|�qSr.r.r7r:r.r/r<jr=z7VbInstanceClient.delete_vb_instance.<locals>.<listcomp>z+delete_vb_instance got unknown kwargs: {!r}r>cSsi|]\}}|tur||�qSr.r?rAr.r.r/rDsr=z7VbInstanceClient.delete_vb_instance.<locals>.<dictcomp>NrrErFr4r5�rHrIrJrKcSs&i|]\}}|tur|dur||�qSrMr?rAr.r.r/rDr=r$rNr"�rRrSrTrUr"rWrX�rrZr[r\r]r^r_r`rar&r@r)rbr$rrcrerfr%rgrh�
r*rir,rRrSrWrXrkrTrBrCrUr$r.r:r/rq:sb$��$

���
�z#VbInstanceClient.delete_vb_instancec
sjd}d}d}d}gd���fdd�t�|�D�}|rBtd�|���d	|i}d
d�t�|�D�}t�|�D]:\}	}
|
dus�t|
tj�rht|
���d
krhtd�|	���qhdd|�	dt
�d�}dd�t�|�D�}|jj|�	d�|j
d�}|dur�tj}|�rDt|tj��s|j�|�|�|j�|j|jj||||d|�	d�||d�	S|jj||||d|�	d�||d�SdS)a(
        Gets a VbInstance by identifier


        :param str vb_instance_id: (required)
            Unique Vb Instance identifier.

        :param str opc_request_id: (optional)
            The client request ID for tracing.

        :param obj retry_strategy: (optional)
            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.

            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.

        :param bool allow_control_chars: (optional)
            allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
            By default, the response will not allow control characters in strings

        :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.visual_builder.models.VbInstance`
        :rtype: :class:`~oci.response.Response`

        :example:
        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.90.0/visualbuilder/get_vb_instance.py.html>`__ to see an example of how to use get_vb_instance API.
        ro�GET�get_vb_instancezVhttps://docs.oracle.com/iaas/api/#/en/visual-builder/20210601/VbInstance/GetVbInstance�r"r$r5csg|]}|�vr|�qSr.r.r7r:r.r/r<�r=z4VbInstanceClient.get_vb_instance.<locals>.<listcomp>z(get_vb_instance got unknown kwargs: {!r}r>cSsi|]\}}|tur||�qSr.r?rAr.r.r/rD�r=z4VbInstanceClient.get_vb_instance.<locals>.<dictcomp>NrrErFr5�rHrIrKcSs&i|]\}}|tur|dur||�qSrMr?rAr.r.r/rD�r=r$rN�
VbInstancer"�rRrSrTrU�
response_typer"rWrX�rrZr[r\r]r^r_r`rar&r@r)rbr$r�DEFAULT_RETRY_STRATEGYrcrerfr%rgrhrvr.r:r/rx�sh��$
����z VbInstanceClient.get_vb_instancec
sjd}d}d}d}gd���fdd�t�|�D�}|rBtd�|���d	|i}d
d�t�|�D�}t�|�D]:\}	}
|
dus�t|
tj�rht|
���d
krhtd�|	���qhdd|�	dt
�d�}dd�t�|�D�}|jj|�	d�|j
d�}|dur�tj}|�rDt|tj��s|j�|�|�|j�|j|jj||||d|�	d�||d�	S|jj||||d|�	d�||d�SdS)aH
        Gets the status of the work request with the given ID.


        :param str work_request_id: (required)
            The ID of the asynchronous request.

        :param str opc_request_id: (optional)
            The client request ID for tracing.

        :param obj retry_strategy: (optional)
            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.

            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.

        :param bool allow_control_chars: (optional)
            allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
            By default, the response will not allow control characters in strings

        :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.visual_builder.models.WorkRequest`
        :rtype: :class:`~oci.response.Response`

        :example:
        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.90.0/visualbuilder/get_work_request.py.html>`__ to see an example of how to use get_work_request API.
        z/workRequests/{workRequestId}rw�get_work_requestzXhttps://docs.oracle.com/iaas/api/#/en/visual-builder/20210601/WorkRequest/GetWorkRequestrycsg|]}|�vr|�qSr.r.r7r:r.r/r<#r=z5VbInstanceClient.get_work_request.<locals>.<listcomp>z)get_work_request got unknown kwargs: {!r}�
workRequestIdcSsi|]\}}|tur||�qSr.r?rAr.r.r/rD,r=z5VbInstanceClient.get_work_request.<locals>.<dictcomp>NrrErFr5rzcSs&i|]\}}|tur|dur||�qSrMr?rAr.r.r/rD7r=r$rN�WorkRequestr"r|r~)
r*�work_request_idr,rRrSrWrXrkrTrBrCrUr$r.r:r/r��sh��$
����z!VbInstanceClient.get_work_requestcs�d}d}d}d}gd���fdd�t�|�D�}|rBtd�|���d	|vrlgd
�}|d	|vrltd�|���d|vr�d
dg}	|d|	vr�td�|	���d|vr�ddg}
|d|
vr�td�|
���||�dt�|�d	t�|�dt�|�dt�|�dt�|�dt�d�}dd�t�|�D�}dd|�dt�d�}dd�t�|�D�}|jj|�d�|j	d�}
|
d u�rht
j}
|
�r�t|
t
j
��s�|j�|�|
�|j�|
j|jj||||d!|�d"�||d#�	S|jj||||d!|�d"�||d#�Sd S)$a�

        Returns a list of Vb Instances.


        :param str compartment_id: (required)
            The ID of the compartment in which to list resources.

        :param str display_name: (optional)
            A user-friendly name. Does not have to be unique, and it's changeable.

            Example: `My new resource`

        :param str lifecycle_state: (optional)
            Life cycle state to query on.

            Allowed values are: "CREATING", "UPDATING", "ACTIVE", "INACTIVE", "DELETING", "DELETED", "FAILED"

        :param int limit: (optional)
            The maximum number of items to return.

        :param str page: (optional)
            The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.

        :param str sort_order: (optional)
            The sort order to use, either 'asc' or 'desc'.

            Allowed values are: "ASC", "DESC"

        :param str sort_by: (optional)
            The field to sort by. Only one sort order may be provided. Default order
            for timeCreated is descending. Default order for displayName is
            ascending. If no value is specified timeCreated is default.

            Allowed values are: "timeCreated", "displayName"

        :param str opc_request_id: (optional)
            The client request ID for tracing.

        :param obj retry_strategy: (optional)
            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.

            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.

        :param bool allow_control_chars: (optional)
            allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
            By default, the response will not allow control characters in strings

        :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.visual_builder.models.VbInstanceSummaryCollection`
        :rtype: :class:`~oci.response.Response`

        :example:
        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.90.0/visualbuilder/list_vb_instances.py.html>`__ to see an example of how to use list_vb_instances API.
        rlrw�list_vb_instanceszihttps://docs.oracle.com/iaas/api/#/en/visual-builder/20210601/VbInstanceSummaryCollection/ListVbInstances)	r"r$�display_name�lifecycle_state�limit�page�
sort_order�sort_byr5csg|]}|�vr|�qSr.r.r7r:r.r/r<�r=z6VbInstanceClient.list_vb_instances.<locals>.<listcomp>z*list_vb_instances got unknown kwargs: {!r}r�)�CREATING�UPDATING�ACTIVE�INACTIVE�DELETING�DELETED�FAILEDz7Invalid value for `lifecycle_state`, must be one of {0}r��ASC�DESCz2Invalid value for `sort_order`, must be one of {0}r��timeCreated�displayNamez/Invalid value for `sort_by`, must be one of {0}r�r�r�)�
compartmentIdr��lifecycleStater�r��	sortOrder�sortBycSs&i|]\}}|tur|dur||�qSrMr?rAr.r.r/rD�r=z6VbInstanceClient.list_vb_instances.<locals>.<dictcomp>rFr5rzcSs&i|]\}}|tur|dur||�qSrMr?rAr.r.r/rD�r=r$rNN�VbInstanceSummaryCollectionr"�rRrS�query_paramsrUr}r"rWrX�rrZr[r\r&r@r]r)rbr$rrr^rcrerfr%rgrh)r*�compartment_idr,rRrSrWrXrk�lifecycle_state_allowed_values�sort_order_allowed_values�sort_by_allowed_valuesr�rUr$r.r:r/r�Ys�9����





�	
��
��z"VbInstanceClient.list_vb_instancescs�d}d}d}d}gd���fdd�t�|�D�}|rBtd�|���d	|i}	d
d�t�|	�D�}	t�|	�D]:\}
}|dus�t|tj�rht|���d
krhtd�|
���qh||�	dt
�|�	dt
�d�}dd�t�|�D�}dd|�	dt
�d�}
dd�t�|
�D�}
|jj|�	d�|j
d�}|du�r$tj}|�rxt|tj��sP|j�|
�|�|j�|j|jj|||	||
d|�	d�||d�
S|jj|||	||
d|�	d�||d�	SdS)a�
        Get the errors of a work request.


        :param str compartment_id: (required)
            The ID of the compartment in which to list resources.

        :param str work_request_id: (required)
            The ID of the asynchronous request.

        :param str opc_request_id: (optional)
            The client request ID for tracing.

        :param int limit: (optional)
            The maximum number of items to return.

        :param str page: (optional)
            The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.

        :param obj retry_strategy: (optional)
            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.

            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.

        :param bool allow_control_chars: (optional)
            allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
            By default, the response will not allow control characters in strings

        :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.visual_builder.models.WorkRequestErrorCollection`
        :rtype: :class:`~oci.response.Response`

        :example:
        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.90.0/visualbuilder/list_work_request_errors.py.html>`__ to see an example of how to use list_work_request_errors API.
        z$/workRequests/{workRequestId}/errorsrw�list_work_request_errorsznhttps://docs.oracle.com/iaas/api/#/en/visual-builder/20210601/WorkRequestErrorCollection/ListWorkRequestErrors�r"r$r5r�r�csg|]}|�vr|�qSr.r.r7r:r.r/r<"r=z=VbInstanceClient.list_work_request_errors.<locals>.<listcomp>z1list_work_request_errors got unknown kwargs: {!r}r�cSsi|]\}}|tur||�qSr.r?rAr.r.r/rD+r=z=VbInstanceClient.list_work_request_errors.<locals>.<dictcomp>NrrEr�r��r�r�r�cSs&i|]\}}|tur|dur||�qSrMr?rAr.r.r/rD6r=rFr5rzcSs&i|]\}}|tur|dur||�qSrMr?rAr.r.r/rD=r=r$rN�WorkRequestErrorCollectionr"�	rRrSrTr�rUr}r"rWrXr~�r*r�r�r,rRrSrWrXrkrTrBrCr�rUr$r.r:r/r��sv&��$

�
��
��z)VbInstanceClient.list_work_request_errorscs�d}d}d}d}gd���fdd�t�|�D�}|rBtd�|���d	|i}	d
d�t�|	�D�}	t�|	�D]:\}
}|dus�t|tj�rht|���d
krhtd�|
���qh||�	dt
�|�	dt
�d�}dd�t�|�D�}dd|�	dt
�d�}
dd�t�|
�D�}
|jj|�	d�|j
d�}|du�r$tj}|�rxt|tj��sP|j�|
�|�|j�|j|jj|||	||
d|�	d�||d�
S|jj|||	||
d|�	d�||d�	SdS)a�
        Get the logs of a work request.


        :param str compartment_id: (required)
            The ID of the compartment in which to list resources.

        :param str work_request_id: (required)
            The ID of the asynchronous request.

        :param str opc_request_id: (optional)
            The client request ID for tracing.

        :param int limit: (optional)
            The maximum number of items to return.

        :param str page: (optional)
            The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.

        :param obj retry_strategy: (optional)
            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.

            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.

        :param bool allow_control_chars: (optional)
            allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
            By default, the response will not allow control characters in strings

        :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.visual_builder.models.WorkRequestLogEntryCollection`
        :rtype: :class:`~oci.response.Response`

        :example:
        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.90.0/visualbuilder/list_work_request_logs.py.html>`__ to see an example of how to use list_work_request_logs API.
        z"/workRequests/{workRequestId}/logsrw�list_work_request_logszohttps://docs.oracle.com/iaas/api/#/en/visual-builder/20210601/WorkRequestLogEntryCollection/ListWorkRequestLogsr�csg|]}|�vr|�qSr.r.r7r:r.r/r<�r=z;VbInstanceClient.list_work_request_logs.<locals>.<listcomp>z/list_work_request_logs got unknown kwargs: {!r}r�cSsi|]\}}|tur||�qSr.r?rAr.r.r/rD�r=z;VbInstanceClient.list_work_request_logs.<locals>.<dictcomp>NrrEr�r�r�cSs&i|]\}}|tur|dur||�qSrMr?rAr.r.r/rD�r=rFr5rzcSs&i|]\}}|tur|dur||�qSrMr?rAr.r.r/rD�r=r$rN�WorkRequestLogEntryCollectionr"r�r~r�r.r:r/r�asv&��$

�
��
��z'VbInstanceClient.list_work_request_logscs@d}d}d}d}gd���fdd�t�|�D�}|rBtd�|���||�d	t�|�d
t�|�dt�d�}d
d�t�|�D�}dd|�dt�d�}	dd�t�|	�D�}	|jj|�d�|j	d�}
|
dur�t
j}
|
�rt|
t
j
�s�|j�|	�|
�|j�|
j|jj||||	d|�d�||d�	S|jj||||	d|�d�||d�SdS)a�
        Lists the work requests in a compartment.


        :param str compartment_id: (required)
            The ID of the compartment in which to list resources.

        :param str opc_request_id: (optional)
            The client request ID for tracing.

        :param str page: (optional)
            The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.

        :param int limit: (optional)
            The maximum number of items to return.

        :param str vb_instance_id: (optional)
            The Vb Instance identifier to use to filter results

        :param obj retry_strategy: (optional)
            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.

            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.

        :param bool allow_control_chars: (optional)
            allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
            By default, the response will not allow control characters in strings

        :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.visual_builder.models.WorkRequestSummaryCollection`
        :rtype: :class:`~oci.response.Response`

        :example:
        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.90.0/visualbuilder/list_work_requests.py.html>`__ to see an example of how to use list_work_requests API.
        z
/workRequestsrw�list_work_requestszkhttps://docs.oracle.com/iaas/api/#/en/visual-builder/20210601/WorkRequestSummaryCollection/ListWorkRequests)r"r$r5r�r�ricsg|]}|�vr|�qSr.r.r7r:r.r/r<r=z7VbInstanceClient.list_work_requests.<locals>.<listcomp>z+list_work_requests got unknown kwargs: {!r}r�r�ri)r�r�r�r>cSs&i|]\}}|tur|dur||�qSrMr?rAr.r.r/rDr=z7VbInstanceClient.list_work_requests.<locals>.<dictcomp>rFr5rzcSs&i|]\}}|tur|dur||�qSrMr?rAr.r.r/rDr=r$rNN�WorkRequestSummaryCollectionr"r�r�)r*r�r,rRrSrWrXrkr�rUr$r.r:r/r��sh&�


�
����z#VbInstanceClient.list_work_requestscs�d}d}d}d}gd���fdd�t�|�D�}|rBtd�|���d	|i}	d
d�t�|	�D�}	t�|	�D]:\}
}|dus�t|tj�rht|���d
krhtd�|
���qhdd|�	dt
�|�	dt
�|�	dt
�d�}dd�t�|�D�}|jj|�	d�|j
d�}
|
�rXt|
tj��s0|j�|�|j�|�|
�|j�|
j|jj|||	||d|�	d�||d�
S|jj|||	||d|�	d�||d�	SdS)a
        Summarizes the applications for a vb instance.


        :param oci.visual_builder.models.RequestSummarizedApplicationsDetails request_summarized_applications_details: (required)
            The parameter holding information to request the summarized applications for a Vb instance

        :param str vb_instance_id: (required)
            Unique Vb Instance identifier.

        :param str opc_request_id: (optional)
            The client request ID for tracing.

        :param str if_match: (optional)
            For optimistic concurrency control. In the PUT or DELETE call
            for a resource, set the `if-match` parameter to the value of the
            etag from a previous GET or POST response for that resource.
            The resource will be updated or deleted only if the etag you
            provide matches the resource's current etag value.

        :param str opc_retry_token: (optional)
            A token that uniquely identifies a request so it can be retried in case
            of a timeout or server error without risk of executing that same action
            again. Retry tokens expire after 24 hours, but can be invalidated before
            then due to conflicting operations. For example, if a resource has been
            deleted and purged from the system, then a retry of the original creation
            request might be rejected.

        :param obj retry_strategy: (optional)
            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.

            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.

        :param bool allow_control_chars: (optional)
            allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
            By default, the response will not allow control characters in strings

        :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.visual_builder.models.ApplicationSummaryCollection`
        :rtype: :class:`~oci.response.Response`

        :example:
        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.90.0/visualbuilder/request_summarized_applications.py.html>`__ to see an example of how to use request_summarized_applications API.
        z0/vbInstances/{vbInstanceId}/actions/applicationsr1�request_summarized_applicationszxhttps://docs.oracle.com/iaas/api/#/en/visual-builder/20210601/ApplicationSummaryCollection/RequestSummarizedApplications)r"r$r5r4r6csg|]}|�vr|�qSr.r.r7r:r.r/r<wr=zDVbInstanceClient.request_summarized_applications.<locals>.<listcomp>z8request_summarized_applications got unknown kwargs: {!r}r>cSsi|]\}}|tur||�qSr.r?rAr.r.r/rD�r=zDVbInstanceClient.request_summarized_applications.<locals>.<dictcomp>NrrErFr5r4r6)rHrIrKrJrLcSs&i|]\}}|tur|dur||�qSrMr?rAr.r.r/rD�r=r$rN�ApplicationSummaryCollectionr")	rRrSrTrUrVr}r"rWrXrY)r*�'request_summarized_applications_detailsrir,rRrSrWrXrkrTrBrCrUr$r.r:r/r�;sn/��$


����z0VbInstanceClient.request_summarized_applicationsc

sxd}d}d}d}gd���fdd�t�|�D�}|rBtd�|���d	|i}d
d�t�|�D�}t�|�D]:\}	}
|
dus�t|
tj�rht|
���d
krhtd�|	���qhdd|�	dt
�|�	dt
�|�	dt
�d�}dd�t�|�D�}|jj|�	d�|j
d�}|�rTt|tj��s0|j�|�|j�|�|�|j�|j|jj|||||�	d�||d�S|jj|||||�	d�||d�SdS)aj

        Start an vb instance that was previously in an INACTIVE state. If the previous state is not
        INACTIVE, then the state of the vbInstance will not be changed and a 409 response returned.


        :param str vb_instance_id: (required)
            Unique Vb Instance identifier.

        :param str if_match: (optional)
            For optimistic concurrency control. In the PUT or DELETE call
            for a resource, set the `if-match` parameter to the value of the
            etag from a previous GET or POST response for that resource.
            The resource will be updated or deleted only if the etag you
            provide matches the resource's current etag value.

        :param str opc_request_id: (optional)
            The client request ID for tracing.

        :param str opc_retry_token: (optional)
            A token that uniquely identifies a request so it can be retried in case
            of a timeout or server error without risk of executing that same action
            again. Retry tokens expire after 24 hours, but can be invalidated before
            then due to conflicting operations. For example, if a resource has been
            deleted and purged from the system, then a retry of the original creation
            request might be rejected.

        :param obj retry_strategy: (optional)
            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.

            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.

        :param bool allow_control_chars: (optional)
            allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
            By default, the response will not allow control characters in strings

        :return: A :class:`~oci.response.Response` object with data of type None
        :rtype: :class:`~oci.response.Response`

        :example:
        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.90.0/visualbuilder/start_vb_instance.py.html>`__ to see an example of how to use start_vb_instance API.
        z)/vbInstances/{vbInstanceId}/actions/startr1�start_vb_instancezXhttps://docs.oracle.com/iaas/api/#/en/visual-builder/20210601/VbInstance/StartVbInstancer3csg|]}|�vr|�qSr.r.r7r:r.r/r<�r=z6VbInstanceClient.start_vb_instance.<locals>.<listcomp>z*start_vb_instance got unknown kwargs: {!r}r>cSsi|]\}}|tur||�qSr.r?rAr.r.r/rD�r=z6VbInstanceClient.start_vb_instance.<locals>.<dictcomp>NrrErFr4r5r6rGcSs&i|]\}}|tur|dur||�qSrMr?rAr.r.r/rDr=r$rNr"rtrYrvr.r:r/r��sf-��$


���
�z"VbInstanceClient.start_vb_instancec

sxd}d}d}d}gd���fdd�t�|�D�}|rBtd�|���d	|i}d
d�t�|�D�}t�|�D]:\}	}
|
dus�t|
tj�rht|
���d
krhtd�|	���qhdd|�	dt
�|�	dt
�|�	dt
�d�}dd�t�|�D�}|jj|�	d�|j
d�}|�rTt|tj��s0|j�|�|j�|�|�|j�|j|jj|||||�	d�||d�S|jj|||||�	d�||d�SdS)ac

        Stop an vb instance that was previously in an ACTIVE state. If the previous state is not
        ACTIVE, then the state of the vbInstance will not be changed and a 409 response returned.


        :param str vb_instance_id: (required)
            Unique Vb Instance identifier.

        :param str if_match: (optional)
            For optimistic concurrency control. In the PUT or DELETE call
            for a resource, set the `if-match` parameter to the value of the
            etag from a previous GET or POST response for that resource.
            The resource will be updated or deleted only if the etag you
            provide matches the resource's current etag value.

        :param str opc_request_id: (optional)
            The client request ID for tracing.

        :param str opc_retry_token: (optional)
            A token that uniquely identifies a request so it can be retried in case
            of a timeout or server error without risk of executing that same action
            again. Retry tokens expire after 24 hours, but can be invalidated before
            then due to conflicting operations. For example, if a resource has been
            deleted and purged from the system, then a retry of the original creation
            request might be rejected.

        :param obj retry_strategy: (optional)
            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.

            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.

        :param bool allow_control_chars: (optional)
            allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
            By default, the response will not allow control characters in strings

        :return: A :class:`~oci.response.Response` object with data of type None
        :rtype: :class:`~oci.response.Response`

        :example:
        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.90.0/visualbuilder/stop_vb_instance.py.html>`__ to see an example of how to use stop_vb_instance API.
        z(/vbInstances/{vbInstanceId}/actions/stopr1�stop_vb_instancezWhttps://docs.oracle.com/iaas/api/#/en/visual-builder/20210601/VbInstance/StopVbInstancer3csg|]}|�vr|�qSr.r.r7r:r.r/r<Yr=z5VbInstanceClient.stop_vb_instance.<locals>.<listcomp>z)stop_vb_instance got unknown kwargs: {!r}r>cSsi|]\}}|tur||�qSr.r?rAr.r.r/rDbr=z5VbInstanceClient.stop_vb_instance.<locals>.<dictcomp>NrrErFr4r5r6rGcSs&i|]\}}|tur|dur||�qSrMr?rAr.r.r/rDor=r$rNr"rtrYrvr.r:r/r�sf-��$


���
�z!VbInstanceClient.stop_vb_instancecsfd}d}d}d}gd���fdd�t�|�D�}|rBtd�|���d	|i}	d
d�t�|	�D�}	t�|	�D]:\}
}|dus�t|tj�rht|���d
krhtd�|
���qhdd|�	dt
�|�	dt
�d�}dd�t�|�D�}|jj|�	d�|j
d�}
|
�r@t|
tj��s|j�|�|
�|j�|
j|jj|||	|||�	d�||d�	S|jj|||	|||�	d�||d�SdS)a[
        Updates the Vb Instance.


        :param str vb_instance_id: (required)
            Unique Vb Instance identifier.

        :param oci.visual_builder.models.UpdateVbInstanceDetails update_vb_instance_details: (required)
            The information to be updated.

        :param str if_match: (optional)
            For optimistic concurrency control. In the PUT or DELETE call
            for a resource, set the `if-match` parameter to the value of the
            etag from a previous GET or POST response for that resource.
            The resource will be updated or deleted only if the etag you
            provide matches the resource's current etag value.

        :param str opc_request_id: (optional)
            The client request ID for tracing.

        :param obj retry_strategy: (optional)
            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.

            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.

        :param bool allow_control_chars: (optional)
            allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
            By default, the response will not allow control characters in strings

        :return: A :class:`~oci.response.Response` object with data of type None
        :rtype: :class:`~oci.response.Response`

        :example:
        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.90.0/visualbuilder/update_vb_instance.py.html>`__ to see an example of how to use update_vb_instance API.
        ro�PUT�update_vb_instancezYhttps://docs.oracle.com/iaas/api/#/en/visual-builder/20210601/VbInstance/UpdateVbInstancerrcsg|]}|�vr|�qSr.r.r7r:r.r/r<�r=z7VbInstanceClient.update_vb_instance.<locals>.<listcomp>z+update_vb_instance got unknown kwargs: {!r}r>cSsi|]\}}|tur||�qSr.r?rAr.r.r/rD�r=z7VbInstanceClient.update_vb_instance.<locals>.<dictcomp>NrrErFr4r5rscSs&i|]\}}|tur|dur||�qSrMr?rAr.r.r/rD�r=r$rNr"rQru)r*ri�update_vb_instance_detailsr,rRrSrWrXrkrTrBrCrUr$r.r:r/r��sf'��$

����z#VbInstanceClient.update_vb_instanceN)�__name__�
__module__�__qualname__�__doc__r0r2rmrqrxr�r�r�r�r�r�r�r�r�r.r.r.r/rs Ss[c^^rrhuoorN)�
__future__r�oci._vendorrr�ocirr�oci.base_clientr�
oci.configrr	�
oci.signerr
�oci.utilrrr
�modelsrr@�objectrr.r.r.r/�<module>s