From 69b8be4481d7172957ed9b2744f6174f4d84cce7 Mon Sep 17 00:00:00 2001 From: bhagwatvyas Date: Tue, 4 Feb 2020 18:17:59 +0000 Subject: [PATCH] Releasing version 2.10.3 --- CHANGELOG.rst | 9 + docs/api/data_science.rst | 45 + .../oci.data_science.DataScienceClient.rst | 8 + ...e.DataScienceClientCompositeOperations.rst | 8 + ...e.models.ChangeModelCompartmentDetails.rst | 11 + ...hangeNotebookSessionCompartmentDetails.rst | 11 + ...models.ChangeProjectCompartmentDetails.rst | 11 + ...data_science.models.CreateModelDetails.rst | 11 + ...ce.models.CreateModelProvenanceDetails.rst | 11 + ...ce.models.CreateNotebookSessionDetails.rst | 11 + ...ta_science.models.CreateProjectDetails.rst | 11 + .../models/oci.data_science.models.Model.rst | 11 + ...ci.data_science.models.ModelProvenance.rst | 11 + .../oci.data_science.models.ModelSummary.rst | 11 + ...ci.data_science.models.NotebookSession.rst | 11 + ...ls.NotebookSessionConfigurationDetails.rst | 11 + ...nce.models.NotebookSessionShapeSummary.rst | 11 + ..._science.models.NotebookSessionSummary.rst | 11 + .../oci.data_science.models.Project.rst | 11 + ...oci.data_science.models.ProjectSummary.rst | 11 + ...data_science.models.UpdateModelDetails.rst | 11 + ...ce.models.UpdateModelProvenanceDetails.rst | 11 + ...ce.models.UpdateNotebookSessionDetails.rst | 11 + ...ta_science.models.UpdateProjectDetails.rst | 11 + .../oci.data_science.models.WorkRequest.rst | 11 + ...i.data_science.models.WorkRequestError.rst | 11 + ...ata_science.models.WorkRequestLogEntry.rst | 11 + ...ata_science.models.WorkRequestResource.rst | 11 + ...data_science.models.WorkRequestSummary.rst | 11 + docs/api/landing.rst | 2 + docs/api/request_and_response.rst | 13 +- examples/tagging.py | 10 +- src/oci/__init__.py | 4 +- src/oci/data_science/__init__.py | 11 + src/oci/data_science/data_science_client.py | 3205 +++++++++++++++++ ...ata_science_client_composite_operations.py | 572 +++ src/oci/data_science/models/__init__.py | 59 + .../change_model_compartment_details.py | 73 + ...ge_notebook_session_compartment_details.py | 73 + .../change_project_compartment_details.py | 73 + .../models/create_model_details.py | 246 ++ .../models/create_model_provenance_details.py | 193 + .../models/create_notebook_session_details.py | 242 ++ .../models/create_project_details.py | 209 ++ src/oci/data_science/models/model.py | 406 +++ .../data_science/models/model_provenance.py | 193 + src/oci/data_science/models/model_summary.py | 375 ++ .../data_science/models/notebook_session.py | 478 +++ .../notebook_session_configuration_details.py | 135 + .../models/notebook_session_shape_summary.py | 131 + .../models/notebook_session_summary.py | 447 +++ src/oci/data_science/models/project.py | 367 ++ .../data_science/models/project_summary.py | 367 ++ .../models/update_model_details.py | 176 + .../models/update_model_provenance_details.py | 193 + .../models/update_notebook_session_details.py | 173 + .../models/update_project_details.py | 174 + src/oci/data_science/models/work_request.py | 401 +++ .../data_science/models/work_request_error.py | 135 + .../models/work_request_log_entry.py | 100 + .../models/work_request_resource.py | 194 + .../models/work_request_summary.py | 401 +++ src/oci/regions.py | 8 +- src/oci/response.py | 14 +- src/oci/service_endpoints.py | 4 +- src/oci/version.py | 2 +- 66 files changed, 10185 insertions(+), 19 deletions(-) create mode 100644 docs/api/data_science.rst create mode 100644 docs/api/data_science/client/oci.data_science.DataScienceClient.rst create mode 100644 docs/api/data_science/client/oci.data_science.DataScienceClientCompositeOperations.rst create mode 100644 docs/api/data_science/models/oci.data_science.models.ChangeModelCompartmentDetails.rst create mode 100644 docs/api/data_science/models/oci.data_science.models.ChangeNotebookSessionCompartmentDetails.rst create mode 100644 docs/api/data_science/models/oci.data_science.models.ChangeProjectCompartmentDetails.rst create mode 100644 docs/api/data_science/models/oci.data_science.models.CreateModelDetails.rst create mode 100644 docs/api/data_science/models/oci.data_science.models.CreateModelProvenanceDetails.rst create mode 100644 docs/api/data_science/models/oci.data_science.models.CreateNotebookSessionDetails.rst create mode 100644 docs/api/data_science/models/oci.data_science.models.CreateProjectDetails.rst create mode 100644 docs/api/data_science/models/oci.data_science.models.Model.rst create mode 100644 docs/api/data_science/models/oci.data_science.models.ModelProvenance.rst create mode 100644 docs/api/data_science/models/oci.data_science.models.ModelSummary.rst create mode 100644 docs/api/data_science/models/oci.data_science.models.NotebookSession.rst create mode 100644 docs/api/data_science/models/oci.data_science.models.NotebookSessionConfigurationDetails.rst create mode 100644 docs/api/data_science/models/oci.data_science.models.NotebookSessionShapeSummary.rst create mode 100644 docs/api/data_science/models/oci.data_science.models.NotebookSessionSummary.rst create mode 100644 docs/api/data_science/models/oci.data_science.models.Project.rst create mode 100644 docs/api/data_science/models/oci.data_science.models.ProjectSummary.rst create mode 100644 docs/api/data_science/models/oci.data_science.models.UpdateModelDetails.rst create mode 100644 docs/api/data_science/models/oci.data_science.models.UpdateModelProvenanceDetails.rst create mode 100644 docs/api/data_science/models/oci.data_science.models.UpdateNotebookSessionDetails.rst create mode 100644 docs/api/data_science/models/oci.data_science.models.UpdateProjectDetails.rst create mode 100644 docs/api/data_science/models/oci.data_science.models.WorkRequest.rst create mode 100644 docs/api/data_science/models/oci.data_science.models.WorkRequestError.rst create mode 100644 docs/api/data_science/models/oci.data_science.models.WorkRequestLogEntry.rst create mode 100644 docs/api/data_science/models/oci.data_science.models.WorkRequestResource.rst create mode 100644 docs/api/data_science/models/oci.data_science.models.WorkRequestSummary.rst create mode 100644 src/oci/data_science/__init__.py create mode 100644 src/oci/data_science/data_science_client.py create mode 100644 src/oci/data_science/data_science_client_composite_operations.py create mode 100644 src/oci/data_science/models/__init__.py create mode 100644 src/oci/data_science/models/change_model_compartment_details.py create mode 100644 src/oci/data_science/models/change_notebook_session_compartment_details.py create mode 100644 src/oci/data_science/models/change_project_compartment_details.py create mode 100644 src/oci/data_science/models/create_model_details.py create mode 100644 src/oci/data_science/models/create_model_provenance_details.py create mode 100644 src/oci/data_science/models/create_notebook_session_details.py create mode 100644 src/oci/data_science/models/create_project_details.py create mode 100644 src/oci/data_science/models/model.py create mode 100644 src/oci/data_science/models/model_provenance.py create mode 100644 src/oci/data_science/models/model_summary.py create mode 100644 src/oci/data_science/models/notebook_session.py create mode 100644 src/oci/data_science/models/notebook_session_configuration_details.py create mode 100644 src/oci/data_science/models/notebook_session_shape_summary.py create mode 100644 src/oci/data_science/models/notebook_session_summary.py create mode 100644 src/oci/data_science/models/project.py create mode 100644 src/oci/data_science/models/project_summary.py create mode 100644 src/oci/data_science/models/update_model_details.py create mode 100644 src/oci/data_science/models/update_model_provenance_details.py create mode 100644 src/oci/data_science/models/update_notebook_session_details.py create mode 100644 src/oci/data_science/models/update_project_details.py create mode 100644 src/oci/data_science/models/work_request.py create mode 100644 src/oci/data_science/models/work_request_error.py create mode 100644 src/oci/data_science/models/work_request_log_entry.py create mode 100644 src/oci/data_science/models/work_request_resource.py create mode 100644 src/oci/data_science/models/work_request_summary.py diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 7897934a00..e84bd2df72 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -3,6 +3,15 @@ Change Log All notable changes to this project will be documented in this file. The format is based on `Keep a Changelog `_. +==================== +2.10.3 - 2020-02-04 +==================== + +Added +----- +* Support for the Data Science service +* Support for calling Oracle Cloud Infrastructure services in the ap-osaka-1 and ap-melbourne-1 regions + ==================== 2.10.2 - 2020-01-28 ==================== diff --git a/docs/api/data_science.rst b/docs/api/data_science.rst new file mode 100644 index 0000000000..a8d6c68844 --- /dev/null +++ b/docs/api/data_science.rst @@ -0,0 +1,45 @@ +Data Science +============ + +.. autosummary:: + :toctree: data_science/client + :nosignatures: + :template: autosummary/service_client.rst + + oci.data_science.DataScienceClient + oci.data_science.DataScienceClientCompositeOperations + +-------- + Models +-------- + +.. autosummary:: + :toctree: data_science/models + :nosignatures: + :template: autosummary/model_class.rst + + oci.data_science.models.ChangeModelCompartmentDetails + oci.data_science.models.ChangeNotebookSessionCompartmentDetails + oci.data_science.models.ChangeProjectCompartmentDetails + oci.data_science.models.CreateModelDetails + oci.data_science.models.CreateModelProvenanceDetails + oci.data_science.models.CreateNotebookSessionDetails + oci.data_science.models.CreateProjectDetails + oci.data_science.models.Model + oci.data_science.models.ModelProvenance + oci.data_science.models.ModelSummary + oci.data_science.models.NotebookSession + oci.data_science.models.NotebookSessionConfigurationDetails + oci.data_science.models.NotebookSessionShapeSummary + oci.data_science.models.NotebookSessionSummary + oci.data_science.models.Project + oci.data_science.models.ProjectSummary + oci.data_science.models.UpdateModelDetails + oci.data_science.models.UpdateModelProvenanceDetails + oci.data_science.models.UpdateNotebookSessionDetails + oci.data_science.models.UpdateProjectDetails + oci.data_science.models.WorkRequest + oci.data_science.models.WorkRequestError + oci.data_science.models.WorkRequestLogEntry + oci.data_science.models.WorkRequestResource + oci.data_science.models.WorkRequestSummary diff --git a/docs/api/data_science/client/oci.data_science.DataScienceClient.rst b/docs/api/data_science/client/oci.data_science.DataScienceClient.rst new file mode 100644 index 0000000000..21a329b57d --- /dev/null +++ b/docs/api/data_science/client/oci.data_science.DataScienceClient.rst @@ -0,0 +1,8 @@ +DataScienceClient +================= + +.. currentmodule:: oci.data_science + +.. autoclass:: DataScienceClient + :special-members: __init__ + :members: \ No newline at end of file diff --git a/docs/api/data_science/client/oci.data_science.DataScienceClientCompositeOperations.rst b/docs/api/data_science/client/oci.data_science.DataScienceClientCompositeOperations.rst new file mode 100644 index 0000000000..1e6a4c5962 --- /dev/null +++ b/docs/api/data_science/client/oci.data_science.DataScienceClientCompositeOperations.rst @@ -0,0 +1,8 @@ +DataScienceClientCompositeOperations +==================================== + +.. currentmodule:: oci.data_science + +.. autoclass:: DataScienceClientCompositeOperations + :special-members: __init__ + :members: \ No newline at end of file diff --git a/docs/api/data_science/models/oci.data_science.models.ChangeModelCompartmentDetails.rst b/docs/api/data_science/models/oci.data_science.models.ChangeModelCompartmentDetails.rst new file mode 100644 index 0000000000..60734e3ed0 --- /dev/null +++ b/docs/api/data_science/models/oci.data_science.models.ChangeModelCompartmentDetails.rst @@ -0,0 +1,11 @@ +ChangeModelCompartmentDetails +============================= + +.. currentmodule:: oci.data_science.models + +.. autoclass:: ChangeModelCompartmentDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_science/models/oci.data_science.models.ChangeNotebookSessionCompartmentDetails.rst b/docs/api/data_science/models/oci.data_science.models.ChangeNotebookSessionCompartmentDetails.rst new file mode 100644 index 0000000000..f38b99d322 --- /dev/null +++ b/docs/api/data_science/models/oci.data_science.models.ChangeNotebookSessionCompartmentDetails.rst @@ -0,0 +1,11 @@ +ChangeNotebookSessionCompartmentDetails +======================================= + +.. currentmodule:: oci.data_science.models + +.. autoclass:: ChangeNotebookSessionCompartmentDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_science/models/oci.data_science.models.ChangeProjectCompartmentDetails.rst b/docs/api/data_science/models/oci.data_science.models.ChangeProjectCompartmentDetails.rst new file mode 100644 index 0000000000..f7778a6e7f --- /dev/null +++ b/docs/api/data_science/models/oci.data_science.models.ChangeProjectCompartmentDetails.rst @@ -0,0 +1,11 @@ +ChangeProjectCompartmentDetails +=============================== + +.. currentmodule:: oci.data_science.models + +.. autoclass:: ChangeProjectCompartmentDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_science/models/oci.data_science.models.CreateModelDetails.rst b/docs/api/data_science/models/oci.data_science.models.CreateModelDetails.rst new file mode 100644 index 0000000000..8e32e2dee5 --- /dev/null +++ b/docs/api/data_science/models/oci.data_science.models.CreateModelDetails.rst @@ -0,0 +1,11 @@ +CreateModelDetails +================== + +.. currentmodule:: oci.data_science.models + +.. autoclass:: CreateModelDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_science/models/oci.data_science.models.CreateModelProvenanceDetails.rst b/docs/api/data_science/models/oci.data_science.models.CreateModelProvenanceDetails.rst new file mode 100644 index 0000000000..1aa25cf312 --- /dev/null +++ b/docs/api/data_science/models/oci.data_science.models.CreateModelProvenanceDetails.rst @@ -0,0 +1,11 @@ +CreateModelProvenanceDetails +============================ + +.. currentmodule:: oci.data_science.models + +.. autoclass:: CreateModelProvenanceDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_science/models/oci.data_science.models.CreateNotebookSessionDetails.rst b/docs/api/data_science/models/oci.data_science.models.CreateNotebookSessionDetails.rst new file mode 100644 index 0000000000..578983c857 --- /dev/null +++ b/docs/api/data_science/models/oci.data_science.models.CreateNotebookSessionDetails.rst @@ -0,0 +1,11 @@ +CreateNotebookSessionDetails +============================ + +.. currentmodule:: oci.data_science.models + +.. autoclass:: CreateNotebookSessionDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_science/models/oci.data_science.models.CreateProjectDetails.rst b/docs/api/data_science/models/oci.data_science.models.CreateProjectDetails.rst new file mode 100644 index 0000000000..912368da40 --- /dev/null +++ b/docs/api/data_science/models/oci.data_science.models.CreateProjectDetails.rst @@ -0,0 +1,11 @@ +CreateProjectDetails +==================== + +.. currentmodule:: oci.data_science.models + +.. autoclass:: CreateProjectDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_science/models/oci.data_science.models.Model.rst b/docs/api/data_science/models/oci.data_science.models.Model.rst new file mode 100644 index 0000000000..cf6547d8c6 --- /dev/null +++ b/docs/api/data_science/models/oci.data_science.models.Model.rst @@ -0,0 +1,11 @@ +Model +===== + +.. currentmodule:: oci.data_science.models + +.. autoclass:: Model + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_science/models/oci.data_science.models.ModelProvenance.rst b/docs/api/data_science/models/oci.data_science.models.ModelProvenance.rst new file mode 100644 index 0000000000..bb62f4d19d --- /dev/null +++ b/docs/api/data_science/models/oci.data_science.models.ModelProvenance.rst @@ -0,0 +1,11 @@ +ModelProvenance +=============== + +.. currentmodule:: oci.data_science.models + +.. autoclass:: ModelProvenance + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_science/models/oci.data_science.models.ModelSummary.rst b/docs/api/data_science/models/oci.data_science.models.ModelSummary.rst new file mode 100644 index 0000000000..caa915ba38 --- /dev/null +++ b/docs/api/data_science/models/oci.data_science.models.ModelSummary.rst @@ -0,0 +1,11 @@ +ModelSummary +============ + +.. currentmodule:: oci.data_science.models + +.. autoclass:: ModelSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_science/models/oci.data_science.models.NotebookSession.rst b/docs/api/data_science/models/oci.data_science.models.NotebookSession.rst new file mode 100644 index 0000000000..e043dfcb59 --- /dev/null +++ b/docs/api/data_science/models/oci.data_science.models.NotebookSession.rst @@ -0,0 +1,11 @@ +NotebookSession +=============== + +.. currentmodule:: oci.data_science.models + +.. autoclass:: NotebookSession + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_science/models/oci.data_science.models.NotebookSessionConfigurationDetails.rst b/docs/api/data_science/models/oci.data_science.models.NotebookSessionConfigurationDetails.rst new file mode 100644 index 0000000000..c7ed77c45d --- /dev/null +++ b/docs/api/data_science/models/oci.data_science.models.NotebookSessionConfigurationDetails.rst @@ -0,0 +1,11 @@ +NotebookSessionConfigurationDetails +=================================== + +.. currentmodule:: oci.data_science.models + +.. autoclass:: NotebookSessionConfigurationDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_science/models/oci.data_science.models.NotebookSessionShapeSummary.rst b/docs/api/data_science/models/oci.data_science.models.NotebookSessionShapeSummary.rst new file mode 100644 index 0000000000..efd811ebc7 --- /dev/null +++ b/docs/api/data_science/models/oci.data_science.models.NotebookSessionShapeSummary.rst @@ -0,0 +1,11 @@ +NotebookSessionShapeSummary +=========================== + +.. currentmodule:: oci.data_science.models + +.. autoclass:: NotebookSessionShapeSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_science/models/oci.data_science.models.NotebookSessionSummary.rst b/docs/api/data_science/models/oci.data_science.models.NotebookSessionSummary.rst new file mode 100644 index 0000000000..3d27368d48 --- /dev/null +++ b/docs/api/data_science/models/oci.data_science.models.NotebookSessionSummary.rst @@ -0,0 +1,11 @@ +NotebookSessionSummary +====================== + +.. currentmodule:: oci.data_science.models + +.. autoclass:: NotebookSessionSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_science/models/oci.data_science.models.Project.rst b/docs/api/data_science/models/oci.data_science.models.Project.rst new file mode 100644 index 0000000000..b08fe2cb8c --- /dev/null +++ b/docs/api/data_science/models/oci.data_science.models.Project.rst @@ -0,0 +1,11 @@ +Project +======= + +.. currentmodule:: oci.data_science.models + +.. autoclass:: Project + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_science/models/oci.data_science.models.ProjectSummary.rst b/docs/api/data_science/models/oci.data_science.models.ProjectSummary.rst new file mode 100644 index 0000000000..8d5dc785cf --- /dev/null +++ b/docs/api/data_science/models/oci.data_science.models.ProjectSummary.rst @@ -0,0 +1,11 @@ +ProjectSummary +============== + +.. currentmodule:: oci.data_science.models + +.. autoclass:: ProjectSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_science/models/oci.data_science.models.UpdateModelDetails.rst b/docs/api/data_science/models/oci.data_science.models.UpdateModelDetails.rst new file mode 100644 index 0000000000..f3fe823d4e --- /dev/null +++ b/docs/api/data_science/models/oci.data_science.models.UpdateModelDetails.rst @@ -0,0 +1,11 @@ +UpdateModelDetails +================== + +.. currentmodule:: oci.data_science.models + +.. autoclass:: UpdateModelDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_science/models/oci.data_science.models.UpdateModelProvenanceDetails.rst b/docs/api/data_science/models/oci.data_science.models.UpdateModelProvenanceDetails.rst new file mode 100644 index 0000000000..3bd9bee66c --- /dev/null +++ b/docs/api/data_science/models/oci.data_science.models.UpdateModelProvenanceDetails.rst @@ -0,0 +1,11 @@ +UpdateModelProvenanceDetails +============================ + +.. currentmodule:: oci.data_science.models + +.. autoclass:: UpdateModelProvenanceDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_science/models/oci.data_science.models.UpdateNotebookSessionDetails.rst b/docs/api/data_science/models/oci.data_science.models.UpdateNotebookSessionDetails.rst new file mode 100644 index 0000000000..418c20f6ff --- /dev/null +++ b/docs/api/data_science/models/oci.data_science.models.UpdateNotebookSessionDetails.rst @@ -0,0 +1,11 @@ +UpdateNotebookSessionDetails +============================ + +.. currentmodule:: oci.data_science.models + +.. autoclass:: UpdateNotebookSessionDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_science/models/oci.data_science.models.UpdateProjectDetails.rst b/docs/api/data_science/models/oci.data_science.models.UpdateProjectDetails.rst new file mode 100644 index 0000000000..1e70aae57d --- /dev/null +++ b/docs/api/data_science/models/oci.data_science.models.UpdateProjectDetails.rst @@ -0,0 +1,11 @@ +UpdateProjectDetails +==================== + +.. currentmodule:: oci.data_science.models + +.. autoclass:: UpdateProjectDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_science/models/oci.data_science.models.WorkRequest.rst b/docs/api/data_science/models/oci.data_science.models.WorkRequest.rst new file mode 100644 index 0000000000..fee007daff --- /dev/null +++ b/docs/api/data_science/models/oci.data_science.models.WorkRequest.rst @@ -0,0 +1,11 @@ +WorkRequest +=========== + +.. currentmodule:: oci.data_science.models + +.. autoclass:: WorkRequest + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_science/models/oci.data_science.models.WorkRequestError.rst b/docs/api/data_science/models/oci.data_science.models.WorkRequestError.rst new file mode 100644 index 0000000000..94f91dbe51 --- /dev/null +++ b/docs/api/data_science/models/oci.data_science.models.WorkRequestError.rst @@ -0,0 +1,11 @@ +WorkRequestError +================ + +.. currentmodule:: oci.data_science.models + +.. autoclass:: WorkRequestError + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_science/models/oci.data_science.models.WorkRequestLogEntry.rst b/docs/api/data_science/models/oci.data_science.models.WorkRequestLogEntry.rst new file mode 100644 index 0000000000..52cfb58325 --- /dev/null +++ b/docs/api/data_science/models/oci.data_science.models.WorkRequestLogEntry.rst @@ -0,0 +1,11 @@ +WorkRequestLogEntry +=================== + +.. currentmodule:: oci.data_science.models + +.. autoclass:: WorkRequestLogEntry + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_science/models/oci.data_science.models.WorkRequestResource.rst b/docs/api/data_science/models/oci.data_science.models.WorkRequestResource.rst new file mode 100644 index 0000000000..0362488e2c --- /dev/null +++ b/docs/api/data_science/models/oci.data_science.models.WorkRequestResource.rst @@ -0,0 +1,11 @@ +WorkRequestResource +=================== + +.. currentmodule:: oci.data_science.models + +.. autoclass:: WorkRequestResource + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_science/models/oci.data_science.models.WorkRequestSummary.rst b/docs/api/data_science/models/oci.data_science.models.WorkRequestSummary.rst new file mode 100644 index 0000000000..57d2a7290b --- /dev/null +++ b/docs/api/data_science/models/oci.data_science.models.WorkRequestSummary.rst @@ -0,0 +1,11 @@ +WorkRequestSummary +================== + +.. currentmodule:: oci.data_science.models + +.. autoclass:: WorkRequestSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/landing.rst b/docs/api/landing.rst index 1297110a04..c364e7e7de 100644 --- a/docs/api/landing.rst +++ b/docs/api/landing.rst @@ -19,6 +19,7 @@ API Reference * :doc:`Virtual Network ` * :doc:`Data Catalog ` * :doc:`Data Flow ` +* :doc:`Data Science ` * :doc:`Database ` * :doc:`DNS ` * :doc:`Appliance Export Job ` @@ -86,6 +87,7 @@ API Reference core data_catalog data_flow + data_science database dns dts diff --git a/docs/api/request_and_response.rst b/docs/api/request_and_response.rst index def584f2cb..844e2107b0 100644 --- a/docs/api/request_and_response.rst +++ b/docs/api/request_and_response.rst @@ -1,20 +1,19 @@ +==================== Request and Response -~~~~~~~~~~~~~~~~~~~~~ +==================== -========= Request -========= -.. module:: oci.request +------- +.. automodule:: oci.request .. autoclass:: Request :members: :undoc-members: -========= Response -========= -.. module:: oci.response +-------- +.. automodule:: oci.response .. autoclass:: Response :members: diff --git a/examples/tagging.py b/examples/tagging.py index de54428942..4826d11969 100644 --- a/examples/tagging.py +++ b/examples/tagging.py @@ -87,8 +87,8 @@ # documentation to see what these are (https://oracle-cloud-infrastructure-python-sdk.readthedocs.io/en/latest/api/landing.html) num_tries = 0 while True: - # You may get a 404 if you create/reactivate a tag and try and use it straight away. If you have a delay/sleep between - # creating the tag and then using it (or alternatively retry the 404) that may resolve the issue. + # You may get a 400 if you create/reactivate a tag and try and use it straight away. If you have a delay/sleep between + # creating the tag and then using it (or alternatively retry the 400) that may resolve the issue. try: create_vcn_response = virtual_network.create_vcn( oci.core.models.CreateVcnDetails( @@ -105,13 +105,13 @@ print('Created VCN with tags: {}'.format(vcn_after_wait_response.data)) break except oci.exceptions.ServiceError as e: - if e.status == 404: - print('Retrying on 404: {}'.format(e)) + if e.status == 400: + print('Retrying on 400: {}'.format(e)) num_tries += 1 if num_tries >= 3: # If we can't get it in 3 tries, something else may be going on raise else: - time.sleep(2) + time.sleep(5) else: raise diff --git a/src/oci/__init__.py b/src/oci/__init__.py index 1e12b82f90..a65d9b75cc 100644 --- a/src/oci/__init__.py +++ b/src/oci/__init__.py @@ -1,7 +1,7 @@ # coding: utf-8 # Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. -from . import analytics, announcements_service, apigateway, application_migration, audit, autoscaling, budget, container_engine, core, data_catalog, data_flow, database, dns, dts, email, events, file_storage, functions, healthchecks, identity, integration, key_management, limits, load_balancer, marketplace, monitoring, object_storage, oce, oda, ons, os_management, resource_manager, resource_search, streaming, waas, work_requests +from . import analytics, announcements_service, apigateway, application_migration, audit, autoscaling, budget, container_engine, core, data_catalog, data_flow, data_science, database, dns, dts, email, events, file_storage, functions, healthchecks, identity, integration, key_management, limits, load_balancer, marketplace, monitoring, object_storage, oce, oda, ons, os_management, resource_manager, resource_search, streaming, waas, work_requests from . import auth, config, constants, decorators, exceptions, regions, pagination, retry, fips from .base_client import BaseClient from .request import Request @@ -14,5 +14,5 @@ __all__ = [ "BaseClient", "Error", "Request", "Response", "Signer", "config", "constants", "decorators", "exceptions", "regions", "wait_until", "pagination", "auth", "retry", "fips", - "analytics", "announcements_service", "apigateway", "application_migration", "audit", "autoscaling", "budget", "container_engine", "core", "data_catalog", "data_flow", "database", "dns", "dts", "email", "events", "file_storage", "functions", "healthchecks", "identity", "integration", "key_management", "limits", "load_balancer", "marketplace", "monitoring", "object_storage", "oce", "oda", "ons", "os_management", "resource_manager", "resource_search", "streaming", "waas", "work_requests" + "analytics", "announcements_service", "apigateway", "application_migration", "audit", "autoscaling", "budget", "container_engine", "core", "data_catalog", "data_flow", "data_science", "database", "dns", "dts", "email", "events", "file_storage", "functions", "healthchecks", "identity", "integration", "key_management", "limits", "load_balancer", "marketplace", "monitoring", "object_storage", "oce", "oda", "ons", "os_management", "resource_manager", "resource_search", "streaming", "waas", "work_requests" ] diff --git a/src/oci/data_science/__init__.py b/src/oci/data_science/__init__.py new file mode 100644 index 0000000000..46def94b91 --- /dev/null +++ b/src/oci/data_science/__init__.py @@ -0,0 +1,11 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + +from __future__ import absolute_import + + +from .data_science_client import DataScienceClient +from .data_science_client_composite_operations import DataScienceClientCompositeOperations +from . import models + +__all__ = ["DataScienceClient", "DataScienceClientCompositeOperations", "models"] diff --git a/src/oci/data_science/data_science_client.py b/src/oci/data_science/data_science_client.py new file mode 100644 index 0000000000..b04ecbaa67 --- /dev/null +++ b/src/oci/data_science/data_science_client.py @@ -0,0 +1,3205 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + +from __future__ import absolute_import + +from oci._vendor import requests # noqa: F401 +from oci._vendor import six + +from oci import retry # noqa: F401 +from oci.base_client import BaseClient +from oci.config import get_config_value_or_default, validate_config +from oci.signer import Signer +from oci.util import Sentinel +from .models import data_science_type_mapping +missing = Sentinel("Missing") + + +class DataScienceClient(object): + """ + Use the Data Science APIs to organize your data science work, access data and computing resources, and build, train, deploy, and manage models on Oracle Cloud. + """ + + def __init__(self, config, **kwargs): + """ + Creates a new service client + + :param dict config: + Configuration keys and values as per `SDK and Tool Configuration `__. + 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 `__ + 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 `__. + """ + validate_config(config, signer=kwargs.get('signer')) + if 'signer' in kwargs: + signer = kwargs['signer'] + else: + signer = Signer( + tenancy=config["tenancy"], + user=config["user"], + fingerprint=config["fingerprint"], + private_key_file_location=config.get("key_file"), + pass_phrase=get_config_value_or_default(config, "pass_phrase"), + private_key_content=config.get("key_content") + ) + + base_client_init_kwargs = { + 'regional_client': True, + 'service_endpoint': kwargs.get('service_endpoint'), + 'timeout': kwargs.get('timeout'), + 'base_path': '/20190101', + 'service_endpoint_template': 'https://datascience.{region}.oci.{secondLevelDomain}', + 'skip_deserialization': kwargs.get('skip_deserialization', False) + } + self.base_client = BaseClient("data_science", config, signer, data_science_type_mapping, **base_client_init_kwargs) + self.retry_strategy = kwargs.get('retry_strategy') + + def activate_model(self, model_id, **kwargs): + """ + ActivateModel + Activates the model. + + + :param str model_id: (required) + The `OCID`__ of the model. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + :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) + Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + + :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. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_science.models.Model` + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/models/{modelId}/actions/activate" + method = "POST" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "if_match", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "activate_model got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "modelId": model_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "if-match": kwargs.get("if_match", missing), + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="Model") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="Model") + + def activate_notebook_session(self, notebook_session_id, **kwargs): + """ + ActivateNotebookSession + Activates the notebook session. + + + :param str notebook_session_id: (required) + The `OCID`__ of the notebook session. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + :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) + Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + + :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. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :return: A :class:`~oci.response.Response` object with data of type None + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/notebookSessions/{notebookSessionId}/actions/activate" + method = "POST" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "if_match", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "activate_notebook_session got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "notebookSessionId": notebook_session_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "if-match": kwargs.get("if_match", missing), + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params) + + def cancel_work_request(self, work_request_id, **kwargs): + """ + CancelWorkRequest + Cancels a work request that has not started. + + + :param str work_request_id: (required) + The `OCID`__ of the work request. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + :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) + Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + + :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. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :return: A :class:`~oci.response.Response` object with data of type None + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/workRequests/{workRequestId}" + method = "DELETE" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "if_match", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "cancel_work_request got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "workRequestId": work_request_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "if-match": kwargs.get("if_match", missing), + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params) + + def change_model_compartment(self, model_id, change_model_compartment_details, **kwargs): + """ + ChangeModelCompartment + Moves a model resource into a different compartment. + + + :param str model_id: (required) + The `OCID`__ of the model. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + :param ChangeModelCompartmentDetails change_model_compartment_details: (required) + Details for changing the compartment of a model. + + :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) + Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + + :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. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :return: A :class:`~oci.response.Response` object with data of type None + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/models/{modelId}/actions/changeCompartment" + method = "POST" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "if_match", + "opc_request_id", + "opc_retry_token" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "change_model_compartment got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "modelId": model_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "if-match": kwargs.get("if_match", missing), + "opc-request-id": kwargs.get("opc_request_id", missing), + "opc-retry-token": kwargs.get("opc_retry_token", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=change_model_compartment_details) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=change_model_compartment_details) + + def change_notebook_session_compartment(self, notebook_session_id, change_notebook_session_compartment_details, **kwargs): + """ + ChangeNotebookSessionCompartment + Moves a notebook session resource into a different compartment. + + + :param str notebook_session_id: (required) + The `OCID`__ of the notebook session. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + :param ChangeNotebookSessionCompartmentDetails change_notebook_session_compartment_details: (required) + Details for changing the compartment of a notebook session. + + :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) + Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + + :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. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :return: A :class:`~oci.response.Response` object with data of type None + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/notebookSessions/{notebookSessionId}/actions/changeCompartment" + method = "POST" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "if_match", + "opc_request_id", + "opc_retry_token" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "change_notebook_session_compartment got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "notebookSessionId": notebook_session_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "if-match": kwargs.get("if_match", missing), + "opc-request-id": kwargs.get("opc_request_id", missing), + "opc-retry-token": kwargs.get("opc_retry_token", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=change_notebook_session_compartment_details) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=change_notebook_session_compartment_details) + + def change_project_compartment(self, project_id, change_project_compartment_details, **kwargs): + """ + ChangeProjectCompartment + Moves a project resource into a different compartment. + + + :param str project_id: (required) + The `OCID`__ of the project. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + :param ChangeProjectCompartmentDetails change_project_compartment_details: (required) + Details for changing the compartment of a project. + + :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) + Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + + :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. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :return: A :class:`~oci.response.Response` object with data of type None + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/projects/{projectId}/actions/changeCompartment" + method = "POST" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "if_match", + "opc_request_id", + "opc_retry_token" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "change_project_compartment got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "projectId": project_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "if-match": kwargs.get("if_match", missing), + "opc-request-id": kwargs.get("opc_request_id", missing), + "opc-retry-token": kwargs.get("opc_retry_token", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=change_project_compartment_details) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=change_project_compartment_details) + + def create_model(self, create_model_details, **kwargs): + """ + CreateModel + Creates a new model. + + + :param CreateModelDetails create_model_details: (required) + Details for creating a new model. + + :param str opc_request_id: (optional) + Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + + :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. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_science.models.Model` + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/models" + method = "POST" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "opc_request_id", + "opc_retry_token" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "create_model got unknown kwargs: {!r}".format(extra_kwargs)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing), + "opc-retry-token": kwargs.get("opc_retry_token", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + header_params=header_params, + body=create_model_details, + response_type="Model") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + header_params=header_params, + body=create_model_details, + response_type="Model") + + def create_model_artifact(self, model_id, model_artifact, **kwargs): + """ + CreateModelArtifact + Creates model artifact for specified model. + + + :param str model_id: (required) + The `OCID`__ of the model. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + :param stream model_artifact: (required) + The model artifact to upload. + + :param int content_length: (optional) + The content length of the body. + + :param str opc_request_id: (optional) + Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + + :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 content_disposition: (optional) + The content disposition of the body. + + :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. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :return: A :class:`~oci.response.Response` object with data of type None + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/models/{modelId}/artifact" + method = "POST" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "content_length", + "opc_request_id", + "opc_retry_token", + "content_disposition" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "create_model_artifact got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "modelId": model_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing), + "opc-retry-token": kwargs.get("opc_retry_token", missing), + "content-length": kwargs.get("content_length", missing), + "content-disposition": kwargs.get("content_disposition", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + # If the body parameter is optional we need to assign it to a variable so additional type checking can be performed. + try: + model_artifact + except NameError: + model_artifact = kwargs.get("model_artifact", missing) + + if model_artifact is not missing and model_artifact is not None: + if (not isinstance(model_artifact, (six.binary_type, six.string_types)) and + not hasattr(model_artifact, "read")): + raise TypeError('The body must be a string, bytes, or provide a read() method.') + + if hasattr(model_artifact, 'fileno') and hasattr(model_artifact, 'name') and model_artifact.name != '': + if requests.utils.super_len(model_artifact) == 0: + header_params['Content-Length'] = '0' + + retry_strategy = self.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + # Disable the retry_strategy to work around data corruption issue temporarily + if retry_strategy: + retry_strategy = None + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=model_artifact, + enforce_content_headers=False) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=model_artifact, + enforce_content_headers=False) + + def create_model_provenance(self, model_id, create_model_provenance_details, **kwargs): + """ + CreateModelProvenance + Creates provenance information for the specified model. + + + :param str model_id: (required) + The `OCID`__ of the model. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + :param CreateModelProvenanceDetails create_model_provenance_details: (required) + Provenance information for specified model. + + :param str opc_request_id: (optional) + Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + + :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. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_science.models.ModelProvenance` + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/models/{modelId}/provenance" + method = "POST" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "opc_request_id", + "opc_retry_token" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "create_model_provenance got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "modelId": model_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing), + "opc-retry-token": kwargs.get("opc_retry_token", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=create_model_provenance_details, + response_type="ModelProvenance") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=create_model_provenance_details, + response_type="ModelProvenance") + + def create_notebook_session(self, create_notebook_session_details, **kwargs): + """ + CreateNotebookSession + Creates a new notebook session. + + + :param CreateNotebookSessionDetails create_notebook_session_details: (required) + Details for creating a new notebook session. + + :param str opc_request_id: (optional) + Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + + :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. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_science.models.NotebookSession` + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/notebookSessions" + method = "POST" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "opc_request_id", + "opc_retry_token" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "create_notebook_session got unknown kwargs: {!r}".format(extra_kwargs)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing), + "opc-retry-token": kwargs.get("opc_retry_token", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + header_params=header_params, + body=create_notebook_session_details, + response_type="NotebookSession") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + header_params=header_params, + body=create_notebook_session_details, + response_type="NotebookSession") + + def create_project(self, create_project_details, **kwargs): + """ + CreateProject + Creates a new project. + + + :param CreateProjectDetails create_project_details: (required) + Details for creating a new project. + + :param str opc_request_id: (optional) + Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + + :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. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_science.models.Project` + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/projects" + method = "POST" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "opc_request_id", + "opc_retry_token" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "create_project got unknown kwargs: {!r}".format(extra_kwargs)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing), + "opc-retry-token": kwargs.get("opc_retry_token", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + header_params=header_params, + body=create_project_details, + response_type="Project") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + header_params=header_params, + body=create_project_details, + response_type="Project") + + def deactivate_model(self, model_id, **kwargs): + """ + DeactivateModel + Deactivates the model. + + + :param str model_id: (required) + The `OCID`__ of the model. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + :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) + Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + + :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. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_science.models.Model` + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/models/{modelId}/actions/deactivate" + method = "POST" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "if_match", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "deactivate_model got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "modelId": model_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "if-match": kwargs.get("if_match", missing), + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="Model") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="Model") + + def deactivate_notebook_session(self, notebook_session_id, **kwargs): + """ + DeactivateNotebookSession + Deactivates the notebook session. + + + :param str notebook_session_id: (required) + The `OCID`__ of the notebook session. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + :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) + Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + + :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. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :return: A :class:`~oci.response.Response` object with data of type None + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/notebookSessions/{notebookSessionId}/actions/deactivate" + method = "POST" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "if_match", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "deactivate_notebook_session got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "notebookSessionId": notebook_session_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "if-match": kwargs.get("if_match", missing), + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params) + + def delete_model(self, model_id, **kwargs): + """ + DeleteModel + Deletes the specified model. + + + :param str model_id: (required) + The `OCID`__ of the model. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + :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) + Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + + :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. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :return: A :class:`~oci.response.Response` object with data of type None + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/models/{modelId}" + method = "DELETE" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "if_match", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "delete_model got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "modelId": model_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "if-match": kwargs.get("if_match", missing), + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params) + + def delete_notebook_session(self, notebook_session_id, **kwargs): + """ + DeleteNotebookSession + Deletes the specified notebook session. Any unsaved work in this notebook session will be lost. + + + :param str notebook_session_id: (required) + The `OCID`__ of the notebook session. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + :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) + Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + + :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. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :return: A :class:`~oci.response.Response` object with data of type None + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/notebookSessions/{notebookSessionId}" + method = "DELETE" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "if_match", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "delete_notebook_session got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "notebookSessionId": notebook_session_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "if-match": kwargs.get("if_match", missing), + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params) + + def delete_project(self, project_id, **kwargs): + """ + DeleteProject + Deletes the specified project. This operation will fail unless all associated resources (such as notebook sessions or models) are in a DELETED state. You must delete all associated resources before deleting a project. + + + :param str project_id: (required) + The `OCID`__ of the project. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + :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) + Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + + :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. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :return: A :class:`~oci.response.Response` object with data of type None + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/projects/{projectId}" + method = "DELETE" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "if_match", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "delete_project got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "projectId": project_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "if-match": kwargs.get("if_match", missing), + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params) + + def get_model(self, model_id, **kwargs): + """ + GetModel + Gets the specified model's information. + + + :param str model_id: (required) + The `OCID`__ of the model. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + :param str opc_request_id: (optional) + Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + + :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. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_science.models.Model` + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/models/{modelId}" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "get_model got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "modelId": model_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="Model") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="Model") + + def get_model_artifact_content(self, model_id, **kwargs): + """ + GetModelArtifactContent + Downloads model artifact content for specified model. + + + :param str model_id: (required) + The `OCID`__ of the model. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + :param str opc_request_id: (optional) + Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + + :param str range: (optional) + Optional byte range to fetch, as described in `RFC 7233`__, section 2.1. + Note that only a single range of bytes is supported. + + __ https://tools.ietf.org/html/rfc7232#section-2.1 + + :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. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :return: A :class:`~oci.response.Response` object with data of type stream + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/models/{modelId}/artifact/content" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "opc_request_id", + "range" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "get_model_artifact_content got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "modelId": model_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/octet-stream", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing), + "range": kwargs.get("range", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="stream") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="stream") + + def get_model_provenance(self, model_id, **kwargs): + """ + GetModelProvenance + Gets provenance information for specified model. + + + :param str model_id: (required) + The `OCID`__ of the model. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + :param str opc_request_id: (optional) + Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + + :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. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_science.models.ModelProvenance` + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/models/{modelId}/provenance" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "get_model_provenance got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "modelId": model_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="ModelProvenance") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="ModelProvenance") + + def get_notebook_session(self, notebook_session_id, **kwargs): + """ + GetNotebookSession + Gets the specified notebook session's information. + + + :param str notebook_session_id: (required) + The `OCID`__ of the notebook session. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + :param str opc_request_id: (optional) + Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + + :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. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_science.models.NotebookSession` + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/notebookSessions/{notebookSessionId}" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "get_notebook_session got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "notebookSessionId": notebook_session_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="NotebookSession") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="NotebookSession") + + def get_project(self, project_id, **kwargs): + """ + GetProject + Gets the specified project's information. + + + :param str project_id: (required) + The `OCID`__ of the project. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + :param str opc_request_id: (optional) + Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + + :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. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_science.models.Project` + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/projects/{projectId}" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "get_project got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "projectId": project_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="Project") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="Project") + + def get_work_request(self, work_request_id, **kwargs): + """ + GetWorkRequest + Gets the specified work request's information. + + + :param str work_request_id: (required) + The `OCID`__ of the work request. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + :param str opc_request_id: (optional) + Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + + :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. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_science.models.WorkRequest` + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/workRequests/{workRequestId}" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "get_work_request got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "workRequestId": work_request_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="WorkRequest") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="WorkRequest") + + def head_model_artifact(self, model_id, **kwargs): + """ + HeadModelArtifact + Gets model artifact metadata for specified model. + + + :param str model_id: (required) + The `OCID`__ of the model. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + :param str opc_request_id: (optional) + Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + + :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. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :return: A :class:`~oci.response.Response` object with data of type None + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/models/{modelId}/artifact/content" + method = "HEAD" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "head_model_artifact got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "modelId": model_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params) + + def list_models(self, compartment_id, **kwargs): + """ + ListModels + Lists models in the specified compartment. + + + :param str compartment_id: (required) + Filter results by the `OCID`__ of the compartment. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + :param str id: (optional) + Filter results by `OCID`__. Must be an OCID of the correct type for the resource type. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + :param str project_id: (optional) + Filter results by the `OCID`__ of the project. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + :param str display_name: (optional) + Filter results by its user-friendly name. + + :param str lifecycle_state: (optional) + Filter results by the specified lifecycle state. Must be a valid + state for the resource type. + + Allowed values are: "ACTIVE", "DELETED", "FAILED", "INACTIVE" + + :param str created_by: (optional) + Filter results by the `OCID`__ of the user who created the resource. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + :param int limit: (optional) + For list pagination. The maximum number of results per page, + or items to return in a paginated \"List\" call. + 1 is the minimum, 1000 is the maximum. + See `List Pagination`__. + + Example: `500` + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine + + :param str page: (optional) + For list pagination. The value of the `opc-next-page` response + header from the previous \"List\" call. + + See `List Pagination`__. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine + + :param str sort_order: (optional) + Specifies sort order to use, either `ASC` (ascending) or `DESC` (descending). + + Allowed values are: "ASC", "DESC" + + :param str sort_by: (optional) + Specifies the field to sort by. Accepts only one field. + By default, when you sort by `timeCreated`, results are shown + in descending order. All other fields default to ascending order. Sort order for `displayName` field is case sensitive. + + Allowed values are: "timeCreated", "displayName", "lifecycleState" + + :param str opc_request_id: (optional) + Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + + :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. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.data_science.models.ModelSummary` + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/models" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "id", + "project_id", + "display_name", + "lifecycle_state", + "created_by", + "limit", + "page", + "sort_order", + "sort_by", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_models got unknown kwargs: {!r}".format(extra_kwargs)) + + if 'lifecycle_state' in kwargs: + lifecycle_state_allowed_values = ["ACTIVE", "DELETED", "FAILED", "INACTIVE"] + if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values: + raise ValueError( + "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values) + ) + + if 'sort_order' in kwargs: + sort_order_allowed_values = ["ASC", "DESC"] + if kwargs['sort_order'] not in sort_order_allowed_values: + raise ValueError( + "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) + ) + + if 'sort_by' in kwargs: + sort_by_allowed_values = ["timeCreated", "displayName", "lifecycleState"] + if kwargs['sort_by'] not in sort_by_allowed_values: + raise ValueError( + "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) + ) + + query_params = { + "compartmentId": compartment_id, + "id": kwargs.get("id", missing), + "projectId": kwargs.get("project_id", missing), + "displayName": kwargs.get("display_name", missing), + "lifecycleState": kwargs.get("lifecycle_state", missing), + "createdBy": kwargs.get("created_by", missing), + "limit": kwargs.get("limit", missing), + "page": kwargs.get("page", missing), + "sortOrder": kwargs.get("sort_order", missing), + "sortBy": kwargs.get("sort_by", missing) + } + query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="list[ModelSummary]") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="list[ModelSummary]") + + def list_notebook_session_shapes(self, compartment_id, **kwargs): + """ + ListNotebookSessionShapes + Lists the valid notebook session shapes. + + + :param str compartment_id: (required) + Filter results by the `OCID`__ of the compartment. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + :param str opc_request_id: (optional) + Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + + :param int limit: (optional) + For list pagination. The maximum number of results per page, + or items to return in a paginated \"List\" call. + 1 is the minimum, 1000 is the maximum. + See `List Pagination`__. + + Example: `500` + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine + + :param str page: (optional) + For list pagination. The value of the `opc-next-page` response + header from the previous \"List\" call. + + See `List Pagination`__. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine + + :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. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.data_science.models.NotebookSessionShapeSummary` + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/notebookSessionShapes" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "opc_request_id", + "limit", + "page" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_notebook_session_shapes got unknown kwargs: {!r}".format(extra_kwargs)) + + query_params = { + "compartmentId": compartment_id, + "limit": kwargs.get("limit", missing), + "page": kwargs.get("page", missing) + } + query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="list[NotebookSessionShapeSummary]") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="list[NotebookSessionShapeSummary]") + + def list_notebook_sessions(self, compartment_id, **kwargs): + """ + ListNotebookSessions + Lists notebook sessions in the specified compartment. + + + :param str compartment_id: (required) + Filter results by the `OCID`__ of the compartment. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + :param str id: (optional) + Filter results by `OCID`__. Must be an OCID of the correct type for the resource type. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + :param str project_id: (optional) + Filter results by the `OCID`__ of the project. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + :param str display_name: (optional) + Filter results by its user-friendly name. + + :param str lifecycle_state: (optional) + Filter results by the specified lifecycle state. Must be a valid + state for the resource type. + + Allowed values are: "CREATING", "ACTIVE", "DELETING", "DELETED", "FAILED", "INACTIVE", "UPDATING" + + :param str created_by: (optional) + Filter results by the `OCID`__ of the user who created the resource. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + :param int limit: (optional) + For list pagination. The maximum number of results per page, + or items to return in a paginated \"List\" call. + 1 is the minimum, 1000 is the maximum. + See `List Pagination`__. + + Example: `500` + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine + + :param str page: (optional) + For list pagination. The value of the `opc-next-page` response + header from the previous \"List\" call. + + See `List Pagination`__. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine + + :param str sort_order: (optional) + Specifies sort order to use, either `ASC` (ascending) or `DESC` (descending). + + Allowed values are: "ASC", "DESC" + + :param str sort_by: (optional) + Specifies the field to sort by. Accepts only one field. + By default, when you sort by `timeCreated`, results are shown + in descending order. When you sort by `displayName`, results are + shown in ascending order. Sort order for `displayName` field is case sensitive. + + Allowed values are: "timeCreated", "displayName" + + :param str opc_request_id: (optional) + Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + + :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. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.data_science.models.NotebookSessionSummary` + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/notebookSessions" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "id", + "project_id", + "display_name", + "lifecycle_state", + "created_by", + "limit", + "page", + "sort_order", + "sort_by", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_notebook_sessions got unknown kwargs: {!r}".format(extra_kwargs)) + + if 'lifecycle_state' in kwargs: + lifecycle_state_allowed_values = ["CREATING", "ACTIVE", "DELETING", "DELETED", "FAILED", "INACTIVE", "UPDATING"] + if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values: + raise ValueError( + "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values) + ) + + if 'sort_order' in kwargs: + sort_order_allowed_values = ["ASC", "DESC"] + if kwargs['sort_order'] not in sort_order_allowed_values: + raise ValueError( + "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) + ) + + if 'sort_by' in kwargs: + sort_by_allowed_values = ["timeCreated", "displayName"] + if kwargs['sort_by'] not in sort_by_allowed_values: + raise ValueError( + "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) + ) + + query_params = { + "compartmentId": compartment_id, + "id": kwargs.get("id", missing), + "projectId": kwargs.get("project_id", missing), + "displayName": kwargs.get("display_name", missing), + "lifecycleState": kwargs.get("lifecycle_state", missing), + "createdBy": kwargs.get("created_by", missing), + "limit": kwargs.get("limit", missing), + "page": kwargs.get("page", missing), + "sortOrder": kwargs.get("sort_order", missing), + "sortBy": kwargs.get("sort_by", missing) + } + query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="list[NotebookSessionSummary]") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="list[NotebookSessionSummary]") + + def list_projects(self, compartment_id, **kwargs): + """ + ListProjects + Lists projects in the specified compartment. + + + :param str compartment_id: (required) + Filter results by the `OCID`__ of the compartment. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + :param str id: (optional) + Filter results by `OCID`__. Must be an OCID of the correct type for the resource type. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + :param str display_name: (optional) + Filter results by its user-friendly name. + + :param str lifecycle_state: (optional) + Filter results by the specified lifecycle state. Must be a valid + state for the resource type. + + Allowed values are: "ACTIVE", "DELETING", "DELETED" + + :param str created_by: (optional) + Filter results by the `OCID`__ of the user who created the resource. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + :param int limit: (optional) + For list pagination. The maximum number of results per page, + or items to return in a paginated \"List\" call. + 1 is the minimum, 1000 is the maximum. + See `List Pagination`__. + + Example: `500` + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine + + :param str page: (optional) + For list pagination. The value of the `opc-next-page` response + header from the previous \"List\" call. + + See `List Pagination`__. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine + + :param str sort_order: (optional) + Specifies sort order to use, either `ASC` (ascending) or `DESC` (descending). + + Allowed values are: "ASC", "DESC" + + :param str sort_by: (optional) + Specifies the field to sort by. Accepts only one field. + By default, when you sort by `timeCreated`, results are shown + in descending order. When you sort by `displayName`, results are + shown in ascending order. Sort order for `displayName` field is case sensitive. + + Allowed values are: "timeCreated", "displayName" + + :param str opc_request_id: (optional) + Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + + :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. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.data_science.models.ProjectSummary` + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/projects" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "id", + "display_name", + "lifecycle_state", + "created_by", + "limit", + "page", + "sort_order", + "sort_by", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_projects got unknown kwargs: {!r}".format(extra_kwargs)) + + if 'lifecycle_state' in kwargs: + lifecycle_state_allowed_values = ["ACTIVE", "DELETING", "DELETED"] + if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values: + raise ValueError( + "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values) + ) + + if 'sort_order' in kwargs: + sort_order_allowed_values = ["ASC", "DESC"] + if kwargs['sort_order'] not in sort_order_allowed_values: + raise ValueError( + "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) + ) + + if 'sort_by' in kwargs: + sort_by_allowed_values = ["timeCreated", "displayName"] + if kwargs['sort_by'] not in sort_by_allowed_values: + raise ValueError( + "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) + ) + + query_params = { + "compartmentId": compartment_id, + "id": kwargs.get("id", missing), + "displayName": kwargs.get("display_name", missing), + "lifecycleState": kwargs.get("lifecycle_state", missing), + "createdBy": kwargs.get("created_by", missing), + "limit": kwargs.get("limit", missing), + "page": kwargs.get("page", missing), + "sortOrder": kwargs.get("sort_order", missing), + "sortBy": kwargs.get("sort_by", missing) + } + query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="list[ProjectSummary]") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="list[ProjectSummary]") + + def list_work_request_errors(self, work_request_id, **kwargs): + """ + ListWorkRequestErrors + Lists work request errors for the specified work request. + + + :param str work_request_id: (required) + The `OCID`__ of the work request. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + :param str opc_request_id: (optional) + Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + + :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. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.data_science.models.WorkRequestError` + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/workRequests/{workRequestId}/errors" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_work_request_errors got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "workRequestId": work_request_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="list[WorkRequestError]") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="list[WorkRequestError]") + + def list_work_request_logs(self, work_request_id, **kwargs): + """ + ListWorkRequestLogs + Lists work request logs for the specified work request. + + + :param str work_request_id: (required) + The `OCID`__ of the work request. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + :param str opc_request_id: (optional) + Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + + :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. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.data_science.models.WorkRequestLogEntry` + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/workRequests/{workRequestId}/logs" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_work_request_logs got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "workRequestId": work_request_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="list[WorkRequestLogEntry]") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="list[WorkRequestLogEntry]") + + def list_work_requests(self, compartment_id, **kwargs): + """ + ListWorkRequests + Lists work requests in the specified compartment. + + + :param str compartment_id: (required) + Filter results by the `OCID`__ of the compartment. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + :param str id: (optional) + Filter results by `OCID`__. Must be an OCID of the correct type for the resource type. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + :param str operation_type: (optional) + Filter results by the type of the operation associated with the work request. + + Allowed values are: "NOTEBOOK_SESSION_CREATE", "NOTEBOOK_SESSION_DELETE", "NOTEBOOK_SESSION_ACTIVATE", "NOTEBOOK_SESSION_DEACTIVATE", "PROJECT_DELETE", "WORKREQUEST_CANCEL" + + :param str status: (optional) + Filter results by work request status. + + Allowed values are: "ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED" + + :param int limit: (optional) + For list pagination. The maximum number of results per page, + or items to return in a paginated \"List\" call. + 1 is the minimum, 1000 is the maximum. + See `List Pagination`__. + + Example: `500` + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine + + :param str page: (optional) + For list pagination. The value of the `opc-next-page` response + header from the previous \"List\" call. + + See `List Pagination`__. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine + + :param str sort_order: (optional) + Specifies sort order to use, either `ASC` (ascending) or `DESC` (descending). + + Allowed values are: "ASC", "DESC" + + :param str sort_by: (optional) + Specifies the field to sort by. Accepts only one field. By default, when you sort by time fields, results are shown in descending order. All other fields default to ascending order. + + Allowed values are: "operationType", "status", "timeAccepted" + + :param str opc_request_id: (optional) + Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + + :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. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.data_science.models.WorkRequestSummary` + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/workRequests" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "id", + "operation_type", + "status", + "limit", + "page", + "sort_order", + "sort_by", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_work_requests got unknown kwargs: {!r}".format(extra_kwargs)) + + if 'operation_type' in kwargs: + operation_type_allowed_values = ["NOTEBOOK_SESSION_CREATE", "NOTEBOOK_SESSION_DELETE", "NOTEBOOK_SESSION_ACTIVATE", "NOTEBOOK_SESSION_DEACTIVATE", "PROJECT_DELETE", "WORKREQUEST_CANCEL"] + if kwargs['operation_type'] not in operation_type_allowed_values: + raise ValueError( + "Invalid value for `operation_type`, must be one of {0}".format(operation_type_allowed_values) + ) + + if 'status' in kwargs: + status_allowed_values = ["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED"] + if kwargs['status'] not in status_allowed_values: + raise ValueError( + "Invalid value for `status`, must be one of {0}".format(status_allowed_values) + ) + + if 'sort_order' in kwargs: + sort_order_allowed_values = ["ASC", "DESC"] + if kwargs['sort_order'] not in sort_order_allowed_values: + raise ValueError( + "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) + ) + + if 'sort_by' in kwargs: + sort_by_allowed_values = ["operationType", "status", "timeAccepted"] + if kwargs['sort_by'] not in sort_by_allowed_values: + raise ValueError( + "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) + ) + + query_params = { + "compartmentId": compartment_id, + "id": kwargs.get("id", missing), + "operationType": kwargs.get("operation_type", missing), + "status": kwargs.get("status", missing), + "limit": kwargs.get("limit", missing), + "page": kwargs.get("page", missing), + "sortOrder": kwargs.get("sort_order", missing), + "sortBy": kwargs.get("sort_by", missing) + } + query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="list[WorkRequestSummary]") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="list[WorkRequestSummary]") + + def update_model(self, model_id, update_model_details, **kwargs): + """ + UpdateModel + Updates the properties of a model. You can update the `displayName`, `description`, `freeformTags`, and `definedTags` properties. + + + :param str model_id: (required) + The `OCID`__ of the model. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + :param UpdateModelDetails update_model_details: (required) + Details for updating a model. You can update the `displayName`, `description`, `freeformTags`, and `definedTags` properties. + + :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) + Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + + :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. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_science.models.Model` + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/models/{modelId}" + method = "PUT" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "if_match", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "update_model got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "modelId": model_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "if-match": kwargs.get("if_match", missing), + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=update_model_details, + response_type="Model") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=update_model_details, + response_type="Model") + + def update_model_provenance(self, model_id, update_model_provenance_details, **kwargs): + """ + UpdateModelProvenance + Updates provenance information for the specified model. + + + :param str model_id: (required) + The `OCID`__ of the model. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + :param UpdateModelProvenanceDetails update_model_provenance_details: (required) + Provenance information for the specified model. + + :param str opc_request_id: (optional) + Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + + :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 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. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_science.models.ModelProvenance` + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/models/{modelId}/provenance" + method = "PUT" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "opc_request_id", + "if_match" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "update_model_provenance got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "modelId": model_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing), + "if-match": kwargs.get("if_match", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=update_model_provenance_details, + response_type="ModelProvenance") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=update_model_provenance_details, + response_type="ModelProvenance") + + def update_notebook_session(self, notebook_session_id, update_notebook_session_details, **kwargs): + """ + UpdateNotebookSession + Updates the properties of a notebook session. You can update the `displayName`, `freeformTags`, and `definedTags` properties. + When the notebook session is in the INACTIVE lifecycle state, you can update `notebookSessionConfigurationDetails` and change `shape`, `subnetId`, and `blockStorageSizeInGBs`. + Changes to the `notebookSessionConfigurationDetails` will take effect the next time the `ActivateNotebookSession` action is invoked on the notebook session resource. + + + :param str notebook_session_id: (required) + The `OCID`__ of the notebook session. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + :param UpdateNotebookSessionDetails update_notebook_session_details: (required) + Details for updating a notebook session. `notebookSessionConfigurationDetails` can only be updated while the notebook session is in the `INACTIVE` state. + Changes to the `notebookSessionConfigurationDetails` will take effect the next time the `ActivateNotebookSession` action is invoked on the notebook session resource. + + :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) + Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + + :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. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_science.models.NotebookSession` + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/notebookSessions/{notebookSessionId}" + method = "PUT" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "if_match", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "update_notebook_session got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "notebookSessionId": notebook_session_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "if-match": kwargs.get("if_match", missing), + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=update_notebook_session_details, + response_type="NotebookSession") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=update_notebook_session_details, + response_type="NotebookSession") + + def update_project(self, project_id, update_project_details, **kwargs): + """ + UpdateProject + Updates the properties of a project. You can update the `displayName`, `description`, `freeformTags`, and `definedTags` properties. + + + :param str project_id: (required) + The `OCID`__ of the project. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + :param UpdateProjectDetails update_project_details: (required) + Details for updating a project. You can update the `displayName`, `description`, `freeformTags`, and `definedTags` properties. + + :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) + Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + + :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. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_science.models.Project` + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/projects/{projectId}" + method = "PUT" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "if_match", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "update_project got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "projectId": project_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "if-match": kwargs.get("if_match", missing), + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=update_project_details, + response_type="Project") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=update_project_details, + response_type="Project") diff --git a/src/oci/data_science/data_science_client_composite_operations.py b/src/oci/data_science/data_science_client_composite_operations.py new file mode 100644 index 0000000000..d1bac660b3 --- /dev/null +++ b/src/oci/data_science/data_science_client_composite_operations.py @@ -0,0 +1,572 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + +import oci # noqa: F401 +from oci.util import WAIT_RESOURCE_NOT_FOUND # noqa: F401 + + +class DataScienceClientCompositeOperations(object): + """ + This class provides a wrapper around :py:class:`~oci.data_science.DataScienceClient` and offers convenience methods + for operations that would otherwise need to be chained together. For example, instead of performing an action + on a resource (e.g. launching an instance, creating a load balancer) and then using a waiter to wait for the resource + to enter a given state, you can call a single method in this class to accomplish the same functionality + """ + + def __init__(self, client, **kwargs): + """ + Creates a new DataScienceClientCompositeOperations object + + :param DataScienceClient client: + The service client which will be wrapped by this object + """ + self.client = client + + def activate_model_and_wait_for_state(self, model_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.data_science.DataScienceClient.activate_model` and waits for the :py:class:`~oci.data_science.models.Model` acted upon + to enter the given state(s). + + :param str model_id: (required) + The `OCID`__ of the model. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.data_science.models.Model.lifecycle_state` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.data_science.DataScienceClient.activate_model` + + :param dict waiter_kwargs: + A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds`` + as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait + """ + operation_result = self.client.activate_model(model_id, **operation_kwargs) + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + wait_for_resource_id = operation_result.data.id + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_model(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + + def activate_notebook_session_and_wait_for_state(self, notebook_session_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.data_science.DataScienceClient.activate_notebook_session` and waits for the :py:class:`~oci.data_science.models.WorkRequest` + to enter the given state(s). + + :param str notebook_session_id: (required) + The `OCID`__ of the notebook session. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.data_science.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.data_science.DataScienceClient.activate_notebook_session` + + :param dict waiter_kwargs: + A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds`` + as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait + """ + operation_result = self.client.activate_notebook_session(notebook_session_id, **operation_kwargs) + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + wait_for_resource_id = operation_result.headers['opc-work-request-id'] + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_work_request(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + + def create_model_and_wait_for_state(self, create_model_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.data_science.DataScienceClient.create_model` and waits for the :py:class:`~oci.data_science.models.Model` acted upon + to enter the given state(s). + + :param CreateModelDetails create_model_details: (required) + Details for creating a new model. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.data_science.models.Model.lifecycle_state` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.data_science.DataScienceClient.create_model` + + :param dict waiter_kwargs: + A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds`` + as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait + """ + operation_result = self.client.create_model(create_model_details, **operation_kwargs) + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + wait_for_resource_id = operation_result.data.id + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_model(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + + def create_notebook_session_and_wait_for_state(self, create_notebook_session_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.data_science.DataScienceClient.create_notebook_session` and waits for the :py:class:`~oci.data_science.models.WorkRequest` + to enter the given state(s). + + :param CreateNotebookSessionDetails create_notebook_session_details: (required) + Details for creating a new notebook session. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.data_science.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.data_science.DataScienceClient.create_notebook_session` + + :param dict waiter_kwargs: + A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds`` + as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait + """ + operation_result = self.client.create_notebook_session(create_notebook_session_details, **operation_kwargs) + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + wait_for_resource_id = operation_result.headers['opc-work-request-id'] + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_work_request(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + + def create_project_and_wait_for_state(self, create_project_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.data_science.DataScienceClient.create_project` and waits for the :py:class:`~oci.data_science.models.Project` acted upon + to enter the given state(s). + + :param CreateProjectDetails create_project_details: (required) + Details for creating a new project. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.data_science.models.Project.lifecycle_state` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.data_science.DataScienceClient.create_project` + + :param dict waiter_kwargs: + A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds`` + as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait + """ + operation_result = self.client.create_project(create_project_details, **operation_kwargs) + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + wait_for_resource_id = operation_result.data.id + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_project(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + + def deactivate_model_and_wait_for_state(self, model_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.data_science.DataScienceClient.deactivate_model` and waits for the :py:class:`~oci.data_science.models.Model` acted upon + to enter the given state(s). + + :param str model_id: (required) + The `OCID`__ of the model. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.data_science.models.Model.lifecycle_state` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.data_science.DataScienceClient.deactivate_model` + + :param dict waiter_kwargs: + A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds`` + as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait + """ + operation_result = self.client.deactivate_model(model_id, **operation_kwargs) + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + wait_for_resource_id = operation_result.data.id + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_model(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + + def deactivate_notebook_session_and_wait_for_state(self, notebook_session_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.data_science.DataScienceClient.deactivate_notebook_session` and waits for the :py:class:`~oci.data_science.models.WorkRequest` + to enter the given state(s). + + :param str notebook_session_id: (required) + The `OCID`__ of the notebook session. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.data_science.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.data_science.DataScienceClient.deactivate_notebook_session` + + :param dict waiter_kwargs: + A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds`` + as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait + """ + operation_result = self.client.deactivate_notebook_session(notebook_session_id, **operation_kwargs) + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + wait_for_resource_id = operation_result.headers['opc-work-request-id'] + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_work_request(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + + def delete_model_and_wait_for_state(self, model_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.data_science.DataScienceClient.delete_model` and waits for the :py:class:`~oci.data_science.models.Model` acted upon + to enter the given state(s). + + :param str model_id: (required) + The `OCID`__ of the model. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.data_science.models.Model.lifecycle_state` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.data_science.DataScienceClient.delete_model` + + :param dict waiter_kwargs: + A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds`` + as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait + """ + initial_get_result = self.client.get_model(model_id) + operation_result = None + try: + operation_result = self.client.delete_model(model_id, **operation_kwargs) + except oci.exceptions.ServiceError as e: + if e.status == 404: + return WAIT_RESOURCE_NOT_FOUND + else: + raise e + + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + + try: + waiter_result = oci.wait_until( + self.client, + initial_get_result, + evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states, + succeed_on_not_found=True, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + + def delete_notebook_session_and_wait_for_state(self, notebook_session_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.data_science.DataScienceClient.delete_notebook_session` and waits for the :py:class:`~oci.data_science.models.WorkRequest` + to enter the given state(s). + + :param str notebook_session_id: (required) + The `OCID`__ of the notebook session. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.data_science.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.data_science.DataScienceClient.delete_notebook_session` + + :param dict waiter_kwargs: + A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds`` + as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait + """ + operation_result = None + try: + operation_result = self.client.delete_notebook_session(notebook_session_id, **operation_kwargs) + except oci.exceptions.ServiceError as e: + if e.status == 404: + return WAIT_RESOURCE_NOT_FOUND + else: + raise e + + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + wait_for_resource_id = operation_result.headers['opc-work-request-id'] + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_work_request(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + + def delete_project_and_wait_for_state(self, project_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.data_science.DataScienceClient.delete_project` and waits for the :py:class:`~oci.data_science.models.WorkRequest` + to enter the given state(s). + + :param str project_id: (required) + The `OCID`__ of the project. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.data_science.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.data_science.DataScienceClient.delete_project` + + :param dict waiter_kwargs: + A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds`` + as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait + """ + operation_result = None + try: + operation_result = self.client.delete_project(project_id, **operation_kwargs) + except oci.exceptions.ServiceError as e: + if e.status == 404: + return WAIT_RESOURCE_NOT_FOUND + else: + raise e + + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + wait_for_resource_id = operation_result.headers['opc-work-request-id'] + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_work_request(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + + def update_model_and_wait_for_state(self, model_id, update_model_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.data_science.DataScienceClient.update_model` and waits for the :py:class:`~oci.data_science.models.Model` acted upon + to enter the given state(s). + + :param str model_id: (required) + The `OCID`__ of the model. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + :param UpdateModelDetails update_model_details: (required) + Details for updating a model. You can update the `displayName`, `description`, `freeformTags`, and `definedTags` properties. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.data_science.models.Model.lifecycle_state` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.data_science.DataScienceClient.update_model` + + :param dict waiter_kwargs: + A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds`` + as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait + """ + operation_result = self.client.update_model(model_id, update_model_details, **operation_kwargs) + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + wait_for_resource_id = operation_result.data.id + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_model(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + + def update_notebook_session_and_wait_for_state(self, notebook_session_id, update_notebook_session_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.data_science.DataScienceClient.update_notebook_session` and waits for the :py:class:`~oci.data_science.models.NotebookSession` acted upon + to enter the given state(s). + + :param str notebook_session_id: (required) + The `OCID`__ of the notebook session. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + :param UpdateNotebookSessionDetails update_notebook_session_details: (required) + Details for updating a notebook session. `notebookSessionConfigurationDetails` can only be updated while the notebook session is in the `INACTIVE` state. + Changes to the `notebookSessionConfigurationDetails` will take effect the next time the `ActivateNotebookSession` action is invoked on the notebook session resource. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.data_science.models.NotebookSession.lifecycle_state` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.data_science.DataScienceClient.update_notebook_session` + + :param dict waiter_kwargs: + A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds`` + as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait + """ + operation_result = self.client.update_notebook_session(notebook_session_id, update_notebook_session_details, **operation_kwargs) + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + wait_for_resource_id = operation_result.data.id + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_notebook_session(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + + def update_project_and_wait_for_state(self, project_id, update_project_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.data_science.DataScienceClient.update_project` and waits for the :py:class:`~oci.data_science.models.Project` acted upon + to enter the given state(s). + + :param str project_id: (required) + The `OCID`__ of the project. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + :param UpdateProjectDetails update_project_details: (required) + Details for updating a project. You can update the `displayName`, `description`, `freeformTags`, and `definedTags` properties. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.data_science.models.Project.lifecycle_state` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.data_science.DataScienceClient.update_project` + + :param dict waiter_kwargs: + A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds`` + as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait + """ + operation_result = self.client.update_project(project_id, update_project_details, **operation_kwargs) + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + wait_for_resource_id = operation_result.data.id + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_project(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) diff --git a/src/oci/data_science/models/__init__.py b/src/oci/data_science/models/__init__.py new file mode 100644 index 0000000000..d281c434f8 --- /dev/null +++ b/src/oci/data_science/models/__init__.py @@ -0,0 +1,59 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + +from __future__ import absolute_import + +from .change_model_compartment_details import ChangeModelCompartmentDetails +from .change_notebook_session_compartment_details import ChangeNotebookSessionCompartmentDetails +from .change_project_compartment_details import ChangeProjectCompartmentDetails +from .create_model_details import CreateModelDetails +from .create_model_provenance_details import CreateModelProvenanceDetails +from .create_notebook_session_details import CreateNotebookSessionDetails +from .create_project_details import CreateProjectDetails +from .model import Model +from .model_provenance import ModelProvenance +from .model_summary import ModelSummary +from .notebook_session import NotebookSession +from .notebook_session_configuration_details import NotebookSessionConfigurationDetails +from .notebook_session_shape_summary import NotebookSessionShapeSummary +from .notebook_session_summary import NotebookSessionSummary +from .project import Project +from .project_summary import ProjectSummary +from .update_model_details import UpdateModelDetails +from .update_model_provenance_details import UpdateModelProvenanceDetails +from .update_notebook_session_details import UpdateNotebookSessionDetails +from .update_project_details import UpdateProjectDetails +from .work_request import WorkRequest +from .work_request_error import WorkRequestError +from .work_request_log_entry import WorkRequestLogEntry +from .work_request_resource import WorkRequestResource +from .work_request_summary import WorkRequestSummary + +# Maps type names to classes for data_science services. +data_science_type_mapping = { + "ChangeModelCompartmentDetails": ChangeModelCompartmentDetails, + "ChangeNotebookSessionCompartmentDetails": ChangeNotebookSessionCompartmentDetails, + "ChangeProjectCompartmentDetails": ChangeProjectCompartmentDetails, + "CreateModelDetails": CreateModelDetails, + "CreateModelProvenanceDetails": CreateModelProvenanceDetails, + "CreateNotebookSessionDetails": CreateNotebookSessionDetails, + "CreateProjectDetails": CreateProjectDetails, + "Model": Model, + "ModelProvenance": ModelProvenance, + "ModelSummary": ModelSummary, + "NotebookSession": NotebookSession, + "NotebookSessionConfigurationDetails": NotebookSessionConfigurationDetails, + "NotebookSessionShapeSummary": NotebookSessionShapeSummary, + "NotebookSessionSummary": NotebookSessionSummary, + "Project": Project, + "ProjectSummary": ProjectSummary, + "UpdateModelDetails": UpdateModelDetails, + "UpdateModelProvenanceDetails": UpdateModelProvenanceDetails, + "UpdateNotebookSessionDetails": UpdateNotebookSessionDetails, + "UpdateProjectDetails": UpdateProjectDetails, + "WorkRequest": WorkRequest, + "WorkRequestError": WorkRequestError, + "WorkRequestLogEntry": WorkRequestLogEntry, + "WorkRequestResource": WorkRequestResource, + "WorkRequestSummary": WorkRequestSummary +} diff --git a/src/oci/data_science/models/change_model_compartment_details.py b/src/oci/data_science/models/change_model_compartment_details.py new file mode 100644 index 0000000000..51671a7c8b --- /dev/null +++ b/src/oci/data_science/models/change_model_compartment_details.py @@ -0,0 +1,73 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class ChangeModelCompartmentDetails(object): + """ + Details for changing the compartment of a model. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ChangeModelCompartmentDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param compartment_id: + The value to assign to the compartment_id property of this ChangeModelCompartmentDetails. + :type compartment_id: str + + """ + self.swagger_types = { + 'compartment_id': 'str' + } + + self.attribute_map = { + 'compartment_id': 'compartmentId' + } + + self._compartment_id = None + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this ChangeModelCompartmentDetails. + The `OCID`__ of the compartment where the resource should be moved. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + + + :return: The compartment_id of this ChangeModelCompartmentDetails. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this ChangeModelCompartmentDetails. + The `OCID`__ of the compartment where the resource should be moved. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + + + :param compartment_id: The compartment_id of this ChangeModelCompartmentDetails. + :type: str + """ + self._compartment_id = compartment_id + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_science/models/change_notebook_session_compartment_details.py b/src/oci/data_science/models/change_notebook_session_compartment_details.py new file mode 100644 index 0000000000..a447108289 --- /dev/null +++ b/src/oci/data_science/models/change_notebook_session_compartment_details.py @@ -0,0 +1,73 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class ChangeNotebookSessionCompartmentDetails(object): + """ + Details for changing the compartment of a notebook session. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ChangeNotebookSessionCompartmentDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param compartment_id: + The value to assign to the compartment_id property of this ChangeNotebookSessionCompartmentDetails. + :type compartment_id: str + + """ + self.swagger_types = { + 'compartment_id': 'str' + } + + self.attribute_map = { + 'compartment_id': 'compartmentId' + } + + self._compartment_id = None + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this ChangeNotebookSessionCompartmentDetails. + The `OCID`__ of the compartment where the resource should be moved. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + + + :return: The compartment_id of this ChangeNotebookSessionCompartmentDetails. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this ChangeNotebookSessionCompartmentDetails. + The `OCID`__ of the compartment where the resource should be moved. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + + + :param compartment_id: The compartment_id of this ChangeNotebookSessionCompartmentDetails. + :type: str + """ + self._compartment_id = compartment_id + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_science/models/change_project_compartment_details.py b/src/oci/data_science/models/change_project_compartment_details.py new file mode 100644 index 0000000000..96440ed60c --- /dev/null +++ b/src/oci/data_science/models/change_project_compartment_details.py @@ -0,0 +1,73 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class ChangeProjectCompartmentDetails(object): + """ + Details for changing the compartment of a project. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ChangeProjectCompartmentDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param compartment_id: + The value to assign to the compartment_id property of this ChangeProjectCompartmentDetails. + :type compartment_id: str + + """ + self.swagger_types = { + 'compartment_id': 'str' + } + + self.attribute_map = { + 'compartment_id': 'compartmentId' + } + + self._compartment_id = None + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this ChangeProjectCompartmentDetails. + The `OCID`__ of the compartment where the resource should be moved. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + + + :return: The compartment_id of this ChangeProjectCompartmentDetails. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this ChangeProjectCompartmentDetails. + The `OCID`__ of the compartment where the resource should be moved. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + + + :param compartment_id: The compartment_id of this ChangeProjectCompartmentDetails. + :type: str + """ + self._compartment_id = compartment_id + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_science/models/create_model_details.py b/src/oci/data_science/models/create_model_details.py new file mode 100644 index 0000000000..1dab1178d2 --- /dev/null +++ b/src/oci/data_science/models/create_model_details.py @@ -0,0 +1,246 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class CreateModelDetails(object): + """ + Parameters needed to create a new model. Models are mathematical representations of the relationships between data. Models are represented by their associated metadata and artifact. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CreateModelDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param compartment_id: + The value to assign to the compartment_id property of this CreateModelDetails. + :type compartment_id: str + + :param project_id: + The value to assign to the project_id property of this CreateModelDetails. + :type project_id: str + + :param display_name: + The value to assign to the display_name property of this CreateModelDetails. + :type display_name: str + + :param description: + The value to assign to the description property of this CreateModelDetails. + :type description: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this CreateModelDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this CreateModelDetails. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'compartment_id': 'str', + 'project_id': 'str', + 'display_name': 'str', + 'description': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'compartment_id': 'compartmentId', + 'project_id': 'projectId', + 'display_name': 'displayName', + 'description': 'description', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._compartment_id = None + self._project_id = None + self._display_name = None + self._description = None + self._freeform_tags = None + self._defined_tags = None + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this CreateModelDetails. + The `OCID`__ of the compartment to create the model in. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + + :return: The compartment_id of this CreateModelDetails. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this CreateModelDetails. + The `OCID`__ of the compartment to create the model in. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + + :param compartment_id: The compartment_id of this CreateModelDetails. + :type: str + """ + self._compartment_id = compartment_id + + @property + def project_id(self): + """ + **[Required]** Gets the project_id of this CreateModelDetails. + The `OCID`__ of the project to associate with the model. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + + :return: The project_id of this CreateModelDetails. + :rtype: str + """ + return self._project_id + + @project_id.setter + def project_id(self, project_id): + """ + Sets the project_id of this CreateModelDetails. + The `OCID`__ of the project to associate with the model. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + + :param project_id: The project_id of this CreateModelDetails. + :type: str + """ + self._project_id = project_id + + @property + def display_name(self): + """ + Gets the display_name of this CreateModelDetails. + A user-friendly display name for the resource. Does not have to be unique, and can be modified. Avoid entering confidential information. + Example: `My Model` + + + :return: The display_name of this CreateModelDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this CreateModelDetails. + A user-friendly display name for the resource. Does not have to be unique, and can be modified. Avoid entering confidential information. + Example: `My Model` + + + :param display_name: The display_name of this CreateModelDetails. + :type: str + """ + self._display_name = display_name + + @property + def description(self): + """ + Gets the description of this CreateModelDetails. + A short blurb describing the model. + + + :return: The description of this CreateModelDetails. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this CreateModelDetails. + A short blurb describing the model. + + + :param description: The description of this CreateModelDetails. + :type: str + """ + self._description = description + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this CreateModelDetails. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. See `Resource Tags`__. + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this CreateModelDetails. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this CreateModelDetails. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. See `Resource Tags`__. + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this CreateModelDetails. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this CreateModelDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this CreateModelDetails. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this CreateModelDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this CreateModelDetails. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_science/models/create_model_provenance_details.py b/src/oci/data_science/models/create_model_provenance_details.py new file mode 100644 index 0000000000..7cf13bf9bc --- /dev/null +++ b/src/oci/data_science/models/create_model_provenance_details.py @@ -0,0 +1,193 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class CreateModelProvenanceDetails(object): + """ + Model provenance gives data scientists information about the origin of their model. This information allows data scientists to reproduce the development environment in which the model was trained. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CreateModelProvenanceDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param repository_url: + The value to assign to the repository_url property of this CreateModelProvenanceDetails. + :type repository_url: str + + :param git_branch: + The value to assign to the git_branch property of this CreateModelProvenanceDetails. + :type git_branch: str + + :param git_commit: + The value to assign to the git_commit property of this CreateModelProvenanceDetails. + :type git_commit: str + + :param script_dir: + The value to assign to the script_dir property of this CreateModelProvenanceDetails. + :type script_dir: str + + :param training_script: + The value to assign to the training_script property of this CreateModelProvenanceDetails. + :type training_script: str + + """ + self.swagger_types = { + 'repository_url': 'str', + 'git_branch': 'str', + 'git_commit': 'str', + 'script_dir': 'str', + 'training_script': 'str' + } + + self.attribute_map = { + 'repository_url': 'repositoryUrl', + 'git_branch': 'gitBranch', + 'git_commit': 'gitCommit', + 'script_dir': 'scriptDir', + 'training_script': 'trainingScript' + } + + self._repository_url = None + self._git_branch = None + self._git_commit = None + self._script_dir = None + self._training_script = None + + @property + def repository_url(self): + """ + Gets the repository_url of this CreateModelProvenanceDetails. + For model reproducibility purposes. URL of the git repository associated with model training. + + + :return: The repository_url of this CreateModelProvenanceDetails. + :rtype: str + """ + return self._repository_url + + @repository_url.setter + def repository_url(self, repository_url): + """ + Sets the repository_url of this CreateModelProvenanceDetails. + For model reproducibility purposes. URL of the git repository associated with model training. + + + :param repository_url: The repository_url of this CreateModelProvenanceDetails. + :type: str + """ + self._repository_url = repository_url + + @property + def git_branch(self): + """ + Gets the git_branch of this CreateModelProvenanceDetails. + For model reproducibility purposes. Branch of the git repository associated with model training. + + + :return: The git_branch of this CreateModelProvenanceDetails. + :rtype: str + """ + return self._git_branch + + @git_branch.setter + def git_branch(self, git_branch): + """ + Sets the git_branch of this CreateModelProvenanceDetails. + For model reproducibility purposes. Branch of the git repository associated with model training. + + + :param git_branch: The git_branch of this CreateModelProvenanceDetails. + :type: str + """ + self._git_branch = git_branch + + @property + def git_commit(self): + """ + Gets the git_commit of this CreateModelProvenanceDetails. + For model reproducibility purposes. Commit ID of the git repository associated with model training. + + + :return: The git_commit of this CreateModelProvenanceDetails. + :rtype: str + """ + return self._git_commit + + @git_commit.setter + def git_commit(self, git_commit): + """ + Sets the git_commit of this CreateModelProvenanceDetails. + For model reproducibility purposes. Commit ID of the git repository associated with model training. + + + :param git_commit: The git_commit of this CreateModelProvenanceDetails. + :type: str + """ + self._git_commit = git_commit + + @property + def script_dir(self): + """ + Gets the script_dir of this CreateModelProvenanceDetails. + For model reproducibility purposes. Path to model artifacts. + + + :return: The script_dir of this CreateModelProvenanceDetails. + :rtype: str + """ + return self._script_dir + + @script_dir.setter + def script_dir(self, script_dir): + """ + Sets the script_dir of this CreateModelProvenanceDetails. + For model reproducibility purposes. Path to model artifacts. + + + :param script_dir: The script_dir of this CreateModelProvenanceDetails. + :type: str + """ + self._script_dir = script_dir + + @property + def training_script(self): + """ + Gets the training_script of this CreateModelProvenanceDetails. + For model reproducibility purposes. Path to the python script or notebook in which the model was trained.\" + + + :return: The training_script of this CreateModelProvenanceDetails. + :rtype: str + """ + return self._training_script + + @training_script.setter + def training_script(self, training_script): + """ + Sets the training_script of this CreateModelProvenanceDetails. + For model reproducibility purposes. Path to the python script or notebook in which the model was trained.\" + + + :param training_script: The training_script of this CreateModelProvenanceDetails. + :type: str + """ + self._training_script = training_script + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_science/models/create_notebook_session_details.py b/src/oci/data_science/models/create_notebook_session_details.py new file mode 100644 index 0000000000..0c7165da6e --- /dev/null +++ b/src/oci/data_science/models/create_notebook_session_details.py @@ -0,0 +1,242 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class CreateNotebookSessionDetails(object): + """ + Parameters needed to create a new notebook session. Notebook sessions are interactive coding environments for data scientists. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CreateNotebookSessionDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param display_name: + The value to assign to the display_name property of this CreateNotebookSessionDetails. + :type display_name: str + + :param project_id: + The value to assign to the project_id property of this CreateNotebookSessionDetails. + :type project_id: str + + :param compartment_id: + The value to assign to the compartment_id property of this CreateNotebookSessionDetails. + :type compartment_id: str + + :param notebook_session_configuration_details: + The value to assign to the notebook_session_configuration_details property of this CreateNotebookSessionDetails. + :type notebook_session_configuration_details: NotebookSessionConfigurationDetails + + :param freeform_tags: + The value to assign to the freeform_tags property of this CreateNotebookSessionDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this CreateNotebookSessionDetails. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'display_name': 'str', + 'project_id': 'str', + 'compartment_id': 'str', + 'notebook_session_configuration_details': 'NotebookSessionConfigurationDetails', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'display_name': 'displayName', + 'project_id': 'projectId', + 'compartment_id': 'compartmentId', + 'notebook_session_configuration_details': 'notebookSessionConfigurationDetails', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._display_name = None + self._project_id = None + self._compartment_id = None + self._notebook_session_configuration_details = None + self._freeform_tags = None + self._defined_tags = None + + @property + def display_name(self): + """ + Gets the display_name of this CreateNotebookSessionDetails. + A user-friendly display name for the resource. Does not have to be unique, and can be modified. Avoid entering confidential information. + Example: `My NotebookSession` + + + :return: The display_name of this CreateNotebookSessionDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this CreateNotebookSessionDetails. + A user-friendly display name for the resource. Does not have to be unique, and can be modified. Avoid entering confidential information. + Example: `My NotebookSession` + + + :param display_name: The display_name of this CreateNotebookSessionDetails. + :type: str + """ + self._display_name = display_name + + @property + def project_id(self): + """ + **[Required]** Gets the project_id of this CreateNotebookSessionDetails. + The `OCID`__ of the project to associate with the notebook session. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + + :return: The project_id of this CreateNotebookSessionDetails. + :rtype: str + """ + return self._project_id + + @project_id.setter + def project_id(self, project_id): + """ + Sets the project_id of this CreateNotebookSessionDetails. + The `OCID`__ of the project to associate with the notebook session. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + + :param project_id: The project_id of this CreateNotebookSessionDetails. + :type: str + """ + self._project_id = project_id + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this CreateNotebookSessionDetails. + The `OCID`__ of the compartment where you want to create the notebook session. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + + :return: The compartment_id of this CreateNotebookSessionDetails. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this CreateNotebookSessionDetails. + The `OCID`__ of the compartment where you want to create the notebook session. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + + :param compartment_id: The compartment_id of this CreateNotebookSessionDetails. + :type: str + """ + self._compartment_id = compartment_id + + @property + def notebook_session_configuration_details(self): + """ + **[Required]** Gets the notebook_session_configuration_details of this CreateNotebookSessionDetails. + + :return: The notebook_session_configuration_details of this CreateNotebookSessionDetails. + :rtype: NotebookSessionConfigurationDetails + """ + return self._notebook_session_configuration_details + + @notebook_session_configuration_details.setter + def notebook_session_configuration_details(self, notebook_session_configuration_details): + """ + Sets the notebook_session_configuration_details of this CreateNotebookSessionDetails. + + :param notebook_session_configuration_details: The notebook_session_configuration_details of this CreateNotebookSessionDetails. + :type: NotebookSessionConfigurationDetails + """ + self._notebook_session_configuration_details = notebook_session_configuration_details + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this CreateNotebookSessionDetails. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. See `Resource Tags`__. + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this CreateNotebookSessionDetails. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this CreateNotebookSessionDetails. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. See `Resource Tags`__. + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this CreateNotebookSessionDetails. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this CreateNotebookSessionDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this CreateNotebookSessionDetails. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this CreateNotebookSessionDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this CreateNotebookSessionDetails. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_science/models/create_project_details.py b/src/oci/data_science/models/create_project_details.py new file mode 100644 index 0000000000..b26c767e53 --- /dev/null +++ b/src/oci/data_science/models/create_project_details.py @@ -0,0 +1,209 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class CreateProjectDetails(object): + """ + Parameters needed to create a new project. Projects enable users to organize their data science work. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CreateProjectDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param display_name: + The value to assign to the display_name property of this CreateProjectDetails. + :type display_name: str + + :param description: + The value to assign to the description property of this CreateProjectDetails. + :type description: str + + :param compartment_id: + The value to assign to the compartment_id property of this CreateProjectDetails. + :type compartment_id: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this CreateProjectDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this CreateProjectDetails. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'display_name': 'str', + 'description': 'str', + 'compartment_id': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'display_name': 'displayName', + 'description': 'description', + 'compartment_id': 'compartmentId', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._display_name = None + self._description = None + self._compartment_id = None + self._freeform_tags = None + self._defined_tags = None + + @property + def display_name(self): + """ + Gets the display_name of this CreateProjectDetails. + A user-friendly display name for the resource. Does not have to be unique, and can be modified. Avoid entering confidential information. + + + :return: The display_name of this CreateProjectDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this CreateProjectDetails. + A user-friendly display name for the resource. Does not have to be unique, and can be modified. Avoid entering confidential information. + + + :param display_name: The display_name of this CreateProjectDetails. + :type: str + """ + self._display_name = display_name + + @property + def description(self): + """ + Gets the description of this CreateProjectDetails. + A short blurb describing the project. + + + :return: The description of this CreateProjectDetails. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this CreateProjectDetails. + A short blurb describing the project. + + + :param description: The description of this CreateProjectDetails. + :type: str + """ + self._description = description + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this CreateProjectDetails. + The `OCID`__ of the compartment to create the project in. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + + :return: The compartment_id of this CreateProjectDetails. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this CreateProjectDetails. + The `OCID`__ of the compartment to create the project in. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + + :param compartment_id: The compartment_id of this CreateProjectDetails. + :type: str + """ + self._compartment_id = compartment_id + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this CreateProjectDetails. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. See `Resource Tags`__. + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this CreateProjectDetails. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this CreateProjectDetails. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. See `Resource Tags`__. + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this CreateProjectDetails. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this CreateProjectDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this CreateProjectDetails. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this CreateProjectDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this CreateProjectDetails. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_science/models/model.py b/src/oci/data_science/models/model.py new file mode 100644 index 0000000000..f05a5e53de --- /dev/null +++ b/src/oci/data_science/models/model.py @@ -0,0 +1,406 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class Model(object): + """ + Models are mathematical representations of the relationships between data. Models are represented by their associated metadata and artifacts. + """ + + #: A constant which can be used with the lifecycle_state property of a Model. + #: This constant has a value of "ACTIVE" + LIFECYCLE_STATE_ACTIVE = "ACTIVE" + + #: A constant which can be used with the lifecycle_state property of a Model. + #: This constant has a value of "DELETED" + LIFECYCLE_STATE_DELETED = "DELETED" + + #: A constant which can be used with the lifecycle_state property of a Model. + #: This constant has a value of "FAILED" + LIFECYCLE_STATE_FAILED = "FAILED" + + #: A constant which can be used with the lifecycle_state property of a Model. + #: This constant has a value of "INACTIVE" + LIFECYCLE_STATE_INACTIVE = "INACTIVE" + + def __init__(self, **kwargs): + """ + 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 compartment_id: + The value to assign to the compartment_id property of this Model. + :type compartment_id: str + + :param project_id: + The value to assign to the project_id property of this Model. + :type project_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 lifecycle_state: + The value to assign to the lifecycle_state property of this Model. + Allowed values for this property are: "ACTIVE", "DELETED", "FAILED", "INACTIVE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type lifecycle_state: str + + :param time_created: + The value to assign to the time_created property of this Model. + :type time_created: datetime + + :param created_by: + The value to assign to the created_by property of this Model. + :type created_by: 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)) + + """ + self.swagger_types = { + 'id': 'str', + 'compartment_id': 'str', + 'project_id': 'str', + 'display_name': 'str', + 'description': 'str', + 'lifecycle_state': 'str', + 'time_created': 'datetime', + 'created_by': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'id': 'id', + 'compartment_id': 'compartmentId', + 'project_id': 'projectId', + 'display_name': 'displayName', + 'description': 'description', + 'lifecycle_state': 'lifecycleState', + 'time_created': 'timeCreated', + 'created_by': 'createdBy', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._id = None + self._compartment_id = None + self._project_id = None + self._display_name = None + self._description = None + self._lifecycle_state = None + self._time_created = None + self._created_by = None + self._freeform_tags = None + self._defined_tags = None + + @property + def id(self): + """ + **[Required]** Gets the id of this Model. + The `OCID`__ of the model. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + + :return: The id of this Model. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this Model. + The `OCID`__ of the model. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + + :param id: The id of this Model. + :type: str + """ + self._id = id + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this Model. + The `OCID`__ of the model's compartment. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + + :return: The compartment_id of this Model. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this Model. + The `OCID`__ of the model's compartment. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + + :param compartment_id: The compartment_id of this Model. + :type: str + """ + self._compartment_id = compartment_id + + @property + def project_id(self): + """ + **[Required]** Gets the project_id of this Model. + The `OCID`__ of the project associated with the model. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + + :return: The project_id of this Model. + :rtype: str + """ + return self._project_id + + @project_id.setter + def project_id(self, project_id): + """ + Sets the project_id of this Model. + The `OCID`__ of the project associated with the model. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + + :param project_id: The project_id of this Model. + :type: str + """ + self._project_id = project_id + + @property + def display_name(self): + """ + **[Required]** Gets the display_name of this Model. + A user-friendly display name for the resource. Does not have to be unique, and can be modified. Avoid entering confidential information. + + + :return: The display_name of this Model. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this Model. + A user-friendly display name for the resource. Does not have to be unique, and can be modified. Avoid entering confidential information. + + + :param display_name: The display_name of this Model. + :type: str + """ + self._display_name = display_name + + @property + def description(self): + """ + Gets the description of this Model. + A short blurb describing the model. + + + :return: The description of this Model. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this Model. + A short blurb describing the model. + + + :param description: The description of this Model. + :type: str + """ + self._description = description + + @property + def lifecycle_state(self): + """ + **[Required]** Gets the lifecycle_state of this Model. + The state of the model. + + Allowed values for this property are: "ACTIVE", "DELETED", "FAILED", "INACTIVE", '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 + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this Model. + The state of the model. + + + :param lifecycle_state: The lifecycle_state of this Model. + :type: str + """ + allowed_values = ["ACTIVE", "DELETED", "FAILED", "INACTIVE"] + if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values): + lifecycle_state = 'UNKNOWN_ENUM_VALUE' + self._lifecycle_state = lifecycle_state + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this Model. + The date and time the resource was created, in the timestamp format defined by `RFC3339`__. + Example: 2019-08-25T21:10:29.41Z + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_created of this Model. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this Model. + The date and time the resource was created, in the timestamp format defined by `RFC3339`__. + Example: 2019-08-25T21:10:29.41Z + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_created: The time_created of this Model. + :type: datetime + """ + self._time_created = time_created + + @property + def created_by(self): + """ + **[Required]** Gets the created_by of this Model. + The `OCID`__ of the user who created the model. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + + :return: The created_by of this Model. + :rtype: str + """ + return self._created_by + + @created_by.setter + def created_by(self, created_by): + """ + Sets the created_by of this Model. + The `OCID`__ of the user who created the model. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + + :param created_by: The created_by of this Model. + :type: str + """ + self._created_by = created_by + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this Model. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. See `Resource Tags`__. + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this Model. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this Model. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. See `Resource Tags`__. + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this Model. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this Model. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this Model. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this Model. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this Model. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_science/models/model_provenance.py b/src/oci/data_science/models/model_provenance.py new file mode 100644 index 0000000000..14a54f23dc --- /dev/null +++ b/src/oci/data_science/models/model_provenance.py @@ -0,0 +1,193 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class ModelProvenance(object): + """ + Model provenance gives data scientists information about the origin of their model. This information allows data scientists to reproduce the development environment in which the model was trained. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ModelProvenance object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param repository_url: + The value to assign to the repository_url property of this ModelProvenance. + :type repository_url: str + + :param git_branch: + The value to assign to the git_branch property of this ModelProvenance. + :type git_branch: str + + :param git_commit: + The value to assign to the git_commit property of this ModelProvenance. + :type git_commit: str + + :param script_dir: + The value to assign to the script_dir property of this ModelProvenance. + :type script_dir: str + + :param training_script: + The value to assign to the training_script property of this ModelProvenance. + :type training_script: str + + """ + self.swagger_types = { + 'repository_url': 'str', + 'git_branch': 'str', + 'git_commit': 'str', + 'script_dir': 'str', + 'training_script': 'str' + } + + self.attribute_map = { + 'repository_url': 'repositoryUrl', + 'git_branch': 'gitBranch', + 'git_commit': 'gitCommit', + 'script_dir': 'scriptDir', + 'training_script': 'trainingScript' + } + + self._repository_url = None + self._git_branch = None + self._git_commit = None + self._script_dir = None + self._training_script = None + + @property + def repository_url(self): + """ + Gets the repository_url of this ModelProvenance. + For model reproducibility purposes. URL of the git repository associated with model training. + + + :return: The repository_url of this ModelProvenance. + :rtype: str + """ + return self._repository_url + + @repository_url.setter + def repository_url(self, repository_url): + """ + Sets the repository_url of this ModelProvenance. + For model reproducibility purposes. URL of the git repository associated with model training. + + + :param repository_url: The repository_url of this ModelProvenance. + :type: str + """ + self._repository_url = repository_url + + @property + def git_branch(self): + """ + Gets the git_branch of this ModelProvenance. + For model reproducibility purposes. Branch of the git repository associated with model training. + + + :return: The git_branch of this ModelProvenance. + :rtype: str + """ + return self._git_branch + + @git_branch.setter + def git_branch(self, git_branch): + """ + Sets the git_branch of this ModelProvenance. + For model reproducibility purposes. Branch of the git repository associated with model training. + + + :param git_branch: The git_branch of this ModelProvenance. + :type: str + """ + self._git_branch = git_branch + + @property + def git_commit(self): + """ + Gets the git_commit of this ModelProvenance. + For model reproducibility purposes. Commit ID of the git repository associated with model training. + + + :return: The git_commit of this ModelProvenance. + :rtype: str + """ + return self._git_commit + + @git_commit.setter + def git_commit(self, git_commit): + """ + Sets the git_commit of this ModelProvenance. + For model reproducibility purposes. Commit ID of the git repository associated with model training. + + + :param git_commit: The git_commit of this ModelProvenance. + :type: str + """ + self._git_commit = git_commit + + @property + def script_dir(self): + """ + Gets the script_dir of this ModelProvenance. + For model reproducibility purposes. Path to model artifacts. + + + :return: The script_dir of this ModelProvenance. + :rtype: str + """ + return self._script_dir + + @script_dir.setter + def script_dir(self, script_dir): + """ + Sets the script_dir of this ModelProvenance. + For model reproducibility purposes. Path to model artifacts. + + + :param script_dir: The script_dir of this ModelProvenance. + :type: str + """ + self._script_dir = script_dir + + @property + def training_script(self): + """ + Gets the training_script of this ModelProvenance. + For model reproducibility purposes. Path to the python script or notebook in which the model was trained.\" + + + :return: The training_script of this ModelProvenance. + :rtype: str + """ + return self._training_script + + @training_script.setter + def training_script(self, training_script): + """ + Sets the training_script of this ModelProvenance. + For model reproducibility purposes. Path to the python script or notebook in which the model was trained.\" + + + :param training_script: The training_script of this ModelProvenance. + :type: str + """ + self._training_script = training_script + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_science/models/model_summary.py b/src/oci/data_science/models/model_summary.py new file mode 100644 index 0000000000..e3caa2cfa3 --- /dev/null +++ b/src/oci/data_science/models/model_summary.py @@ -0,0 +1,375 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class ModelSummary(object): + """ + Summary information for a model. + """ + + #: A constant which can be used with the lifecycle_state property of a ModelSummary. + #: This constant has a value of "ACTIVE" + LIFECYCLE_STATE_ACTIVE = "ACTIVE" + + #: A constant which can be used with the lifecycle_state property of a ModelSummary. + #: This constant has a value of "DELETED" + LIFECYCLE_STATE_DELETED = "DELETED" + + #: A constant which can be used with the lifecycle_state property of a ModelSummary. + #: This constant has a value of "FAILED" + LIFECYCLE_STATE_FAILED = "FAILED" + + #: A constant which can be used with the lifecycle_state property of a ModelSummary. + #: This constant has a value of "INACTIVE" + LIFECYCLE_STATE_INACTIVE = "INACTIVE" + + def __init__(self, **kwargs): + """ + Initializes a new ModelSummary object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param compartment_id: + The value to assign to the compartment_id property of this ModelSummary. + :type compartment_id: str + + :param project_id: + The value to assign to the project_id property of this ModelSummary. + :type project_id: str + + :param id: + The value to assign to the id property of this ModelSummary. + :type id: str + + :param display_name: + The value to assign to the display_name property of this ModelSummary. + :type display_name: str + + :param created_by: + The value to assign to the created_by property of this ModelSummary. + :type created_by: str + + :param time_created: + The value to assign to the time_created property of this ModelSummary. + :type time_created: datetime + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this ModelSummary. + Allowed values for this property are: "ACTIVE", "DELETED", "FAILED", "INACTIVE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type lifecycle_state: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this ModelSummary. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this ModelSummary. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'compartment_id': 'str', + 'project_id': 'str', + 'id': 'str', + 'display_name': 'str', + 'created_by': 'str', + 'time_created': 'datetime', + 'lifecycle_state': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'compartment_id': 'compartmentId', + 'project_id': 'projectId', + 'id': 'id', + 'display_name': 'displayName', + 'created_by': 'createdBy', + 'time_created': 'timeCreated', + 'lifecycle_state': 'lifecycleState', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._compartment_id = None + self._project_id = None + self._id = None + self._display_name = None + self._created_by = None + self._time_created = None + self._lifecycle_state = None + self._freeform_tags = None + self._defined_tags = None + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this ModelSummary. + The `OCID`__ of the model's compartment. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + + :return: The compartment_id of this ModelSummary. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this ModelSummary. + The `OCID`__ of the model's compartment. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + + :param compartment_id: The compartment_id of this ModelSummary. + :type: str + """ + self._compartment_id = compartment_id + + @property + def project_id(self): + """ + **[Required]** Gets the project_id of this ModelSummary. + The `OCID`__ of the project associated with the model. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + + :return: The project_id of this ModelSummary. + :rtype: str + """ + return self._project_id + + @project_id.setter + def project_id(self, project_id): + """ + Sets the project_id of this ModelSummary. + The `OCID`__ of the project associated with the model. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + + :param project_id: The project_id of this ModelSummary. + :type: str + """ + self._project_id = project_id + + @property + def id(self): + """ + **[Required]** Gets the id of this ModelSummary. + The `OCID`__ of the model. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + + :return: The id of this ModelSummary. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this ModelSummary. + The `OCID`__ of the model. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + + :param id: The id of this ModelSummary. + :type: str + """ + self._id = id + + @property + def display_name(self): + """ + **[Required]** Gets the display_name of this ModelSummary. + A user-friendly display name for the resource. Does not have to be unique, and can be modified. Avoid entering confidential information. + + + :return: The display_name of this ModelSummary. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this ModelSummary. + A user-friendly display name for the resource. Does not have to be unique, and can be modified. Avoid entering confidential information. + + + :param display_name: The display_name of this ModelSummary. + :type: str + """ + self._display_name = display_name + + @property + def created_by(self): + """ + **[Required]** Gets the created_by of this ModelSummary. + The `OCID`__ of the user who created the model. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + + :return: The created_by of this ModelSummary. + :rtype: str + """ + return self._created_by + + @created_by.setter + def created_by(self, created_by): + """ + Sets the created_by of this ModelSummary. + The `OCID`__ of the user who created the model. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + + :param created_by: The created_by of this ModelSummary. + :type: str + """ + self._created_by = created_by + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this ModelSummary. + The date and time the resource was created, in the timestamp format defined by `RFC3339`__. + Example: 2019-08-25T21:10:29.41Z + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_created of this ModelSummary. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this ModelSummary. + The date and time the resource was created, in the timestamp format defined by `RFC3339`__. + Example: 2019-08-25T21:10:29.41Z + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_created: The time_created of this ModelSummary. + :type: datetime + """ + self._time_created = time_created + + @property + def lifecycle_state(self): + """ + **[Required]** Gets the lifecycle_state of this ModelSummary. + The state of the model. + + Allowed values for this property are: "ACTIVE", "DELETED", "FAILED", "INACTIVE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The lifecycle_state of this ModelSummary. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this ModelSummary. + The state of the model. + + + :param lifecycle_state: The lifecycle_state of this ModelSummary. + :type: str + """ + allowed_values = ["ACTIVE", "DELETED", "FAILED", "INACTIVE"] + if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values): + lifecycle_state = 'UNKNOWN_ENUM_VALUE' + self._lifecycle_state = lifecycle_state + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this ModelSummary. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. See `Resource Tags`__. + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this ModelSummary. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this ModelSummary. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. See `Resource Tags`__. + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this ModelSummary. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this ModelSummary. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this ModelSummary. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this ModelSummary. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this ModelSummary. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_science/models/notebook_session.py b/src/oci/data_science/models/notebook_session.py new file mode 100644 index 0000000000..f128f535bd --- /dev/null +++ b/src/oci/data_science/models/notebook_session.py @@ -0,0 +1,478 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class NotebookSession(object): + """ + Notebook sessions are interactive coding environments for data scientists. + """ + + #: A constant which can be used with the lifecycle_state property of a NotebookSession. + #: This constant has a value of "CREATING" + LIFECYCLE_STATE_CREATING = "CREATING" + + #: A constant which can be used with the lifecycle_state property of a NotebookSession. + #: This constant has a value of "ACTIVE" + LIFECYCLE_STATE_ACTIVE = "ACTIVE" + + #: A constant which can be used with the lifecycle_state property of a NotebookSession. + #: This constant has a value of "DELETING" + LIFECYCLE_STATE_DELETING = "DELETING" + + #: A constant which can be used with the lifecycle_state property of a NotebookSession. + #: This constant has a value of "DELETED" + LIFECYCLE_STATE_DELETED = "DELETED" + + #: A constant which can be used with the lifecycle_state property of a NotebookSession. + #: This constant has a value of "FAILED" + LIFECYCLE_STATE_FAILED = "FAILED" + + #: A constant which can be used with the lifecycle_state property of a NotebookSession. + #: This constant has a value of "INACTIVE" + LIFECYCLE_STATE_INACTIVE = "INACTIVE" + + #: A constant which can be used with the lifecycle_state property of a NotebookSession. + #: This constant has a value of "UPDATING" + LIFECYCLE_STATE_UPDATING = "UPDATING" + + def __init__(self, **kwargs): + """ + Initializes a new NotebookSession 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 NotebookSession. + :type id: str + + :param time_created: + The value to assign to the time_created property of this NotebookSession. + :type time_created: datetime + + :param display_name: + The value to assign to the display_name property of this NotebookSession. + :type display_name: str + + :param project_id: + The value to assign to the project_id property of this NotebookSession. + :type project_id: str + + :param created_by: + The value to assign to the created_by property of this NotebookSession. + :type created_by: str + + :param compartment_id: + The value to assign to the compartment_id property of this NotebookSession. + :type compartment_id: str + + :param notebook_session_configuration_details: + The value to assign to the notebook_session_configuration_details property of this NotebookSession. + :type notebook_session_configuration_details: NotebookSessionConfigurationDetails + + :param notebook_session_url: + The value to assign to the notebook_session_url property of this NotebookSession. + :type notebook_session_url: str + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this NotebookSession. + Allowed values for this property are: "CREATING", "ACTIVE", "DELETING", "DELETED", "FAILED", "INACTIVE", "UPDATING", '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 NotebookSession. + :type lifecycle_details: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this NotebookSession. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this NotebookSession. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'id': 'str', + 'time_created': 'datetime', + 'display_name': 'str', + 'project_id': 'str', + 'created_by': 'str', + 'compartment_id': 'str', + 'notebook_session_configuration_details': 'NotebookSessionConfigurationDetails', + 'notebook_session_url': 'str', + 'lifecycle_state': 'str', + 'lifecycle_details': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'id': 'id', + 'time_created': 'timeCreated', + 'display_name': 'displayName', + 'project_id': 'projectId', + 'created_by': 'createdBy', + 'compartment_id': 'compartmentId', + 'notebook_session_configuration_details': 'notebookSessionConfigurationDetails', + 'notebook_session_url': 'notebookSessionUrl', + 'lifecycle_state': 'lifecycleState', + 'lifecycle_details': 'lifecycleDetails', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._id = None + self._time_created = None + self._display_name = None + self._project_id = None + self._created_by = None + self._compartment_id = None + self._notebook_session_configuration_details = None + self._notebook_session_url = None + self._lifecycle_state = None + self._lifecycle_details = None + self._freeform_tags = None + self._defined_tags = None + + @property + def id(self): + """ + **[Required]** Gets the id of this NotebookSession. + The `OCID`__ of the notebook session. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + + :return: The id of this NotebookSession. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this NotebookSession. + The `OCID`__ of the notebook session. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + + :param id: The id of this NotebookSession. + :type: str + """ + self._id = id + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this NotebookSession. + The date and time the resource was created, in the timestamp format defined by `RFC3339`__. + Example: 2019-08-25T21:10:29.41Z + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_created of this NotebookSession. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this NotebookSession. + The date and time the resource was created, in the timestamp format defined by `RFC3339`__. + Example: 2019-08-25T21:10:29.41Z + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_created: The time_created of this NotebookSession. + :type: datetime + """ + self._time_created = time_created + + @property + def display_name(self): + """ + **[Required]** Gets the display_name of this NotebookSession. + A user-friendly display name for the resource. Does not have to be unique, and can be modified. Avoid entering confidential information. + Example: `My NotebookSession` + + + :return: The display_name of this NotebookSession. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this NotebookSession. + A user-friendly display name for the resource. Does not have to be unique, and can be modified. Avoid entering confidential information. + Example: `My NotebookSession` + + + :param display_name: The display_name of this NotebookSession. + :type: str + """ + self._display_name = display_name + + @property + def project_id(self): + """ + **[Required]** Gets the project_id of this NotebookSession. + The `OCID`__ of the project associated with the notebook session. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + + :return: The project_id of this NotebookSession. + :rtype: str + """ + return self._project_id + + @project_id.setter + def project_id(self, project_id): + """ + Sets the project_id of this NotebookSession. + The `OCID`__ of the project associated with the notebook session. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + + :param project_id: The project_id of this NotebookSession. + :type: str + """ + self._project_id = project_id + + @property + def created_by(self): + """ + **[Required]** Gets the created_by of this NotebookSession. + The `OCID`__ of the user who created the notebook session. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + + :return: The created_by of this NotebookSession. + :rtype: str + """ + return self._created_by + + @created_by.setter + def created_by(self, created_by): + """ + Sets the created_by of this NotebookSession. + The `OCID`__ of the user who created the notebook session. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + + :param created_by: The created_by of this NotebookSession. + :type: str + """ + self._created_by = created_by + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this NotebookSession. + The `OCID`__ of the notebook session's compartment. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + + :return: The compartment_id of this NotebookSession. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this NotebookSession. + The `OCID`__ of the notebook session's compartment. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + + :param compartment_id: The compartment_id of this NotebookSession. + :type: str + """ + self._compartment_id = compartment_id + + @property + def notebook_session_configuration_details(self): + """ + Gets the notebook_session_configuration_details of this NotebookSession. + + :return: The notebook_session_configuration_details of this NotebookSession. + :rtype: NotebookSessionConfigurationDetails + """ + return self._notebook_session_configuration_details + + @notebook_session_configuration_details.setter + def notebook_session_configuration_details(self, notebook_session_configuration_details): + """ + Sets the notebook_session_configuration_details of this NotebookSession. + + :param notebook_session_configuration_details: The notebook_session_configuration_details of this NotebookSession. + :type: NotebookSessionConfigurationDetails + """ + self._notebook_session_configuration_details = notebook_session_configuration_details + + @property + def notebook_session_url(self): + """ + Gets the notebook_session_url of this NotebookSession. + The URL to interact with the notebook session. + + + :return: The notebook_session_url of this NotebookSession. + :rtype: str + """ + return self._notebook_session_url + + @notebook_session_url.setter + def notebook_session_url(self, notebook_session_url): + """ + Sets the notebook_session_url of this NotebookSession. + The URL to interact with the notebook session. + + + :param notebook_session_url: The notebook_session_url of this NotebookSession. + :type: str + """ + self._notebook_session_url = notebook_session_url + + @property + def lifecycle_state(self): + """ + **[Required]** Gets the lifecycle_state of this NotebookSession. + The state of the notebook session. + + Allowed values for this property are: "CREATING", "ACTIVE", "DELETING", "DELETED", "FAILED", "INACTIVE", "UPDATING", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The lifecycle_state of this NotebookSession. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this NotebookSession. + The state of the notebook session. + + + :param lifecycle_state: The lifecycle_state of this NotebookSession. + :type: str + """ + allowed_values = ["CREATING", "ACTIVE", "DELETING", "DELETED", "FAILED", "INACTIVE", "UPDATING"] + if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values): + lifecycle_state = 'UNKNOWN_ENUM_VALUE' + self._lifecycle_state = lifecycle_state + + @property + def lifecycle_details(self): + """ + Gets the lifecycle_details of this NotebookSession. + Details about the state of the notebook session. + + + :return: The lifecycle_details of this NotebookSession. + :rtype: str + """ + return self._lifecycle_details + + @lifecycle_details.setter + def lifecycle_details(self, lifecycle_details): + """ + Sets the lifecycle_details of this NotebookSession. + Details about the state of the notebook session. + + + :param lifecycle_details: The lifecycle_details of this NotebookSession. + :type: str + """ + self._lifecycle_details = lifecycle_details + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this NotebookSession. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. See `Resource Tags`__. + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this NotebookSession. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this NotebookSession. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. See `Resource Tags`__. + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this NotebookSession. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this NotebookSession. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this NotebookSession. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this NotebookSession. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this NotebookSession. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_science/models/notebook_session_configuration_details.py b/src/oci/data_science/models/notebook_session_configuration_details.py new file mode 100644 index 0000000000..7d09773826 --- /dev/null +++ b/src/oci/data_science/models/notebook_session_configuration_details.py @@ -0,0 +1,135 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class NotebookSessionConfigurationDetails(object): + """ + Details for the notebook session configuration. + """ + + def __init__(self, **kwargs): + """ + Initializes a new NotebookSessionConfigurationDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param shape: + The value to assign to the shape property of this NotebookSessionConfigurationDetails. + :type shape: str + + :param block_storage_size_in_gbs: + The value to assign to the block_storage_size_in_gbs property of this NotebookSessionConfigurationDetails. + :type block_storage_size_in_gbs: int + + :param subnet_id: + The value to assign to the subnet_id property of this NotebookSessionConfigurationDetails. + :type subnet_id: str + + """ + self.swagger_types = { + 'shape': 'str', + 'block_storage_size_in_gbs': 'int', + 'subnet_id': 'str' + } + + self.attribute_map = { + 'shape': 'shape', + 'block_storage_size_in_gbs': 'blockStorageSizeInGBs', + 'subnet_id': 'subnetId' + } + + self._shape = None + self._block_storage_size_in_gbs = None + self._subnet_id = None + + @property + def shape(self): + """ + **[Required]** Gets the shape of this NotebookSessionConfigurationDetails. + The shape used to launch the notebook session compute instance. The list of available shapes in a given compartment can be retrieved from the `ListNotebookSessionShapes` endpoint. + + + :return: The shape of this NotebookSessionConfigurationDetails. + :rtype: str + """ + return self._shape + + @shape.setter + def shape(self, shape): + """ + Sets the shape of this NotebookSessionConfigurationDetails. + The shape used to launch the notebook session compute instance. The list of available shapes in a given compartment can be retrieved from the `ListNotebookSessionShapes` endpoint. + + + :param shape: The shape of this NotebookSessionConfigurationDetails. + :type: str + """ + self._shape = shape + + @property + def block_storage_size_in_gbs(self): + """ + Gets the block_storage_size_in_gbs of this NotebookSessionConfigurationDetails. + A notebook session instance is provided with a block storage volume. This specifies the size of the volume in GBs. + + + :return: The block_storage_size_in_gbs of this NotebookSessionConfigurationDetails. + :rtype: int + """ + return self._block_storage_size_in_gbs + + @block_storage_size_in_gbs.setter + def block_storage_size_in_gbs(self, block_storage_size_in_gbs): + """ + Sets the block_storage_size_in_gbs of this NotebookSessionConfigurationDetails. + A notebook session instance is provided with a block storage volume. This specifies the size of the volume in GBs. + + + :param block_storage_size_in_gbs: The block_storage_size_in_gbs of this NotebookSessionConfigurationDetails. + :type: int + """ + self._block_storage_size_in_gbs = block_storage_size_in_gbs + + @property + def subnet_id(self): + """ + **[Required]** Gets the subnet_id of this NotebookSessionConfigurationDetails. + A notebook session instance is provided with a VNIC for network access. This specifies the `OCID`__ of the subnet to create a VNIC in. The subnet should be in a VCN with a NAT gateway for egress to the internet. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + + :return: The subnet_id of this NotebookSessionConfigurationDetails. + :rtype: str + """ + return self._subnet_id + + @subnet_id.setter + def subnet_id(self, subnet_id): + """ + Sets the subnet_id of this NotebookSessionConfigurationDetails. + A notebook session instance is provided with a VNIC for network access. This specifies the `OCID`__ of the subnet to create a VNIC in. The subnet should be in a VCN with a NAT gateway for egress to the internet. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + + :param subnet_id: The subnet_id of this NotebookSessionConfigurationDetails. + :type: str + """ + self._subnet_id = subnet_id + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_science/models/notebook_session_shape_summary.py b/src/oci/data_science/models/notebook_session_shape_summary.py new file mode 100644 index 0000000000..69c567fd72 --- /dev/null +++ b/src/oci/data_science/models/notebook_session_shape_summary.py @@ -0,0 +1,131 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class NotebookSessionShapeSummary(object): + """ + The compute shape used to launch a notebook session compute instance. + """ + + def __init__(self, **kwargs): + """ + Initializes a new NotebookSessionShapeSummary object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param name: + The value to assign to the name property of this NotebookSessionShapeSummary. + :type name: str + + :param core_count: + The value to assign to the core_count property of this NotebookSessionShapeSummary. + :type core_count: int + + :param memory_in_gbs: + The value to assign to the memory_in_gbs property of this NotebookSessionShapeSummary. + :type memory_in_gbs: int + + """ + self.swagger_types = { + 'name': 'str', + 'core_count': 'int', + 'memory_in_gbs': 'int' + } + + self.attribute_map = { + 'name': 'name', + 'core_count': 'coreCount', + 'memory_in_gbs': 'memoryInGBs' + } + + self._name = None + self._core_count = None + self._memory_in_gbs = None + + @property + def name(self): + """ + **[Required]** Gets the name of this NotebookSessionShapeSummary. + The name of the notebook session shape. + + + :return: The name of this NotebookSessionShapeSummary. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """ + Sets the name of this NotebookSessionShapeSummary. + The name of the notebook session shape. + + + :param name: The name of this NotebookSessionShapeSummary. + :type: str + """ + self._name = name + + @property + def core_count(self): + """ + **[Required]** Gets the core_count of this NotebookSessionShapeSummary. + The number of cores associated with this notebook session shape. + + + :return: The core_count of this NotebookSessionShapeSummary. + :rtype: int + """ + return self._core_count + + @core_count.setter + def core_count(self, core_count): + """ + Sets the core_count of this NotebookSessionShapeSummary. + The number of cores associated with this notebook session shape. + + + :param core_count: The core_count of this NotebookSessionShapeSummary. + :type: int + """ + self._core_count = core_count + + @property + def memory_in_gbs(self): + """ + **[Required]** Gets the memory_in_gbs of this NotebookSessionShapeSummary. + The amount of memory in GBs associated with this notebook session shape. + + + :return: The memory_in_gbs of this NotebookSessionShapeSummary. + :rtype: int + """ + return self._memory_in_gbs + + @memory_in_gbs.setter + def memory_in_gbs(self, memory_in_gbs): + """ + Sets the memory_in_gbs of this NotebookSessionShapeSummary. + The amount of memory in GBs associated with this notebook session shape. + + + :param memory_in_gbs: The memory_in_gbs of this NotebookSessionShapeSummary. + :type: int + """ + self._memory_in_gbs = memory_in_gbs + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_science/models/notebook_session_summary.py b/src/oci/data_science/models/notebook_session_summary.py new file mode 100644 index 0000000000..6f9cf8716c --- /dev/null +++ b/src/oci/data_science/models/notebook_session_summary.py @@ -0,0 +1,447 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class NotebookSessionSummary(object): + """ + Summary information for a notebook session. + """ + + #: A constant which can be used with the lifecycle_state property of a NotebookSessionSummary. + #: This constant has a value of "CREATING" + LIFECYCLE_STATE_CREATING = "CREATING" + + #: A constant which can be used with the lifecycle_state property of a NotebookSessionSummary. + #: This constant has a value of "ACTIVE" + LIFECYCLE_STATE_ACTIVE = "ACTIVE" + + #: A constant which can be used with the lifecycle_state property of a NotebookSessionSummary. + #: This constant has a value of "DELETING" + LIFECYCLE_STATE_DELETING = "DELETING" + + #: A constant which can be used with the lifecycle_state property of a NotebookSessionSummary. + #: This constant has a value of "DELETED" + LIFECYCLE_STATE_DELETED = "DELETED" + + #: A constant which can be used with the lifecycle_state property of a NotebookSessionSummary. + #: This constant has a value of "FAILED" + LIFECYCLE_STATE_FAILED = "FAILED" + + #: A constant which can be used with the lifecycle_state property of a NotebookSessionSummary. + #: This constant has a value of "INACTIVE" + LIFECYCLE_STATE_INACTIVE = "INACTIVE" + + #: A constant which can be used with the lifecycle_state property of a NotebookSessionSummary. + #: This constant has a value of "UPDATING" + LIFECYCLE_STATE_UPDATING = "UPDATING" + + def __init__(self, **kwargs): + """ + Initializes a new NotebookSessionSummary 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 NotebookSessionSummary. + :type id: str + + :param time_created: + The value to assign to the time_created property of this NotebookSessionSummary. + :type time_created: datetime + + :param display_name: + The value to assign to the display_name property of this NotebookSessionSummary. + :type display_name: str + + :param project_id: + The value to assign to the project_id property of this NotebookSessionSummary. + :type project_id: str + + :param created_by: + The value to assign to the created_by property of this NotebookSessionSummary. + :type created_by: str + + :param compartment_id: + The value to assign to the compartment_id property of this NotebookSessionSummary. + :type compartment_id: str + + :param notebook_session_configuration_details: + The value to assign to the notebook_session_configuration_details property of this NotebookSessionSummary. + :type notebook_session_configuration_details: NotebookSessionConfigurationDetails + + :param notebook_session_url: + The value to assign to the notebook_session_url property of this NotebookSessionSummary. + :type notebook_session_url: str + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this NotebookSessionSummary. + Allowed values for this property are: "CREATING", "ACTIVE", "DELETING", "DELETED", "FAILED", "INACTIVE", "UPDATING", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type lifecycle_state: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this NotebookSessionSummary. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this NotebookSessionSummary. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'id': 'str', + 'time_created': 'datetime', + 'display_name': 'str', + 'project_id': 'str', + 'created_by': 'str', + 'compartment_id': 'str', + 'notebook_session_configuration_details': 'NotebookSessionConfigurationDetails', + 'notebook_session_url': 'str', + 'lifecycle_state': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'id': 'id', + 'time_created': 'timeCreated', + 'display_name': 'displayName', + 'project_id': 'projectId', + 'created_by': 'createdBy', + 'compartment_id': 'compartmentId', + 'notebook_session_configuration_details': 'notebookSessionConfigurationDetails', + 'notebook_session_url': 'notebookSessionUrl', + 'lifecycle_state': 'lifecycleState', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._id = None + self._time_created = None + self._display_name = None + self._project_id = None + self._created_by = None + self._compartment_id = None + self._notebook_session_configuration_details = None + self._notebook_session_url = None + self._lifecycle_state = None + self._freeform_tags = None + self._defined_tags = None + + @property + def id(self): + """ + **[Required]** Gets the id of this NotebookSessionSummary. + The `OCID`__ of the notebook session. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + + :return: The id of this NotebookSessionSummary. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this NotebookSessionSummary. + The `OCID`__ of the notebook session. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + + :param id: The id of this NotebookSessionSummary. + :type: str + """ + self._id = id + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this NotebookSessionSummary. + The date and time the resource was created, in the timestamp format defined by `RFC3339`__. + Example: 2019-08-25T21:10:29.41Z + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_created of this NotebookSessionSummary. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this NotebookSessionSummary. + The date and time the resource was created, in the timestamp format defined by `RFC3339`__. + Example: 2019-08-25T21:10:29.41Z + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_created: The time_created of this NotebookSessionSummary. + :type: datetime + """ + self._time_created = time_created + + @property + def display_name(self): + """ + **[Required]** Gets the display_name of this NotebookSessionSummary. + A user-friendly display name for the resource. Does not have to be unique, and can be modified. Avoid entering confidential information. + Example: `My NotebookSession` + + + :return: The display_name of this NotebookSessionSummary. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this NotebookSessionSummary. + A user-friendly display name for the resource. Does not have to be unique, and can be modified. Avoid entering confidential information. + Example: `My NotebookSession` + + + :param display_name: The display_name of this NotebookSessionSummary. + :type: str + """ + self._display_name = display_name + + @property + def project_id(self): + """ + **[Required]** Gets the project_id of this NotebookSessionSummary. + The `OCID`__ of the project associated with the notebook session. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + + :return: The project_id of this NotebookSessionSummary. + :rtype: str + """ + return self._project_id + + @project_id.setter + def project_id(self, project_id): + """ + Sets the project_id of this NotebookSessionSummary. + The `OCID`__ of the project associated with the notebook session. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + + :param project_id: The project_id of this NotebookSessionSummary. + :type: str + """ + self._project_id = project_id + + @property + def created_by(self): + """ + **[Required]** Gets the created_by of this NotebookSessionSummary. + The `OCID`__ of the user who created the notebook session. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + + :return: The created_by of this NotebookSessionSummary. + :rtype: str + """ + return self._created_by + + @created_by.setter + def created_by(self, created_by): + """ + Sets the created_by of this NotebookSessionSummary. + The `OCID`__ of the user who created the notebook session. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + + :param created_by: The created_by of this NotebookSessionSummary. + :type: str + """ + self._created_by = created_by + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this NotebookSessionSummary. + The `OCID`__ of the notebook session's compartment. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + + :return: The compartment_id of this NotebookSessionSummary. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this NotebookSessionSummary. + The `OCID`__ of the notebook session's compartment. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + + :param compartment_id: The compartment_id of this NotebookSessionSummary. + :type: str + """ + self._compartment_id = compartment_id + + @property + def notebook_session_configuration_details(self): + """ + Gets the notebook_session_configuration_details of this NotebookSessionSummary. + + :return: The notebook_session_configuration_details of this NotebookSessionSummary. + :rtype: NotebookSessionConfigurationDetails + """ + return self._notebook_session_configuration_details + + @notebook_session_configuration_details.setter + def notebook_session_configuration_details(self, notebook_session_configuration_details): + """ + Sets the notebook_session_configuration_details of this NotebookSessionSummary. + + :param notebook_session_configuration_details: The notebook_session_configuration_details of this NotebookSessionSummary. + :type: NotebookSessionConfigurationDetails + """ + self._notebook_session_configuration_details = notebook_session_configuration_details + + @property + def notebook_session_url(self): + """ + Gets the notebook_session_url of this NotebookSessionSummary. + The URL to interact with the notebook session. + + + :return: The notebook_session_url of this NotebookSessionSummary. + :rtype: str + """ + return self._notebook_session_url + + @notebook_session_url.setter + def notebook_session_url(self, notebook_session_url): + """ + Sets the notebook_session_url of this NotebookSessionSummary. + The URL to interact with the notebook session. + + + :param notebook_session_url: The notebook_session_url of this NotebookSessionSummary. + :type: str + """ + self._notebook_session_url = notebook_session_url + + @property + def lifecycle_state(self): + """ + **[Required]** Gets the lifecycle_state of this NotebookSessionSummary. + The state of the notebook session. + + Allowed values for this property are: "CREATING", "ACTIVE", "DELETING", "DELETED", "FAILED", "INACTIVE", "UPDATING", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The lifecycle_state of this NotebookSessionSummary. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this NotebookSessionSummary. + The state of the notebook session. + + + :param lifecycle_state: The lifecycle_state of this NotebookSessionSummary. + :type: str + """ + allowed_values = ["CREATING", "ACTIVE", "DELETING", "DELETED", "FAILED", "INACTIVE", "UPDATING"] + if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values): + lifecycle_state = 'UNKNOWN_ENUM_VALUE' + self._lifecycle_state = lifecycle_state + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this NotebookSessionSummary. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. See `Resource Tags`__. + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this NotebookSessionSummary. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this NotebookSessionSummary. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. See `Resource Tags`__. + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this NotebookSessionSummary. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this NotebookSessionSummary. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this NotebookSessionSummary. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this NotebookSessionSummary. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this NotebookSessionSummary. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_science/models/project.py b/src/oci/data_science/models/project.py new file mode 100644 index 0000000000..8e242620bd --- /dev/null +++ b/src/oci/data_science/models/project.py @@ -0,0 +1,367 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class Project(object): + """ + Projects enable users to organize their data science work. + """ + + #: A constant which can be used with the lifecycle_state property of a Project. + #: This constant has a value of "ACTIVE" + LIFECYCLE_STATE_ACTIVE = "ACTIVE" + + #: A constant which can be used with the lifecycle_state property of a Project. + #: This constant has a value of "DELETING" + LIFECYCLE_STATE_DELETING = "DELETING" + + #: A constant which can be used with the lifecycle_state property of a Project. + #: This constant has a value of "DELETED" + LIFECYCLE_STATE_DELETED = "DELETED" + + def __init__(self, **kwargs): + """ + Initializes a new Project 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 Project. + :type id: str + + :param time_created: + The value to assign to the time_created property of this Project. + :type time_created: datetime + + :param display_name: + The value to assign to the display_name property of this Project. + :type display_name: str + + :param description: + The value to assign to the description property of this Project. + :type description: str + + :param compartment_id: + The value to assign to the compartment_id property of this Project. + :type compartment_id: str + + :param created_by: + The value to assign to the created_by property of this Project. + :type created_by: str + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this Project. + Allowed values for this property are: "ACTIVE", "DELETING", "DELETED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type lifecycle_state: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this Project. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this Project. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'id': 'str', + 'time_created': 'datetime', + 'display_name': 'str', + 'description': 'str', + 'compartment_id': 'str', + 'created_by': 'str', + 'lifecycle_state': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'id': 'id', + 'time_created': 'timeCreated', + 'display_name': 'displayName', + 'description': 'description', + 'compartment_id': 'compartmentId', + 'created_by': 'createdBy', + 'lifecycle_state': 'lifecycleState', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._id = None + self._time_created = None + self._display_name = None + self._description = None + self._compartment_id = None + self._created_by = None + self._lifecycle_state = None + self._freeform_tags = None + self._defined_tags = None + + @property + def id(self): + """ + **[Required]** Gets the id of this Project. + The `OCID`__ of the project. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + + :return: The id of this Project. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this Project. + The `OCID`__ of the project. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + + :param id: The id of this Project. + :type: str + """ + self._id = id + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this Project. + The date and time the resource was created, in the timestamp format defined by `RFC3339`__. + Example: 2019-08-25T21:10:29.41Z + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_created of this Project. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this Project. + The date and time the resource was created, in the timestamp format defined by `RFC3339`__. + Example: 2019-08-25T21:10:29.41Z + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_created: The time_created of this Project. + :type: datetime + """ + self._time_created = time_created + + @property + def display_name(self): + """ + **[Required]** Gets the display_name of this Project. + A user-friendly display name for the resource. Does not have to be unique, and can be modified. Avoid entering confidential information. + + + :return: The display_name of this Project. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this Project. + A user-friendly display name for the resource. Does not have to be unique, and can be modified. Avoid entering confidential information. + + + :param display_name: The display_name of this Project. + :type: str + """ + self._display_name = display_name + + @property + def description(self): + """ + Gets the description of this Project. + A short blurb describing the project. + + + :return: The description of this Project. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this Project. + A short blurb describing the project. + + + :param description: The description of this Project. + :type: str + """ + self._description = description + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this Project. + The `OCID`__ of the project's compartment. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + + :return: The compartment_id of this Project. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this Project. + The `OCID`__ of the project's compartment. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + + :param compartment_id: The compartment_id of this Project. + :type: str + """ + self._compartment_id = compartment_id + + @property + def created_by(self): + """ + **[Required]** Gets the created_by of this Project. + The `OCID`__ of the user who created this project. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + + :return: The created_by of this Project. + :rtype: str + """ + return self._created_by + + @created_by.setter + def created_by(self, created_by): + """ + Sets the created_by of this Project. + The `OCID`__ of the user who created this project. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + + :param created_by: The created_by of this Project. + :type: str + """ + self._created_by = created_by + + @property + def lifecycle_state(self): + """ + **[Required]** Gets the lifecycle_state of this Project. + The state of the project. + + Allowed values for this property are: "ACTIVE", "DELETING", "DELETED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The lifecycle_state of this Project. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this Project. + The state of the project. + + + :param lifecycle_state: The lifecycle_state of this Project. + :type: str + """ + allowed_values = ["ACTIVE", "DELETING", "DELETED"] + if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values): + lifecycle_state = 'UNKNOWN_ENUM_VALUE' + self._lifecycle_state = lifecycle_state + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this Project. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. See `Resource Tags`__. + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this Project. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this Project. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. See `Resource Tags`__. + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this Project. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this Project. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this Project. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this Project. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this Project. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_science/models/project_summary.py b/src/oci/data_science/models/project_summary.py new file mode 100644 index 0000000000..ad5532d101 --- /dev/null +++ b/src/oci/data_science/models/project_summary.py @@ -0,0 +1,367 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class ProjectSummary(object): + """ + Summary information for a project. + """ + + #: A constant which can be used with the lifecycle_state property of a ProjectSummary. + #: This constant has a value of "ACTIVE" + LIFECYCLE_STATE_ACTIVE = "ACTIVE" + + #: A constant which can be used with the lifecycle_state property of a ProjectSummary. + #: This constant has a value of "DELETING" + LIFECYCLE_STATE_DELETING = "DELETING" + + #: A constant which can be used with the lifecycle_state property of a ProjectSummary. + #: This constant has a value of "DELETED" + LIFECYCLE_STATE_DELETED = "DELETED" + + def __init__(self, **kwargs): + """ + Initializes a new ProjectSummary 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 ProjectSummary. + :type id: str + + :param time_created: + The value to assign to the time_created property of this ProjectSummary. + :type time_created: datetime + + :param display_name: + The value to assign to the display_name property of this ProjectSummary. + :type display_name: str + + :param description: + The value to assign to the description property of this ProjectSummary. + :type description: str + + :param compartment_id: + The value to assign to the compartment_id property of this ProjectSummary. + :type compartment_id: str + + :param created_by: + The value to assign to the created_by property of this ProjectSummary. + :type created_by: str + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this ProjectSummary. + Allowed values for this property are: "ACTIVE", "DELETING", "DELETED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type lifecycle_state: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this ProjectSummary. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this ProjectSummary. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'id': 'str', + 'time_created': 'datetime', + 'display_name': 'str', + 'description': 'str', + 'compartment_id': 'str', + 'created_by': 'str', + 'lifecycle_state': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'id': 'id', + 'time_created': 'timeCreated', + 'display_name': 'displayName', + 'description': 'description', + 'compartment_id': 'compartmentId', + 'created_by': 'createdBy', + 'lifecycle_state': 'lifecycleState', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._id = None + self._time_created = None + self._display_name = None + self._description = None + self._compartment_id = None + self._created_by = None + self._lifecycle_state = None + self._freeform_tags = None + self._defined_tags = None + + @property + def id(self): + """ + **[Required]** Gets the id of this ProjectSummary. + The `OCID`__ of the project. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + + :return: The id of this ProjectSummary. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this ProjectSummary. + The `OCID`__ of the project. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + + :param id: The id of this ProjectSummary. + :type: str + """ + self._id = id + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this ProjectSummary. + The date and time the resource was created, in the timestamp format defined by `RFC3339`__. + Example: 2019-08-25T21:10:29.41Z + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_created of this ProjectSummary. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this ProjectSummary. + The date and time the resource was created, in the timestamp format defined by `RFC3339`__. + Example: 2019-08-25T21:10:29.41Z + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_created: The time_created of this ProjectSummary. + :type: datetime + """ + self._time_created = time_created + + @property + def display_name(self): + """ + **[Required]** Gets the display_name of this ProjectSummary. + A user-friendly display name for the resource. Does not have to be unique, and can be modified. Avoid entering confidential information. + + + :return: The display_name of this ProjectSummary. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this ProjectSummary. + A user-friendly display name for the resource. Does not have to be unique, and can be modified. Avoid entering confidential information. + + + :param display_name: The display_name of this ProjectSummary. + :type: str + """ + self._display_name = display_name + + @property + def description(self): + """ + Gets the description of this ProjectSummary. + A short blurb describing the project. + + + :return: The description of this ProjectSummary. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this ProjectSummary. + A short blurb describing the project. + + + :param description: The description of this ProjectSummary. + :type: str + """ + self._description = description + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this ProjectSummary. + The `OCID`__ of the project's compartment. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + + :return: The compartment_id of this ProjectSummary. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this ProjectSummary. + The `OCID`__ of the project's compartment. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + + :param compartment_id: The compartment_id of this ProjectSummary. + :type: str + """ + self._compartment_id = compartment_id + + @property + def created_by(self): + """ + **[Required]** Gets the created_by of this ProjectSummary. + The `OCID`__ of the user who created this project. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + + :return: The created_by of this ProjectSummary. + :rtype: str + """ + return self._created_by + + @created_by.setter + def created_by(self, created_by): + """ + Sets the created_by of this ProjectSummary. + The `OCID`__ of the user who created this project. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + + :param created_by: The created_by of this ProjectSummary. + :type: str + """ + self._created_by = created_by + + @property + def lifecycle_state(self): + """ + **[Required]** Gets the lifecycle_state of this ProjectSummary. + The state of the project. + + Allowed values for this property are: "ACTIVE", "DELETING", "DELETED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The lifecycle_state of this ProjectSummary. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this ProjectSummary. + The state of the project. + + + :param lifecycle_state: The lifecycle_state of this ProjectSummary. + :type: str + """ + allowed_values = ["ACTIVE", "DELETING", "DELETED"] + if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values): + lifecycle_state = 'UNKNOWN_ENUM_VALUE' + self._lifecycle_state = lifecycle_state + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this ProjectSummary. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. See `Resource Tags`__. + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this ProjectSummary. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this ProjectSummary. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. See `Resource Tags`__. + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this ProjectSummary. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this ProjectSummary. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this ProjectSummary. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this ProjectSummary. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this ProjectSummary. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_science/models/update_model_details.py b/src/oci/data_science/models/update_model_details.py new file mode 100644 index 0000000000..303660b1a6 --- /dev/null +++ b/src/oci/data_science/models/update_model_details.py @@ -0,0 +1,176 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class UpdateModelDetails(object): + """ + Details for updating a model. + """ + + def __init__(self, **kwargs): + """ + Initializes a new UpdateModelDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param display_name: + The value to assign to the display_name property of this UpdateModelDetails. + :type display_name: str + + :param description: + The value to assign to the description property of this UpdateModelDetails. + :type description: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this UpdateModelDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this UpdateModelDetails. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'display_name': 'str', + 'description': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'display_name': 'displayName', + 'description': 'description', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._display_name = None + self._description = None + self._freeform_tags = None + self._defined_tags = None + + @property + def display_name(self): + """ + Gets the display_name of this UpdateModelDetails. + A user-friendly display name for the resource. Does not have to be unique, and can be modified. Avoid entering confidential information. + Example: `My Model` + + + :return: The display_name of this UpdateModelDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this UpdateModelDetails. + A user-friendly display name for the resource. Does not have to be unique, and can be modified. Avoid entering confidential information. + Example: `My Model` + + + :param display_name: The display_name of this UpdateModelDetails. + :type: str + """ + self._display_name = display_name + + @property + def description(self): + """ + Gets the description of this UpdateModelDetails. + A short blurb describing the model. + + + :return: The description of this UpdateModelDetails. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this UpdateModelDetails. + A short blurb describing the model. + + + :param description: The description of this UpdateModelDetails. + :type: str + """ + self._description = description + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this UpdateModelDetails. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. See `Resource Tags`__. + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this UpdateModelDetails. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this UpdateModelDetails. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. See `Resource Tags`__. + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this UpdateModelDetails. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this UpdateModelDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this UpdateModelDetails. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this UpdateModelDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this UpdateModelDetails. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_science/models/update_model_provenance_details.py b/src/oci/data_science/models/update_model_provenance_details.py new file mode 100644 index 0000000000..693087b5c5 --- /dev/null +++ b/src/oci/data_science/models/update_model_provenance_details.py @@ -0,0 +1,193 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class UpdateModelProvenanceDetails(object): + """ + Model provenance gives data scientists information about the origin of their model. This information allows data scientists to reproduce the development environment in which the model was trained. + """ + + def __init__(self, **kwargs): + """ + Initializes a new UpdateModelProvenanceDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param repository_url: + The value to assign to the repository_url property of this UpdateModelProvenanceDetails. + :type repository_url: str + + :param git_branch: + The value to assign to the git_branch property of this UpdateModelProvenanceDetails. + :type git_branch: str + + :param git_commit: + The value to assign to the git_commit property of this UpdateModelProvenanceDetails. + :type git_commit: str + + :param script_dir: + The value to assign to the script_dir property of this UpdateModelProvenanceDetails. + :type script_dir: str + + :param training_script: + The value to assign to the training_script property of this UpdateModelProvenanceDetails. + :type training_script: str + + """ + self.swagger_types = { + 'repository_url': 'str', + 'git_branch': 'str', + 'git_commit': 'str', + 'script_dir': 'str', + 'training_script': 'str' + } + + self.attribute_map = { + 'repository_url': 'repositoryUrl', + 'git_branch': 'gitBranch', + 'git_commit': 'gitCommit', + 'script_dir': 'scriptDir', + 'training_script': 'trainingScript' + } + + self._repository_url = None + self._git_branch = None + self._git_commit = None + self._script_dir = None + self._training_script = None + + @property + def repository_url(self): + """ + Gets the repository_url of this UpdateModelProvenanceDetails. + For model reproducibility purposes. URL of the git repository associated with model training. + + + :return: The repository_url of this UpdateModelProvenanceDetails. + :rtype: str + """ + return self._repository_url + + @repository_url.setter + def repository_url(self, repository_url): + """ + Sets the repository_url of this UpdateModelProvenanceDetails. + For model reproducibility purposes. URL of the git repository associated with model training. + + + :param repository_url: The repository_url of this UpdateModelProvenanceDetails. + :type: str + """ + self._repository_url = repository_url + + @property + def git_branch(self): + """ + Gets the git_branch of this UpdateModelProvenanceDetails. + For model reproducibility purposes. Branch of the git repository associated with model training. + + + :return: The git_branch of this UpdateModelProvenanceDetails. + :rtype: str + """ + return self._git_branch + + @git_branch.setter + def git_branch(self, git_branch): + """ + Sets the git_branch of this UpdateModelProvenanceDetails. + For model reproducibility purposes. Branch of the git repository associated with model training. + + + :param git_branch: The git_branch of this UpdateModelProvenanceDetails. + :type: str + """ + self._git_branch = git_branch + + @property + def git_commit(self): + """ + Gets the git_commit of this UpdateModelProvenanceDetails. + For model reproducibility purposes. Commit ID of the git repository associated with model training. + + + :return: The git_commit of this UpdateModelProvenanceDetails. + :rtype: str + """ + return self._git_commit + + @git_commit.setter + def git_commit(self, git_commit): + """ + Sets the git_commit of this UpdateModelProvenanceDetails. + For model reproducibility purposes. Commit ID of the git repository associated with model training. + + + :param git_commit: The git_commit of this UpdateModelProvenanceDetails. + :type: str + """ + self._git_commit = git_commit + + @property + def script_dir(self): + """ + Gets the script_dir of this UpdateModelProvenanceDetails. + For model reproducibility purposes. Path to model artifacts. + + + :return: The script_dir of this UpdateModelProvenanceDetails. + :rtype: str + """ + return self._script_dir + + @script_dir.setter + def script_dir(self, script_dir): + """ + Sets the script_dir of this UpdateModelProvenanceDetails. + For model reproducibility purposes. Path to model artifacts. + + + :param script_dir: The script_dir of this UpdateModelProvenanceDetails. + :type: str + """ + self._script_dir = script_dir + + @property + def training_script(self): + """ + Gets the training_script of this UpdateModelProvenanceDetails. + For model reproducibility purposes. Path to the python script or notebook in which the model was trained.\" + + + :return: The training_script of this UpdateModelProvenanceDetails. + :rtype: str + """ + return self._training_script + + @training_script.setter + def training_script(self, training_script): + """ + Sets the training_script of this UpdateModelProvenanceDetails. + For model reproducibility purposes. Path to the python script or notebook in which the model was trained.\" + + + :param training_script: The training_script of this UpdateModelProvenanceDetails. + :type: str + """ + self._training_script = training_script + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_science/models/update_notebook_session_details.py b/src/oci/data_science/models/update_notebook_session_details.py new file mode 100644 index 0000000000..dd1efc155a --- /dev/null +++ b/src/oci/data_science/models/update_notebook_session_details.py @@ -0,0 +1,173 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class UpdateNotebookSessionDetails(object): + """ + Details for updating a notebook session. `notebookSessionConfigurationDetails` can only be updated while the notebook session is in the `INACTIVE` state. + Changes to the `notebookSessionConfigurationDetails` will take effect the next time the `ActivateNotebookSession` action is invoked on the notebook session resource. + """ + + def __init__(self, **kwargs): + """ + Initializes a new UpdateNotebookSessionDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param display_name: + The value to assign to the display_name property of this UpdateNotebookSessionDetails. + :type display_name: str + + :param notebook_session_configuration_details: + The value to assign to the notebook_session_configuration_details property of this UpdateNotebookSessionDetails. + :type notebook_session_configuration_details: NotebookSessionConfigurationDetails + + :param freeform_tags: + The value to assign to the freeform_tags property of this UpdateNotebookSessionDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this UpdateNotebookSessionDetails. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'display_name': 'str', + 'notebook_session_configuration_details': 'NotebookSessionConfigurationDetails', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'display_name': 'displayName', + 'notebook_session_configuration_details': 'notebookSessionConfigurationDetails', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._display_name = None + self._notebook_session_configuration_details = None + self._freeform_tags = None + self._defined_tags = None + + @property + def display_name(self): + """ + Gets the display_name of this UpdateNotebookSessionDetails. + A user-friendly display name for the resource. Does not have to be unique, and can be modified. Avoid entering confidential information. + Example: `My NotebookSession` + + + :return: The display_name of this UpdateNotebookSessionDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this UpdateNotebookSessionDetails. + A user-friendly display name for the resource. Does not have to be unique, and can be modified. Avoid entering confidential information. + Example: `My NotebookSession` + + + :param display_name: The display_name of this UpdateNotebookSessionDetails. + :type: str + """ + self._display_name = display_name + + @property + def notebook_session_configuration_details(self): + """ + Gets the notebook_session_configuration_details of this UpdateNotebookSessionDetails. + + :return: The notebook_session_configuration_details of this UpdateNotebookSessionDetails. + :rtype: NotebookSessionConfigurationDetails + """ + return self._notebook_session_configuration_details + + @notebook_session_configuration_details.setter + def notebook_session_configuration_details(self, notebook_session_configuration_details): + """ + Sets the notebook_session_configuration_details of this UpdateNotebookSessionDetails. + + :param notebook_session_configuration_details: The notebook_session_configuration_details of this UpdateNotebookSessionDetails. + :type: NotebookSessionConfigurationDetails + """ + self._notebook_session_configuration_details = notebook_session_configuration_details + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this UpdateNotebookSessionDetails. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. See `Resource Tags`__. + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this UpdateNotebookSessionDetails. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this UpdateNotebookSessionDetails. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. See `Resource Tags`__. + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this UpdateNotebookSessionDetails. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this UpdateNotebookSessionDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this UpdateNotebookSessionDetails. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this UpdateNotebookSessionDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this UpdateNotebookSessionDetails. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_science/models/update_project_details.py b/src/oci/data_science/models/update_project_details.py new file mode 100644 index 0000000000..97a215271e --- /dev/null +++ b/src/oci/data_science/models/update_project_details.py @@ -0,0 +1,174 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class UpdateProjectDetails(object): + """ + Details for updating a project. + """ + + def __init__(self, **kwargs): + """ + Initializes a new UpdateProjectDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param display_name: + The value to assign to the display_name property of this UpdateProjectDetails. + :type display_name: str + + :param description: + The value to assign to the description property of this UpdateProjectDetails. + :type description: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this UpdateProjectDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this UpdateProjectDetails. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'display_name': 'str', + 'description': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'display_name': 'displayName', + 'description': 'description', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._display_name = None + self._description = None + self._freeform_tags = None + self._defined_tags = None + + @property + def display_name(self): + """ + Gets the display_name of this UpdateProjectDetails. + A user-friendly display name for the resource. Does not have to be unique, and can be modified. Avoid entering confidential information. + + + :return: The display_name of this UpdateProjectDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this UpdateProjectDetails. + A user-friendly display name for the resource. Does not have to be unique, and can be modified. Avoid entering confidential information. + + + :param display_name: The display_name of this UpdateProjectDetails. + :type: str + """ + self._display_name = display_name + + @property + def description(self): + """ + Gets the description of this UpdateProjectDetails. + A short blurb describing the project. + + + :return: The description of this UpdateProjectDetails. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this UpdateProjectDetails. + A short blurb describing the project. + + + :param description: The description of this UpdateProjectDetails. + :type: str + """ + self._description = description + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this UpdateProjectDetails. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. See `Resource Tags`__. + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this UpdateProjectDetails. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this UpdateProjectDetails. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. See `Resource Tags`__. + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this UpdateProjectDetails. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this UpdateProjectDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this UpdateProjectDetails. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this UpdateProjectDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this UpdateProjectDetails. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_science/models/work_request.py b/src/oci/data_science/models/work_request.py new file mode 100644 index 0000000000..7c7fdb5bcf --- /dev/null +++ b/src/oci/data_science/models/work_request.py @@ -0,0 +1,401 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class WorkRequest(object): + """ + An asynchronous work request. + """ + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "NOTEBOOK_SESSION_CREATE" + OPERATION_TYPE_NOTEBOOK_SESSION_CREATE = "NOTEBOOK_SESSION_CREATE" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "NOTEBOOK_SESSION_DELETE" + OPERATION_TYPE_NOTEBOOK_SESSION_DELETE = "NOTEBOOK_SESSION_DELETE" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "NOTEBOOK_SESSION_ACTIVATE" + OPERATION_TYPE_NOTEBOOK_SESSION_ACTIVATE = "NOTEBOOK_SESSION_ACTIVATE" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "NOTEBOOK_SESSION_DEACTIVATE" + OPERATION_TYPE_NOTEBOOK_SESSION_DEACTIVATE = "NOTEBOOK_SESSION_DEACTIVATE" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "PROJECT_DELETE" + OPERATION_TYPE_PROJECT_DELETE = "PROJECT_DELETE" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "WORKREQUEST_CANCEL" + OPERATION_TYPE_WORKREQUEST_CANCEL = "WORKREQUEST_CANCEL" + + #: A constant which can be used with the status property of a WorkRequest. + #: This constant has a value of "ACCEPTED" + STATUS_ACCEPTED = "ACCEPTED" + + #: A constant which can be used with the status property of a WorkRequest. + #: This constant has a value of "IN_PROGRESS" + STATUS_IN_PROGRESS = "IN_PROGRESS" + + #: A constant which can be used with the status property of a WorkRequest. + #: This constant has a value of "FAILED" + STATUS_FAILED = "FAILED" + + #: A constant which can be used with the status property of a WorkRequest. + #: This constant has a value of "SUCCEEDED" + STATUS_SUCCEEDED = "SUCCEEDED" + + #: A constant which can be used with the status property of a WorkRequest. + #: This constant has a value of "CANCELING" + STATUS_CANCELING = "CANCELING" + + #: A constant which can be used with the status property of a WorkRequest. + #: This constant has a value of "CANCELED" + STATUS_CANCELED = "CANCELED" + + def __init__(self, **kwargs): + """ + Initializes a new WorkRequest 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 WorkRequest. + :type id: str + + :param operation_type: + The value to assign to the operation_type property of this WorkRequest. + Allowed values for this property are: "NOTEBOOK_SESSION_CREATE", "NOTEBOOK_SESSION_DELETE", "NOTEBOOK_SESSION_ACTIVATE", "NOTEBOOK_SESSION_DEACTIVATE", "PROJECT_DELETE", "WORKREQUEST_CANCEL", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type operation_type: str + + :param status: + The value to assign to the status property of this WorkRequest. + Allowed values for this property are: "ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type status: str + + :param compartment_id: + The value to assign to the compartment_id property of this WorkRequest. + :type compartment_id: str + + :param percent_complete: + The value to assign to the percent_complete property of this WorkRequest. + :type percent_complete: float + + :param resources: + The value to assign to the resources property of this WorkRequest. + :type resources: list[WorkRequestResource] + + :param time_accepted: + The value to assign to the time_accepted property of this WorkRequest. + :type time_accepted: datetime + + :param time_started: + The value to assign to the time_started property of this WorkRequest. + :type time_started: datetime + + :param time_finished: + The value to assign to the time_finished property of this WorkRequest. + :type time_finished: datetime + + """ + self.swagger_types = { + 'id': 'str', + 'operation_type': 'str', + 'status': 'str', + 'compartment_id': 'str', + 'percent_complete': 'float', + 'resources': 'list[WorkRequestResource]', + 'time_accepted': 'datetime', + 'time_started': 'datetime', + 'time_finished': 'datetime' + } + + self.attribute_map = { + 'id': 'id', + 'operation_type': 'operationType', + 'status': 'status', + 'compartment_id': 'compartmentId', + 'percent_complete': 'percentComplete', + 'resources': 'resources', + 'time_accepted': 'timeAccepted', + 'time_started': 'timeStarted', + 'time_finished': 'timeFinished' + } + + self._id = None + self._operation_type = None + self._status = None + self._compartment_id = None + self._percent_complete = None + self._resources = None + self._time_accepted = None + self._time_started = None + self._time_finished = None + + @property + def id(self): + """ + **[Required]** Gets the id of this WorkRequest. + The `OCID`__ of the work request. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + + :return: The id of this WorkRequest. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this WorkRequest. + The `OCID`__ of the work request. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + + :param id: The id of this WorkRequest. + :type: str + """ + self._id = id + + @property + def operation_type(self): + """ + **[Required]** Gets the operation_type of this WorkRequest. + The type of work the work request is doing. + + Allowed values for this property are: "NOTEBOOK_SESSION_CREATE", "NOTEBOOK_SESSION_DELETE", "NOTEBOOK_SESSION_ACTIVATE", "NOTEBOOK_SESSION_DEACTIVATE", "PROJECT_DELETE", "WORKREQUEST_CANCEL", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The operation_type of this WorkRequest. + :rtype: str + """ + return self._operation_type + + @operation_type.setter + def operation_type(self, operation_type): + """ + Sets the operation_type of this WorkRequest. + The type of work the work request is doing. + + + :param operation_type: The operation_type of this WorkRequest. + :type: str + """ + allowed_values = ["NOTEBOOK_SESSION_CREATE", "NOTEBOOK_SESSION_DELETE", "NOTEBOOK_SESSION_ACTIVATE", "NOTEBOOK_SESSION_DEACTIVATE", "PROJECT_DELETE", "WORKREQUEST_CANCEL"] + if not value_allowed_none_or_none_sentinel(operation_type, allowed_values): + operation_type = 'UNKNOWN_ENUM_VALUE' + self._operation_type = operation_type + + @property + def status(self): + """ + **[Required]** Gets the status of this WorkRequest. + The current status of the work request. + + Allowed values for this property are: "ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The status of this WorkRequest. + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """ + Sets the status of this WorkRequest. + The current status of the work request. + + + :param status: The status of this WorkRequest. + :type: str + """ + allowed_values = ["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED"] + if not value_allowed_none_or_none_sentinel(status, allowed_values): + status = 'UNKNOWN_ENUM_VALUE' + self._status = status + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this WorkRequest. + The `OCID`__ of the work request's compartment. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + + :return: The compartment_id of this WorkRequest. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this WorkRequest. + The `OCID`__ of the work request's compartment. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + + :param compartment_id: The compartment_id of this WorkRequest. + :type: str + """ + self._compartment_id = compartment_id + + @property + def percent_complete(self): + """ + **[Required]** Gets the percent_complete of this WorkRequest. + Percentage of the request completed. + + + :return: The percent_complete of this WorkRequest. + :rtype: float + """ + return self._percent_complete + + @percent_complete.setter + def percent_complete(self, percent_complete): + """ + Sets the percent_complete of this WorkRequest. + Percentage of the request completed. + + + :param percent_complete: The percent_complete of this WorkRequest. + :type: float + """ + self._percent_complete = percent_complete + + @property + def resources(self): + """ + **[Required]** Gets the resources of this WorkRequest. + The resources affected by this work request. + + + :return: The resources of this WorkRequest. + :rtype: list[WorkRequestResource] + """ + return self._resources + + @resources.setter + def resources(self, resources): + """ + Sets the resources of this WorkRequest. + The resources affected by this work request. + + + :param resources: The resources of this WorkRequest. + :type: list[WorkRequestResource] + """ + self._resources = resources + + @property + def time_accepted(self): + """ + **[Required]** Gets the time_accepted of this WorkRequest. + The time the work request was accepted, in the timestamp format defined by `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_accepted of this WorkRequest. + :rtype: datetime + """ + return self._time_accepted + + @time_accepted.setter + def time_accepted(self, time_accepted): + """ + Sets the time_accepted of this WorkRequest. + The time the work request was accepted, in the timestamp format defined by `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_accepted: The time_accepted of this WorkRequest. + :type: datetime + """ + self._time_accepted = time_accepted + + @property + def time_started(self): + """ + Gets the time_started of this WorkRequest. + The time the work request was started, in the timestamp format defined by `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_started of this WorkRequest. + :rtype: datetime + """ + return self._time_started + + @time_started.setter + def time_started(self, time_started): + """ + Sets the time_started of this WorkRequest. + The time the work request was started, in the timestamp format defined by `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_started: The time_started of this WorkRequest. + :type: datetime + """ + self._time_started = time_started + + @property + def time_finished(self): + """ + Gets the time_finished of this WorkRequest. + The time the work request was finished, in the timestamp format defined by `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_finished of this WorkRequest. + :rtype: datetime + """ + return self._time_finished + + @time_finished.setter + def time_finished(self, time_finished): + """ + Sets the time_finished of this WorkRequest. + The time the work request was finished, in the timestamp format defined by `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_finished: The time_finished of this WorkRequest. + :type: datetime + """ + self._time_finished = time_finished + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_science/models/work_request_error.py b/src/oci/data_science/models/work_request_error.py new file mode 100644 index 0000000000..ed20367fd8 --- /dev/null +++ b/src/oci/data_science/models/work_request_error.py @@ -0,0 +1,135 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class WorkRequestError(object): + """ + Errors related to a specific work request. + """ + + def __init__(self, **kwargs): + """ + Initializes a new WorkRequestError object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param code: + The value to assign to the code property of this WorkRequestError. + :type code: str + + :param message: + The value to assign to the message property of this WorkRequestError. + :type message: str + + :param timestamp: + The value to assign to the timestamp property of this WorkRequestError. + :type timestamp: datetime + + """ + self.swagger_types = { + 'code': 'str', + 'message': 'str', + 'timestamp': 'datetime' + } + + self.attribute_map = { + 'code': 'code', + 'message': 'message', + 'timestamp': 'timestamp' + } + + self._code = None + self._message = None + self._timestamp = None + + @property + def code(self): + """ + **[Required]** Gets the code of this WorkRequestError. + A short error code that defines the error, meant for programmatic parsing. See `API Errors`__. + + __ https://docs.cloud.oracle.com/Content/API/References/apierrors.htm + + + :return: The code of this WorkRequestError. + :rtype: str + """ + return self._code + + @code.setter + def code(self, code): + """ + Sets the code of this WorkRequestError. + A short error code that defines the error, meant for programmatic parsing. See `API Errors`__. + + __ https://docs.cloud.oracle.com/Content/API/References/apierrors.htm + + + :param code: The code of this WorkRequestError. + :type: str + """ + self._code = code + + @property + def message(self): + """ + **[Required]** Gets the message of this WorkRequestError. + A human-readable error string. + + + :return: The message of this WorkRequestError. + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """ + Sets the message of this WorkRequestError. + A human-readable error string. + + + :param message: The message of this WorkRequestError. + :type: str + """ + self._message = message + + @property + def timestamp(self): + """ + **[Required]** Gets the timestamp of this WorkRequestError. + The date and time the error occurred. + + + :return: The timestamp of this WorkRequestError. + :rtype: datetime + """ + return self._timestamp + + @timestamp.setter + def timestamp(self, timestamp): + """ + Sets the timestamp of this WorkRequestError. + The date and time the error occurred. + + + :param timestamp: The timestamp of this WorkRequestError. + :type: datetime + """ + self._timestamp = timestamp + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_science/models/work_request_log_entry.py b/src/oci/data_science/models/work_request_log_entry.py new file mode 100644 index 0000000000..5d87dd440d --- /dev/null +++ b/src/oci/data_science/models/work_request_log_entry.py @@ -0,0 +1,100 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class WorkRequestLogEntry(object): + """ + Log entries related to a specific work request. + """ + + def __init__(self, **kwargs): + """ + Initializes a new WorkRequestLogEntry object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param message: + The value to assign to the message property of this WorkRequestLogEntry. + :type message: str + + :param timestamp: + The value to assign to the timestamp property of this WorkRequestLogEntry. + :type timestamp: datetime + + """ + self.swagger_types = { + 'message': 'str', + 'timestamp': 'datetime' + } + + self.attribute_map = { + 'message': 'message', + 'timestamp': 'timestamp' + } + + self._message = None + self._timestamp = None + + @property + def message(self): + """ + **[Required]** Gets the message of this WorkRequestLogEntry. + The description of an action that occurred. + + + :return: The message of this WorkRequestLogEntry. + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """ + Sets the message of this WorkRequestLogEntry. + The description of an action that occurred. + + + :param message: The message of this WorkRequestLogEntry. + :type: str + """ + self._message = message + + @property + def timestamp(self): + """ + **[Required]** Gets the timestamp of this WorkRequestLogEntry. + The date and time the log entry occurred. + + + :return: The timestamp of this WorkRequestLogEntry. + :rtype: datetime + """ + return self._timestamp + + @timestamp.setter + def timestamp(self, timestamp): + """ + Sets the timestamp of this WorkRequestLogEntry. + The date and time the log entry occurred. + + + :param timestamp: The timestamp of this WorkRequestLogEntry. + :type: datetime + """ + self._timestamp = timestamp + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_science/models/work_request_resource.py b/src/oci/data_science/models/work_request_resource.py new file mode 100644 index 0000000000..4eda207075 --- /dev/null +++ b/src/oci/data_science/models/work_request_resource.py @@ -0,0 +1,194 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class WorkRequestResource(object): + """ + The properties that define a work request resource. + """ + + #: A constant which can be used with the action_type property of a WorkRequestResource. + #: This constant has a value of "CREATED" + ACTION_TYPE_CREATED = "CREATED" + + #: A constant which can be used with the action_type property of a WorkRequestResource. + #: This constant has a value of "UPDATED" + ACTION_TYPE_UPDATED = "UPDATED" + + #: A constant which can be used with the action_type property of a WorkRequestResource. + #: This constant has a value of "DELETED" + ACTION_TYPE_DELETED = "DELETED" + + #: A constant which can be used with the action_type property of a WorkRequestResource. + #: This constant has a value of "RELATED" + ACTION_TYPE_RELATED = "RELATED" + + #: A constant which can be used with the action_type property of a WorkRequestResource. + #: This constant has a value of "IN_PROGRESS" + ACTION_TYPE_IN_PROGRESS = "IN_PROGRESS" + + def __init__(self, **kwargs): + """ + Initializes a new WorkRequestResource object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param action_type: + The value to assign to the action_type property of this WorkRequestResource. + Allowed values for this property are: "CREATED", "UPDATED", "DELETED", "RELATED", "IN_PROGRESS", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type action_type: str + + :param entity_type: + The value to assign to the entity_type property of this WorkRequestResource. + :type entity_type: str + + :param identifier: + The value to assign to the identifier property of this WorkRequestResource. + :type identifier: str + + :param entity_uri: + The value to assign to the entity_uri property of this WorkRequestResource. + :type entity_uri: str + + """ + self.swagger_types = { + 'action_type': 'str', + 'entity_type': 'str', + 'identifier': 'str', + 'entity_uri': 'str' + } + + self.attribute_map = { + 'action_type': 'actionType', + 'entity_type': 'entityType', + 'identifier': 'identifier', + 'entity_uri': 'entityUri' + } + + self._action_type = None + self._entity_type = None + self._identifier = None + self._entity_uri = None + + @property + def action_type(self): + """ + **[Required]** Gets the action_type of this WorkRequestResource. + The way in which this resource was affected by the work tracked by the work request. + + Allowed values for this property are: "CREATED", "UPDATED", "DELETED", "RELATED", "IN_PROGRESS", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The action_type of this WorkRequestResource. + :rtype: str + """ + return self._action_type + + @action_type.setter + def action_type(self, action_type): + """ + Sets the action_type of this WorkRequestResource. + The way in which this resource was affected by the work tracked by the work request. + + + :param action_type: The action_type of this WorkRequestResource. + :type: str + """ + allowed_values = ["CREATED", "UPDATED", "DELETED", "RELATED", "IN_PROGRESS"] + if not value_allowed_none_or_none_sentinel(action_type, allowed_values): + action_type = 'UNKNOWN_ENUM_VALUE' + self._action_type = action_type + + @property + def entity_type(self): + """ + **[Required]** Gets the entity_type of this WorkRequestResource. + The resource type the work request affects. + + + :return: The entity_type of this WorkRequestResource. + :rtype: str + """ + return self._entity_type + + @entity_type.setter + def entity_type(self, entity_type): + """ + Sets the entity_type of this WorkRequestResource. + The resource type the work request affects. + + + :param entity_type: The entity_type of this WorkRequestResource. + :type: str + """ + self._entity_type = entity_type + + @property + def identifier(self): + """ + **[Required]** Gets the identifier of this WorkRequestResource. + The `OCID`__ of the resource the work request affects. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + + :return: The identifier of this WorkRequestResource. + :rtype: str + """ + return self._identifier + + @identifier.setter + def identifier(self, identifier): + """ + Sets the identifier of this WorkRequestResource. + The `OCID`__ of the resource the work request affects. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + + :param identifier: The identifier of this WorkRequestResource. + :type: str + """ + self._identifier = identifier + + @property + def entity_uri(self): + """ + Gets the entity_uri of this WorkRequestResource. + The URI path on which the user can issue a GET request to access the resource metadata. + + + :return: The entity_uri of this WorkRequestResource. + :rtype: str + """ + return self._entity_uri + + @entity_uri.setter + def entity_uri(self, entity_uri): + """ + Sets the entity_uri of this WorkRequestResource. + The URI path on which the user can issue a GET request to access the resource metadata. + + + :param entity_uri: The entity_uri of this WorkRequestResource. + :type: str + """ + self._entity_uri = entity_uri + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_science/models/work_request_summary.py b/src/oci/data_science/models/work_request_summary.py new file mode 100644 index 0000000000..6a56ed00ea --- /dev/null +++ b/src/oci/data_science/models/work_request_summary.py @@ -0,0 +1,401 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class WorkRequestSummary(object): + """ + Summary information for a work request. + """ + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "NOTEBOOK_SESSION_CREATE" + OPERATION_TYPE_NOTEBOOK_SESSION_CREATE = "NOTEBOOK_SESSION_CREATE" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "NOTEBOOK_SESSION_DELETE" + OPERATION_TYPE_NOTEBOOK_SESSION_DELETE = "NOTEBOOK_SESSION_DELETE" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "NOTEBOOK_SESSION_ACTIVATE" + OPERATION_TYPE_NOTEBOOK_SESSION_ACTIVATE = "NOTEBOOK_SESSION_ACTIVATE" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "NOTEBOOK_SESSION_DEACTIVATE" + OPERATION_TYPE_NOTEBOOK_SESSION_DEACTIVATE = "NOTEBOOK_SESSION_DEACTIVATE" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "PROJECT_DELETE" + OPERATION_TYPE_PROJECT_DELETE = "PROJECT_DELETE" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "WORKREQUEST_CANCEL" + OPERATION_TYPE_WORKREQUEST_CANCEL = "WORKREQUEST_CANCEL" + + #: A constant which can be used with the status property of a WorkRequestSummary. + #: This constant has a value of "ACCEPTED" + STATUS_ACCEPTED = "ACCEPTED" + + #: A constant which can be used with the status property of a WorkRequestSummary. + #: This constant has a value of "IN_PROGRESS" + STATUS_IN_PROGRESS = "IN_PROGRESS" + + #: A constant which can be used with the status property of a WorkRequestSummary. + #: This constant has a value of "FAILED" + STATUS_FAILED = "FAILED" + + #: A constant which can be used with the status property of a WorkRequestSummary. + #: This constant has a value of "SUCCEEDED" + STATUS_SUCCEEDED = "SUCCEEDED" + + #: A constant which can be used with the status property of a WorkRequestSummary. + #: This constant has a value of "CANCELING" + STATUS_CANCELING = "CANCELING" + + #: A constant which can be used with the status property of a WorkRequestSummary. + #: This constant has a value of "CANCELED" + STATUS_CANCELED = "CANCELED" + + def __init__(self, **kwargs): + """ + Initializes a new WorkRequestSummary 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 WorkRequestSummary. + :type id: str + + :param operation_type: + The value to assign to the operation_type property of this WorkRequestSummary. + Allowed values for this property are: "NOTEBOOK_SESSION_CREATE", "NOTEBOOK_SESSION_DELETE", "NOTEBOOK_SESSION_ACTIVATE", "NOTEBOOK_SESSION_DEACTIVATE", "PROJECT_DELETE", "WORKREQUEST_CANCEL", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type operation_type: str + + :param status: + The value to assign to the status property of this WorkRequestSummary. + Allowed values for this property are: "ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type status: str + + :param compartment_id: + The value to assign to the compartment_id property of this WorkRequestSummary. + :type compartment_id: str + + :param percent_complete: + The value to assign to the percent_complete property of this WorkRequestSummary. + :type percent_complete: float + + :param resources: + The value to assign to the resources property of this WorkRequestSummary. + :type resources: list[WorkRequestResource] + + :param time_accepted: + The value to assign to the time_accepted property of this WorkRequestSummary. + :type time_accepted: datetime + + :param time_started: + The value to assign to the time_started property of this WorkRequestSummary. + :type time_started: datetime + + :param time_finished: + The value to assign to the time_finished property of this WorkRequestSummary. + :type time_finished: datetime + + """ + self.swagger_types = { + 'id': 'str', + 'operation_type': 'str', + 'status': 'str', + 'compartment_id': 'str', + 'percent_complete': 'float', + 'resources': 'list[WorkRequestResource]', + 'time_accepted': 'datetime', + 'time_started': 'datetime', + 'time_finished': 'datetime' + } + + self.attribute_map = { + 'id': 'id', + 'operation_type': 'operationType', + 'status': 'status', + 'compartment_id': 'compartmentId', + 'percent_complete': 'percentComplete', + 'resources': 'resources', + 'time_accepted': 'timeAccepted', + 'time_started': 'timeStarted', + 'time_finished': 'timeFinished' + } + + self._id = None + self._operation_type = None + self._status = None + self._compartment_id = None + self._percent_complete = None + self._resources = None + self._time_accepted = None + self._time_started = None + self._time_finished = None + + @property + def id(self): + """ + **[Required]** Gets the id of this WorkRequestSummary. + The `OCID`__ of the work request. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + + :return: The id of this WorkRequestSummary. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this WorkRequestSummary. + The `OCID`__ of the work request. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + + :param id: The id of this WorkRequestSummary. + :type: str + """ + self._id = id + + @property + def operation_type(self): + """ + **[Required]** Gets the operation_type of this WorkRequestSummary. + The type of work the work request is doing. + + Allowed values for this property are: "NOTEBOOK_SESSION_CREATE", "NOTEBOOK_SESSION_DELETE", "NOTEBOOK_SESSION_ACTIVATE", "NOTEBOOK_SESSION_DEACTIVATE", "PROJECT_DELETE", "WORKREQUEST_CANCEL", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The operation_type of this WorkRequestSummary. + :rtype: str + """ + return self._operation_type + + @operation_type.setter + def operation_type(self, operation_type): + """ + Sets the operation_type of this WorkRequestSummary. + The type of work the work request is doing. + + + :param operation_type: The operation_type of this WorkRequestSummary. + :type: str + """ + allowed_values = ["NOTEBOOK_SESSION_CREATE", "NOTEBOOK_SESSION_DELETE", "NOTEBOOK_SESSION_ACTIVATE", "NOTEBOOK_SESSION_DEACTIVATE", "PROJECT_DELETE", "WORKREQUEST_CANCEL"] + if not value_allowed_none_or_none_sentinel(operation_type, allowed_values): + operation_type = 'UNKNOWN_ENUM_VALUE' + self._operation_type = operation_type + + @property + def status(self): + """ + **[Required]** Gets the status of this WorkRequestSummary. + The current status of the work request. + + Allowed values for this property are: "ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The status of this WorkRequestSummary. + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """ + Sets the status of this WorkRequestSummary. + The current status of the work request. + + + :param status: The status of this WorkRequestSummary. + :type: str + """ + allowed_values = ["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED"] + if not value_allowed_none_or_none_sentinel(status, allowed_values): + status = 'UNKNOWN_ENUM_VALUE' + self._status = status + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this WorkRequestSummary. + The `OCID`__ of the work request's compartment. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + + :return: The compartment_id of this WorkRequestSummary. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this WorkRequestSummary. + The `OCID`__ of the work request's compartment. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm + + + :param compartment_id: The compartment_id of this WorkRequestSummary. + :type: str + """ + self._compartment_id = compartment_id + + @property + def percent_complete(self): + """ + **[Required]** Gets the percent_complete of this WorkRequestSummary. + Percentage of the request completed. + + + :return: The percent_complete of this WorkRequestSummary. + :rtype: float + """ + return self._percent_complete + + @percent_complete.setter + def percent_complete(self, percent_complete): + """ + Sets the percent_complete of this WorkRequestSummary. + Percentage of the request completed. + + + :param percent_complete: The percent_complete of this WorkRequestSummary. + :type: float + """ + self._percent_complete = percent_complete + + @property + def resources(self): + """ + **[Required]** Gets the resources of this WorkRequestSummary. + The resources affected by this work request. + + + :return: The resources of this WorkRequestSummary. + :rtype: list[WorkRequestResource] + """ + return self._resources + + @resources.setter + def resources(self, resources): + """ + Sets the resources of this WorkRequestSummary. + The resources affected by this work request. + + + :param resources: The resources of this WorkRequestSummary. + :type: list[WorkRequestResource] + """ + self._resources = resources + + @property + def time_accepted(self): + """ + **[Required]** Gets the time_accepted of this WorkRequestSummary. + The date and time the work request was accepted, in the timestamp format defined by `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_accepted of this WorkRequestSummary. + :rtype: datetime + """ + return self._time_accepted + + @time_accepted.setter + def time_accepted(self, time_accepted): + """ + Sets the time_accepted of this WorkRequestSummary. + The date and time the work request was accepted, in the timestamp format defined by `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_accepted: The time_accepted of this WorkRequestSummary. + :type: datetime + """ + self._time_accepted = time_accepted + + @property + def time_started(self): + """ + Gets the time_started of this WorkRequestSummary. + The date and time the work request was started, in the timestamp format defined by `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_started of this WorkRequestSummary. + :rtype: datetime + """ + return self._time_started + + @time_started.setter + def time_started(self, time_started): + """ + Sets the time_started of this WorkRequestSummary. + The date and time the work request was started, in the timestamp format defined by `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_started: The time_started of this WorkRequestSummary. + :type: datetime + """ + self._time_started = time_started + + @property + def time_finished(self): + """ + Gets the time_finished of this WorkRequestSummary. + The date and time the work request was finished, in the timestamp format defined by `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_finished of this WorkRequestSummary. + :rtype: datetime + """ + return self._time_finished + + @time_finished.setter + def time_finished(self, time_finished): + """ + Sets the time_finished of this WorkRequestSummary. + The date and time the work request was finished, in the timestamp format defined by `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_finished: The time_finished of this WorkRequestSummary. + :type: datetime + """ + self._time_finished = time_finished + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/regions.py b/src/oci/regions.py index 75b26c5128..25ce3e04ba 100644 --- a/src/oci/regions.py +++ b/src/oci/regions.py @@ -15,10 +15,14 @@ 'bom': 'ap-mumbai-1', 'gru': 'sa-saopaulo-1', 'syd': 'ap-sydney-1', - 'ltn': 'uk-gov-london-1' + 'ltn': 'uk-gov-london-1', + 'kix': 'ap-osaka-1', + 'mel': 'ap-melbourne-1' } REGION_REALMS = { + 'ap-melbourne-1': 'oc1', 'ap-mumbai-1': 'oc1', + 'ap-osaka-1': 'oc1', 'ap-seoul-1': 'oc1', 'ap-sydney-1': 'oc1', 'ap-tokyo-1': 'oc1', @@ -46,7 +50,9 @@ 'oc4': 'oraclegovcloud.uk' } REGIONS = [ + "ap-melbourne-1", "ap-mumbai-1", + "ap-osaka-1", "ap-seoul-1", "ap-sydney-1", "ap-tokyo-1", diff --git a/src/oci/response.py b/src/oci/response.py index 13e6e70e8a..97dd98f2ff 100644 --- a/src/oci/response.py +++ b/src/oci/response.py @@ -5,7 +5,19 @@ class Response(object): - def __init__(self, status, headers, data, request): + def __init__(self, + status, + headers, + data, + request): + """ + :param status: The HTTP status code for the Response + :param headers: The HTTP headers for the Response + :param data: The response data. The type of data depends on the request. + :param request: The corresponding request for this response. + :param next_page: (optional) The value of the `opc-next-page` response header. + :param request_id: (optional) The ID of the request that generated this response. + """ self.status = status """ The HTTP status code for the Response diff --git a/src/oci/service_endpoints.py b/src/oci/service_endpoints.py index 02dad48f59..3a3689a6ef 100644 --- a/src/oci/service_endpoints.py +++ b/src/oci/service_endpoints.py @@ -21,8 +21,8 @@ "kms_vault": "https://kms.{domain}", "load_balancer": "https://iaas.{domain}", "monitoring": "https://telemetry.{domain}", - "notification_control_plane": "https://notifications.{domain}", - "notification_data_plane": "https://notifications.{domain}", + "notification_control_plane": "https://notification.{domain}", + "notification_data_plane": "https://notification.{domain}", "object_storage": "https://objectstorage.{domain}", "redirect": "https://waas.{domain}", "resource_manager": "https://resourcemanager.{domain}", diff --git a/src/oci/version.py b/src/oci/version.py index f2d3c8f31b..6942f23b4f 100644 --- a/src/oci/version.py +++ b/src/oci/version.py @@ -1,4 +1,4 @@ # coding: utf-8 # Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. -__version__ = "2.10.2" +__version__ = "2.10.3"