o
    ɶdr                     @   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                   @   s  e 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-d. Zejd/d. Zed0d1 Zejd2d1 Zed3d4 Zejd5d4 Zed6d7 Zejd8d7 Zed9d: Zejd;d: Zed<d= Zejd>d= Zed?d@ Z e jdAd@ Z edBdC Z!e!jdDdC Z!edEdF Z"e"jdGdF Z"edHdI Z#e#jdJdI Z#edKdL Z$e$jdMdL Z$edNdO Z%e%jdPdO Z%edQdR Z&e&jdSdR Z&edTdU Z'e'jdVdU Z'edWdX Z(e(jdYdX Z(edZd[ Z)e)jd\d[ Z)d]d^ Z*d_d` Z+dadb Z,dcS )dModelz 
    Machine-learned Model.
    IMAGE_CLASSIFICATIONOBJECT_DETECTIONCREATINGUPDATINGACTIVEDELETINGDELETEDFAILEDc                 K   s  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
| _ 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/d0d1d2d3d
| _d4| _d4| _d4| _d4| _d4| _d4| _d4| _d4| _	d4| _
d4| _d4| _d4| _d4| _d4| _d4| _d4| _d4| _d4| _d4| _d4| _d4| _d4| _d4| _d4| _d4| _d4| _d4| _d4S )5aD  
        Initializes a new Model 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 Model.
        :type id: str

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

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

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

        :param model_type:
            The value to assign to the model_type property of this Model.
            Allowed values for this property are: "IMAGE_CLASSIFICATION", "OBJECT_DETECTION", 'UNKNOWN_ENUM_VALUE'.
            Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
        :type model_type: str

        :param is_quick_mode:
            The value to assign to the is_quick_mode property of this Model.
        :type is_quick_mode: bool

        :param max_training_duration_in_hours:
            The value to assign to the max_training_duration_in_hours property of this Model.
        :type max_training_duration_in_hours: float

        :param trained_duration_in_hours:
            The value to assign to the trained_duration_in_hours property of this Model.
        :type trained_duration_in_hours: float

        :param training_dataset:
            The value to assign to the training_dataset property of this Model.
        :type training_dataset: oci.ai_vision.models.Dataset

        :param testing_dataset:
            The value to assign to the testing_dataset property of this Model.
        :type testing_dataset: oci.ai_vision.models.Dataset

        :param validation_dataset:
            The value to assign to the validation_dataset property of this Model.
        :type validation_dataset: oci.ai_vision.models.Dataset

        :param model_version:
            The value to assign to the model_version property of this Model.
        :type model_version: str

        :param project_id:
            The value to assign to the project_id property of this Model.
        :type project_id: str

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

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

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

        :param precision:
            The value to assign to the precision property of this Model.
        :type precision: float

        :param recall:
            The value to assign to the recall property of this Model.
        :type recall: float

        :param average_precision:
            The value to assign to the average_precision property of this Model.
        :type average_precision: float

        :param confidence_threshold:
            The value to assign to the confidence_threshold property of this Model.
        :type confidence_threshold: float

        :param total_image_count:
            The value to assign to the total_image_count property of this Model.
        :type total_image_count: int

        :param test_image_count:
            The value to assign to the test_image_count property of this Model.
        :type test_image_count: int

        :param metrics:
            The value to assign to the metrics property of this Model.
        :type metrics: str

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

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

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

        idstrdisplay_namedescriptioncompartment_id
model_typeis_quick_modeboolmax_training_duration_in_hoursfloattrained_duration_in_hourstraining_datasetZDatasettesting_datasetvalidation_datasetmodel_version
project_idtime_createddatetimetime_updatedlifecycle_statelifecycle_detailsintzdict(str, str)zdict(str, dict(str, object)))
	precisionrecallaverage_precisionconfidence_thresholdtotal_image_counttest_image_countmetricsfreeform_tagsdefined_tagssystem_tagsZdisplayNameZcompartmentIdZ	modelTypeZisQuickModeZmaxTrainingDurationInHoursZtrainedDurationInHoursZtrainingDatasetZtestingDatasetZvalidationDatasetZmodelVersionZ	projectIdZtimeCreatedZtimeUpdatedZlifecycleStateZlifecycleDetailsr%   r&   ZaveragePrecisionZconfidenceThresholdZtotalImageCountZtestImageCountr+   ZfreeformTagsZdefinedTagsZ
systemTagsN)Zswagger_typesZattribute_map_id_display_name_description_compartment_id_model_type_is_quick_mode_max_training_duration_in_hours_trained_duration_in_hours_training_dataset_testing_dataset_validation_dataset_model_version_project_id_time_created_time_updated_lifecycle_state_lifecycle_details
_precision_recall_average_precision_confidence_threshold_total_image_count_test_image_count_metrics_freeform_tags_defined_tags_system_tags)selfkwargs rL   >usr/lib/python3.10/site-packages/oci/ai_vision/models/model.py__init__2   s   v	

	


zModel.__init__c                 C      | j S )z
        **[Required]** Gets the id of this Model.
        A unique identifier that is immutable after creation.


        :return: The id of this Model.
        :rtype: str
        r/   rJ   rL   rL   rM   r         
zModel.idc                 C   
   || _ dS )z
        Sets the id of this Model.
        A unique identifier that is immutable after creation.


        :param id: The id of this Model.
        :type: str
        NrP   )rJ   r   rL   rL   rM   r        

c                 C   rO   )z
        Gets the display_name of this Model.
        A human-friendly name for the model, which can be changed.


        :return: The display_name of this Model.
        :rtype: str
        r0   rQ   rL   rL   rM   r     rR   zModel.display_namec                 C   rS   )z
        Sets the display_name of this Model.
        A human-friendly name for the model, which can be changed.


        :param display_name: The display_name of this Model.
        :type: str
        NrU   )rJ   r   rL   rL   rM   r   $  rT   c                 C   rO   )z
        Gets the description of this Model.
        An optional description of the model.


        :return: The description of this Model.
        :rtype: str
        r1   rQ   rL   rL   rM   r   0  rR   zModel.descriptionc                 C   rS   )z
        Sets the description of this Model.
        An optional description of the model.


        :param description: The description of this Model.
        :type: str
        NrV   )rJ   r   rL   rL   rM   r   <  rT   c                 C   rO   )z
        **[Required]** Gets the compartment_id of this Model.
        The compartment identifier.


        :return: The compartment_id of this Model.
        :rtype: str
        r2   rQ   rL   rL   rM   r   H  rR   zModel.compartment_idc                 C   rS   )z
        Sets the compartment_id of this Model.
        The compartment identifier.


        :param compartment_id: The compartment_id of this Model.
        :type: str
        NrW   )rJ   r   rL   rL   rM   r   T  rT   c                 C   rO   )a  
        **[Required]** Gets the model_type of this Model.
        What type of Vision model this is.

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


        :return: The model_type of this Model.
        :rtype: str
        )r3   rQ   rL   rL   rM   r   `     zModel.model_typec                 C   s    ddg}t ||sd}|| _dS )z
        Sets the model_type of this Model.
        What type of Vision model this is.


        :param model_type: The model_type of this Model.
        :type: str
        r   r   UNKNOWN_ENUM_VALUEN)r   r3   )rJ   r   allowed_valuesrL   rL   rM   r   o     


c                 C   rO   )a'  
        Gets the is_quick_mode of this Model.
        Set to true when experimenting with a new model type or dataset, so model training is quick, with a predefined low number of passes through the training data.


        :return: The is_quick_mode of this Model.
        :rtype: bool
        r4   rQ   rL   rL   rM   r   ~  rR   zModel.is_quick_modec                 C   rS   )a3  
        Sets the is_quick_mode of this Model.
        Set to true when experimenting with a new model type or dataset, so model training is quick, with a predefined low number of passes through the training data.


        :param is_quick_mode: The is_quick_mode of this Model.
        :type: bool
        Nr\   )rJ   r   rL   rL   rM   r     rT   c                 C   rO   )z
        Gets the max_training_duration_in_hours of this Model.
        The maximum model training duration in hours, expressed as a decimal fraction.


        :return: The max_training_duration_in_hours of this Model.
        :rtype: float
        r5   rQ   rL   rL   rM   r     rR   z$Model.max_training_duration_in_hoursc                 C   rS   )a  
        Sets the max_training_duration_in_hours of this Model.
        The maximum model training duration in hours, expressed as a decimal fraction.


        :param max_training_duration_in_hours: The max_training_duration_in_hours of this Model.
        :type: float
        Nr]   )rJ   r   rL   rL   rM   r     rT   c                 C   rO   )z
        Gets the trained_duration_in_hours of this Model.
        The total hours actually used for model training.


        :return: The trained_duration_in_hours of this Model.
        :rtype: float
        r6   rQ   rL   rL   rM   r     rR   zModel.trained_duration_in_hoursc                 C   rS   )z
        Sets the trained_duration_in_hours of this Model.
        The total hours actually used for model training.


        :param trained_duration_in_hours: The trained_duration_in_hours of this Model.
        :type: float
        Nr^   )rJ   r   rL   rL   rM   r     rT   c                 C   rO   )z
        **[Required]** Gets the training_dataset of this Model.

        :return: The training_dataset of this Model.
        :rtype: oci.ai_vision.models.Dataset
        r7   rQ   rL   rL   rM   r        zModel.training_datasetc                 C   rS   )z
        Sets the training_dataset of this Model.

        :param training_dataset: The training_dataset of this Model.
        :type: oci.ai_vision.models.Dataset
        Nr_   )rJ   r   rL   rL   rM   r        
c                 C   rO   )z
        Gets the testing_dataset of this Model.

        :return: The testing_dataset of this Model.
        :rtype: oci.ai_vision.models.Dataset
        r8   rQ   rL   rL   rM   r     r`   zModel.testing_datasetc                 C   rS   )z
        Sets the testing_dataset of this Model.

        :param testing_dataset: The testing_dataset of this Model.
        :type: oci.ai_vision.models.Dataset
        Nrb   )rJ   r   rL   rL   rM   r     ra   c                 C   rO   )z
        Gets the validation_dataset of this Model.

        :return: The validation_dataset of this Model.
        :rtype: oci.ai_vision.models.Dataset
        r9   rQ   rL   rL   rM   r     r`   zModel.validation_datasetc                 C   rS   )z
        Sets the validation_dataset of this Model.

        :param validation_dataset: The validation_dataset of this Model.
        :type: oci.ai_vision.models.Dataset
        Nrc   )rJ   r   rL   rL   rM   r     ra   c                 C   rO   )z
        **[Required]** Gets the model_version of this Model.
        The version of the model.


        :return: The model_version of this Model.
        :rtype: str
        r:   rQ   rL   rL   rM   r     rR   zModel.model_versionc                 C   rS   )z
        Sets the model_version of this Model.
        The version of the model.


        :param model_version: The model_version of this Model.
        :type: str
        Nrd   )rJ   r   rL   rL   rM   r     rT   c                 C   rO   )a  
        **[Required]** Gets the project_id of this Model.
        The `OCID`__ of the project that contains the model.

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


        :return: The project_id of this Model.
        :rtype: str
        r;   rQ   rL   rL   rM   r     s   zModel.project_idc                 C   rS   )a  
        Sets the project_id of this Model.
        The `OCID`__ of the project that contains the model.

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


        :param project_id: The project_id of this Model.
        :type: str
        Nre   )rJ   r   rL   rL   rM   r   (  s   
c                 C   rO   )z
        **[Required]** Gets the time_created of this Model.
        When the model was created, as an RFC3339 datetime string.


        :return: The time_created of this Model.
        :rtype: datetime
        r<   rQ   rL   rL   rM   r   6  rR   zModel.time_createdc                 C   rS   )z
        Sets the time_created of this Model.
        When the model was created, as an RFC3339 datetime string.


        :param time_created: The time_created of this Model.
        :type: datetime
        Nrf   )rJ   r   rL   rL   rM   r   B  rT   c                 C   rO   )z
        Gets the time_updated of this Model.
        When the model was updated, as an RFC3339 datetime string.


        :return: The time_updated of this Model.
        :rtype: datetime
        r=   rQ   rL   rL   rM   r!   N  rR   zModel.time_updatedc                 C   rS   )z
        Sets the time_updated of this Model.
        When the model was updated, as an RFC3339 datetime string.


        :param time_updated: The time_updated of this Model.
        :type: datetime
        Nrg   )rJ   r!   rL   rL   rM   r!   Z  rT   c                 C   rO   )a  
        **[Required]** Gets the lifecycle_state of this Model.
        The current state of the model.

        Allowed values for this property are: "CREATING", "UPDATING", "ACTIVE", "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 Model.
        :rtype: str
        )r>   rQ   rL   rL   rM   r"   f  rX   zModel.lifecycle_statec                 C   s    g d}t ||sd}|| _dS )z
        Sets the lifecycle_state of this Model.
        The current state of the model.


        :param lifecycle_state: The lifecycle_state of this Model.
        :type: str
        )r	   r
   r   r   r   r   rY   N)r   r>   )rJ   r"   rZ   rL   rL   rM   r"   u  r[   c                 C   rO   )a  
        Gets the lifecycle_details of this Model.
        A message describing the current state in more detail, that can provide actionable information if training failed.


        :return: The lifecycle_details of this Model.
        :rtype: str
        r?   rQ   rL   rL   rM   r#     rR   zModel.lifecycle_detailsc                 C   rS   )a  
        Sets the lifecycle_details of this Model.
        A message describing the current state in more detail, that can provide actionable information if training failed.


        :param lifecycle_details: The lifecycle_details of this Model.
        :type: str
        Nrh   )rJ   r#   rL   rL   rM   r#     rT   c                 C   rO   )z
        Gets the precision of this Model.
        The precision of the trained model.


        :return: The precision of this Model.
        :rtype: float
        r@   rQ   rL   rL   rM   r%     rR   zModel.precisionc                 C   rS   )z
        Sets the precision of this Model.
        The precision of the trained model.


        :param precision: The precision of this Model.
        :type: float
        Nri   )rJ   r%   rL   rL   rM   r%     rT   c                 C   rO   )z
        Gets the recall of this Model.
        Recall of the trained model.


        :return: The recall of this Model.
        :rtype: float
        rA   rQ   rL   rL   rM   r&     rR   zModel.recallc                 C   rS   )z
        Sets the recall of this Model.
        Recall of the trained model.


        :param recall: The recall of this Model.
        :type: float
        Nrj   )rJ   r&   rL   rL   rM   r&     rT   c                 C   rO   )z
        Gets the average_precision of this Model.
        The mean average precision of the trained model.


        :return: The average_precision of this Model.
        :rtype: float
        rB   rQ   rL   rL   rM   r'     rR   zModel.average_precisionc                 C   rS   )z
        Sets the average_precision of this Model.
        The mean average precision of the trained model.


        :param average_precision: The average_precision of this Model.
        :type: float
        Nrk   )rJ   r'   rL   rL   rM   r'     rT   c                 C   rO   )z
        Gets the confidence_threshold of this Model.
        The intersection over the union threshold used for calculating precision and recall.


        :return: The confidence_threshold of this Model.
        :rtype: float
        rC   rQ   rL   rL   rM   r(     rR   zModel.confidence_thresholdc                 C   rS   )z
        Sets the confidence_threshold of this Model.
        The intersection over the union threshold used for calculating precision and recall.


        :param confidence_threshold: The confidence_threshold of this Model.
        :type: float
        Nrl   )rJ   r(   rL   rL   rM   r(     rT   c                 C   rO   )z
        Gets the total_image_count of this Model.
        The number of images in the dataset used to train, validate, and test the model.


        :return: The total_image_count of this Model.
        :rtype: int
        rD   rQ   rL   rL   rM   r)     rR   zModel.total_image_countc                 C   rS   )z
        Sets the total_image_count of this Model.
        The number of images in the dataset used to train, validate, and test the model.


        :param total_image_count: The total_image_count of this Model.
        :type: int
        Nrm   )rJ   r)   rL   rL   rM   r)     rT   c                 C   rO   )z
        Gets the test_image_count of this Model.
        The number of images set aside for evaluating model performance metrics after training.


        :return: The test_image_count of this Model.
        :rtype: int
        rE   rQ   rL   rL   rM   r*     rR   zModel.test_image_countc                 C   rS   )z
        Sets the test_image_count of this Model.
        The number of images set aside for evaluating model performance metrics after training.


        :param test_image_count: The test_image_count of this Model.
        :type: int
        Nrn   )rJ   r*   rL   rL   rM   r*      rT   c                 C   rO   )z
        Gets the metrics of this Model.
        The complete set of per-label metrics for successfully trained models.


        :return: The metrics of this Model.
        :rtype: str
        rF   rQ   rL   rL   rM   r+   ,  rR   zModel.metricsc                 C   rS   )z
        Sets the metrics of this Model.
        The complete set of per-label metrics for successfully trained models.


        :param metrics: The metrics of this Model.
        :type: str
        Nro   )rJ   r+   rL   rL   rM   r+   8  rT   c                 C   rO   )a;  
        Gets the freeform_tags of this Model.
        A simple key-value pair that is applied without any predefined name, type, or scope. It exists for cross-compatibility only.
        For example: `{"bar-key": "value"}`


        :return: The freeform_tags of this Model.
        :rtype: dict(str, str)
        rG   rQ   rL   rL   rM   r,   D     zModel.freeform_tagsc                 C   rS   )aG  
        Sets the freeform_tags of this Model.
        A simple key-value pair that is applied without any predefined name, type, or scope. It exists for cross-compatibility only.
        For example: `{"bar-key": "value"}`


        :param freeform_tags: The freeform_tags of this Model.
        :type: dict(str, str)
        Nrp   )rJ   r,   rL   rL   rM   r,   Q     
c                 C   rO   )a/  
        Gets the defined_tags of this Model.
        Defined tags for this resource. Each key is predefined and scoped to a namespace.
        For example: `{"foo-namespace": {"bar-key": "value"}}`


        :return: The defined_tags of this Model.
        :rtype: dict(str, dict(str, object))
        rH   rQ   rL   rL   rM   r-   ^  rq   zModel.defined_tagsc                 C   rS   )a:  
        Sets the defined_tags of this Model.
        Defined tags for this resource. Each key is predefined and scoped to a namespace.
        For example: `{"foo-namespace": {"bar-key": "value"}}`


        :param defined_tags: The defined_tags of this Model.
        :type: dict(str, dict(str, object))
        Nrs   )rJ   r-   rL   rL   rM   r-   k  rr   c                 C   rO   )a,  
        Gets the system_tags of this Model.
        Usage of system tag keys. These predefined keys are scoped to namespaces.
        For example: `{"orcl-cloud": {"free-tier-retained": "true"}}`


        :return: The system_tags of this Model.
        :rtype: dict(str, dict(str, object))
        rI   rQ   rL   rL   rM   r.   x  rq   zModel.system_tagsc                 C   rS   )a6  
        Sets the system_tags of this Model.
        Usage of system tag keys. These predefined keys are scoped to namespaces.
        For example: `{"orcl-cloud": {"free-tier-retained": "true"}}`


        :param system_tags: The system_tags of this Model.
        :type: dict(str, dict(str, object))
        Nrt   )rJ   r.   rL   rL   rM   r.     rr   c                 C   s   t | S N)r   rQ   rL   rL   rM   __repr__  s   zModel.__repr__c                 C   s   |d u rdS | j |j kS )NF)__dict__rJ   otherrL   rL   rM   __eq__  s   zModel.__eq__c                 C   s
   | |k S ru   rL   rx   rL   rL   rM   __ne__  s   
zModel.__ne__N)-__name__
__module____qualname____doc__ZMODEL_TYPE_IMAGE_CLASSIFICATIONZMODEL_TYPE_OBJECT_DETECTIONZLIFECYCLE_STATE_CREATINGZLIFECYCLE_STATE_UPDATINGZLIFECYCLE_STATE_ACTIVEZLIFECYCLE_STATE_DELETINGZLIFECYCLE_STATE_DELETEDZLIFECYCLE_STATE_FAILEDrN   propertyr   setterr   r   r   r   r   r   r   r   r   r   r   r   r   r!   r"   r#   r%   r&   r'   r(   r)   r*   r+   r,   r-   r.   rv   rz   r{   rL   rL   rL   rM   r      s     O
















	
	
	
	
	
	































r   N)Zoci.utilr   r   r   Zoci.decoratorsr   objectr   rL   rL   rL   rM   <module>   s   