diff --git a/CHANGELOG.rst b/CHANGELOG.rst index a6ed37e118..60c8c1799a 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -3,6 +3,25 @@ Change Log All notable changes to this project will be documented in this file. The format is based on `Keep a Changelog `_. +==================== +2.49.0 - 2021-10-26 +==================== + +Added +----- +* Support for the Source Code Management service +* Support for the Build service +* Support for the Certificates service +* Support to create child tenancies in an organization and manage subscriptions in the Organizations service +* Support for Certificates service integration in the Load Balancing service +* Support for creating hosts in specific availability domains in the VMWare Solution service +* Support for user-defined functions and libraries, as well as scheduling and orchestration, in the Data Integration service +* Support for EM-managed Exadatas and EM-managed hosts in the Operations Insights service + +Breaking +-------- +* Models `ComputeInstanceGroupBlueGreenDeployStageExecutionProgress`, `ComputeInstanceGroupBlueGreenTrafficShiftDeployStageExecutionProgress`, `ComputeInstanceGroupCanaryApprovalDeployStageExecutionProgress`, `ComputeInstanceGroupCanaryDeployStageExecutionProgress`, `ComputeInstanceGroupCanaryTrafficShiftDeployStageExecutionProgress`, `RunPipelineDeployStageExecutionProgress`and `RunValidationTestOnComputeInstanceDeployStageExecutionProgress` were removed from the DevOps service. + ==================== 2.48.0 - 2021-10-19 ==================== diff --git a/docs/api/certificates.rst b/docs/api/certificates.rst new file mode 100644 index 0000000000..5210a129e6 --- /dev/null +++ b/docs/api/certificates.rst @@ -0,0 +1,31 @@ +Certificates +============ + +.. autosummary:: + :toctree: certificates/client + :nosignatures: + :template: autosummary/service_client.rst + + oci.certificates.CertificatesClient + oci.certificates.CertificatesClientCompositeOperations + +-------- + Models +-------- + +.. autosummary:: + :toctree: certificates/models + :nosignatures: + :template: autosummary/model_class.rst + + oci.certificates.models.CaBundle + oci.certificates.models.CertificateAuthorityBundle + oci.certificates.models.CertificateAuthorityBundleVersionCollection + oci.certificates.models.CertificateAuthorityBundleVersionSummary + oci.certificates.models.CertificateBundle + oci.certificates.models.CertificateBundlePublicOnly + oci.certificates.models.CertificateBundleVersionCollection + oci.certificates.models.CertificateBundleVersionSummary + oci.certificates.models.CertificateBundleWithPrivateKey + oci.certificates.models.RevocationStatus + oci.certificates.models.Validity diff --git a/docs/api/certificates/client/oci.certificates.CertificatesClient.rst b/docs/api/certificates/client/oci.certificates.CertificatesClient.rst new file mode 100644 index 0000000000..4e3d3aa046 --- /dev/null +++ b/docs/api/certificates/client/oci.certificates.CertificatesClient.rst @@ -0,0 +1,8 @@ +CertificatesClient +================== + +.. currentmodule:: oci.certificates + +.. autoclass:: CertificatesClient + :special-members: __init__ + :members: \ No newline at end of file diff --git a/docs/api/certificates/client/oci.certificates.CertificatesClientCompositeOperations.rst b/docs/api/certificates/client/oci.certificates.CertificatesClientCompositeOperations.rst new file mode 100644 index 0000000000..f4160bc310 --- /dev/null +++ b/docs/api/certificates/client/oci.certificates.CertificatesClientCompositeOperations.rst @@ -0,0 +1,8 @@ +CertificatesClientCompositeOperations +===================================== + +.. currentmodule:: oci.certificates + +.. autoclass:: CertificatesClientCompositeOperations + :special-members: __init__ + :members: \ No newline at end of file diff --git a/docs/api/certificates/models/oci.certificates.models.CaBundle.rst b/docs/api/certificates/models/oci.certificates.models.CaBundle.rst new file mode 100644 index 0000000000..3833d20098 --- /dev/null +++ b/docs/api/certificates/models/oci.certificates.models.CaBundle.rst @@ -0,0 +1,11 @@ +CaBundle +======== + +.. currentmodule:: oci.certificates.models + +.. autoclass:: CaBundle + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/certificates/models/oci.certificates.models.CertificateAuthorityBundle.rst b/docs/api/certificates/models/oci.certificates.models.CertificateAuthorityBundle.rst new file mode 100644 index 0000000000..e5ff7a878c --- /dev/null +++ b/docs/api/certificates/models/oci.certificates.models.CertificateAuthorityBundle.rst @@ -0,0 +1,11 @@ +CertificateAuthorityBundle +========================== + +.. currentmodule:: oci.certificates.models + +.. autoclass:: CertificateAuthorityBundle + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/certificates/models/oci.certificates.models.CertificateAuthorityBundleVersionCollection.rst b/docs/api/certificates/models/oci.certificates.models.CertificateAuthorityBundleVersionCollection.rst new file mode 100644 index 0000000000..bc97bfd501 --- /dev/null +++ b/docs/api/certificates/models/oci.certificates.models.CertificateAuthorityBundleVersionCollection.rst @@ -0,0 +1,11 @@ +CertificateAuthorityBundleVersionCollection +=========================================== + +.. currentmodule:: oci.certificates.models + +.. autoclass:: CertificateAuthorityBundleVersionCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/certificates/models/oci.certificates.models.CertificateAuthorityBundleVersionSummary.rst b/docs/api/certificates/models/oci.certificates.models.CertificateAuthorityBundleVersionSummary.rst new file mode 100644 index 0000000000..c3683c213e --- /dev/null +++ b/docs/api/certificates/models/oci.certificates.models.CertificateAuthorityBundleVersionSummary.rst @@ -0,0 +1,11 @@ +CertificateAuthorityBundleVersionSummary +======================================== + +.. currentmodule:: oci.certificates.models + +.. autoclass:: CertificateAuthorityBundleVersionSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/certificates/models/oci.certificates.models.CertificateBundle.rst b/docs/api/certificates/models/oci.certificates.models.CertificateBundle.rst new file mode 100644 index 0000000000..00afd4b2df --- /dev/null +++ b/docs/api/certificates/models/oci.certificates.models.CertificateBundle.rst @@ -0,0 +1,11 @@ +CertificateBundle +================= + +.. currentmodule:: oci.certificates.models + +.. autoclass:: CertificateBundle + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/certificates/models/oci.certificates.models.CertificateBundlePublicOnly.rst b/docs/api/certificates/models/oci.certificates.models.CertificateBundlePublicOnly.rst new file mode 100644 index 0000000000..61cf1f7333 --- /dev/null +++ b/docs/api/certificates/models/oci.certificates.models.CertificateBundlePublicOnly.rst @@ -0,0 +1,11 @@ +CertificateBundlePublicOnly +=========================== + +.. currentmodule:: oci.certificates.models + +.. autoclass:: CertificateBundlePublicOnly + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/certificates/models/oci.certificates.models.CertificateBundleVersionCollection.rst b/docs/api/certificates/models/oci.certificates.models.CertificateBundleVersionCollection.rst new file mode 100644 index 0000000000..f41e52bb86 --- /dev/null +++ b/docs/api/certificates/models/oci.certificates.models.CertificateBundleVersionCollection.rst @@ -0,0 +1,11 @@ +CertificateBundleVersionCollection +================================== + +.. currentmodule:: oci.certificates.models + +.. autoclass:: CertificateBundleVersionCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/certificates/models/oci.certificates.models.CertificateBundleVersionSummary.rst b/docs/api/certificates/models/oci.certificates.models.CertificateBundleVersionSummary.rst new file mode 100644 index 0000000000..2792056061 --- /dev/null +++ b/docs/api/certificates/models/oci.certificates.models.CertificateBundleVersionSummary.rst @@ -0,0 +1,11 @@ +CertificateBundleVersionSummary +=============================== + +.. currentmodule:: oci.certificates.models + +.. autoclass:: CertificateBundleVersionSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/certificates/models/oci.certificates.models.CertificateBundleWithPrivateKey.rst b/docs/api/certificates/models/oci.certificates.models.CertificateBundleWithPrivateKey.rst new file mode 100644 index 0000000000..cb37376956 --- /dev/null +++ b/docs/api/certificates/models/oci.certificates.models.CertificateBundleWithPrivateKey.rst @@ -0,0 +1,11 @@ +CertificateBundleWithPrivateKey +=============================== + +.. currentmodule:: oci.certificates.models + +.. autoclass:: CertificateBundleWithPrivateKey + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/certificates/models/oci.certificates.models.RevocationStatus.rst b/docs/api/certificates/models/oci.certificates.models.RevocationStatus.rst new file mode 100644 index 0000000000..3718e5c389 --- /dev/null +++ b/docs/api/certificates/models/oci.certificates.models.RevocationStatus.rst @@ -0,0 +1,11 @@ +RevocationStatus +================ + +.. currentmodule:: oci.certificates.models + +.. autoclass:: RevocationStatus + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/certificates/models/oci.certificates.models.Validity.rst b/docs/api/certificates/models/oci.certificates.models.Validity.rst new file mode 100644 index 0000000000..e272c2476e --- /dev/null +++ b/docs/api/certificates/models/oci.certificates.models.Validity.rst @@ -0,0 +1,11 @@ +Validity +======== + +.. currentmodule:: oci.certificates.models + +.. autoclass:: Validity + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/certificates_management.rst b/docs/api/certificates_management.rst new file mode 100644 index 0000000000..f3a9faeb67 --- /dev/null +++ b/docs/api/certificates_management.rst @@ -0,0 +1,77 @@ +Certificates Management +======================= + +.. autosummary:: + :toctree: certificates_management/client + :nosignatures: + :template: autosummary/service_client.rst + + oci.certificates_management.CertificatesManagementClient + oci.certificates_management.CertificatesManagementClientCompositeOperations + +-------- + Models +-------- + +.. autosummary:: + :toctree: certificates_management/models + :nosignatures: + :template: autosummary/model_class.rst + + oci.certificates_management.models.Association + oci.certificates_management.models.AssociationCollection + oci.certificates_management.models.AssociationSummary + oci.certificates_management.models.CaBundle + oci.certificates_management.models.CaBundleCollection + oci.certificates_management.models.CaBundleSummary + oci.certificates_management.models.Certificate + oci.certificates_management.models.CertificateAuthority + oci.certificates_management.models.CertificateAuthorityCollection + oci.certificates_management.models.CertificateAuthorityIssuanceExpiryRule + oci.certificates_management.models.CertificateAuthorityRule + oci.certificates_management.models.CertificateAuthoritySummary + oci.certificates_management.models.CertificateAuthorityVersion + oci.certificates_management.models.CertificateAuthorityVersionCollection + oci.certificates_management.models.CertificateAuthorityVersionSummary + oci.certificates_management.models.CertificateCollection + oci.certificates_management.models.CertificateRenewalRule + oci.certificates_management.models.CertificateRevocationListDetails + oci.certificates_management.models.CertificateRule + oci.certificates_management.models.CertificateSubject + oci.certificates_management.models.CertificateSubjectAlternativeName + oci.certificates_management.models.CertificateSummary + oci.certificates_management.models.CertificateVersion + oci.certificates_management.models.CertificateVersionCollection + oci.certificates_management.models.CertificateVersionSummary + oci.certificates_management.models.ChangeCaBundleCompartmentDetails + oci.certificates_management.models.ChangeCertificateAuthorityCompartmentDetails + oci.certificates_management.models.ChangeCertificateCompartmentDetails + oci.certificates_management.models.CreateCaBundleDetails + oci.certificates_management.models.CreateCertificateAuthorityConfigDetails + oci.certificates_management.models.CreateCertificateAuthorityDetails + oci.certificates_management.models.CreateCertificateByImportingConfigDetails + oci.certificates_management.models.CreateCertificateConfigDetails + oci.certificates_management.models.CreateCertificateDetails + oci.certificates_management.models.CreateCertificateIssuedByInternalCaConfigDetails + oci.certificates_management.models.CreateCertificateManagedExternallyIssuedByInternalCaConfigDetails + oci.certificates_management.models.CreateRootCaByGeneratingInternallyConfigDetails + oci.certificates_management.models.CreateSubordinateCaIssuedByInternalCaConfigDetails + oci.certificates_management.models.ObjectStorageBucketConfigDetails + oci.certificates_management.models.RevocationStatus + oci.certificates_management.models.RevokeCertificateAuthorityVersionDetails + oci.certificates_management.models.RevokeCertificateVersionDetails + oci.certificates_management.models.ScheduleCertificateAuthorityDeletionDetails + oci.certificates_management.models.ScheduleCertificateAuthorityVersionDeletionDetails + oci.certificates_management.models.ScheduleCertificateDeletionDetails + oci.certificates_management.models.ScheduleCertificateVersionDeletionDetails + oci.certificates_management.models.UpdateCaBundleDetails + oci.certificates_management.models.UpdateCertificateAuthorityConfigDetails + oci.certificates_management.models.UpdateCertificateAuthorityDetails + oci.certificates_management.models.UpdateCertificateByImportingConfigDetails + oci.certificates_management.models.UpdateCertificateConfigDetails + oci.certificates_management.models.UpdateCertificateDetails + oci.certificates_management.models.UpdateCertificateIssuedByInternalCaConfigDetails + oci.certificates_management.models.UpdateCertificateManagedExternallyIssuedByInternalCaConfigDetails + oci.certificates_management.models.UpdateRootCaByGeneratingInternallyConfigDetails + oci.certificates_management.models.UpdateSubordinateCaIssuedByInternalCaConfigDetails + oci.certificates_management.models.Validity diff --git a/docs/api/certificates_management/client/oci.certificates_management.CertificatesManagementClient.rst b/docs/api/certificates_management/client/oci.certificates_management.CertificatesManagementClient.rst new file mode 100644 index 0000000000..6b39b6af97 --- /dev/null +++ b/docs/api/certificates_management/client/oci.certificates_management.CertificatesManagementClient.rst @@ -0,0 +1,8 @@ +CertificatesManagementClient +============================ + +.. currentmodule:: oci.certificates_management + +.. autoclass:: CertificatesManagementClient + :special-members: __init__ + :members: \ No newline at end of file diff --git a/docs/api/certificates_management/client/oci.certificates_management.CertificatesManagementClientCompositeOperations.rst b/docs/api/certificates_management/client/oci.certificates_management.CertificatesManagementClientCompositeOperations.rst new file mode 100644 index 0000000000..5c81d6b537 --- /dev/null +++ b/docs/api/certificates_management/client/oci.certificates_management.CertificatesManagementClientCompositeOperations.rst @@ -0,0 +1,8 @@ +CertificatesManagementClientCompositeOperations +=============================================== + +.. currentmodule:: oci.certificates_management + +.. autoclass:: CertificatesManagementClientCompositeOperations + :special-members: __init__ + :members: \ No newline at end of file diff --git a/docs/api/certificates_management/models/oci.certificates_management.models.Association.rst b/docs/api/certificates_management/models/oci.certificates_management.models.Association.rst new file mode 100644 index 0000000000..44a64e8c2f --- /dev/null +++ b/docs/api/certificates_management/models/oci.certificates_management.models.Association.rst @@ -0,0 +1,11 @@ +Association +=========== + +.. currentmodule:: oci.certificates_management.models + +.. autoclass:: Association + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/certificates_management/models/oci.certificates_management.models.AssociationCollection.rst b/docs/api/certificates_management/models/oci.certificates_management.models.AssociationCollection.rst new file mode 100644 index 0000000000..8bae849628 --- /dev/null +++ b/docs/api/certificates_management/models/oci.certificates_management.models.AssociationCollection.rst @@ -0,0 +1,11 @@ +AssociationCollection +===================== + +.. currentmodule:: oci.certificates_management.models + +.. autoclass:: AssociationCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/certificates_management/models/oci.certificates_management.models.AssociationSummary.rst b/docs/api/certificates_management/models/oci.certificates_management.models.AssociationSummary.rst new file mode 100644 index 0000000000..6b9a858fe6 --- /dev/null +++ b/docs/api/certificates_management/models/oci.certificates_management.models.AssociationSummary.rst @@ -0,0 +1,11 @@ +AssociationSummary +================== + +.. currentmodule:: oci.certificates_management.models + +.. autoclass:: AssociationSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/certificates_management/models/oci.certificates_management.models.CaBundle.rst b/docs/api/certificates_management/models/oci.certificates_management.models.CaBundle.rst new file mode 100644 index 0000000000..5e47dc6ca5 --- /dev/null +++ b/docs/api/certificates_management/models/oci.certificates_management.models.CaBundle.rst @@ -0,0 +1,11 @@ +CaBundle +======== + +.. currentmodule:: oci.certificates_management.models + +.. autoclass:: CaBundle + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/certificates_management/models/oci.certificates_management.models.CaBundleCollection.rst b/docs/api/certificates_management/models/oci.certificates_management.models.CaBundleCollection.rst new file mode 100644 index 0000000000..998aada212 --- /dev/null +++ b/docs/api/certificates_management/models/oci.certificates_management.models.CaBundleCollection.rst @@ -0,0 +1,11 @@ +CaBundleCollection +================== + +.. currentmodule:: oci.certificates_management.models + +.. autoclass:: CaBundleCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/certificates_management/models/oci.certificates_management.models.CaBundleSummary.rst b/docs/api/certificates_management/models/oci.certificates_management.models.CaBundleSummary.rst new file mode 100644 index 0000000000..3abb8b4f67 --- /dev/null +++ b/docs/api/certificates_management/models/oci.certificates_management.models.CaBundleSummary.rst @@ -0,0 +1,11 @@ +CaBundleSummary +=============== + +.. currentmodule:: oci.certificates_management.models + +.. autoclass:: CaBundleSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/certificates_management/models/oci.certificates_management.models.Certificate.rst b/docs/api/certificates_management/models/oci.certificates_management.models.Certificate.rst new file mode 100644 index 0000000000..5c6a3232a4 --- /dev/null +++ b/docs/api/certificates_management/models/oci.certificates_management.models.Certificate.rst @@ -0,0 +1,11 @@ +Certificate +=========== + +.. currentmodule:: oci.certificates_management.models + +.. autoclass:: Certificate + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/certificates_management/models/oci.certificates_management.models.CertificateAuthority.rst b/docs/api/certificates_management/models/oci.certificates_management.models.CertificateAuthority.rst new file mode 100644 index 0000000000..54da774bc8 --- /dev/null +++ b/docs/api/certificates_management/models/oci.certificates_management.models.CertificateAuthority.rst @@ -0,0 +1,11 @@ +CertificateAuthority +==================== + +.. currentmodule:: oci.certificates_management.models + +.. autoclass:: CertificateAuthority + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/certificates_management/models/oci.certificates_management.models.CertificateAuthorityCollection.rst b/docs/api/certificates_management/models/oci.certificates_management.models.CertificateAuthorityCollection.rst new file mode 100644 index 0000000000..0bcc11f84b --- /dev/null +++ b/docs/api/certificates_management/models/oci.certificates_management.models.CertificateAuthorityCollection.rst @@ -0,0 +1,11 @@ +CertificateAuthorityCollection +============================== + +.. currentmodule:: oci.certificates_management.models + +.. autoclass:: CertificateAuthorityCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/certificates_management/models/oci.certificates_management.models.CertificateAuthorityIssuanceExpiryRule.rst b/docs/api/certificates_management/models/oci.certificates_management.models.CertificateAuthorityIssuanceExpiryRule.rst new file mode 100644 index 0000000000..ceaef56c00 --- /dev/null +++ b/docs/api/certificates_management/models/oci.certificates_management.models.CertificateAuthorityIssuanceExpiryRule.rst @@ -0,0 +1,11 @@ +CertificateAuthorityIssuanceExpiryRule +====================================== + +.. currentmodule:: oci.certificates_management.models + +.. autoclass:: CertificateAuthorityIssuanceExpiryRule + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/certificates_management/models/oci.certificates_management.models.CertificateAuthorityRule.rst b/docs/api/certificates_management/models/oci.certificates_management.models.CertificateAuthorityRule.rst new file mode 100644 index 0000000000..bb76c445f7 --- /dev/null +++ b/docs/api/certificates_management/models/oci.certificates_management.models.CertificateAuthorityRule.rst @@ -0,0 +1,11 @@ +CertificateAuthorityRule +======================== + +.. currentmodule:: oci.certificates_management.models + +.. autoclass:: CertificateAuthorityRule + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/certificates_management/models/oci.certificates_management.models.CertificateAuthoritySummary.rst b/docs/api/certificates_management/models/oci.certificates_management.models.CertificateAuthoritySummary.rst new file mode 100644 index 0000000000..d6a2d13fd3 --- /dev/null +++ b/docs/api/certificates_management/models/oci.certificates_management.models.CertificateAuthoritySummary.rst @@ -0,0 +1,11 @@ +CertificateAuthoritySummary +=========================== + +.. currentmodule:: oci.certificates_management.models + +.. autoclass:: CertificateAuthoritySummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/certificates_management/models/oci.certificates_management.models.CertificateAuthorityVersion.rst b/docs/api/certificates_management/models/oci.certificates_management.models.CertificateAuthorityVersion.rst new file mode 100644 index 0000000000..6c4ff5a1be --- /dev/null +++ b/docs/api/certificates_management/models/oci.certificates_management.models.CertificateAuthorityVersion.rst @@ -0,0 +1,11 @@ +CertificateAuthorityVersion +=========================== + +.. currentmodule:: oci.certificates_management.models + +.. autoclass:: CertificateAuthorityVersion + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/certificates_management/models/oci.certificates_management.models.CertificateAuthorityVersionCollection.rst b/docs/api/certificates_management/models/oci.certificates_management.models.CertificateAuthorityVersionCollection.rst new file mode 100644 index 0000000000..730779e711 --- /dev/null +++ b/docs/api/certificates_management/models/oci.certificates_management.models.CertificateAuthorityVersionCollection.rst @@ -0,0 +1,11 @@ +CertificateAuthorityVersionCollection +===================================== + +.. currentmodule:: oci.certificates_management.models + +.. autoclass:: CertificateAuthorityVersionCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/certificates_management/models/oci.certificates_management.models.CertificateAuthorityVersionSummary.rst b/docs/api/certificates_management/models/oci.certificates_management.models.CertificateAuthorityVersionSummary.rst new file mode 100644 index 0000000000..2be235cf46 --- /dev/null +++ b/docs/api/certificates_management/models/oci.certificates_management.models.CertificateAuthorityVersionSummary.rst @@ -0,0 +1,11 @@ +CertificateAuthorityVersionSummary +================================== + +.. currentmodule:: oci.certificates_management.models + +.. autoclass:: CertificateAuthorityVersionSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/certificates_management/models/oci.certificates_management.models.CertificateCollection.rst b/docs/api/certificates_management/models/oci.certificates_management.models.CertificateCollection.rst new file mode 100644 index 0000000000..4159fd967a --- /dev/null +++ b/docs/api/certificates_management/models/oci.certificates_management.models.CertificateCollection.rst @@ -0,0 +1,11 @@ +CertificateCollection +===================== + +.. currentmodule:: oci.certificates_management.models + +.. autoclass:: CertificateCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/certificates_management/models/oci.certificates_management.models.CertificateRenewalRule.rst b/docs/api/certificates_management/models/oci.certificates_management.models.CertificateRenewalRule.rst new file mode 100644 index 0000000000..59d794c19a --- /dev/null +++ b/docs/api/certificates_management/models/oci.certificates_management.models.CertificateRenewalRule.rst @@ -0,0 +1,11 @@ +CertificateRenewalRule +====================== + +.. currentmodule:: oci.certificates_management.models + +.. autoclass:: CertificateRenewalRule + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/certificates_management/models/oci.certificates_management.models.CertificateRevocationListDetails.rst b/docs/api/certificates_management/models/oci.certificates_management.models.CertificateRevocationListDetails.rst new file mode 100644 index 0000000000..a6825484fc --- /dev/null +++ b/docs/api/certificates_management/models/oci.certificates_management.models.CertificateRevocationListDetails.rst @@ -0,0 +1,11 @@ +CertificateRevocationListDetails +================================ + +.. currentmodule:: oci.certificates_management.models + +.. autoclass:: CertificateRevocationListDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/certificates_management/models/oci.certificates_management.models.CertificateRule.rst b/docs/api/certificates_management/models/oci.certificates_management.models.CertificateRule.rst new file mode 100644 index 0000000000..b8027e2e20 --- /dev/null +++ b/docs/api/certificates_management/models/oci.certificates_management.models.CertificateRule.rst @@ -0,0 +1,11 @@ +CertificateRule +=============== + +.. currentmodule:: oci.certificates_management.models + +.. autoclass:: CertificateRule + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/certificates_management/models/oci.certificates_management.models.CertificateSubject.rst b/docs/api/certificates_management/models/oci.certificates_management.models.CertificateSubject.rst new file mode 100644 index 0000000000..b0cd6370f7 --- /dev/null +++ b/docs/api/certificates_management/models/oci.certificates_management.models.CertificateSubject.rst @@ -0,0 +1,11 @@ +CertificateSubject +================== + +.. currentmodule:: oci.certificates_management.models + +.. autoclass:: CertificateSubject + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/certificates_management/models/oci.certificates_management.models.CertificateSubjectAlternativeName.rst b/docs/api/certificates_management/models/oci.certificates_management.models.CertificateSubjectAlternativeName.rst new file mode 100644 index 0000000000..a761e0a488 --- /dev/null +++ b/docs/api/certificates_management/models/oci.certificates_management.models.CertificateSubjectAlternativeName.rst @@ -0,0 +1,11 @@ +CertificateSubjectAlternativeName +================================= + +.. currentmodule:: oci.certificates_management.models + +.. autoclass:: CertificateSubjectAlternativeName + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/certificates_management/models/oci.certificates_management.models.CertificateSummary.rst b/docs/api/certificates_management/models/oci.certificates_management.models.CertificateSummary.rst new file mode 100644 index 0000000000..1d153834a7 --- /dev/null +++ b/docs/api/certificates_management/models/oci.certificates_management.models.CertificateSummary.rst @@ -0,0 +1,11 @@ +CertificateSummary +================== + +.. currentmodule:: oci.certificates_management.models + +.. autoclass:: CertificateSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/certificates_management/models/oci.certificates_management.models.CertificateVersion.rst b/docs/api/certificates_management/models/oci.certificates_management.models.CertificateVersion.rst new file mode 100644 index 0000000000..d3fcbd40d5 --- /dev/null +++ b/docs/api/certificates_management/models/oci.certificates_management.models.CertificateVersion.rst @@ -0,0 +1,11 @@ +CertificateVersion +================== + +.. currentmodule:: oci.certificates_management.models + +.. autoclass:: CertificateVersion + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/certificates_management/models/oci.certificates_management.models.CertificateVersionCollection.rst b/docs/api/certificates_management/models/oci.certificates_management.models.CertificateVersionCollection.rst new file mode 100644 index 0000000000..e2853cca3d --- /dev/null +++ b/docs/api/certificates_management/models/oci.certificates_management.models.CertificateVersionCollection.rst @@ -0,0 +1,11 @@ +CertificateVersionCollection +============================ + +.. currentmodule:: oci.certificates_management.models + +.. autoclass:: CertificateVersionCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/certificates_management/models/oci.certificates_management.models.CertificateVersionSummary.rst b/docs/api/certificates_management/models/oci.certificates_management.models.CertificateVersionSummary.rst new file mode 100644 index 0000000000..595472c33a --- /dev/null +++ b/docs/api/certificates_management/models/oci.certificates_management.models.CertificateVersionSummary.rst @@ -0,0 +1,11 @@ +CertificateVersionSummary +========================= + +.. currentmodule:: oci.certificates_management.models + +.. autoclass:: CertificateVersionSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/certificates_management/models/oci.certificates_management.models.ChangeCaBundleCompartmentDetails.rst b/docs/api/certificates_management/models/oci.certificates_management.models.ChangeCaBundleCompartmentDetails.rst new file mode 100644 index 0000000000..995d99d251 --- /dev/null +++ b/docs/api/certificates_management/models/oci.certificates_management.models.ChangeCaBundleCompartmentDetails.rst @@ -0,0 +1,11 @@ +ChangeCaBundleCompartmentDetails +================================ + +.. currentmodule:: oci.certificates_management.models + +.. autoclass:: ChangeCaBundleCompartmentDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/certificates_management/models/oci.certificates_management.models.ChangeCertificateAuthorityCompartmentDetails.rst b/docs/api/certificates_management/models/oci.certificates_management.models.ChangeCertificateAuthorityCompartmentDetails.rst new file mode 100644 index 0000000000..42982d1c6f --- /dev/null +++ b/docs/api/certificates_management/models/oci.certificates_management.models.ChangeCertificateAuthorityCompartmentDetails.rst @@ -0,0 +1,11 @@ +ChangeCertificateAuthorityCompartmentDetails +============================================ + +.. currentmodule:: oci.certificates_management.models + +.. autoclass:: ChangeCertificateAuthorityCompartmentDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/certificates_management/models/oci.certificates_management.models.ChangeCertificateCompartmentDetails.rst b/docs/api/certificates_management/models/oci.certificates_management.models.ChangeCertificateCompartmentDetails.rst new file mode 100644 index 0000000000..ea668d0de3 --- /dev/null +++ b/docs/api/certificates_management/models/oci.certificates_management.models.ChangeCertificateCompartmentDetails.rst @@ -0,0 +1,11 @@ +ChangeCertificateCompartmentDetails +=================================== + +.. currentmodule:: oci.certificates_management.models + +.. autoclass:: ChangeCertificateCompartmentDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/certificates_management/models/oci.certificates_management.models.CreateCaBundleDetails.rst b/docs/api/certificates_management/models/oci.certificates_management.models.CreateCaBundleDetails.rst new file mode 100644 index 0000000000..c8bbe3a6da --- /dev/null +++ b/docs/api/certificates_management/models/oci.certificates_management.models.CreateCaBundleDetails.rst @@ -0,0 +1,11 @@ +CreateCaBundleDetails +===================== + +.. currentmodule:: oci.certificates_management.models + +.. autoclass:: CreateCaBundleDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/certificates_management/models/oci.certificates_management.models.CreateCertificateAuthorityConfigDetails.rst b/docs/api/certificates_management/models/oci.certificates_management.models.CreateCertificateAuthorityConfigDetails.rst new file mode 100644 index 0000000000..9cc0b2b015 --- /dev/null +++ b/docs/api/certificates_management/models/oci.certificates_management.models.CreateCertificateAuthorityConfigDetails.rst @@ -0,0 +1,11 @@ +CreateCertificateAuthorityConfigDetails +======================================= + +.. currentmodule:: oci.certificates_management.models + +.. autoclass:: CreateCertificateAuthorityConfigDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/certificates_management/models/oci.certificates_management.models.CreateCertificateAuthorityDetails.rst b/docs/api/certificates_management/models/oci.certificates_management.models.CreateCertificateAuthorityDetails.rst new file mode 100644 index 0000000000..2b04581555 --- /dev/null +++ b/docs/api/certificates_management/models/oci.certificates_management.models.CreateCertificateAuthorityDetails.rst @@ -0,0 +1,11 @@ +CreateCertificateAuthorityDetails +================================= + +.. currentmodule:: oci.certificates_management.models + +.. autoclass:: CreateCertificateAuthorityDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/certificates_management/models/oci.certificates_management.models.CreateCertificateByImportingConfigDetails.rst b/docs/api/certificates_management/models/oci.certificates_management.models.CreateCertificateByImportingConfigDetails.rst new file mode 100644 index 0000000000..1751d772f2 --- /dev/null +++ b/docs/api/certificates_management/models/oci.certificates_management.models.CreateCertificateByImportingConfigDetails.rst @@ -0,0 +1,11 @@ +CreateCertificateByImportingConfigDetails +========================================= + +.. currentmodule:: oci.certificates_management.models + +.. autoclass:: CreateCertificateByImportingConfigDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/certificates_management/models/oci.certificates_management.models.CreateCertificateConfigDetails.rst b/docs/api/certificates_management/models/oci.certificates_management.models.CreateCertificateConfigDetails.rst new file mode 100644 index 0000000000..1c1638d6c5 --- /dev/null +++ b/docs/api/certificates_management/models/oci.certificates_management.models.CreateCertificateConfigDetails.rst @@ -0,0 +1,11 @@ +CreateCertificateConfigDetails +============================== + +.. currentmodule:: oci.certificates_management.models + +.. autoclass:: CreateCertificateConfigDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/certificates_management/models/oci.certificates_management.models.CreateCertificateDetails.rst b/docs/api/certificates_management/models/oci.certificates_management.models.CreateCertificateDetails.rst new file mode 100644 index 0000000000..551ec5637e --- /dev/null +++ b/docs/api/certificates_management/models/oci.certificates_management.models.CreateCertificateDetails.rst @@ -0,0 +1,11 @@ +CreateCertificateDetails +======================== + +.. currentmodule:: oci.certificates_management.models + +.. autoclass:: CreateCertificateDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/certificates_management/models/oci.certificates_management.models.CreateCertificateIssuedByInternalCaConfigDetails.rst b/docs/api/certificates_management/models/oci.certificates_management.models.CreateCertificateIssuedByInternalCaConfigDetails.rst new file mode 100644 index 0000000000..2728bb7b11 --- /dev/null +++ b/docs/api/certificates_management/models/oci.certificates_management.models.CreateCertificateIssuedByInternalCaConfigDetails.rst @@ -0,0 +1,11 @@ +CreateCertificateIssuedByInternalCaConfigDetails +================================================ + +.. currentmodule:: oci.certificates_management.models + +.. autoclass:: CreateCertificateIssuedByInternalCaConfigDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/certificates_management/models/oci.certificates_management.models.CreateCertificateManagedExternallyIssuedByInternalCaConfigDetails.rst b/docs/api/certificates_management/models/oci.certificates_management.models.CreateCertificateManagedExternallyIssuedByInternalCaConfigDetails.rst new file mode 100644 index 0000000000..7f05fc71bc --- /dev/null +++ b/docs/api/certificates_management/models/oci.certificates_management.models.CreateCertificateManagedExternallyIssuedByInternalCaConfigDetails.rst @@ -0,0 +1,11 @@ +CreateCertificateManagedExternallyIssuedByInternalCaConfigDetails +================================================================= + +.. currentmodule:: oci.certificates_management.models + +.. autoclass:: CreateCertificateManagedExternallyIssuedByInternalCaConfigDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/certificates_management/models/oci.certificates_management.models.CreateRootCaByGeneratingInternallyConfigDetails.rst b/docs/api/certificates_management/models/oci.certificates_management.models.CreateRootCaByGeneratingInternallyConfigDetails.rst new file mode 100644 index 0000000000..5e9b1c4950 --- /dev/null +++ b/docs/api/certificates_management/models/oci.certificates_management.models.CreateRootCaByGeneratingInternallyConfigDetails.rst @@ -0,0 +1,11 @@ +CreateRootCaByGeneratingInternallyConfigDetails +=============================================== + +.. currentmodule:: oci.certificates_management.models + +.. autoclass:: CreateRootCaByGeneratingInternallyConfigDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/certificates_management/models/oci.certificates_management.models.CreateSubordinateCaIssuedByInternalCaConfigDetails.rst b/docs/api/certificates_management/models/oci.certificates_management.models.CreateSubordinateCaIssuedByInternalCaConfigDetails.rst new file mode 100644 index 0000000000..28ec83862a --- /dev/null +++ b/docs/api/certificates_management/models/oci.certificates_management.models.CreateSubordinateCaIssuedByInternalCaConfigDetails.rst @@ -0,0 +1,11 @@ +CreateSubordinateCaIssuedByInternalCaConfigDetails +================================================== + +.. currentmodule:: oci.certificates_management.models + +.. autoclass:: CreateSubordinateCaIssuedByInternalCaConfigDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/certificates_management/models/oci.certificates_management.models.ObjectStorageBucketConfigDetails.rst b/docs/api/certificates_management/models/oci.certificates_management.models.ObjectStorageBucketConfigDetails.rst new file mode 100644 index 0000000000..d95c148df7 --- /dev/null +++ b/docs/api/certificates_management/models/oci.certificates_management.models.ObjectStorageBucketConfigDetails.rst @@ -0,0 +1,11 @@ +ObjectStorageBucketConfigDetails +================================ + +.. currentmodule:: oci.certificates_management.models + +.. autoclass:: ObjectStorageBucketConfigDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/certificates_management/models/oci.certificates_management.models.RevocationStatus.rst b/docs/api/certificates_management/models/oci.certificates_management.models.RevocationStatus.rst new file mode 100644 index 0000000000..5d5fc87527 --- /dev/null +++ b/docs/api/certificates_management/models/oci.certificates_management.models.RevocationStatus.rst @@ -0,0 +1,11 @@ +RevocationStatus +================ + +.. currentmodule:: oci.certificates_management.models + +.. autoclass:: RevocationStatus + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/certificates_management/models/oci.certificates_management.models.RevokeCertificateAuthorityVersionDetails.rst b/docs/api/certificates_management/models/oci.certificates_management.models.RevokeCertificateAuthorityVersionDetails.rst new file mode 100644 index 0000000000..87e01af826 --- /dev/null +++ b/docs/api/certificates_management/models/oci.certificates_management.models.RevokeCertificateAuthorityVersionDetails.rst @@ -0,0 +1,11 @@ +RevokeCertificateAuthorityVersionDetails +======================================== + +.. currentmodule:: oci.certificates_management.models + +.. autoclass:: RevokeCertificateAuthorityVersionDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/certificates_management/models/oci.certificates_management.models.RevokeCertificateVersionDetails.rst b/docs/api/certificates_management/models/oci.certificates_management.models.RevokeCertificateVersionDetails.rst new file mode 100644 index 0000000000..3c89ec194f --- /dev/null +++ b/docs/api/certificates_management/models/oci.certificates_management.models.RevokeCertificateVersionDetails.rst @@ -0,0 +1,11 @@ +RevokeCertificateVersionDetails +=============================== + +.. currentmodule:: oci.certificates_management.models + +.. autoclass:: RevokeCertificateVersionDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/certificates_management/models/oci.certificates_management.models.ScheduleCertificateAuthorityDeletionDetails.rst b/docs/api/certificates_management/models/oci.certificates_management.models.ScheduleCertificateAuthorityDeletionDetails.rst new file mode 100644 index 0000000000..ad48dd221d --- /dev/null +++ b/docs/api/certificates_management/models/oci.certificates_management.models.ScheduleCertificateAuthorityDeletionDetails.rst @@ -0,0 +1,11 @@ +ScheduleCertificateAuthorityDeletionDetails +=========================================== + +.. currentmodule:: oci.certificates_management.models + +.. autoclass:: ScheduleCertificateAuthorityDeletionDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/certificates_management/models/oci.certificates_management.models.ScheduleCertificateAuthorityVersionDeletionDetails.rst b/docs/api/certificates_management/models/oci.certificates_management.models.ScheduleCertificateAuthorityVersionDeletionDetails.rst new file mode 100644 index 0000000000..e5f800a6f0 --- /dev/null +++ b/docs/api/certificates_management/models/oci.certificates_management.models.ScheduleCertificateAuthorityVersionDeletionDetails.rst @@ -0,0 +1,11 @@ +ScheduleCertificateAuthorityVersionDeletionDetails +================================================== + +.. currentmodule:: oci.certificates_management.models + +.. autoclass:: ScheduleCertificateAuthorityVersionDeletionDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/certificates_management/models/oci.certificates_management.models.ScheduleCertificateDeletionDetails.rst b/docs/api/certificates_management/models/oci.certificates_management.models.ScheduleCertificateDeletionDetails.rst new file mode 100644 index 0000000000..25cd74e568 --- /dev/null +++ b/docs/api/certificates_management/models/oci.certificates_management.models.ScheduleCertificateDeletionDetails.rst @@ -0,0 +1,11 @@ +ScheduleCertificateDeletionDetails +================================== + +.. currentmodule:: oci.certificates_management.models + +.. autoclass:: ScheduleCertificateDeletionDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/certificates_management/models/oci.certificates_management.models.ScheduleCertificateVersionDeletionDetails.rst b/docs/api/certificates_management/models/oci.certificates_management.models.ScheduleCertificateVersionDeletionDetails.rst new file mode 100644 index 0000000000..721bc9fd52 --- /dev/null +++ b/docs/api/certificates_management/models/oci.certificates_management.models.ScheduleCertificateVersionDeletionDetails.rst @@ -0,0 +1,11 @@ +ScheduleCertificateVersionDeletionDetails +========================================= + +.. currentmodule:: oci.certificates_management.models + +.. autoclass:: ScheduleCertificateVersionDeletionDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/certificates_management/models/oci.certificates_management.models.UpdateCaBundleDetails.rst b/docs/api/certificates_management/models/oci.certificates_management.models.UpdateCaBundleDetails.rst new file mode 100644 index 0000000000..e2258b25df --- /dev/null +++ b/docs/api/certificates_management/models/oci.certificates_management.models.UpdateCaBundleDetails.rst @@ -0,0 +1,11 @@ +UpdateCaBundleDetails +===================== + +.. currentmodule:: oci.certificates_management.models + +.. autoclass:: UpdateCaBundleDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/certificates_management/models/oci.certificates_management.models.UpdateCertificateAuthorityConfigDetails.rst b/docs/api/certificates_management/models/oci.certificates_management.models.UpdateCertificateAuthorityConfigDetails.rst new file mode 100644 index 0000000000..c83604516b --- /dev/null +++ b/docs/api/certificates_management/models/oci.certificates_management.models.UpdateCertificateAuthorityConfigDetails.rst @@ -0,0 +1,11 @@ +UpdateCertificateAuthorityConfigDetails +======================================= + +.. currentmodule:: oci.certificates_management.models + +.. autoclass:: UpdateCertificateAuthorityConfigDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/certificates_management/models/oci.certificates_management.models.UpdateCertificateAuthorityDetails.rst b/docs/api/certificates_management/models/oci.certificates_management.models.UpdateCertificateAuthorityDetails.rst new file mode 100644 index 0000000000..83ae465cb2 --- /dev/null +++ b/docs/api/certificates_management/models/oci.certificates_management.models.UpdateCertificateAuthorityDetails.rst @@ -0,0 +1,11 @@ +UpdateCertificateAuthorityDetails +================================= + +.. currentmodule:: oci.certificates_management.models + +.. autoclass:: UpdateCertificateAuthorityDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/certificates_management/models/oci.certificates_management.models.UpdateCertificateByImportingConfigDetails.rst b/docs/api/certificates_management/models/oci.certificates_management.models.UpdateCertificateByImportingConfigDetails.rst new file mode 100644 index 0000000000..b6262f6618 --- /dev/null +++ b/docs/api/certificates_management/models/oci.certificates_management.models.UpdateCertificateByImportingConfigDetails.rst @@ -0,0 +1,11 @@ +UpdateCertificateByImportingConfigDetails +========================================= + +.. currentmodule:: oci.certificates_management.models + +.. autoclass:: UpdateCertificateByImportingConfigDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/certificates_management/models/oci.certificates_management.models.UpdateCertificateConfigDetails.rst b/docs/api/certificates_management/models/oci.certificates_management.models.UpdateCertificateConfigDetails.rst new file mode 100644 index 0000000000..f32e3b6cc3 --- /dev/null +++ b/docs/api/certificates_management/models/oci.certificates_management.models.UpdateCertificateConfigDetails.rst @@ -0,0 +1,11 @@ +UpdateCertificateConfigDetails +============================== + +.. currentmodule:: oci.certificates_management.models + +.. autoclass:: UpdateCertificateConfigDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/certificates_management/models/oci.certificates_management.models.UpdateCertificateDetails.rst b/docs/api/certificates_management/models/oci.certificates_management.models.UpdateCertificateDetails.rst new file mode 100644 index 0000000000..994448afd3 --- /dev/null +++ b/docs/api/certificates_management/models/oci.certificates_management.models.UpdateCertificateDetails.rst @@ -0,0 +1,11 @@ +UpdateCertificateDetails +======================== + +.. currentmodule:: oci.certificates_management.models + +.. autoclass:: UpdateCertificateDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/certificates_management/models/oci.certificates_management.models.UpdateCertificateIssuedByInternalCaConfigDetails.rst b/docs/api/certificates_management/models/oci.certificates_management.models.UpdateCertificateIssuedByInternalCaConfigDetails.rst new file mode 100644 index 0000000000..b90722add6 --- /dev/null +++ b/docs/api/certificates_management/models/oci.certificates_management.models.UpdateCertificateIssuedByInternalCaConfigDetails.rst @@ -0,0 +1,11 @@ +UpdateCertificateIssuedByInternalCaConfigDetails +================================================ + +.. currentmodule:: oci.certificates_management.models + +.. autoclass:: UpdateCertificateIssuedByInternalCaConfigDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/certificates_management/models/oci.certificates_management.models.UpdateCertificateManagedExternallyIssuedByInternalCaConfigDetails.rst b/docs/api/certificates_management/models/oci.certificates_management.models.UpdateCertificateManagedExternallyIssuedByInternalCaConfigDetails.rst new file mode 100644 index 0000000000..1d46b8b5d6 --- /dev/null +++ b/docs/api/certificates_management/models/oci.certificates_management.models.UpdateCertificateManagedExternallyIssuedByInternalCaConfigDetails.rst @@ -0,0 +1,11 @@ +UpdateCertificateManagedExternallyIssuedByInternalCaConfigDetails +================================================================= + +.. currentmodule:: oci.certificates_management.models + +.. autoclass:: UpdateCertificateManagedExternallyIssuedByInternalCaConfigDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/certificates_management/models/oci.certificates_management.models.UpdateRootCaByGeneratingInternallyConfigDetails.rst b/docs/api/certificates_management/models/oci.certificates_management.models.UpdateRootCaByGeneratingInternallyConfigDetails.rst new file mode 100644 index 0000000000..0878d32d23 --- /dev/null +++ b/docs/api/certificates_management/models/oci.certificates_management.models.UpdateRootCaByGeneratingInternallyConfigDetails.rst @@ -0,0 +1,11 @@ +UpdateRootCaByGeneratingInternallyConfigDetails +=============================================== + +.. currentmodule:: oci.certificates_management.models + +.. autoclass:: UpdateRootCaByGeneratingInternallyConfigDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/certificates_management/models/oci.certificates_management.models.UpdateSubordinateCaIssuedByInternalCaConfigDetails.rst b/docs/api/certificates_management/models/oci.certificates_management.models.UpdateSubordinateCaIssuedByInternalCaConfigDetails.rst new file mode 100644 index 0000000000..4663e97899 --- /dev/null +++ b/docs/api/certificates_management/models/oci.certificates_management.models.UpdateSubordinateCaIssuedByInternalCaConfigDetails.rst @@ -0,0 +1,11 @@ +UpdateSubordinateCaIssuedByInternalCaConfigDetails +================================================== + +.. currentmodule:: oci.certificates_management.models + +.. autoclass:: UpdateSubordinateCaIssuedByInternalCaConfigDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/certificates_management/models/oci.certificates_management.models.Validity.rst b/docs/api/certificates_management/models/oci.certificates_management.models.Validity.rst new file mode 100644 index 0000000000..47023d541b --- /dev/null +++ b/docs/api/certificates_management/models/oci.certificates_management.models.Validity.rst @@ -0,0 +1,11 @@ +Validity +======== + +.. currentmodule:: oci.certificates_management.models + +.. autoclass:: Validity + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_integration.rst b/docs/api/data_integration.rst index ae125f9e97..1452bd61cc 100644 --- a/docs/api/data_integration.rst +++ b/docs/api/data_integration.rst @@ -34,6 +34,7 @@ Data Integration oci.data_integration.models.AvroFormatAttribute oci.data_integration.models.BaseType oci.data_integration.models.BiccReadAttributes + oci.data_integration.models.CancelRestCallConfig oci.data_integration.models.ChangeCompartmentDetails oci.data_integration.models.ChildReference oci.data_integration.models.ChildReferenceDetail @@ -108,9 +109,11 @@ Data Integration oci.data_integration.models.CreateDataFlowValidationDetails oci.data_integration.models.CreateEntityShapeDetails oci.data_integration.models.CreateEntityShapeFromFile + oci.data_integration.models.CreateEntityShapeFromSQL oci.data_integration.models.CreateExternalPublicationDetails oci.data_integration.models.CreateExternalPublicationValidationDetails oci.data_integration.models.CreateFolderDetails + oci.data_integration.models.CreateFunctionLibraryDetails oci.data_integration.models.CreatePatchDetails oci.data_integration.models.CreatePipelineDetails oci.data_integration.models.CreatePipelineValidationDetails @@ -130,8 +133,11 @@ Data Integration oci.data_integration.models.CreateTaskValidationFromDataLoaderTask oci.data_integration.models.CreateTaskValidationFromIntegrationTask oci.data_integration.models.CreateTaskValidationFromPipelineTask + oci.data_integration.models.CreateUserDefinedFunctionDetails + oci.data_integration.models.CreateUserDefinedFunctionValidationDetails oci.data_integration.models.CreateWorkspaceDetails oci.data_integration.models.CsvFormatAttribute + oci.data_integration.models.CustomFrequencyDetails oci.data_integration.models.DailyFrequencyDetails oci.data_integration.models.DataAsset oci.data_integration.models.DataAssetFromAdwcDetails @@ -158,6 +164,8 @@ Data Integration oci.data_integration.models.DataEntityFromDataStoreEntityDetails oci.data_integration.models.DataEntityFromFile oci.data_integration.models.DataEntityFromFileEntityDetails + oci.data_integration.models.DataEntityFromSql + oci.data_integration.models.DataEntityFromSqlEntityDetails oci.data_integration.models.DataEntityFromTable oci.data_integration.models.DataEntityFromTableEntityDetails oci.data_integration.models.DataEntityFromView @@ -166,6 +174,7 @@ Data Integration oci.data_integration.models.DataEntitySummaryCollection oci.data_integration.models.DataEntitySummaryFromDataStore oci.data_integration.models.DataEntitySummaryFromFile + oci.data_integration.models.DataEntitySummaryFromSql oci.data_integration.models.DataEntitySummaryFromTable oci.data_integration.models.DataEntitySummaryFromView oci.data_integration.models.DataFlow @@ -194,7 +203,9 @@ Data Integration oci.data_integration.models.EnrichedEntity oci.data_integration.models.EntityShape oci.data_integration.models.EntityShapeFromFile + oci.data_integration.models.EntityShapeFromSQL oci.data_integration.models.ErrorDetails + oci.data_integration.models.ExecuteRestCallConfig oci.data_integration.models.Expression oci.data_integration.models.ExpressionOperator oci.data_integration.models.ExternalPublication @@ -215,6 +226,11 @@ Data Integration oci.data_integration.models.FolderSummary oci.data_integration.models.FolderSummaryCollection oci.data_integration.models.ForeignKey + oci.data_integration.models.FunctionLibrary + oci.data_integration.models.FunctionLibraryDetails + oci.data_integration.models.FunctionLibrarySummary + oci.data_integration.models.FunctionLibrarySummaryCollection + oci.data_integration.models.FunctionSignature oci.data_integration.models.HourlyFrequencyDetails oci.data_integration.models.InputField oci.data_integration.models.InputLink @@ -235,6 +251,7 @@ Data Integration oci.data_integration.models.Message oci.data_integration.models.Minus oci.data_integration.models.MonthlyFrequencyDetails + oci.data_integration.models.MonthlyRuleFrequencyDetails oci.data_integration.models.NameListRule oci.data_integration.models.NamePatternRule oci.data_integration.models.NativeShapeField @@ -298,6 +315,7 @@ Data Integration oci.data_integration.models.RegistryMetadata oci.data_integration.models.RenameRule oci.data_integration.models.ResourceConfiguration + oci.data_integration.models.RestCallConfig oci.data_integration.models.RootObject oci.data_integration.models.RuleBasedFieldMap oci.data_integration.models.RuleTypeConfig @@ -359,6 +377,7 @@ Data Integration oci.data_integration.models.TypedObject oci.data_integration.models.UIProperties oci.data_integration.models.Union + oci.data_integration.models.UniqueDataKey oci.data_integration.models.UniqueKey oci.data_integration.models.UpdateApplicationDetails oci.data_integration.models.UpdateConnectionDetails @@ -382,6 +401,7 @@ Data Integration oci.data_integration.models.UpdateDataFlowDetails oci.data_integration.models.UpdateExternalPublicationDetails oci.data_integration.models.UpdateFolderDetails + oci.data_integration.models.UpdateFunctionLibraryDetails oci.data_integration.models.UpdatePipelineDetails oci.data_integration.models.UpdateProjectDetails oci.data_integration.models.UpdateReferenceDetails @@ -395,9 +415,18 @@ Data Integration oci.data_integration.models.UpdateTaskFromSQLTask oci.data_integration.models.UpdateTaskRunDetails oci.data_integration.models.UpdateTaskScheduleDetails + oci.data_integration.models.UpdateUserDefinedFunctionDetails oci.data_integration.models.UpdateWorkspaceDetails + oci.data_integration.models.UserDefinedFunction + oci.data_integration.models.UserDefinedFunctionDetails + oci.data_integration.models.UserDefinedFunctionSummary + oci.data_integration.models.UserDefinedFunctionSummaryCollection + oci.data_integration.models.UserDefinedFunctionValidation + oci.data_integration.models.UserDefinedFunctionValidationSummary + oci.data_integration.models.UserDefinedFunctionValidationSummaryCollection oci.data_integration.models.ValidationMessage oci.data_integration.models.Variable + oci.data_integration.models.WeeklyFrequencyDetails oci.data_integration.models.WorkRequest oci.data_integration.models.WorkRequestError oci.data_integration.models.WorkRequestLogEntry diff --git a/docs/api/data_integration/models/oci.data_integration.models.CancelRestCallConfig.rst b/docs/api/data_integration/models/oci.data_integration.models.CancelRestCallConfig.rst new file mode 100644 index 0000000000..75fdc653b1 --- /dev/null +++ b/docs/api/data_integration/models/oci.data_integration.models.CancelRestCallConfig.rst @@ -0,0 +1,11 @@ +CancelRestCallConfig +==================== + +.. currentmodule:: oci.data_integration.models + +.. autoclass:: CancelRestCallConfig + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_integration/models/oci.data_integration.models.CreateEntityShapeFromSQL.rst b/docs/api/data_integration/models/oci.data_integration.models.CreateEntityShapeFromSQL.rst new file mode 100644 index 0000000000..0aeebcafd9 --- /dev/null +++ b/docs/api/data_integration/models/oci.data_integration.models.CreateEntityShapeFromSQL.rst @@ -0,0 +1,11 @@ +CreateEntityShapeFromSQL +======================== + +.. currentmodule:: oci.data_integration.models + +.. autoclass:: CreateEntityShapeFromSQL + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_integration/models/oci.data_integration.models.CreateFunctionLibraryDetails.rst b/docs/api/data_integration/models/oci.data_integration.models.CreateFunctionLibraryDetails.rst new file mode 100644 index 0000000000..f7858a8f85 --- /dev/null +++ b/docs/api/data_integration/models/oci.data_integration.models.CreateFunctionLibraryDetails.rst @@ -0,0 +1,11 @@ +CreateFunctionLibraryDetails +============================ + +.. currentmodule:: oci.data_integration.models + +.. autoclass:: CreateFunctionLibraryDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_integration/models/oci.data_integration.models.CreateUserDefinedFunctionDetails.rst b/docs/api/data_integration/models/oci.data_integration.models.CreateUserDefinedFunctionDetails.rst new file mode 100644 index 0000000000..8f098ef580 --- /dev/null +++ b/docs/api/data_integration/models/oci.data_integration.models.CreateUserDefinedFunctionDetails.rst @@ -0,0 +1,11 @@ +CreateUserDefinedFunctionDetails +================================ + +.. currentmodule:: oci.data_integration.models + +.. autoclass:: CreateUserDefinedFunctionDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_integration/models/oci.data_integration.models.CreateUserDefinedFunctionValidationDetails.rst b/docs/api/data_integration/models/oci.data_integration.models.CreateUserDefinedFunctionValidationDetails.rst new file mode 100644 index 0000000000..48fec4895d --- /dev/null +++ b/docs/api/data_integration/models/oci.data_integration.models.CreateUserDefinedFunctionValidationDetails.rst @@ -0,0 +1,11 @@ +CreateUserDefinedFunctionValidationDetails +========================================== + +.. currentmodule:: oci.data_integration.models + +.. autoclass:: CreateUserDefinedFunctionValidationDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_integration/models/oci.data_integration.models.CustomFrequencyDetails.rst b/docs/api/data_integration/models/oci.data_integration.models.CustomFrequencyDetails.rst new file mode 100644 index 0000000000..8af23f1b63 --- /dev/null +++ b/docs/api/data_integration/models/oci.data_integration.models.CustomFrequencyDetails.rst @@ -0,0 +1,11 @@ +CustomFrequencyDetails +====================== + +.. currentmodule:: oci.data_integration.models + +.. autoclass:: CustomFrequencyDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_integration/models/oci.data_integration.models.DataEntityFromSql.rst b/docs/api/data_integration/models/oci.data_integration.models.DataEntityFromSql.rst new file mode 100644 index 0000000000..9214e94ec1 --- /dev/null +++ b/docs/api/data_integration/models/oci.data_integration.models.DataEntityFromSql.rst @@ -0,0 +1,11 @@ +DataEntityFromSql +================= + +.. currentmodule:: oci.data_integration.models + +.. autoclass:: DataEntityFromSql + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_integration/models/oci.data_integration.models.DataEntityFromSqlEntityDetails.rst b/docs/api/data_integration/models/oci.data_integration.models.DataEntityFromSqlEntityDetails.rst new file mode 100644 index 0000000000..8296b98d66 --- /dev/null +++ b/docs/api/data_integration/models/oci.data_integration.models.DataEntityFromSqlEntityDetails.rst @@ -0,0 +1,11 @@ +DataEntityFromSqlEntityDetails +============================== + +.. currentmodule:: oci.data_integration.models + +.. autoclass:: DataEntityFromSqlEntityDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_integration/models/oci.data_integration.models.DataEntitySummaryFromSql.rst b/docs/api/data_integration/models/oci.data_integration.models.DataEntitySummaryFromSql.rst new file mode 100644 index 0000000000..971cd31c40 --- /dev/null +++ b/docs/api/data_integration/models/oci.data_integration.models.DataEntitySummaryFromSql.rst @@ -0,0 +1,11 @@ +DataEntitySummaryFromSql +======================== + +.. currentmodule:: oci.data_integration.models + +.. autoclass:: DataEntitySummaryFromSql + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_integration/models/oci.data_integration.models.EntityShapeFromSQL.rst b/docs/api/data_integration/models/oci.data_integration.models.EntityShapeFromSQL.rst new file mode 100644 index 0000000000..ca7f4dfd71 --- /dev/null +++ b/docs/api/data_integration/models/oci.data_integration.models.EntityShapeFromSQL.rst @@ -0,0 +1,11 @@ +EntityShapeFromSQL +================== + +.. currentmodule:: oci.data_integration.models + +.. autoclass:: EntityShapeFromSQL + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_integration/models/oci.data_integration.models.ExecuteRestCallConfig.rst b/docs/api/data_integration/models/oci.data_integration.models.ExecuteRestCallConfig.rst new file mode 100644 index 0000000000..d10c73cc95 --- /dev/null +++ b/docs/api/data_integration/models/oci.data_integration.models.ExecuteRestCallConfig.rst @@ -0,0 +1,11 @@ +ExecuteRestCallConfig +===================== + +.. currentmodule:: oci.data_integration.models + +.. autoclass:: ExecuteRestCallConfig + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_integration/models/oci.data_integration.models.FunctionLibrary.rst b/docs/api/data_integration/models/oci.data_integration.models.FunctionLibrary.rst new file mode 100644 index 0000000000..d83950354f --- /dev/null +++ b/docs/api/data_integration/models/oci.data_integration.models.FunctionLibrary.rst @@ -0,0 +1,11 @@ +FunctionLibrary +=============== + +.. currentmodule:: oci.data_integration.models + +.. autoclass:: FunctionLibrary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_integration/models/oci.data_integration.models.FunctionLibraryDetails.rst b/docs/api/data_integration/models/oci.data_integration.models.FunctionLibraryDetails.rst new file mode 100644 index 0000000000..b8de8e98fa --- /dev/null +++ b/docs/api/data_integration/models/oci.data_integration.models.FunctionLibraryDetails.rst @@ -0,0 +1,11 @@ +FunctionLibraryDetails +====================== + +.. currentmodule:: oci.data_integration.models + +.. autoclass:: FunctionLibraryDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_integration/models/oci.data_integration.models.FunctionLibrarySummary.rst b/docs/api/data_integration/models/oci.data_integration.models.FunctionLibrarySummary.rst new file mode 100644 index 0000000000..3484f225f4 --- /dev/null +++ b/docs/api/data_integration/models/oci.data_integration.models.FunctionLibrarySummary.rst @@ -0,0 +1,11 @@ +FunctionLibrarySummary +====================== + +.. currentmodule:: oci.data_integration.models + +.. autoclass:: FunctionLibrarySummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_integration/models/oci.data_integration.models.FunctionLibrarySummaryCollection.rst b/docs/api/data_integration/models/oci.data_integration.models.FunctionLibrarySummaryCollection.rst new file mode 100644 index 0000000000..22dce387bc --- /dev/null +++ b/docs/api/data_integration/models/oci.data_integration.models.FunctionLibrarySummaryCollection.rst @@ -0,0 +1,11 @@ +FunctionLibrarySummaryCollection +================================ + +.. currentmodule:: oci.data_integration.models + +.. autoclass:: FunctionLibrarySummaryCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_integration/models/oci.data_integration.models.FunctionSignature.rst b/docs/api/data_integration/models/oci.data_integration.models.FunctionSignature.rst new file mode 100644 index 0000000000..d02b465504 --- /dev/null +++ b/docs/api/data_integration/models/oci.data_integration.models.FunctionSignature.rst @@ -0,0 +1,11 @@ +FunctionSignature +================= + +.. currentmodule:: oci.data_integration.models + +.. autoclass:: FunctionSignature + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_integration/models/oci.data_integration.models.MonthlyRuleFrequencyDetails.rst b/docs/api/data_integration/models/oci.data_integration.models.MonthlyRuleFrequencyDetails.rst new file mode 100644 index 0000000000..53de8b8e68 --- /dev/null +++ b/docs/api/data_integration/models/oci.data_integration.models.MonthlyRuleFrequencyDetails.rst @@ -0,0 +1,11 @@ +MonthlyRuleFrequencyDetails +=========================== + +.. currentmodule:: oci.data_integration.models + +.. autoclass:: MonthlyRuleFrequencyDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_integration/models/oci.data_integration.models.RestCallConfig.rst b/docs/api/data_integration/models/oci.data_integration.models.RestCallConfig.rst new file mode 100644 index 0000000000..0df569d419 --- /dev/null +++ b/docs/api/data_integration/models/oci.data_integration.models.RestCallConfig.rst @@ -0,0 +1,11 @@ +RestCallConfig +============== + +.. currentmodule:: oci.data_integration.models + +.. autoclass:: RestCallConfig + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_integration/models/oci.data_integration.models.UniqueDataKey.rst b/docs/api/data_integration/models/oci.data_integration.models.UniqueDataKey.rst new file mode 100644 index 0000000000..3e9bd0b14d --- /dev/null +++ b/docs/api/data_integration/models/oci.data_integration.models.UniqueDataKey.rst @@ -0,0 +1,11 @@ +UniqueDataKey +============= + +.. currentmodule:: oci.data_integration.models + +.. autoclass:: UniqueDataKey + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_integration/models/oci.data_integration.models.UpdateFunctionLibraryDetails.rst b/docs/api/data_integration/models/oci.data_integration.models.UpdateFunctionLibraryDetails.rst new file mode 100644 index 0000000000..3a90bdc3a7 --- /dev/null +++ b/docs/api/data_integration/models/oci.data_integration.models.UpdateFunctionLibraryDetails.rst @@ -0,0 +1,11 @@ +UpdateFunctionLibraryDetails +============================ + +.. currentmodule:: oci.data_integration.models + +.. autoclass:: UpdateFunctionLibraryDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_integration/models/oci.data_integration.models.UpdateUserDefinedFunctionDetails.rst b/docs/api/data_integration/models/oci.data_integration.models.UpdateUserDefinedFunctionDetails.rst new file mode 100644 index 0000000000..4e6304b012 --- /dev/null +++ b/docs/api/data_integration/models/oci.data_integration.models.UpdateUserDefinedFunctionDetails.rst @@ -0,0 +1,11 @@ +UpdateUserDefinedFunctionDetails +================================ + +.. currentmodule:: oci.data_integration.models + +.. autoclass:: UpdateUserDefinedFunctionDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_integration/models/oci.data_integration.models.UserDefinedFunction.rst b/docs/api/data_integration/models/oci.data_integration.models.UserDefinedFunction.rst new file mode 100644 index 0000000000..b1f301fd22 --- /dev/null +++ b/docs/api/data_integration/models/oci.data_integration.models.UserDefinedFunction.rst @@ -0,0 +1,11 @@ +UserDefinedFunction +=================== + +.. currentmodule:: oci.data_integration.models + +.. autoclass:: UserDefinedFunction + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_integration/models/oci.data_integration.models.UserDefinedFunctionDetails.rst b/docs/api/data_integration/models/oci.data_integration.models.UserDefinedFunctionDetails.rst new file mode 100644 index 0000000000..3881b688d4 --- /dev/null +++ b/docs/api/data_integration/models/oci.data_integration.models.UserDefinedFunctionDetails.rst @@ -0,0 +1,11 @@ +UserDefinedFunctionDetails +========================== + +.. currentmodule:: oci.data_integration.models + +.. autoclass:: UserDefinedFunctionDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_integration/models/oci.data_integration.models.UserDefinedFunctionSummary.rst b/docs/api/data_integration/models/oci.data_integration.models.UserDefinedFunctionSummary.rst new file mode 100644 index 0000000000..c97d15deb5 --- /dev/null +++ b/docs/api/data_integration/models/oci.data_integration.models.UserDefinedFunctionSummary.rst @@ -0,0 +1,11 @@ +UserDefinedFunctionSummary +========================== + +.. currentmodule:: oci.data_integration.models + +.. autoclass:: UserDefinedFunctionSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_integration/models/oci.data_integration.models.UserDefinedFunctionSummaryCollection.rst b/docs/api/data_integration/models/oci.data_integration.models.UserDefinedFunctionSummaryCollection.rst new file mode 100644 index 0000000000..af2c493b3b --- /dev/null +++ b/docs/api/data_integration/models/oci.data_integration.models.UserDefinedFunctionSummaryCollection.rst @@ -0,0 +1,11 @@ +UserDefinedFunctionSummaryCollection +==================================== + +.. currentmodule:: oci.data_integration.models + +.. autoclass:: UserDefinedFunctionSummaryCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_integration/models/oci.data_integration.models.UserDefinedFunctionValidation.rst b/docs/api/data_integration/models/oci.data_integration.models.UserDefinedFunctionValidation.rst new file mode 100644 index 0000000000..ae74b4f249 --- /dev/null +++ b/docs/api/data_integration/models/oci.data_integration.models.UserDefinedFunctionValidation.rst @@ -0,0 +1,11 @@ +UserDefinedFunctionValidation +============================= + +.. currentmodule:: oci.data_integration.models + +.. autoclass:: UserDefinedFunctionValidation + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_integration/models/oci.data_integration.models.UserDefinedFunctionValidationSummary.rst b/docs/api/data_integration/models/oci.data_integration.models.UserDefinedFunctionValidationSummary.rst new file mode 100644 index 0000000000..e34253794b --- /dev/null +++ b/docs/api/data_integration/models/oci.data_integration.models.UserDefinedFunctionValidationSummary.rst @@ -0,0 +1,11 @@ +UserDefinedFunctionValidationSummary +==================================== + +.. currentmodule:: oci.data_integration.models + +.. autoclass:: UserDefinedFunctionValidationSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_integration/models/oci.data_integration.models.UserDefinedFunctionValidationSummaryCollection.rst b/docs/api/data_integration/models/oci.data_integration.models.UserDefinedFunctionValidationSummaryCollection.rst new file mode 100644 index 0000000000..c382695fd7 --- /dev/null +++ b/docs/api/data_integration/models/oci.data_integration.models.UserDefinedFunctionValidationSummaryCollection.rst @@ -0,0 +1,11 @@ +UserDefinedFunctionValidationSummaryCollection +============================================== + +.. currentmodule:: oci.data_integration.models + +.. autoclass:: UserDefinedFunctionValidationSummaryCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_integration/models/oci.data_integration.models.WeeklyFrequencyDetails.rst b/docs/api/data_integration/models/oci.data_integration.models.WeeklyFrequencyDetails.rst new file mode 100644 index 0000000000..611df312b8 --- /dev/null +++ b/docs/api/data_integration/models/oci.data_integration.models.WeeklyFrequencyDetails.rst @@ -0,0 +1,11 @@ +WeeklyFrequencyDetails +====================== + +.. currentmodule:: oci.data_integration.models + +.. autoclass:: WeeklyFrequencyDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops.rst b/docs/api/devops.rst index 616bcf5efb..4f231126a5 100644 --- a/docs/api/devops.rst +++ b/docs/api/devops.rst @@ -20,20 +20,44 @@ Devops oci.devops.models.AbsoluteWaitCriteria oci.devops.models.AbsoluteWaitCriteriaSummary + oci.devops.models.ActualBuildRunnerShapeConfig oci.devops.models.ApprovalAction oci.devops.models.ApprovalPolicy oci.devops.models.ApproveDeploymentDetails oci.devops.models.AutomatedDeployStageRollbackPolicy oci.devops.models.BackendSetIpCollection + oci.devops.models.BuildOutputs + oci.devops.models.BuildPipeline + oci.devops.models.BuildPipelineCollection + oci.devops.models.BuildPipelineParameter + oci.devops.models.BuildPipelineParameterCollection + oci.devops.models.BuildPipelineStage + oci.devops.models.BuildPipelineStageCollection + oci.devops.models.BuildPipelineStagePredecessor + oci.devops.models.BuildPipelineStagePredecessorCollection + oci.devops.models.BuildPipelineStageRunProgress + oci.devops.models.BuildPipelineStageSummary + oci.devops.models.BuildPipelineSummary + oci.devops.models.BuildRun + oci.devops.models.BuildRunArgument + oci.devops.models.BuildRunArgumentCollection + oci.devops.models.BuildRunProgress + oci.devops.models.BuildRunProgressSummary + oci.devops.models.BuildRunSource + oci.devops.models.BuildRunSummary + oci.devops.models.BuildRunSummaryCollection + oci.devops.models.BuildSource + oci.devops.models.BuildSourceCollection + oci.devops.models.BuildStage + oci.devops.models.BuildStageRunProgress + oci.devops.models.BuildStageRunStep + oci.devops.models.BuildStageSummary + oci.devops.models.CancelBuildRunDetails oci.devops.models.CancelDeploymentDetails oci.devops.models.ChangeProjectCompartmentDetails - oci.devops.models.ComputeInstanceGroupBlueGreenDeployStageExecutionProgress - oci.devops.models.ComputeInstanceGroupBlueGreenTrafficShiftDeployStageExecutionProgress + oci.devops.models.CommitInfo oci.devops.models.ComputeInstanceGroupByIdsSelector oci.devops.models.ComputeInstanceGroupByQuerySelector - oci.devops.models.ComputeInstanceGroupCanaryApprovalDeployStageExecutionProgress - oci.devops.models.ComputeInstanceGroupCanaryDeployStageExecutionProgress - oci.devops.models.ComputeInstanceGroupCanaryTrafficShiftDeployStageExecutionProgress oci.devops.models.ComputeInstanceGroupDeployEnvironment oci.devops.models.ComputeInstanceGroupDeployEnvironmentSummary oci.devops.models.ComputeInstanceGroupDeployStage @@ -47,9 +71,20 @@ Devops oci.devops.models.ComputeInstanceGroupRolloutPolicy oci.devops.models.ComputeInstanceGroupSelector oci.devops.models.ComputeInstanceGroupSelectorCollection + oci.devops.models.Connection + oci.devops.models.ConnectionCollection + oci.devops.models.ConnectionSummary + oci.devops.models.ContainerRegistryDeliveredArtifact oci.devops.models.CountBasedApprovalPolicy + oci.devops.models.CreateAbsoluteWaitCriteriaDetails + oci.devops.models.CreateBuildPipelineDetails + oci.devops.models.CreateBuildPipelineStageDetails + oci.devops.models.CreateBuildRunDetails + oci.devops.models.CreateBuildStageDetails oci.devops.models.CreateComputeInstanceGroupDeployEnvironmentDetails oci.devops.models.CreateComputeInstanceGroupDeployStageDetails + oci.devops.models.CreateConnectionDetails + oci.devops.models.CreateDeliverArtifactStageDetails oci.devops.models.CreateDeployArtifactDetails oci.devops.models.CreateDeployEnvironmentDetails oci.devops.models.CreateDeployPipelineDeploymentDetails @@ -57,16 +92,33 @@ Devops oci.devops.models.CreateDeployPipelineRedeploymentDetails oci.devops.models.CreateDeployStageDetails oci.devops.models.CreateDeploymentDetails + oci.devops.models.CreateDevopsCodeRepositoryTriggerDetails oci.devops.models.CreateFunctionDeployEnvironmentDetails oci.devops.models.CreateFunctionDeployStageDetails + oci.devops.models.CreateGithubAccessTokenConnectionDetails + oci.devops.models.CreateGithubTriggerDetails + oci.devops.models.CreateGitlabAccessTokenConnectionDetails + oci.devops.models.CreateGitlabTriggerDetails oci.devops.models.CreateInvokeFunctionDeployStageDetails oci.devops.models.CreateLoadBalancerTrafficShiftDeployStageDetails oci.devops.models.CreateManualApprovalDeployStageDetails oci.devops.models.CreateOkeClusterDeployEnvironmentDetails oci.devops.models.CreateOkeDeployStageDetails oci.devops.models.CreateProjectDetails + oci.devops.models.CreateRepositoryDetails oci.devops.models.CreateSingleDeployStageDeploymentDetails + oci.devops.models.CreateTriggerDeploymentStageDetails + oci.devops.models.CreateTriggerDetails + oci.devops.models.CreateWaitCriteriaDetails oci.devops.models.CreateWaitDeployStageDetails + oci.devops.models.CreateWaitStageDetails + oci.devops.models.DeliverArtifact + oci.devops.models.DeliverArtifactCollection + oci.devops.models.DeliverArtifactStage + oci.devops.models.DeliverArtifactStageRunProgress + oci.devops.models.DeliverArtifactStageSummary + oci.devops.models.DeliveredArtifact + oci.devops.models.DeliveredArtifactCollection oci.devops.models.DeployArtifact oci.devops.models.DeployArtifactCollection oci.devops.models.DeployArtifactOverrideArgument @@ -106,12 +158,50 @@ Devops oci.devops.models.DeploymentCollection oci.devops.models.DeploymentExecutionProgress oci.devops.models.DeploymentSummary + oci.devops.models.DevopsCodeRepositoryBuildRunSource + oci.devops.models.DevopsCodeRepositoryBuildSource + oci.devops.models.DevopsCodeRepositoryFilter + oci.devops.models.DevopsCodeRepositoryFilterAttributes + oci.devops.models.DevopsCodeRepositoryTrigger + oci.devops.models.DevopsCodeRepositoryTriggerCreateResult + oci.devops.models.DevopsCodeRepositoryTriggerSummary + oci.devops.models.DiffChunk + oci.devops.models.DiffCollection + oci.devops.models.DiffLineDetails + oci.devops.models.DiffResponse + oci.devops.models.DiffResponseEntry + oci.devops.models.DiffSection + oci.devops.models.DiffSummary + oci.devops.models.ExportedVariable + oci.devops.models.ExportedVariableCollection + oci.devops.models.FileDiffResponse + oci.devops.models.FileLineDetails + oci.devops.models.Filter oci.devops.models.FunctionDeployEnvironment oci.devops.models.FunctionDeployEnvironmentSummary oci.devops.models.FunctionDeployStage oci.devops.models.FunctionDeployStageExecutionProgress oci.devops.models.FunctionDeployStageSummary + oci.devops.models.GenericDeliveredArtifact oci.devops.models.GenericDeployArtifactSource + oci.devops.models.GithubAccessTokenConnection + oci.devops.models.GithubAccessTokenConnectionSummary + oci.devops.models.GithubBuildRunSource + oci.devops.models.GithubBuildSource + oci.devops.models.GithubFilter + oci.devops.models.GithubFilterAttributes + oci.devops.models.GithubTrigger + oci.devops.models.GithubTriggerCreateResult + oci.devops.models.GithubTriggerSummary + oci.devops.models.GitlabAccessTokenConnection + oci.devops.models.GitlabAccessTokenConnectionSummary + oci.devops.models.GitlabBuildRunSource + oci.devops.models.GitlabBuildSource + oci.devops.models.GitlabFilter + oci.devops.models.GitlabFilterAttributes + oci.devops.models.GitlabTrigger + oci.devops.models.GitlabTriggerCreateResult + oci.devops.models.GitlabTriggerSummary oci.devops.models.InlineDeployArtifactSource oci.devops.models.InvokeFunctionDeployStage oci.devops.models.InvokeFunctionDeployStageExecutionProgress @@ -124,6 +214,8 @@ Devops oci.devops.models.ManualApprovalDeployStage oci.devops.models.ManualApprovalDeployStageExecutionProgress oci.devops.models.ManualApprovalDeployStageSummary + oci.devops.models.ManualBuildRunSource + oci.devops.models.MirrorRepositoryConfig oci.devops.models.NoDeployStageRollbackPolicy oci.devops.models.NotificationConfig oci.devops.models.OcirDeployArtifactSource @@ -135,12 +227,53 @@ Devops oci.devops.models.Project oci.devops.models.ProjectCollection oci.devops.models.ProjectSummary - oci.devops.models.RunPipelineDeployStageExecutionProgress - oci.devops.models.RunValidationTestOnComputeInstanceDeployStageExecutionProgress + oci.devops.models.PutRepositoryBranchDetails + oci.devops.models.PutRepositoryRefDetails + oci.devops.models.PutRepositoryTagDetails + oci.devops.models.Repository + oci.devops.models.RepositoryAuthorCollection + oci.devops.models.RepositoryAuthorSummary + oci.devops.models.RepositoryBranch + oci.devops.models.RepositoryBranchSummary + oci.devops.models.RepositoryCollection + oci.devops.models.RepositoryCommit + oci.devops.models.RepositoryCommitCollection + oci.devops.models.RepositoryCommitSummary + oci.devops.models.RepositoryFileLines + oci.devops.models.RepositoryMirrorRecord + oci.devops.models.RepositoryMirrorRecordCollection + oci.devops.models.RepositoryMirrorRecordSummary + oci.devops.models.RepositoryObject + oci.devops.models.RepositoryPathCollection + oci.devops.models.RepositoryPathSummary + oci.devops.models.RepositoryRef + oci.devops.models.RepositoryRefCollection + oci.devops.models.RepositoryRefSummary + oci.devops.models.RepositorySummary + oci.devops.models.RepositoryTag + oci.devops.models.RepositoryTagSummary oci.devops.models.SingleDeployStageDeployment oci.devops.models.SingleDeployStageDeploymentSummary + oci.devops.models.Trigger + oci.devops.models.TriggerAction + oci.devops.models.TriggerBuildPipelineAction + oci.devops.models.TriggerCollection + oci.devops.models.TriggerCreateResult + oci.devops.models.TriggerDeploymentPipelineStageRunProgress + oci.devops.models.TriggerDeploymentStage + oci.devops.models.TriggerDeploymentStageSummary + oci.devops.models.TriggerInfo + oci.devops.models.TriggerSchedule + oci.devops.models.TriggerSummary + oci.devops.models.UpdateAbsoluteWaitCriteriaDetails + oci.devops.models.UpdateBuildPipelineDetails + oci.devops.models.UpdateBuildPipelineStageDetails + oci.devops.models.UpdateBuildRunDetails + oci.devops.models.UpdateBuildStageDetails oci.devops.models.UpdateComputeInstanceGroupDeployEnvironmentDetails oci.devops.models.UpdateComputeInstanceGroupDeployStageDetails + oci.devops.models.UpdateConnectionDetails + oci.devops.models.UpdateDeliverArtifactStageDetails oci.devops.models.UpdateDeployArtifactDetails oci.devops.models.UpdateDeployEnvironmentDetails oci.devops.models.UpdateDeployPipelineDeploymentDetails @@ -148,21 +281,34 @@ Devops oci.devops.models.UpdateDeployPipelineRedeploymentDetails oci.devops.models.UpdateDeployStageDetails oci.devops.models.UpdateDeploymentDetails + oci.devops.models.UpdateDevopsCodeRepositoryTriggerDetails oci.devops.models.UpdateFunctionDeployEnvironmentDetails oci.devops.models.UpdateFunctionDeployStageDetails + oci.devops.models.UpdateGithubAccessTokenConnectionDetails + oci.devops.models.UpdateGithubTriggerDetails + oci.devops.models.UpdateGitlabAccessTokenConnectionDetails + oci.devops.models.UpdateGitlabTriggerDetails oci.devops.models.UpdateInvokeFunctionDeployStageDetails oci.devops.models.UpdateLoadBalancerTrafficShiftDeployStageDetails oci.devops.models.UpdateManualApprovalDeployStageDetails oci.devops.models.UpdateOkeClusterDeployEnvironmentDetails oci.devops.models.UpdateOkeDeployStageDetails oci.devops.models.UpdateProjectDetails + oci.devops.models.UpdateRepositoryDetails oci.devops.models.UpdateSingleDeployStageDeploymentDetails + oci.devops.models.UpdateTriggerDeploymentStageDetails + oci.devops.models.UpdateTriggerDetails + oci.devops.models.UpdateWaitCriteriaDetails oci.devops.models.UpdateWaitDeployStageDetails + oci.devops.models.UpdateWaitStageDetails oci.devops.models.WaitCriteria oci.devops.models.WaitCriteriaSummary oci.devops.models.WaitDeployStage oci.devops.models.WaitDeployStageExecutionProgress oci.devops.models.WaitDeployStageSummary + oci.devops.models.WaitStage + oci.devops.models.WaitStageRunProgress + oci.devops.models.WaitStageSummary oci.devops.models.WorkRequest oci.devops.models.WorkRequestCollection oci.devops.models.WorkRequestError diff --git a/docs/api/devops/models/oci.devops.models.ActualBuildRunnerShapeConfig.rst b/docs/api/devops/models/oci.devops.models.ActualBuildRunnerShapeConfig.rst new file mode 100644 index 0000000000..502c5810c3 --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.ActualBuildRunnerShapeConfig.rst @@ -0,0 +1,11 @@ +ActualBuildRunnerShapeConfig +============================ + +.. currentmodule:: oci.devops.models + +.. autoclass:: ActualBuildRunnerShapeConfig + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.BuildOutputs.rst b/docs/api/devops/models/oci.devops.models.BuildOutputs.rst new file mode 100644 index 0000000000..15bffd78aa --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.BuildOutputs.rst @@ -0,0 +1,11 @@ +BuildOutputs +============ + +.. currentmodule:: oci.devops.models + +.. autoclass:: BuildOutputs + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.BuildPipeline.rst b/docs/api/devops/models/oci.devops.models.BuildPipeline.rst new file mode 100644 index 0000000000..331abe885d --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.BuildPipeline.rst @@ -0,0 +1,11 @@ +BuildPipeline +============= + +.. currentmodule:: oci.devops.models + +.. autoclass:: BuildPipeline + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.BuildPipelineCollection.rst b/docs/api/devops/models/oci.devops.models.BuildPipelineCollection.rst new file mode 100644 index 0000000000..f0a167cd43 --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.BuildPipelineCollection.rst @@ -0,0 +1,11 @@ +BuildPipelineCollection +======================= + +.. currentmodule:: oci.devops.models + +.. autoclass:: BuildPipelineCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.BuildPipelineParameter.rst b/docs/api/devops/models/oci.devops.models.BuildPipelineParameter.rst new file mode 100644 index 0000000000..a0dbe0c42c --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.BuildPipelineParameter.rst @@ -0,0 +1,11 @@ +BuildPipelineParameter +====================== + +.. currentmodule:: oci.devops.models + +.. autoclass:: BuildPipelineParameter + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.BuildPipelineParameterCollection.rst b/docs/api/devops/models/oci.devops.models.BuildPipelineParameterCollection.rst new file mode 100644 index 0000000000..ce7bc52912 --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.BuildPipelineParameterCollection.rst @@ -0,0 +1,11 @@ +BuildPipelineParameterCollection +================================ + +.. currentmodule:: oci.devops.models + +.. autoclass:: BuildPipelineParameterCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.BuildPipelineStage.rst b/docs/api/devops/models/oci.devops.models.BuildPipelineStage.rst new file mode 100644 index 0000000000..604657365c --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.BuildPipelineStage.rst @@ -0,0 +1,11 @@ +BuildPipelineStage +================== + +.. currentmodule:: oci.devops.models + +.. autoclass:: BuildPipelineStage + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.BuildPipelineStageCollection.rst b/docs/api/devops/models/oci.devops.models.BuildPipelineStageCollection.rst new file mode 100644 index 0000000000..e79a844db2 --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.BuildPipelineStageCollection.rst @@ -0,0 +1,11 @@ +BuildPipelineStageCollection +============================ + +.. currentmodule:: oci.devops.models + +.. autoclass:: BuildPipelineStageCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.BuildPipelineStagePredecessor.rst b/docs/api/devops/models/oci.devops.models.BuildPipelineStagePredecessor.rst new file mode 100644 index 0000000000..03999c14e0 --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.BuildPipelineStagePredecessor.rst @@ -0,0 +1,11 @@ +BuildPipelineStagePredecessor +============================= + +.. currentmodule:: oci.devops.models + +.. autoclass:: BuildPipelineStagePredecessor + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.RunPipelineDeployStageExecutionProgress.rst b/docs/api/devops/models/oci.devops.models.BuildPipelineStagePredecessorCollection.rst similarity index 66% rename from docs/api/devops/models/oci.devops.models.RunPipelineDeployStageExecutionProgress.rst rename to docs/api/devops/models/oci.devops.models.BuildPipelineStagePredecessorCollection.rst index a7dcc52ca2..3a09cb66c7 100644 --- a/docs/api/devops/models/oci.devops.models.RunPipelineDeployStageExecutionProgress.rst +++ b/docs/api/devops/models/oci.devops.models.BuildPipelineStagePredecessorCollection.rst @@ -1,9 +1,9 @@ -RunPipelineDeployStageExecutionProgress +BuildPipelineStagePredecessorCollection ======================================= .. currentmodule:: oci.devops.models -.. autoclass:: RunPipelineDeployStageExecutionProgress +.. autoclass:: BuildPipelineStagePredecessorCollection :show-inheritance: :special-members: __init__ :members: diff --git a/docs/api/devops/models/oci.devops.models.BuildPipelineStageRunProgress.rst b/docs/api/devops/models/oci.devops.models.BuildPipelineStageRunProgress.rst new file mode 100644 index 0000000000..7acbf957ec --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.BuildPipelineStageRunProgress.rst @@ -0,0 +1,11 @@ +BuildPipelineStageRunProgress +============================= + +.. currentmodule:: oci.devops.models + +.. autoclass:: BuildPipelineStageRunProgress + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.BuildPipelineStageSummary.rst b/docs/api/devops/models/oci.devops.models.BuildPipelineStageSummary.rst new file mode 100644 index 0000000000..e09e813630 --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.BuildPipelineStageSummary.rst @@ -0,0 +1,11 @@ +BuildPipelineStageSummary +========================= + +.. currentmodule:: oci.devops.models + +.. autoclass:: BuildPipelineStageSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.BuildPipelineSummary.rst b/docs/api/devops/models/oci.devops.models.BuildPipelineSummary.rst new file mode 100644 index 0000000000..c236a9b7e3 --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.BuildPipelineSummary.rst @@ -0,0 +1,11 @@ +BuildPipelineSummary +==================== + +.. currentmodule:: oci.devops.models + +.. autoclass:: BuildPipelineSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.BuildRun.rst b/docs/api/devops/models/oci.devops.models.BuildRun.rst new file mode 100644 index 0000000000..580bf19bca --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.BuildRun.rst @@ -0,0 +1,11 @@ +BuildRun +======== + +.. currentmodule:: oci.devops.models + +.. autoclass:: BuildRun + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.BuildRunArgument.rst b/docs/api/devops/models/oci.devops.models.BuildRunArgument.rst new file mode 100644 index 0000000000..02ed0ed6e8 --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.BuildRunArgument.rst @@ -0,0 +1,11 @@ +BuildRunArgument +================ + +.. currentmodule:: oci.devops.models + +.. autoclass:: BuildRunArgument + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.BuildRunArgumentCollection.rst b/docs/api/devops/models/oci.devops.models.BuildRunArgumentCollection.rst new file mode 100644 index 0000000000..31e6018285 --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.BuildRunArgumentCollection.rst @@ -0,0 +1,11 @@ +BuildRunArgumentCollection +========================== + +.. currentmodule:: oci.devops.models + +.. autoclass:: BuildRunArgumentCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.BuildRunProgress.rst b/docs/api/devops/models/oci.devops.models.BuildRunProgress.rst new file mode 100644 index 0000000000..5a4336c511 --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.BuildRunProgress.rst @@ -0,0 +1,11 @@ +BuildRunProgress +================ + +.. currentmodule:: oci.devops.models + +.. autoclass:: BuildRunProgress + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.BuildRunProgressSummary.rst b/docs/api/devops/models/oci.devops.models.BuildRunProgressSummary.rst new file mode 100644 index 0000000000..595c149c34 --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.BuildRunProgressSummary.rst @@ -0,0 +1,11 @@ +BuildRunProgressSummary +======================= + +.. currentmodule:: oci.devops.models + +.. autoclass:: BuildRunProgressSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.BuildRunSource.rst b/docs/api/devops/models/oci.devops.models.BuildRunSource.rst new file mode 100644 index 0000000000..df7b311652 --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.BuildRunSource.rst @@ -0,0 +1,11 @@ +BuildRunSource +============== + +.. currentmodule:: oci.devops.models + +.. autoclass:: BuildRunSource + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.BuildRunSummary.rst b/docs/api/devops/models/oci.devops.models.BuildRunSummary.rst new file mode 100644 index 0000000000..cb535ec9ff --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.BuildRunSummary.rst @@ -0,0 +1,11 @@ +BuildRunSummary +=============== + +.. currentmodule:: oci.devops.models + +.. autoclass:: BuildRunSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.BuildRunSummaryCollection.rst b/docs/api/devops/models/oci.devops.models.BuildRunSummaryCollection.rst new file mode 100644 index 0000000000..3d87663c8f --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.BuildRunSummaryCollection.rst @@ -0,0 +1,11 @@ +BuildRunSummaryCollection +========================= + +.. currentmodule:: oci.devops.models + +.. autoclass:: BuildRunSummaryCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.BuildSource.rst b/docs/api/devops/models/oci.devops.models.BuildSource.rst new file mode 100644 index 0000000000..851875cb8a --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.BuildSource.rst @@ -0,0 +1,11 @@ +BuildSource +=========== + +.. currentmodule:: oci.devops.models + +.. autoclass:: BuildSource + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.BuildSourceCollection.rst b/docs/api/devops/models/oci.devops.models.BuildSourceCollection.rst new file mode 100644 index 0000000000..2035fb2bca --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.BuildSourceCollection.rst @@ -0,0 +1,11 @@ +BuildSourceCollection +===================== + +.. currentmodule:: oci.devops.models + +.. autoclass:: BuildSourceCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.BuildStage.rst b/docs/api/devops/models/oci.devops.models.BuildStage.rst new file mode 100644 index 0000000000..dca4d64c64 --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.BuildStage.rst @@ -0,0 +1,11 @@ +BuildStage +========== + +.. currentmodule:: oci.devops.models + +.. autoclass:: BuildStage + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.BuildStageRunProgress.rst b/docs/api/devops/models/oci.devops.models.BuildStageRunProgress.rst new file mode 100644 index 0000000000..42de94f3a3 --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.BuildStageRunProgress.rst @@ -0,0 +1,11 @@ +BuildStageRunProgress +===================== + +.. currentmodule:: oci.devops.models + +.. autoclass:: BuildStageRunProgress + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.BuildStageRunStep.rst b/docs/api/devops/models/oci.devops.models.BuildStageRunStep.rst new file mode 100644 index 0000000000..697f869a12 --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.BuildStageRunStep.rst @@ -0,0 +1,11 @@ +BuildStageRunStep +================= + +.. currentmodule:: oci.devops.models + +.. autoclass:: BuildStageRunStep + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.BuildStageSummary.rst b/docs/api/devops/models/oci.devops.models.BuildStageSummary.rst new file mode 100644 index 0000000000..31dabe36eb --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.BuildStageSummary.rst @@ -0,0 +1,11 @@ +BuildStageSummary +================= + +.. currentmodule:: oci.devops.models + +.. autoclass:: BuildStageSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.CancelBuildRunDetails.rst b/docs/api/devops/models/oci.devops.models.CancelBuildRunDetails.rst new file mode 100644 index 0000000000..b2e3f4dd30 --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.CancelBuildRunDetails.rst @@ -0,0 +1,11 @@ +CancelBuildRunDetails +===================== + +.. currentmodule:: oci.devops.models + +.. autoclass:: CancelBuildRunDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.CommitInfo.rst b/docs/api/devops/models/oci.devops.models.CommitInfo.rst new file mode 100644 index 0000000000..319f92e6bc --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.CommitInfo.rst @@ -0,0 +1,11 @@ +CommitInfo +========== + +.. currentmodule:: oci.devops.models + +.. autoclass:: CommitInfo + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.ComputeInstanceGroupBlueGreenDeployStageExecutionProgress.rst b/docs/api/devops/models/oci.devops.models.ComputeInstanceGroupBlueGreenDeployStageExecutionProgress.rst deleted file mode 100644 index 29bbad35af..0000000000 --- a/docs/api/devops/models/oci.devops.models.ComputeInstanceGroupBlueGreenDeployStageExecutionProgress.rst +++ /dev/null @@ -1,11 +0,0 @@ -ComputeInstanceGroupBlueGreenDeployStageExecutionProgress -========================================================= - -.. currentmodule:: oci.devops.models - -.. autoclass:: ComputeInstanceGroupBlueGreenDeployStageExecutionProgress - :show-inheritance: - :special-members: __init__ - :members: - :undoc-members: - :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.ComputeInstanceGroupBlueGreenTrafficShiftDeployStageExecutionProgress.rst b/docs/api/devops/models/oci.devops.models.ComputeInstanceGroupBlueGreenTrafficShiftDeployStageExecutionProgress.rst deleted file mode 100644 index d0da383318..0000000000 --- a/docs/api/devops/models/oci.devops.models.ComputeInstanceGroupBlueGreenTrafficShiftDeployStageExecutionProgress.rst +++ /dev/null @@ -1,11 +0,0 @@ -ComputeInstanceGroupBlueGreenTrafficShiftDeployStageExecutionProgress -===================================================================== - -.. currentmodule:: oci.devops.models - -.. autoclass:: ComputeInstanceGroupBlueGreenTrafficShiftDeployStageExecutionProgress - :show-inheritance: - :special-members: __init__ - :members: - :undoc-members: - :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.ComputeInstanceGroupCanaryApprovalDeployStageExecutionProgress.rst b/docs/api/devops/models/oci.devops.models.ComputeInstanceGroupCanaryApprovalDeployStageExecutionProgress.rst deleted file mode 100644 index 7f42130e57..0000000000 --- a/docs/api/devops/models/oci.devops.models.ComputeInstanceGroupCanaryApprovalDeployStageExecutionProgress.rst +++ /dev/null @@ -1,11 +0,0 @@ -ComputeInstanceGroupCanaryApprovalDeployStageExecutionProgress -============================================================== - -.. currentmodule:: oci.devops.models - -.. autoclass:: ComputeInstanceGroupCanaryApprovalDeployStageExecutionProgress - :show-inheritance: - :special-members: __init__ - :members: - :undoc-members: - :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.ComputeInstanceGroupCanaryTrafficShiftDeployStageExecutionProgress.rst b/docs/api/devops/models/oci.devops.models.ComputeInstanceGroupCanaryTrafficShiftDeployStageExecutionProgress.rst deleted file mode 100644 index abfde28656..0000000000 --- a/docs/api/devops/models/oci.devops.models.ComputeInstanceGroupCanaryTrafficShiftDeployStageExecutionProgress.rst +++ /dev/null @@ -1,11 +0,0 @@ -ComputeInstanceGroupCanaryTrafficShiftDeployStageExecutionProgress -================================================================== - -.. currentmodule:: oci.devops.models - -.. autoclass:: ComputeInstanceGroupCanaryTrafficShiftDeployStageExecutionProgress - :show-inheritance: - :special-members: __init__ - :members: - :undoc-members: - :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.Connection.rst b/docs/api/devops/models/oci.devops.models.Connection.rst new file mode 100644 index 0000000000..644d6b5588 --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.Connection.rst @@ -0,0 +1,11 @@ +Connection +========== + +.. currentmodule:: oci.devops.models + +.. autoclass:: Connection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.ConnectionCollection.rst b/docs/api/devops/models/oci.devops.models.ConnectionCollection.rst new file mode 100644 index 0000000000..589e47bd78 --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.ConnectionCollection.rst @@ -0,0 +1,11 @@ +ConnectionCollection +==================== + +.. currentmodule:: oci.devops.models + +.. autoclass:: ConnectionCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.ConnectionSummary.rst b/docs/api/devops/models/oci.devops.models.ConnectionSummary.rst new file mode 100644 index 0000000000..54ac4e2394 --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.ConnectionSummary.rst @@ -0,0 +1,11 @@ +ConnectionSummary +================= + +.. currentmodule:: oci.devops.models + +.. autoclass:: ConnectionSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.ContainerRegistryDeliveredArtifact.rst b/docs/api/devops/models/oci.devops.models.ContainerRegistryDeliveredArtifact.rst new file mode 100644 index 0000000000..4722f8858e --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.ContainerRegistryDeliveredArtifact.rst @@ -0,0 +1,11 @@ +ContainerRegistryDeliveredArtifact +================================== + +.. currentmodule:: oci.devops.models + +.. autoclass:: ContainerRegistryDeliveredArtifact + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.CreateAbsoluteWaitCriteriaDetails.rst b/docs/api/devops/models/oci.devops.models.CreateAbsoluteWaitCriteriaDetails.rst new file mode 100644 index 0000000000..4da0b0e342 --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.CreateAbsoluteWaitCriteriaDetails.rst @@ -0,0 +1,11 @@ +CreateAbsoluteWaitCriteriaDetails +================================= + +.. currentmodule:: oci.devops.models + +.. autoclass:: CreateAbsoluteWaitCriteriaDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.CreateBuildPipelineDetails.rst b/docs/api/devops/models/oci.devops.models.CreateBuildPipelineDetails.rst new file mode 100644 index 0000000000..62bb1afd16 --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.CreateBuildPipelineDetails.rst @@ -0,0 +1,11 @@ +CreateBuildPipelineDetails +========================== + +.. currentmodule:: oci.devops.models + +.. autoclass:: CreateBuildPipelineDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.CreateBuildPipelineStageDetails.rst b/docs/api/devops/models/oci.devops.models.CreateBuildPipelineStageDetails.rst new file mode 100644 index 0000000000..7e8a9dc7b1 --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.CreateBuildPipelineStageDetails.rst @@ -0,0 +1,11 @@ +CreateBuildPipelineStageDetails +=============================== + +.. currentmodule:: oci.devops.models + +.. autoclass:: CreateBuildPipelineStageDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.CreateBuildRunDetails.rst b/docs/api/devops/models/oci.devops.models.CreateBuildRunDetails.rst new file mode 100644 index 0000000000..8037904928 --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.CreateBuildRunDetails.rst @@ -0,0 +1,11 @@ +CreateBuildRunDetails +===================== + +.. currentmodule:: oci.devops.models + +.. autoclass:: CreateBuildRunDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.CreateBuildStageDetails.rst b/docs/api/devops/models/oci.devops.models.CreateBuildStageDetails.rst new file mode 100644 index 0000000000..b8067e331a --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.CreateBuildStageDetails.rst @@ -0,0 +1,11 @@ +CreateBuildStageDetails +======================= + +.. currentmodule:: oci.devops.models + +.. autoclass:: CreateBuildStageDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.CreateConnectionDetails.rst b/docs/api/devops/models/oci.devops.models.CreateConnectionDetails.rst new file mode 100644 index 0000000000..1fa7400a79 --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.CreateConnectionDetails.rst @@ -0,0 +1,11 @@ +CreateConnectionDetails +======================= + +.. currentmodule:: oci.devops.models + +.. autoclass:: CreateConnectionDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.CreateDeliverArtifactStageDetails.rst b/docs/api/devops/models/oci.devops.models.CreateDeliverArtifactStageDetails.rst new file mode 100644 index 0000000000..aca061aeda --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.CreateDeliverArtifactStageDetails.rst @@ -0,0 +1,11 @@ +CreateDeliverArtifactStageDetails +================================= + +.. currentmodule:: oci.devops.models + +.. autoclass:: CreateDeliverArtifactStageDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.CreateDevopsCodeRepositoryTriggerDetails.rst b/docs/api/devops/models/oci.devops.models.CreateDevopsCodeRepositoryTriggerDetails.rst new file mode 100644 index 0000000000..d82bd0dda1 --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.CreateDevopsCodeRepositoryTriggerDetails.rst @@ -0,0 +1,11 @@ +CreateDevopsCodeRepositoryTriggerDetails +======================================== + +.. currentmodule:: oci.devops.models + +.. autoclass:: CreateDevopsCodeRepositoryTriggerDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.CreateGithubAccessTokenConnectionDetails.rst b/docs/api/devops/models/oci.devops.models.CreateGithubAccessTokenConnectionDetails.rst new file mode 100644 index 0000000000..4fecd7cac6 --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.CreateGithubAccessTokenConnectionDetails.rst @@ -0,0 +1,11 @@ +CreateGithubAccessTokenConnectionDetails +======================================== + +.. currentmodule:: oci.devops.models + +.. autoclass:: CreateGithubAccessTokenConnectionDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.CreateGithubTriggerDetails.rst b/docs/api/devops/models/oci.devops.models.CreateGithubTriggerDetails.rst new file mode 100644 index 0000000000..9093d3264f --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.CreateGithubTriggerDetails.rst @@ -0,0 +1,11 @@ +CreateGithubTriggerDetails +========================== + +.. currentmodule:: oci.devops.models + +.. autoclass:: CreateGithubTriggerDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.CreateGitlabAccessTokenConnectionDetails.rst b/docs/api/devops/models/oci.devops.models.CreateGitlabAccessTokenConnectionDetails.rst new file mode 100644 index 0000000000..e093cb29d3 --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.CreateGitlabAccessTokenConnectionDetails.rst @@ -0,0 +1,11 @@ +CreateGitlabAccessTokenConnectionDetails +======================================== + +.. currentmodule:: oci.devops.models + +.. autoclass:: CreateGitlabAccessTokenConnectionDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.CreateGitlabTriggerDetails.rst b/docs/api/devops/models/oci.devops.models.CreateGitlabTriggerDetails.rst new file mode 100644 index 0000000000..0b9e11d3f1 --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.CreateGitlabTriggerDetails.rst @@ -0,0 +1,11 @@ +CreateGitlabTriggerDetails +========================== + +.. currentmodule:: oci.devops.models + +.. autoclass:: CreateGitlabTriggerDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.CreateRepositoryDetails.rst b/docs/api/devops/models/oci.devops.models.CreateRepositoryDetails.rst new file mode 100644 index 0000000000..0daba48438 --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.CreateRepositoryDetails.rst @@ -0,0 +1,11 @@ +CreateRepositoryDetails +======================= + +.. currentmodule:: oci.devops.models + +.. autoclass:: CreateRepositoryDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.CreateTriggerDeploymentStageDetails.rst b/docs/api/devops/models/oci.devops.models.CreateTriggerDeploymentStageDetails.rst new file mode 100644 index 0000000000..d88213865a --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.CreateTriggerDeploymentStageDetails.rst @@ -0,0 +1,11 @@ +CreateTriggerDeploymentStageDetails +=================================== + +.. currentmodule:: oci.devops.models + +.. autoclass:: CreateTriggerDeploymentStageDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.CreateTriggerDetails.rst b/docs/api/devops/models/oci.devops.models.CreateTriggerDetails.rst new file mode 100644 index 0000000000..2d8c10a181 --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.CreateTriggerDetails.rst @@ -0,0 +1,11 @@ +CreateTriggerDetails +==================== + +.. currentmodule:: oci.devops.models + +.. autoclass:: CreateTriggerDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.CreateWaitCriteriaDetails.rst b/docs/api/devops/models/oci.devops.models.CreateWaitCriteriaDetails.rst new file mode 100644 index 0000000000..30973ca594 --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.CreateWaitCriteriaDetails.rst @@ -0,0 +1,11 @@ +CreateWaitCriteriaDetails +========================= + +.. currentmodule:: oci.devops.models + +.. autoclass:: CreateWaitCriteriaDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.CreateWaitStageDetails.rst b/docs/api/devops/models/oci.devops.models.CreateWaitStageDetails.rst new file mode 100644 index 0000000000..26761eef18 --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.CreateWaitStageDetails.rst @@ -0,0 +1,11 @@ +CreateWaitStageDetails +====================== + +.. currentmodule:: oci.devops.models + +.. autoclass:: CreateWaitStageDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.DeliverArtifact.rst b/docs/api/devops/models/oci.devops.models.DeliverArtifact.rst new file mode 100644 index 0000000000..fdfbd3e16e --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.DeliverArtifact.rst @@ -0,0 +1,11 @@ +DeliverArtifact +=============== + +.. currentmodule:: oci.devops.models + +.. autoclass:: DeliverArtifact + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.DeliverArtifactCollection.rst b/docs/api/devops/models/oci.devops.models.DeliverArtifactCollection.rst new file mode 100644 index 0000000000..f93a3397f7 --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.DeliverArtifactCollection.rst @@ -0,0 +1,11 @@ +DeliverArtifactCollection +========================= + +.. currentmodule:: oci.devops.models + +.. autoclass:: DeliverArtifactCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.DeliverArtifactStage.rst b/docs/api/devops/models/oci.devops.models.DeliverArtifactStage.rst new file mode 100644 index 0000000000..4d35755db1 --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.DeliverArtifactStage.rst @@ -0,0 +1,11 @@ +DeliverArtifactStage +==================== + +.. currentmodule:: oci.devops.models + +.. autoclass:: DeliverArtifactStage + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.DeliverArtifactStageRunProgress.rst b/docs/api/devops/models/oci.devops.models.DeliverArtifactStageRunProgress.rst new file mode 100644 index 0000000000..9b1390b8cf --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.DeliverArtifactStageRunProgress.rst @@ -0,0 +1,11 @@ +DeliverArtifactStageRunProgress +=============================== + +.. currentmodule:: oci.devops.models + +.. autoclass:: DeliverArtifactStageRunProgress + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.DeliverArtifactStageSummary.rst b/docs/api/devops/models/oci.devops.models.DeliverArtifactStageSummary.rst new file mode 100644 index 0000000000..99babd2f03 --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.DeliverArtifactStageSummary.rst @@ -0,0 +1,11 @@ +DeliverArtifactStageSummary +=========================== + +.. currentmodule:: oci.devops.models + +.. autoclass:: DeliverArtifactStageSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.DeliveredArtifact.rst b/docs/api/devops/models/oci.devops.models.DeliveredArtifact.rst new file mode 100644 index 0000000000..7783cd78e7 --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.DeliveredArtifact.rst @@ -0,0 +1,11 @@ +DeliveredArtifact +================= + +.. currentmodule:: oci.devops.models + +.. autoclass:: DeliveredArtifact + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.DeliveredArtifactCollection.rst b/docs/api/devops/models/oci.devops.models.DeliveredArtifactCollection.rst new file mode 100644 index 0000000000..3ec00c390b --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.DeliveredArtifactCollection.rst @@ -0,0 +1,11 @@ +DeliveredArtifactCollection +=========================== + +.. currentmodule:: oci.devops.models + +.. autoclass:: DeliveredArtifactCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.DevopsCodeRepositoryBuildRunSource.rst b/docs/api/devops/models/oci.devops.models.DevopsCodeRepositoryBuildRunSource.rst new file mode 100644 index 0000000000..951ff9e16a --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.DevopsCodeRepositoryBuildRunSource.rst @@ -0,0 +1,11 @@ +DevopsCodeRepositoryBuildRunSource +================================== + +.. currentmodule:: oci.devops.models + +.. autoclass:: DevopsCodeRepositoryBuildRunSource + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.DevopsCodeRepositoryBuildSource.rst b/docs/api/devops/models/oci.devops.models.DevopsCodeRepositoryBuildSource.rst new file mode 100644 index 0000000000..f0f97e3f4a --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.DevopsCodeRepositoryBuildSource.rst @@ -0,0 +1,11 @@ +DevopsCodeRepositoryBuildSource +=============================== + +.. currentmodule:: oci.devops.models + +.. autoclass:: DevopsCodeRepositoryBuildSource + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.DevopsCodeRepositoryFilter.rst b/docs/api/devops/models/oci.devops.models.DevopsCodeRepositoryFilter.rst new file mode 100644 index 0000000000..dda403ff81 --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.DevopsCodeRepositoryFilter.rst @@ -0,0 +1,11 @@ +DevopsCodeRepositoryFilter +========================== + +.. currentmodule:: oci.devops.models + +.. autoclass:: DevopsCodeRepositoryFilter + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.DevopsCodeRepositoryFilterAttributes.rst b/docs/api/devops/models/oci.devops.models.DevopsCodeRepositoryFilterAttributes.rst new file mode 100644 index 0000000000..b8ac7d5de2 --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.DevopsCodeRepositoryFilterAttributes.rst @@ -0,0 +1,11 @@ +DevopsCodeRepositoryFilterAttributes +==================================== + +.. currentmodule:: oci.devops.models + +.. autoclass:: DevopsCodeRepositoryFilterAttributes + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.DevopsCodeRepositoryTrigger.rst b/docs/api/devops/models/oci.devops.models.DevopsCodeRepositoryTrigger.rst new file mode 100644 index 0000000000..f9473cb8e9 --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.DevopsCodeRepositoryTrigger.rst @@ -0,0 +1,11 @@ +DevopsCodeRepositoryTrigger +=========================== + +.. currentmodule:: oci.devops.models + +.. autoclass:: DevopsCodeRepositoryTrigger + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.DevopsCodeRepositoryTriggerCreateResult.rst b/docs/api/devops/models/oci.devops.models.DevopsCodeRepositoryTriggerCreateResult.rst new file mode 100644 index 0000000000..8c50a45068 --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.DevopsCodeRepositoryTriggerCreateResult.rst @@ -0,0 +1,11 @@ +DevopsCodeRepositoryTriggerCreateResult +======================================= + +.. currentmodule:: oci.devops.models + +.. autoclass:: DevopsCodeRepositoryTriggerCreateResult + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.DevopsCodeRepositoryTriggerSummary.rst b/docs/api/devops/models/oci.devops.models.DevopsCodeRepositoryTriggerSummary.rst new file mode 100644 index 0000000000..a1da08f505 --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.DevopsCodeRepositoryTriggerSummary.rst @@ -0,0 +1,11 @@ +DevopsCodeRepositoryTriggerSummary +================================== + +.. currentmodule:: oci.devops.models + +.. autoclass:: DevopsCodeRepositoryTriggerSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.DiffChunk.rst b/docs/api/devops/models/oci.devops.models.DiffChunk.rst new file mode 100644 index 0000000000..a66e5f23fe --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.DiffChunk.rst @@ -0,0 +1,11 @@ +DiffChunk +========= + +.. currentmodule:: oci.devops.models + +.. autoclass:: DiffChunk + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.DiffCollection.rst b/docs/api/devops/models/oci.devops.models.DiffCollection.rst new file mode 100644 index 0000000000..d219b6ac61 --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.DiffCollection.rst @@ -0,0 +1,11 @@ +DiffCollection +============== + +.. currentmodule:: oci.devops.models + +.. autoclass:: DiffCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.DiffLineDetails.rst b/docs/api/devops/models/oci.devops.models.DiffLineDetails.rst new file mode 100644 index 0000000000..87d022bee5 --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.DiffLineDetails.rst @@ -0,0 +1,11 @@ +DiffLineDetails +=============== + +.. currentmodule:: oci.devops.models + +.. autoclass:: DiffLineDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.DiffResponse.rst b/docs/api/devops/models/oci.devops.models.DiffResponse.rst new file mode 100644 index 0000000000..d2429cada6 --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.DiffResponse.rst @@ -0,0 +1,11 @@ +DiffResponse +============ + +.. currentmodule:: oci.devops.models + +.. autoclass:: DiffResponse + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.DiffResponseEntry.rst b/docs/api/devops/models/oci.devops.models.DiffResponseEntry.rst new file mode 100644 index 0000000000..d4a90bade1 --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.DiffResponseEntry.rst @@ -0,0 +1,11 @@ +DiffResponseEntry +================= + +.. currentmodule:: oci.devops.models + +.. autoclass:: DiffResponseEntry + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.DiffSection.rst b/docs/api/devops/models/oci.devops.models.DiffSection.rst new file mode 100644 index 0000000000..af14c7cc90 --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.DiffSection.rst @@ -0,0 +1,11 @@ +DiffSection +=========== + +.. currentmodule:: oci.devops.models + +.. autoclass:: DiffSection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.DiffSummary.rst b/docs/api/devops/models/oci.devops.models.DiffSummary.rst new file mode 100644 index 0000000000..31ff644927 --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.DiffSummary.rst @@ -0,0 +1,11 @@ +DiffSummary +=========== + +.. currentmodule:: oci.devops.models + +.. autoclass:: DiffSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.ExportedVariable.rst b/docs/api/devops/models/oci.devops.models.ExportedVariable.rst new file mode 100644 index 0000000000..bb4a8673cf --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.ExportedVariable.rst @@ -0,0 +1,11 @@ +ExportedVariable +================ + +.. currentmodule:: oci.devops.models + +.. autoclass:: ExportedVariable + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.ExportedVariableCollection.rst b/docs/api/devops/models/oci.devops.models.ExportedVariableCollection.rst new file mode 100644 index 0000000000..b71f65fb0a --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.ExportedVariableCollection.rst @@ -0,0 +1,11 @@ +ExportedVariableCollection +========================== + +.. currentmodule:: oci.devops.models + +.. autoclass:: ExportedVariableCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.FileDiffResponse.rst b/docs/api/devops/models/oci.devops.models.FileDiffResponse.rst new file mode 100644 index 0000000000..80c4e9eee7 --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.FileDiffResponse.rst @@ -0,0 +1,11 @@ +FileDiffResponse +================ + +.. currentmodule:: oci.devops.models + +.. autoclass:: FileDiffResponse + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.FileLineDetails.rst b/docs/api/devops/models/oci.devops.models.FileLineDetails.rst new file mode 100644 index 0000000000..342f93d8b2 --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.FileLineDetails.rst @@ -0,0 +1,11 @@ +FileLineDetails +=============== + +.. currentmodule:: oci.devops.models + +.. autoclass:: FileLineDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.Filter.rst b/docs/api/devops/models/oci.devops.models.Filter.rst new file mode 100644 index 0000000000..687733cb48 --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.Filter.rst @@ -0,0 +1,11 @@ +Filter +====== + +.. currentmodule:: oci.devops.models + +.. autoclass:: Filter + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.GenericDeliveredArtifact.rst b/docs/api/devops/models/oci.devops.models.GenericDeliveredArtifact.rst new file mode 100644 index 0000000000..89b79233e9 --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.GenericDeliveredArtifact.rst @@ -0,0 +1,11 @@ +GenericDeliveredArtifact +======================== + +.. currentmodule:: oci.devops.models + +.. autoclass:: GenericDeliveredArtifact + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.GithubAccessTokenConnection.rst b/docs/api/devops/models/oci.devops.models.GithubAccessTokenConnection.rst new file mode 100644 index 0000000000..ec545f5480 --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.GithubAccessTokenConnection.rst @@ -0,0 +1,11 @@ +GithubAccessTokenConnection +=========================== + +.. currentmodule:: oci.devops.models + +.. autoclass:: GithubAccessTokenConnection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.GithubAccessTokenConnectionSummary.rst b/docs/api/devops/models/oci.devops.models.GithubAccessTokenConnectionSummary.rst new file mode 100644 index 0000000000..fa5c8fa649 --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.GithubAccessTokenConnectionSummary.rst @@ -0,0 +1,11 @@ +GithubAccessTokenConnectionSummary +================================== + +.. currentmodule:: oci.devops.models + +.. autoclass:: GithubAccessTokenConnectionSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.GithubBuildRunSource.rst b/docs/api/devops/models/oci.devops.models.GithubBuildRunSource.rst new file mode 100644 index 0000000000..36b4460e57 --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.GithubBuildRunSource.rst @@ -0,0 +1,11 @@ +GithubBuildRunSource +==================== + +.. currentmodule:: oci.devops.models + +.. autoclass:: GithubBuildRunSource + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.GithubBuildSource.rst b/docs/api/devops/models/oci.devops.models.GithubBuildSource.rst new file mode 100644 index 0000000000..6a22bde8f9 --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.GithubBuildSource.rst @@ -0,0 +1,11 @@ +GithubBuildSource +================= + +.. currentmodule:: oci.devops.models + +.. autoclass:: GithubBuildSource + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.GithubFilter.rst b/docs/api/devops/models/oci.devops.models.GithubFilter.rst new file mode 100644 index 0000000000..1db141618a --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.GithubFilter.rst @@ -0,0 +1,11 @@ +GithubFilter +============ + +.. currentmodule:: oci.devops.models + +.. autoclass:: GithubFilter + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.GithubFilterAttributes.rst b/docs/api/devops/models/oci.devops.models.GithubFilterAttributes.rst new file mode 100644 index 0000000000..1251c36c33 --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.GithubFilterAttributes.rst @@ -0,0 +1,11 @@ +GithubFilterAttributes +====================== + +.. currentmodule:: oci.devops.models + +.. autoclass:: GithubFilterAttributes + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.GithubTrigger.rst b/docs/api/devops/models/oci.devops.models.GithubTrigger.rst new file mode 100644 index 0000000000..125897b827 --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.GithubTrigger.rst @@ -0,0 +1,11 @@ +GithubTrigger +============= + +.. currentmodule:: oci.devops.models + +.. autoclass:: GithubTrigger + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.GithubTriggerCreateResult.rst b/docs/api/devops/models/oci.devops.models.GithubTriggerCreateResult.rst new file mode 100644 index 0000000000..a271d15e5b --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.GithubTriggerCreateResult.rst @@ -0,0 +1,11 @@ +GithubTriggerCreateResult +========================= + +.. currentmodule:: oci.devops.models + +.. autoclass:: GithubTriggerCreateResult + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.GithubTriggerSummary.rst b/docs/api/devops/models/oci.devops.models.GithubTriggerSummary.rst new file mode 100644 index 0000000000..ca8121894c --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.GithubTriggerSummary.rst @@ -0,0 +1,11 @@ +GithubTriggerSummary +==================== + +.. currentmodule:: oci.devops.models + +.. autoclass:: GithubTriggerSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.GitlabAccessTokenConnection.rst b/docs/api/devops/models/oci.devops.models.GitlabAccessTokenConnection.rst new file mode 100644 index 0000000000..de90076aa4 --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.GitlabAccessTokenConnection.rst @@ -0,0 +1,11 @@ +GitlabAccessTokenConnection +=========================== + +.. currentmodule:: oci.devops.models + +.. autoclass:: GitlabAccessTokenConnection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.GitlabAccessTokenConnectionSummary.rst b/docs/api/devops/models/oci.devops.models.GitlabAccessTokenConnectionSummary.rst new file mode 100644 index 0000000000..33b8bfe756 --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.GitlabAccessTokenConnectionSummary.rst @@ -0,0 +1,11 @@ +GitlabAccessTokenConnectionSummary +================================== + +.. currentmodule:: oci.devops.models + +.. autoclass:: GitlabAccessTokenConnectionSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.GitlabBuildRunSource.rst b/docs/api/devops/models/oci.devops.models.GitlabBuildRunSource.rst new file mode 100644 index 0000000000..b2f1f0871b --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.GitlabBuildRunSource.rst @@ -0,0 +1,11 @@ +GitlabBuildRunSource +==================== + +.. currentmodule:: oci.devops.models + +.. autoclass:: GitlabBuildRunSource + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.GitlabBuildSource.rst b/docs/api/devops/models/oci.devops.models.GitlabBuildSource.rst new file mode 100644 index 0000000000..1a2f2f5f81 --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.GitlabBuildSource.rst @@ -0,0 +1,11 @@ +GitlabBuildSource +================= + +.. currentmodule:: oci.devops.models + +.. autoclass:: GitlabBuildSource + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.GitlabFilter.rst b/docs/api/devops/models/oci.devops.models.GitlabFilter.rst new file mode 100644 index 0000000000..5038756801 --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.GitlabFilter.rst @@ -0,0 +1,11 @@ +GitlabFilter +============ + +.. currentmodule:: oci.devops.models + +.. autoclass:: GitlabFilter + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.GitlabFilterAttributes.rst b/docs/api/devops/models/oci.devops.models.GitlabFilterAttributes.rst new file mode 100644 index 0000000000..1202877cbe --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.GitlabFilterAttributes.rst @@ -0,0 +1,11 @@ +GitlabFilterAttributes +====================== + +.. currentmodule:: oci.devops.models + +.. autoclass:: GitlabFilterAttributes + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.GitlabTrigger.rst b/docs/api/devops/models/oci.devops.models.GitlabTrigger.rst new file mode 100644 index 0000000000..6b6ebb174f --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.GitlabTrigger.rst @@ -0,0 +1,11 @@ +GitlabTrigger +============= + +.. currentmodule:: oci.devops.models + +.. autoclass:: GitlabTrigger + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.GitlabTriggerCreateResult.rst b/docs/api/devops/models/oci.devops.models.GitlabTriggerCreateResult.rst new file mode 100644 index 0000000000..8ddf01bd04 --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.GitlabTriggerCreateResult.rst @@ -0,0 +1,11 @@ +GitlabTriggerCreateResult +========================= + +.. currentmodule:: oci.devops.models + +.. autoclass:: GitlabTriggerCreateResult + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.GitlabTriggerSummary.rst b/docs/api/devops/models/oci.devops.models.GitlabTriggerSummary.rst new file mode 100644 index 0000000000..63894287cc --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.GitlabTriggerSummary.rst @@ -0,0 +1,11 @@ +GitlabTriggerSummary +==================== + +.. currentmodule:: oci.devops.models + +.. autoclass:: GitlabTriggerSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.ManualBuildRunSource.rst b/docs/api/devops/models/oci.devops.models.ManualBuildRunSource.rst new file mode 100644 index 0000000000..c4bee5e383 --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.ManualBuildRunSource.rst @@ -0,0 +1,11 @@ +ManualBuildRunSource +==================== + +.. currentmodule:: oci.devops.models + +.. autoclass:: ManualBuildRunSource + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.MirrorRepositoryConfig.rst b/docs/api/devops/models/oci.devops.models.MirrorRepositoryConfig.rst new file mode 100644 index 0000000000..428d9a4b5a --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.MirrorRepositoryConfig.rst @@ -0,0 +1,11 @@ +MirrorRepositoryConfig +====================== + +.. currentmodule:: oci.devops.models + +.. autoclass:: MirrorRepositoryConfig + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.PutRepositoryBranchDetails.rst b/docs/api/devops/models/oci.devops.models.PutRepositoryBranchDetails.rst new file mode 100644 index 0000000000..02cb4a6526 --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.PutRepositoryBranchDetails.rst @@ -0,0 +1,11 @@ +PutRepositoryBranchDetails +========================== + +.. currentmodule:: oci.devops.models + +.. autoclass:: PutRepositoryBranchDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.PutRepositoryRefDetails.rst b/docs/api/devops/models/oci.devops.models.PutRepositoryRefDetails.rst new file mode 100644 index 0000000000..84de22fd1a --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.PutRepositoryRefDetails.rst @@ -0,0 +1,11 @@ +PutRepositoryRefDetails +======================= + +.. currentmodule:: oci.devops.models + +.. autoclass:: PutRepositoryRefDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.PutRepositoryTagDetails.rst b/docs/api/devops/models/oci.devops.models.PutRepositoryTagDetails.rst new file mode 100644 index 0000000000..b8c20f55e5 --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.PutRepositoryTagDetails.rst @@ -0,0 +1,11 @@ +PutRepositoryTagDetails +======================= + +.. currentmodule:: oci.devops.models + +.. autoclass:: PutRepositoryTagDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.Repository.rst b/docs/api/devops/models/oci.devops.models.Repository.rst new file mode 100644 index 0000000000..2a1d5ff763 --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.Repository.rst @@ -0,0 +1,11 @@ +Repository +========== + +.. currentmodule:: oci.devops.models + +.. autoclass:: Repository + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.RepositoryAuthorCollection.rst b/docs/api/devops/models/oci.devops.models.RepositoryAuthorCollection.rst new file mode 100644 index 0000000000..81f68e6988 --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.RepositoryAuthorCollection.rst @@ -0,0 +1,11 @@ +RepositoryAuthorCollection +========================== + +.. currentmodule:: oci.devops.models + +.. autoclass:: RepositoryAuthorCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.RepositoryAuthorSummary.rst b/docs/api/devops/models/oci.devops.models.RepositoryAuthorSummary.rst new file mode 100644 index 0000000000..51c8b6d2a9 --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.RepositoryAuthorSummary.rst @@ -0,0 +1,11 @@ +RepositoryAuthorSummary +======================= + +.. currentmodule:: oci.devops.models + +.. autoclass:: RepositoryAuthorSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.RepositoryBranch.rst b/docs/api/devops/models/oci.devops.models.RepositoryBranch.rst new file mode 100644 index 0000000000..63529c59e3 --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.RepositoryBranch.rst @@ -0,0 +1,11 @@ +RepositoryBranch +================ + +.. currentmodule:: oci.devops.models + +.. autoclass:: RepositoryBranch + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.RepositoryBranchSummary.rst b/docs/api/devops/models/oci.devops.models.RepositoryBranchSummary.rst new file mode 100644 index 0000000000..cb68aaa933 --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.RepositoryBranchSummary.rst @@ -0,0 +1,11 @@ +RepositoryBranchSummary +======================= + +.. currentmodule:: oci.devops.models + +.. autoclass:: RepositoryBranchSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.RepositoryCollection.rst b/docs/api/devops/models/oci.devops.models.RepositoryCollection.rst new file mode 100644 index 0000000000..fb0c05927b --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.RepositoryCollection.rst @@ -0,0 +1,11 @@ +RepositoryCollection +==================== + +.. currentmodule:: oci.devops.models + +.. autoclass:: RepositoryCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.RepositoryCommit.rst b/docs/api/devops/models/oci.devops.models.RepositoryCommit.rst new file mode 100644 index 0000000000..f89a74238f --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.RepositoryCommit.rst @@ -0,0 +1,11 @@ +RepositoryCommit +================ + +.. currentmodule:: oci.devops.models + +.. autoclass:: RepositoryCommit + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.RepositoryCommitCollection.rst b/docs/api/devops/models/oci.devops.models.RepositoryCommitCollection.rst new file mode 100644 index 0000000000..17e53d23d9 --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.RepositoryCommitCollection.rst @@ -0,0 +1,11 @@ +RepositoryCommitCollection +========================== + +.. currentmodule:: oci.devops.models + +.. autoclass:: RepositoryCommitCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.RepositoryCommitSummary.rst b/docs/api/devops/models/oci.devops.models.RepositoryCommitSummary.rst new file mode 100644 index 0000000000..8b1f6f12c4 --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.RepositoryCommitSummary.rst @@ -0,0 +1,11 @@ +RepositoryCommitSummary +======================= + +.. currentmodule:: oci.devops.models + +.. autoclass:: RepositoryCommitSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.RepositoryFileLines.rst b/docs/api/devops/models/oci.devops.models.RepositoryFileLines.rst new file mode 100644 index 0000000000..3b38a5848b --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.RepositoryFileLines.rst @@ -0,0 +1,11 @@ +RepositoryFileLines +=================== + +.. currentmodule:: oci.devops.models + +.. autoclass:: RepositoryFileLines + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.RepositoryMirrorRecord.rst b/docs/api/devops/models/oci.devops.models.RepositoryMirrorRecord.rst new file mode 100644 index 0000000000..ca00d4e731 --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.RepositoryMirrorRecord.rst @@ -0,0 +1,11 @@ +RepositoryMirrorRecord +====================== + +.. currentmodule:: oci.devops.models + +.. autoclass:: RepositoryMirrorRecord + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.RepositoryMirrorRecordCollection.rst b/docs/api/devops/models/oci.devops.models.RepositoryMirrorRecordCollection.rst new file mode 100644 index 0000000000..d923e16007 --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.RepositoryMirrorRecordCollection.rst @@ -0,0 +1,11 @@ +RepositoryMirrorRecordCollection +================================ + +.. currentmodule:: oci.devops.models + +.. autoclass:: RepositoryMirrorRecordCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.RepositoryMirrorRecordSummary.rst b/docs/api/devops/models/oci.devops.models.RepositoryMirrorRecordSummary.rst new file mode 100644 index 0000000000..8add8b93cf --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.RepositoryMirrorRecordSummary.rst @@ -0,0 +1,11 @@ +RepositoryMirrorRecordSummary +============================= + +.. currentmodule:: oci.devops.models + +.. autoclass:: RepositoryMirrorRecordSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.RepositoryObject.rst b/docs/api/devops/models/oci.devops.models.RepositoryObject.rst new file mode 100644 index 0000000000..6af706d91b --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.RepositoryObject.rst @@ -0,0 +1,11 @@ +RepositoryObject +================ + +.. currentmodule:: oci.devops.models + +.. autoclass:: RepositoryObject + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.RepositoryPathCollection.rst b/docs/api/devops/models/oci.devops.models.RepositoryPathCollection.rst new file mode 100644 index 0000000000..4fc3541d1e --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.RepositoryPathCollection.rst @@ -0,0 +1,11 @@ +RepositoryPathCollection +======================== + +.. currentmodule:: oci.devops.models + +.. autoclass:: RepositoryPathCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.RepositoryPathSummary.rst b/docs/api/devops/models/oci.devops.models.RepositoryPathSummary.rst new file mode 100644 index 0000000000..f8047f88ca --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.RepositoryPathSummary.rst @@ -0,0 +1,11 @@ +RepositoryPathSummary +===================== + +.. currentmodule:: oci.devops.models + +.. autoclass:: RepositoryPathSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.RepositoryRef.rst b/docs/api/devops/models/oci.devops.models.RepositoryRef.rst new file mode 100644 index 0000000000..656ecea155 --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.RepositoryRef.rst @@ -0,0 +1,11 @@ +RepositoryRef +============= + +.. currentmodule:: oci.devops.models + +.. autoclass:: RepositoryRef + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.RepositoryRefCollection.rst b/docs/api/devops/models/oci.devops.models.RepositoryRefCollection.rst new file mode 100644 index 0000000000..fc99cbee32 --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.RepositoryRefCollection.rst @@ -0,0 +1,11 @@ +RepositoryRefCollection +======================= + +.. currentmodule:: oci.devops.models + +.. autoclass:: RepositoryRefCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.RepositoryRefSummary.rst b/docs/api/devops/models/oci.devops.models.RepositoryRefSummary.rst new file mode 100644 index 0000000000..47692e4c4a --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.RepositoryRefSummary.rst @@ -0,0 +1,11 @@ +RepositoryRefSummary +==================== + +.. currentmodule:: oci.devops.models + +.. autoclass:: RepositoryRefSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.RepositorySummary.rst b/docs/api/devops/models/oci.devops.models.RepositorySummary.rst new file mode 100644 index 0000000000..9f5760722a --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.RepositorySummary.rst @@ -0,0 +1,11 @@ +RepositorySummary +================= + +.. currentmodule:: oci.devops.models + +.. autoclass:: RepositorySummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.RepositoryTag.rst b/docs/api/devops/models/oci.devops.models.RepositoryTag.rst new file mode 100644 index 0000000000..2a04f2f829 --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.RepositoryTag.rst @@ -0,0 +1,11 @@ +RepositoryTag +============= + +.. currentmodule:: oci.devops.models + +.. autoclass:: RepositoryTag + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.RepositoryTagSummary.rst b/docs/api/devops/models/oci.devops.models.RepositoryTagSummary.rst new file mode 100644 index 0000000000..3981c817f4 --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.RepositoryTagSummary.rst @@ -0,0 +1,11 @@ +RepositoryTagSummary +==================== + +.. currentmodule:: oci.devops.models + +.. autoclass:: RepositoryTagSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.RunValidationTestOnComputeInstanceDeployStageExecutionProgress.rst b/docs/api/devops/models/oci.devops.models.RunValidationTestOnComputeInstanceDeployStageExecutionProgress.rst deleted file mode 100644 index dfd4825545..0000000000 --- a/docs/api/devops/models/oci.devops.models.RunValidationTestOnComputeInstanceDeployStageExecutionProgress.rst +++ /dev/null @@ -1,11 +0,0 @@ -RunValidationTestOnComputeInstanceDeployStageExecutionProgress -============================================================== - -.. currentmodule:: oci.devops.models - -.. autoclass:: RunValidationTestOnComputeInstanceDeployStageExecutionProgress - :show-inheritance: - :special-members: __init__ - :members: - :undoc-members: - :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.Trigger.rst b/docs/api/devops/models/oci.devops.models.Trigger.rst new file mode 100644 index 0000000000..2116550185 --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.Trigger.rst @@ -0,0 +1,11 @@ +Trigger +======= + +.. currentmodule:: oci.devops.models + +.. autoclass:: Trigger + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.TriggerAction.rst b/docs/api/devops/models/oci.devops.models.TriggerAction.rst new file mode 100644 index 0000000000..d6f3722b6a --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.TriggerAction.rst @@ -0,0 +1,11 @@ +TriggerAction +============= + +.. currentmodule:: oci.devops.models + +.. autoclass:: TriggerAction + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.TriggerBuildPipelineAction.rst b/docs/api/devops/models/oci.devops.models.TriggerBuildPipelineAction.rst new file mode 100644 index 0000000000..0a55bbbdb8 --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.TriggerBuildPipelineAction.rst @@ -0,0 +1,11 @@ +TriggerBuildPipelineAction +========================== + +.. currentmodule:: oci.devops.models + +.. autoclass:: TriggerBuildPipelineAction + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.TriggerCollection.rst b/docs/api/devops/models/oci.devops.models.TriggerCollection.rst new file mode 100644 index 0000000000..4356c2080a --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.TriggerCollection.rst @@ -0,0 +1,11 @@ +TriggerCollection +================= + +.. currentmodule:: oci.devops.models + +.. autoclass:: TriggerCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.TriggerCreateResult.rst b/docs/api/devops/models/oci.devops.models.TriggerCreateResult.rst new file mode 100644 index 0000000000..7b44f5a1a9 --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.TriggerCreateResult.rst @@ -0,0 +1,11 @@ +TriggerCreateResult +=================== + +.. currentmodule:: oci.devops.models + +.. autoclass:: TriggerCreateResult + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.TriggerDeploymentPipelineStageRunProgress.rst b/docs/api/devops/models/oci.devops.models.TriggerDeploymentPipelineStageRunProgress.rst new file mode 100644 index 0000000000..c8d377d7f0 --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.TriggerDeploymentPipelineStageRunProgress.rst @@ -0,0 +1,11 @@ +TriggerDeploymentPipelineStageRunProgress +========================================= + +.. currentmodule:: oci.devops.models + +.. autoclass:: TriggerDeploymentPipelineStageRunProgress + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.TriggerDeploymentStage.rst b/docs/api/devops/models/oci.devops.models.TriggerDeploymentStage.rst new file mode 100644 index 0000000000..f97739dbb1 --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.TriggerDeploymentStage.rst @@ -0,0 +1,11 @@ +TriggerDeploymentStage +====================== + +.. currentmodule:: oci.devops.models + +.. autoclass:: TriggerDeploymentStage + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.TriggerDeploymentStageSummary.rst b/docs/api/devops/models/oci.devops.models.TriggerDeploymentStageSummary.rst new file mode 100644 index 0000000000..4ed263045e --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.TriggerDeploymentStageSummary.rst @@ -0,0 +1,11 @@ +TriggerDeploymentStageSummary +============================= + +.. currentmodule:: oci.devops.models + +.. autoclass:: TriggerDeploymentStageSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.TriggerInfo.rst b/docs/api/devops/models/oci.devops.models.TriggerInfo.rst new file mode 100644 index 0000000000..e88253992a --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.TriggerInfo.rst @@ -0,0 +1,11 @@ +TriggerInfo +=========== + +.. currentmodule:: oci.devops.models + +.. autoclass:: TriggerInfo + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.TriggerSchedule.rst b/docs/api/devops/models/oci.devops.models.TriggerSchedule.rst new file mode 100644 index 0000000000..3c298e7f4b --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.TriggerSchedule.rst @@ -0,0 +1,11 @@ +TriggerSchedule +=============== + +.. currentmodule:: oci.devops.models + +.. autoclass:: TriggerSchedule + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.TriggerSummary.rst b/docs/api/devops/models/oci.devops.models.TriggerSummary.rst new file mode 100644 index 0000000000..8a7cb26cb7 --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.TriggerSummary.rst @@ -0,0 +1,11 @@ +TriggerSummary +============== + +.. currentmodule:: oci.devops.models + +.. autoclass:: TriggerSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.UpdateAbsoluteWaitCriteriaDetails.rst b/docs/api/devops/models/oci.devops.models.UpdateAbsoluteWaitCriteriaDetails.rst new file mode 100644 index 0000000000..20cdc3c7cd --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.UpdateAbsoluteWaitCriteriaDetails.rst @@ -0,0 +1,11 @@ +UpdateAbsoluteWaitCriteriaDetails +================================= + +.. currentmodule:: oci.devops.models + +.. autoclass:: UpdateAbsoluteWaitCriteriaDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.UpdateBuildPipelineDetails.rst b/docs/api/devops/models/oci.devops.models.UpdateBuildPipelineDetails.rst new file mode 100644 index 0000000000..36b4da3276 --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.UpdateBuildPipelineDetails.rst @@ -0,0 +1,11 @@ +UpdateBuildPipelineDetails +========================== + +.. currentmodule:: oci.devops.models + +.. autoclass:: UpdateBuildPipelineDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.UpdateBuildPipelineStageDetails.rst b/docs/api/devops/models/oci.devops.models.UpdateBuildPipelineStageDetails.rst new file mode 100644 index 0000000000..a245438bc7 --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.UpdateBuildPipelineStageDetails.rst @@ -0,0 +1,11 @@ +UpdateBuildPipelineStageDetails +=============================== + +.. currentmodule:: oci.devops.models + +.. autoclass:: UpdateBuildPipelineStageDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.UpdateBuildRunDetails.rst b/docs/api/devops/models/oci.devops.models.UpdateBuildRunDetails.rst new file mode 100644 index 0000000000..8669b69135 --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.UpdateBuildRunDetails.rst @@ -0,0 +1,11 @@ +UpdateBuildRunDetails +===================== + +.. currentmodule:: oci.devops.models + +.. autoclass:: UpdateBuildRunDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.UpdateBuildStageDetails.rst b/docs/api/devops/models/oci.devops.models.UpdateBuildStageDetails.rst new file mode 100644 index 0000000000..9846c85340 --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.UpdateBuildStageDetails.rst @@ -0,0 +1,11 @@ +UpdateBuildStageDetails +======================= + +.. currentmodule:: oci.devops.models + +.. autoclass:: UpdateBuildStageDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.UpdateConnectionDetails.rst b/docs/api/devops/models/oci.devops.models.UpdateConnectionDetails.rst new file mode 100644 index 0000000000..e3a840a88f --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.UpdateConnectionDetails.rst @@ -0,0 +1,11 @@ +UpdateConnectionDetails +======================= + +.. currentmodule:: oci.devops.models + +.. autoclass:: UpdateConnectionDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.UpdateDeliverArtifactStageDetails.rst b/docs/api/devops/models/oci.devops.models.UpdateDeliverArtifactStageDetails.rst new file mode 100644 index 0000000000..a782e8410e --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.UpdateDeliverArtifactStageDetails.rst @@ -0,0 +1,11 @@ +UpdateDeliverArtifactStageDetails +================================= + +.. currentmodule:: oci.devops.models + +.. autoclass:: UpdateDeliverArtifactStageDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.UpdateDevopsCodeRepositoryTriggerDetails.rst b/docs/api/devops/models/oci.devops.models.UpdateDevopsCodeRepositoryTriggerDetails.rst new file mode 100644 index 0000000000..2572ae4ced --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.UpdateDevopsCodeRepositoryTriggerDetails.rst @@ -0,0 +1,11 @@ +UpdateDevopsCodeRepositoryTriggerDetails +======================================== + +.. currentmodule:: oci.devops.models + +.. autoclass:: UpdateDevopsCodeRepositoryTriggerDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.UpdateGithubAccessTokenConnectionDetails.rst b/docs/api/devops/models/oci.devops.models.UpdateGithubAccessTokenConnectionDetails.rst new file mode 100644 index 0000000000..ee50f66ef8 --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.UpdateGithubAccessTokenConnectionDetails.rst @@ -0,0 +1,11 @@ +UpdateGithubAccessTokenConnectionDetails +======================================== + +.. currentmodule:: oci.devops.models + +.. autoclass:: UpdateGithubAccessTokenConnectionDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.UpdateGithubTriggerDetails.rst b/docs/api/devops/models/oci.devops.models.UpdateGithubTriggerDetails.rst new file mode 100644 index 0000000000..212e138d43 --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.UpdateGithubTriggerDetails.rst @@ -0,0 +1,11 @@ +UpdateGithubTriggerDetails +========================== + +.. currentmodule:: oci.devops.models + +.. autoclass:: UpdateGithubTriggerDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.UpdateGitlabAccessTokenConnectionDetails.rst b/docs/api/devops/models/oci.devops.models.UpdateGitlabAccessTokenConnectionDetails.rst new file mode 100644 index 0000000000..2d6615ef05 --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.UpdateGitlabAccessTokenConnectionDetails.rst @@ -0,0 +1,11 @@ +UpdateGitlabAccessTokenConnectionDetails +======================================== + +.. currentmodule:: oci.devops.models + +.. autoclass:: UpdateGitlabAccessTokenConnectionDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.UpdateGitlabTriggerDetails.rst b/docs/api/devops/models/oci.devops.models.UpdateGitlabTriggerDetails.rst new file mode 100644 index 0000000000..340226f04d --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.UpdateGitlabTriggerDetails.rst @@ -0,0 +1,11 @@ +UpdateGitlabTriggerDetails +========================== + +.. currentmodule:: oci.devops.models + +.. autoclass:: UpdateGitlabTriggerDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.UpdateRepositoryDetails.rst b/docs/api/devops/models/oci.devops.models.UpdateRepositoryDetails.rst new file mode 100644 index 0000000000..03b2bce9ff --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.UpdateRepositoryDetails.rst @@ -0,0 +1,11 @@ +UpdateRepositoryDetails +======================= + +.. currentmodule:: oci.devops.models + +.. autoclass:: UpdateRepositoryDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.UpdateTriggerDeploymentStageDetails.rst b/docs/api/devops/models/oci.devops.models.UpdateTriggerDeploymentStageDetails.rst new file mode 100644 index 0000000000..8a18071bd8 --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.UpdateTriggerDeploymentStageDetails.rst @@ -0,0 +1,11 @@ +UpdateTriggerDeploymentStageDetails +=================================== + +.. currentmodule:: oci.devops.models + +.. autoclass:: UpdateTriggerDeploymentStageDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.UpdateTriggerDetails.rst b/docs/api/devops/models/oci.devops.models.UpdateTriggerDetails.rst new file mode 100644 index 0000000000..8e583178db --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.UpdateTriggerDetails.rst @@ -0,0 +1,11 @@ +UpdateTriggerDetails +==================== + +.. currentmodule:: oci.devops.models + +.. autoclass:: UpdateTriggerDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.UpdateWaitCriteriaDetails.rst b/docs/api/devops/models/oci.devops.models.UpdateWaitCriteriaDetails.rst new file mode 100644 index 0000000000..70ee82a8e8 --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.UpdateWaitCriteriaDetails.rst @@ -0,0 +1,11 @@ +UpdateWaitCriteriaDetails +========================= + +.. currentmodule:: oci.devops.models + +.. autoclass:: UpdateWaitCriteriaDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.UpdateWaitStageDetails.rst b/docs/api/devops/models/oci.devops.models.UpdateWaitStageDetails.rst new file mode 100644 index 0000000000..e099ab1989 --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.UpdateWaitStageDetails.rst @@ -0,0 +1,11 @@ +UpdateWaitStageDetails +====================== + +.. currentmodule:: oci.devops.models + +.. autoclass:: UpdateWaitStageDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.WaitStage.rst b/docs/api/devops/models/oci.devops.models.WaitStage.rst new file mode 100644 index 0000000000..b9db4ca1c8 --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.WaitStage.rst @@ -0,0 +1,11 @@ +WaitStage +========= + +.. currentmodule:: oci.devops.models + +.. autoclass:: WaitStage + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.WaitStageRunProgress.rst b/docs/api/devops/models/oci.devops.models.WaitStageRunProgress.rst new file mode 100644 index 0000000000..3c97c80ea2 --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.WaitStageRunProgress.rst @@ -0,0 +1,11 @@ +WaitStageRunProgress +==================== + +.. currentmodule:: oci.devops.models + +.. autoclass:: WaitStageRunProgress + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.WaitStageSummary.rst b/docs/api/devops/models/oci.devops.models.WaitStageSummary.rst new file mode 100644 index 0000000000..60b67a323c --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.WaitStageSummary.rst @@ -0,0 +1,11 @@ +WaitStageSummary +================ + +.. currentmodule:: oci.devops.models + +.. autoclass:: WaitStageSummary + :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 8f9e206bf1..094874d065 100644 --- a/docs/api/landing.rst +++ b/docs/api/landing.rst @@ -25,6 +25,8 @@ API Reference * :doc:`Bds ` * :doc:`Blockchain Platform ` * :doc:`Budget ` +* :doc:`Certificates ` +* :doc:`Certificates Management ` * :doc:`Incident ` * :doc:`User ` * :doc:`Cloud Guard ` @@ -118,8 +120,10 @@ API Reference * :doc:`Domain Governance ` * :doc:`Link ` * :doc:`Orders ` +* :doc:`Organization ` * :doc:`Recipient Invitation ` * :doc:`Sender Invitation ` +* :doc:`Subscription ` * :doc:`Work Request ` * :doc:`Usageapi ` * :doc:`Vaults ` @@ -164,6 +168,8 @@ API Reference bds blockchain budget + certificates + certificates_management cims cloud_guard compute_instance_agent diff --git a/docs/api/opsi.rst b/docs/api/opsi.rst index d4a7f16933..686c7da295 100644 --- a/docs/api/opsi.rst +++ b/docs/api/opsi.rst @@ -18,16 +18,23 @@ Opsi :nosignatures: :template: autosummary/model_class.rst + oci.opsi.models.AddEmManagedExternalExadataInsightMembersDetails + oci.opsi.models.AddExadataInsightMembersDetails oci.opsi.models.AutonomousDatabaseConfigurationSummary oci.opsi.models.AutonomousDatabaseInsight oci.opsi.models.AutonomousDatabaseInsightSummary oci.opsi.models.ChangeDatabaseInsightCompartmentDetails oci.opsi.models.ChangeEnterpriseManagerBridgeCompartmentDetails + oci.opsi.models.ChangeExadataInsightCompartmentDetails oci.opsi.models.ChangeHostInsightCompartmentDetails oci.opsi.models.ConnectionDetails oci.opsi.models.CreateDatabaseInsightDetails oci.opsi.models.CreateEmManagedExternalDatabaseInsightDetails + oci.opsi.models.CreateEmManagedExternalExadataInsightDetails + oci.opsi.models.CreateEmManagedExternalExadataMemberEntityDetails + oci.opsi.models.CreateEmManagedExternalHostInsightDetails oci.opsi.models.CreateEnterpriseManagerBridgeDetails + oci.opsi.models.CreateExadataInsightDetails oci.opsi.models.CreateHostInsightDetails oci.opsi.models.CreateMacsManagedExternalHostInsightDetails oci.opsi.models.CredentialDetails @@ -43,19 +50,50 @@ Opsi oci.opsi.models.DatabaseInsightSummary oci.opsi.models.DatabaseInsights oci.opsi.models.DatabaseInsightsCollection + oci.opsi.models.DiskGroupDetails oci.opsi.models.EmManagedExternalDatabaseConfigurationSummary oci.opsi.models.EmManagedExternalDatabaseInsight oci.opsi.models.EmManagedExternalDatabaseInsightSummary + oci.opsi.models.EmManagedExternalExadataInsight + oci.opsi.models.EmManagedExternalExadataInsightSummary + oci.opsi.models.EmManagedExternalHostConfigurationSummary + oci.opsi.models.EmManagedExternalHostInsight + oci.opsi.models.EmManagedExternalHostInsightSummary oci.opsi.models.EnableDatabaseInsightDetails oci.opsi.models.EnableEmManagedExternalDatabaseInsightDetails + oci.opsi.models.EnableEmManagedExternalExadataInsightDetails + oci.opsi.models.EnableEmManagedExternalHostInsightDetails + oci.opsi.models.EnableExadataInsightDetails oci.opsi.models.EnableHostInsightDetails oci.opsi.models.EnableMacsManagedExternalHostInsightDetails oci.opsi.models.EnterpriseManagerBridge oci.opsi.models.EnterpriseManagerBridgeCollection oci.opsi.models.EnterpriseManagerBridgeSummary oci.opsi.models.EnterpriseManagerBridges + oci.opsi.models.ExadataConfigurationCollection + oci.opsi.models.ExadataConfigurationSummary + oci.opsi.models.ExadataDatabaseMachineConfigurationSummary + oci.opsi.models.ExadataDatabaseStatisticsSummary + oci.opsi.models.ExadataDetails + oci.opsi.models.ExadataDiskgroupStatisticsSummary + oci.opsi.models.ExadataHostStatisticsSummary + oci.opsi.models.ExadataInsight + oci.opsi.models.ExadataInsightResourceCapacityTrendAggregation + oci.opsi.models.ExadataInsightResourceCapacityTrendSummary + oci.opsi.models.ExadataInsightResourceForecastTrendSummary + oci.opsi.models.ExadataInsightResourceInsightUtilizationItem + oci.opsi.models.ExadataInsightResourceStatistics + oci.opsi.models.ExadataInsightResourceStatisticsAggregation + oci.opsi.models.ExadataInsightSummary + oci.opsi.models.ExadataInsightSummaryCollection + oci.opsi.models.ExadataInsights + oci.opsi.models.ExadataMemberCollection + oci.opsi.models.ExadataMemberSummary + oci.opsi.models.ExadataStorageServerStatisticsSummary oci.opsi.models.HistoricalDataItem + oci.opsi.models.HostConfigurationCollection oci.opsi.models.HostConfigurationMetricGroup + oci.opsi.models.HostConfigurationSummary oci.opsi.models.HostCpuHardwareConfiguration oci.opsi.models.HostCpuStatistics oci.opsi.models.HostCpuUsage @@ -97,9 +135,11 @@ Opsi oci.opsi.models.IngestSqlPlanLinesResponseDetails oci.opsi.models.IngestSqlTextDetails oci.opsi.models.IngestSqlTextResponseDetails + oci.opsi.models.InstanceMetrics oci.opsi.models.MacsManagedExternalDatabaseConfigurationSummary oci.opsi.models.MacsManagedExternalDatabaseInsight oci.opsi.models.MacsManagedExternalDatabaseInsightSummary + oci.opsi.models.MacsManagedExternalHostConfigurationSummary oci.opsi.models.MacsManagedExternalHostInsight oci.opsi.models.MacsManagedExternalHostInsightSummary oci.opsi.models.ProjectedDataItem @@ -109,6 +149,7 @@ Opsi oci.opsi.models.ResourceInsightProjectedUtilizationItem oci.opsi.models.ResourceStatistics oci.opsi.models.ResourceStatisticsAggregation + oci.opsi.models.ResourceUsageSummary oci.opsi.models.ResourceUsageTrendAggregation oci.opsi.models.SqlBucket oci.opsi.models.SqlInsightAggregation @@ -136,6 +177,7 @@ Opsi oci.opsi.models.SqlText oci.opsi.models.SqlTextCollection oci.opsi.models.SqlTextSummary + oci.opsi.models.StorageServerDetails oci.opsi.models.SummarizeDatabaseInsightResourceCapacityTrendAggregationCollection oci.opsi.models.SummarizeDatabaseInsightResourceForecastTrendAggregation oci.opsi.models.SummarizeDatabaseInsightResourceStatisticsAggregationCollection @@ -143,6 +185,14 @@ Opsi oci.opsi.models.SummarizeDatabaseInsightResourceUsageTrendAggregationCollection oci.opsi.models.SummarizeDatabaseInsightResourceUtilizationInsightAggregation oci.opsi.models.SummarizeDatabaseInsightTablespaceUsageTrendAggregationCollection + oci.opsi.models.SummarizeExadataInsightResourceCapacityTrendAggregation + oci.opsi.models.SummarizeExadataInsightResourceCapacityTrendCollection + oci.opsi.models.SummarizeExadataInsightResourceForecastTrendAggregation + oci.opsi.models.SummarizeExadataInsightResourceForecastTrendCollection + oci.opsi.models.SummarizeExadataInsightResourceStatisticsAggregationCollection + oci.opsi.models.SummarizeExadataInsightResourceUsageAggregation + oci.opsi.models.SummarizeExadataInsightResourceUsageCollection + oci.opsi.models.SummarizeExadataInsightResourceUtilizationInsightAggregation oci.opsi.models.SummarizeHostInsightResourceCapacityTrendAggregationCollection oci.opsi.models.SummarizeHostInsightResourceForecastTrendAggregation oci.opsi.models.SummarizeHostInsightResourceStatisticsAggregationCollection @@ -155,7 +205,10 @@ Opsi oci.opsi.models.UpdateAutonomousDatabaseInsightDetails oci.opsi.models.UpdateDatabaseInsightDetails oci.opsi.models.UpdateEmManagedExternalDatabaseInsightDetails + oci.opsi.models.UpdateEmManagedExternalExadataInsightDetails + oci.opsi.models.UpdateEmManagedExternalHostInsightDetails oci.opsi.models.UpdateEnterpriseManagerBridgeDetails + oci.opsi.models.UpdateExadataInsightDetails oci.opsi.models.UpdateHostInsightDetails oci.opsi.models.UpdateMacsManagedExternalDatabaseInsightDetails oci.opsi.models.UpdateMacsManagedExternalHostInsightDetails diff --git a/docs/api/opsi/models/oci.opsi.models.AddEmManagedExternalExadataInsightMembersDetails.rst b/docs/api/opsi/models/oci.opsi.models.AddEmManagedExternalExadataInsightMembersDetails.rst new file mode 100644 index 0000000000..f79de003a2 --- /dev/null +++ b/docs/api/opsi/models/oci.opsi.models.AddEmManagedExternalExadataInsightMembersDetails.rst @@ -0,0 +1,11 @@ +AddEmManagedExternalExadataInsightMembersDetails +================================================ + +.. currentmodule:: oci.opsi.models + +.. autoclass:: AddEmManagedExternalExadataInsightMembersDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/opsi/models/oci.opsi.models.AddExadataInsightMembersDetails.rst b/docs/api/opsi/models/oci.opsi.models.AddExadataInsightMembersDetails.rst new file mode 100644 index 0000000000..592badc829 --- /dev/null +++ b/docs/api/opsi/models/oci.opsi.models.AddExadataInsightMembersDetails.rst @@ -0,0 +1,11 @@ +AddExadataInsightMembersDetails +=============================== + +.. currentmodule:: oci.opsi.models + +.. autoclass:: AddExadataInsightMembersDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/opsi/models/oci.opsi.models.ChangeExadataInsightCompartmentDetails.rst b/docs/api/opsi/models/oci.opsi.models.ChangeExadataInsightCompartmentDetails.rst new file mode 100644 index 0000000000..bd810add19 --- /dev/null +++ b/docs/api/opsi/models/oci.opsi.models.ChangeExadataInsightCompartmentDetails.rst @@ -0,0 +1,11 @@ +ChangeExadataInsightCompartmentDetails +====================================== + +.. currentmodule:: oci.opsi.models + +.. autoclass:: ChangeExadataInsightCompartmentDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/opsi/models/oci.opsi.models.CreateEmManagedExternalExadataInsightDetails.rst b/docs/api/opsi/models/oci.opsi.models.CreateEmManagedExternalExadataInsightDetails.rst new file mode 100644 index 0000000000..e60e6268c7 --- /dev/null +++ b/docs/api/opsi/models/oci.opsi.models.CreateEmManagedExternalExadataInsightDetails.rst @@ -0,0 +1,11 @@ +CreateEmManagedExternalExadataInsightDetails +============================================ + +.. currentmodule:: oci.opsi.models + +.. autoclass:: CreateEmManagedExternalExadataInsightDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/opsi/models/oci.opsi.models.CreateEmManagedExternalExadataMemberEntityDetails.rst b/docs/api/opsi/models/oci.opsi.models.CreateEmManagedExternalExadataMemberEntityDetails.rst new file mode 100644 index 0000000000..190bcd80a4 --- /dev/null +++ b/docs/api/opsi/models/oci.opsi.models.CreateEmManagedExternalExadataMemberEntityDetails.rst @@ -0,0 +1,11 @@ +CreateEmManagedExternalExadataMemberEntityDetails +================================================= + +.. currentmodule:: oci.opsi.models + +.. autoclass:: CreateEmManagedExternalExadataMemberEntityDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/opsi/models/oci.opsi.models.CreateEmManagedExternalHostInsightDetails.rst b/docs/api/opsi/models/oci.opsi.models.CreateEmManagedExternalHostInsightDetails.rst new file mode 100644 index 0000000000..c79a701c12 --- /dev/null +++ b/docs/api/opsi/models/oci.opsi.models.CreateEmManagedExternalHostInsightDetails.rst @@ -0,0 +1,11 @@ +CreateEmManagedExternalHostInsightDetails +========================================= + +.. currentmodule:: oci.opsi.models + +.. autoclass:: CreateEmManagedExternalHostInsightDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/opsi/models/oci.opsi.models.CreateExadataInsightDetails.rst b/docs/api/opsi/models/oci.opsi.models.CreateExadataInsightDetails.rst new file mode 100644 index 0000000000..b83c1450eb --- /dev/null +++ b/docs/api/opsi/models/oci.opsi.models.CreateExadataInsightDetails.rst @@ -0,0 +1,11 @@ +CreateExadataInsightDetails +=========================== + +.. currentmodule:: oci.opsi.models + +.. autoclass:: CreateExadataInsightDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/opsi/models/oci.opsi.models.DiskGroupDetails.rst b/docs/api/opsi/models/oci.opsi.models.DiskGroupDetails.rst new file mode 100644 index 0000000000..9481187001 --- /dev/null +++ b/docs/api/opsi/models/oci.opsi.models.DiskGroupDetails.rst @@ -0,0 +1,11 @@ +DiskGroupDetails +================ + +.. currentmodule:: oci.opsi.models + +.. autoclass:: DiskGroupDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/opsi/models/oci.opsi.models.EmManagedExternalExadataInsight.rst b/docs/api/opsi/models/oci.opsi.models.EmManagedExternalExadataInsight.rst new file mode 100644 index 0000000000..6c8fded939 --- /dev/null +++ b/docs/api/opsi/models/oci.opsi.models.EmManagedExternalExadataInsight.rst @@ -0,0 +1,11 @@ +EmManagedExternalExadataInsight +=============================== + +.. currentmodule:: oci.opsi.models + +.. autoclass:: EmManagedExternalExadataInsight + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/opsi/models/oci.opsi.models.EmManagedExternalExadataInsightSummary.rst b/docs/api/opsi/models/oci.opsi.models.EmManagedExternalExadataInsightSummary.rst new file mode 100644 index 0000000000..5c6c49b8a9 --- /dev/null +++ b/docs/api/opsi/models/oci.opsi.models.EmManagedExternalExadataInsightSummary.rst @@ -0,0 +1,11 @@ +EmManagedExternalExadataInsightSummary +====================================== + +.. currentmodule:: oci.opsi.models + +.. autoclass:: EmManagedExternalExadataInsightSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/opsi/models/oci.opsi.models.EmManagedExternalHostConfigurationSummary.rst b/docs/api/opsi/models/oci.opsi.models.EmManagedExternalHostConfigurationSummary.rst new file mode 100644 index 0000000000..b2e1e9481b --- /dev/null +++ b/docs/api/opsi/models/oci.opsi.models.EmManagedExternalHostConfigurationSummary.rst @@ -0,0 +1,11 @@ +EmManagedExternalHostConfigurationSummary +========================================= + +.. currentmodule:: oci.opsi.models + +.. autoclass:: EmManagedExternalHostConfigurationSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/opsi/models/oci.opsi.models.EmManagedExternalHostInsight.rst b/docs/api/opsi/models/oci.opsi.models.EmManagedExternalHostInsight.rst new file mode 100644 index 0000000000..e19abf905f --- /dev/null +++ b/docs/api/opsi/models/oci.opsi.models.EmManagedExternalHostInsight.rst @@ -0,0 +1,11 @@ +EmManagedExternalHostInsight +============================ + +.. currentmodule:: oci.opsi.models + +.. autoclass:: EmManagedExternalHostInsight + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/opsi/models/oci.opsi.models.EmManagedExternalHostInsightSummary.rst b/docs/api/opsi/models/oci.opsi.models.EmManagedExternalHostInsightSummary.rst new file mode 100644 index 0000000000..b7e01cb700 --- /dev/null +++ b/docs/api/opsi/models/oci.opsi.models.EmManagedExternalHostInsightSummary.rst @@ -0,0 +1,11 @@ +EmManagedExternalHostInsightSummary +=================================== + +.. currentmodule:: oci.opsi.models + +.. autoclass:: EmManagedExternalHostInsightSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/opsi/models/oci.opsi.models.EnableEmManagedExternalExadataInsightDetails.rst b/docs/api/opsi/models/oci.opsi.models.EnableEmManagedExternalExadataInsightDetails.rst new file mode 100644 index 0000000000..490de3bcfd --- /dev/null +++ b/docs/api/opsi/models/oci.opsi.models.EnableEmManagedExternalExadataInsightDetails.rst @@ -0,0 +1,11 @@ +EnableEmManagedExternalExadataInsightDetails +============================================ + +.. currentmodule:: oci.opsi.models + +.. autoclass:: EnableEmManagedExternalExadataInsightDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/opsi/models/oci.opsi.models.EnableEmManagedExternalHostInsightDetails.rst b/docs/api/opsi/models/oci.opsi.models.EnableEmManagedExternalHostInsightDetails.rst new file mode 100644 index 0000000000..7b175d4df1 --- /dev/null +++ b/docs/api/opsi/models/oci.opsi.models.EnableEmManagedExternalHostInsightDetails.rst @@ -0,0 +1,11 @@ +EnableEmManagedExternalHostInsightDetails +========================================= + +.. currentmodule:: oci.opsi.models + +.. autoclass:: EnableEmManagedExternalHostInsightDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/opsi/models/oci.opsi.models.EnableExadataInsightDetails.rst b/docs/api/opsi/models/oci.opsi.models.EnableExadataInsightDetails.rst new file mode 100644 index 0000000000..3bde4ffa69 --- /dev/null +++ b/docs/api/opsi/models/oci.opsi.models.EnableExadataInsightDetails.rst @@ -0,0 +1,11 @@ +EnableExadataInsightDetails +=========================== + +.. currentmodule:: oci.opsi.models + +.. autoclass:: EnableExadataInsightDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/opsi/models/oci.opsi.models.ExadataConfigurationCollection.rst b/docs/api/opsi/models/oci.opsi.models.ExadataConfigurationCollection.rst new file mode 100644 index 0000000000..ce1e6492ee --- /dev/null +++ b/docs/api/opsi/models/oci.opsi.models.ExadataConfigurationCollection.rst @@ -0,0 +1,11 @@ +ExadataConfigurationCollection +============================== + +.. currentmodule:: oci.opsi.models + +.. autoclass:: ExadataConfigurationCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/opsi/models/oci.opsi.models.ExadataConfigurationSummary.rst b/docs/api/opsi/models/oci.opsi.models.ExadataConfigurationSummary.rst new file mode 100644 index 0000000000..c0855645c2 --- /dev/null +++ b/docs/api/opsi/models/oci.opsi.models.ExadataConfigurationSummary.rst @@ -0,0 +1,11 @@ +ExadataConfigurationSummary +=========================== + +.. currentmodule:: oci.opsi.models + +.. autoclass:: ExadataConfigurationSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/opsi/models/oci.opsi.models.ExadataDatabaseMachineConfigurationSummary.rst b/docs/api/opsi/models/oci.opsi.models.ExadataDatabaseMachineConfigurationSummary.rst new file mode 100644 index 0000000000..8759e2f60f --- /dev/null +++ b/docs/api/opsi/models/oci.opsi.models.ExadataDatabaseMachineConfigurationSummary.rst @@ -0,0 +1,11 @@ +ExadataDatabaseMachineConfigurationSummary +========================================== + +.. currentmodule:: oci.opsi.models + +.. autoclass:: ExadataDatabaseMachineConfigurationSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/opsi/models/oci.opsi.models.ExadataDatabaseStatisticsSummary.rst b/docs/api/opsi/models/oci.opsi.models.ExadataDatabaseStatisticsSummary.rst new file mode 100644 index 0000000000..a3b8be895e --- /dev/null +++ b/docs/api/opsi/models/oci.opsi.models.ExadataDatabaseStatisticsSummary.rst @@ -0,0 +1,11 @@ +ExadataDatabaseStatisticsSummary +================================ + +.. currentmodule:: oci.opsi.models + +.. autoclass:: ExadataDatabaseStatisticsSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/opsi/models/oci.opsi.models.ExadataDetails.rst b/docs/api/opsi/models/oci.opsi.models.ExadataDetails.rst new file mode 100644 index 0000000000..c3ac50529c --- /dev/null +++ b/docs/api/opsi/models/oci.opsi.models.ExadataDetails.rst @@ -0,0 +1,11 @@ +ExadataDetails +============== + +.. currentmodule:: oci.opsi.models + +.. autoclass:: ExadataDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/opsi/models/oci.opsi.models.ExadataDiskgroupStatisticsSummary.rst b/docs/api/opsi/models/oci.opsi.models.ExadataDiskgroupStatisticsSummary.rst new file mode 100644 index 0000000000..82b95101b6 --- /dev/null +++ b/docs/api/opsi/models/oci.opsi.models.ExadataDiskgroupStatisticsSummary.rst @@ -0,0 +1,11 @@ +ExadataDiskgroupStatisticsSummary +================================= + +.. currentmodule:: oci.opsi.models + +.. autoclass:: ExadataDiskgroupStatisticsSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/opsi/models/oci.opsi.models.ExadataHostStatisticsSummary.rst b/docs/api/opsi/models/oci.opsi.models.ExadataHostStatisticsSummary.rst new file mode 100644 index 0000000000..8b17acf8da --- /dev/null +++ b/docs/api/opsi/models/oci.opsi.models.ExadataHostStatisticsSummary.rst @@ -0,0 +1,11 @@ +ExadataHostStatisticsSummary +============================ + +.. currentmodule:: oci.opsi.models + +.. autoclass:: ExadataHostStatisticsSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/opsi/models/oci.opsi.models.ExadataInsight.rst b/docs/api/opsi/models/oci.opsi.models.ExadataInsight.rst new file mode 100644 index 0000000000..4c492f3ba3 --- /dev/null +++ b/docs/api/opsi/models/oci.opsi.models.ExadataInsight.rst @@ -0,0 +1,11 @@ +ExadataInsight +============== + +.. currentmodule:: oci.opsi.models + +.. autoclass:: ExadataInsight + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/opsi/models/oci.opsi.models.ExadataInsightResourceCapacityTrendAggregation.rst b/docs/api/opsi/models/oci.opsi.models.ExadataInsightResourceCapacityTrendAggregation.rst new file mode 100644 index 0000000000..e4a908ff92 --- /dev/null +++ b/docs/api/opsi/models/oci.opsi.models.ExadataInsightResourceCapacityTrendAggregation.rst @@ -0,0 +1,11 @@ +ExadataInsightResourceCapacityTrendAggregation +============================================== + +.. currentmodule:: oci.opsi.models + +.. autoclass:: ExadataInsightResourceCapacityTrendAggregation + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/opsi/models/oci.opsi.models.ExadataInsightResourceCapacityTrendSummary.rst b/docs/api/opsi/models/oci.opsi.models.ExadataInsightResourceCapacityTrendSummary.rst new file mode 100644 index 0000000000..a50a6d9a3d --- /dev/null +++ b/docs/api/opsi/models/oci.opsi.models.ExadataInsightResourceCapacityTrendSummary.rst @@ -0,0 +1,11 @@ +ExadataInsightResourceCapacityTrendSummary +========================================== + +.. currentmodule:: oci.opsi.models + +.. autoclass:: ExadataInsightResourceCapacityTrendSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/opsi/models/oci.opsi.models.ExadataInsightResourceForecastTrendSummary.rst b/docs/api/opsi/models/oci.opsi.models.ExadataInsightResourceForecastTrendSummary.rst new file mode 100644 index 0000000000..a1adbce82d --- /dev/null +++ b/docs/api/opsi/models/oci.opsi.models.ExadataInsightResourceForecastTrendSummary.rst @@ -0,0 +1,11 @@ +ExadataInsightResourceForecastTrendSummary +========================================== + +.. currentmodule:: oci.opsi.models + +.. autoclass:: ExadataInsightResourceForecastTrendSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/opsi/models/oci.opsi.models.ExadataInsightResourceInsightUtilizationItem.rst b/docs/api/opsi/models/oci.opsi.models.ExadataInsightResourceInsightUtilizationItem.rst new file mode 100644 index 0000000000..a112376f2c --- /dev/null +++ b/docs/api/opsi/models/oci.opsi.models.ExadataInsightResourceInsightUtilizationItem.rst @@ -0,0 +1,11 @@ +ExadataInsightResourceInsightUtilizationItem +============================================ + +.. currentmodule:: oci.opsi.models + +.. autoclass:: ExadataInsightResourceInsightUtilizationItem + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/opsi/models/oci.opsi.models.ExadataInsightResourceStatistics.rst b/docs/api/opsi/models/oci.opsi.models.ExadataInsightResourceStatistics.rst new file mode 100644 index 0000000000..1c9234ab31 --- /dev/null +++ b/docs/api/opsi/models/oci.opsi.models.ExadataInsightResourceStatistics.rst @@ -0,0 +1,11 @@ +ExadataInsightResourceStatistics +================================ + +.. currentmodule:: oci.opsi.models + +.. autoclass:: ExadataInsightResourceStatistics + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/opsi/models/oci.opsi.models.ExadataInsightResourceStatisticsAggregation.rst b/docs/api/opsi/models/oci.opsi.models.ExadataInsightResourceStatisticsAggregation.rst new file mode 100644 index 0000000000..23c3635d5d --- /dev/null +++ b/docs/api/opsi/models/oci.opsi.models.ExadataInsightResourceStatisticsAggregation.rst @@ -0,0 +1,11 @@ +ExadataInsightResourceStatisticsAggregation +=========================================== + +.. currentmodule:: oci.opsi.models + +.. autoclass:: ExadataInsightResourceStatisticsAggregation + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/opsi/models/oci.opsi.models.ExadataInsightSummary.rst b/docs/api/opsi/models/oci.opsi.models.ExadataInsightSummary.rst new file mode 100644 index 0000000000..5fd9d107d3 --- /dev/null +++ b/docs/api/opsi/models/oci.opsi.models.ExadataInsightSummary.rst @@ -0,0 +1,11 @@ +ExadataInsightSummary +===================== + +.. currentmodule:: oci.opsi.models + +.. autoclass:: ExadataInsightSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/opsi/models/oci.opsi.models.ExadataInsightSummaryCollection.rst b/docs/api/opsi/models/oci.opsi.models.ExadataInsightSummaryCollection.rst new file mode 100644 index 0000000000..1143b9bf9e --- /dev/null +++ b/docs/api/opsi/models/oci.opsi.models.ExadataInsightSummaryCollection.rst @@ -0,0 +1,11 @@ +ExadataInsightSummaryCollection +=============================== + +.. currentmodule:: oci.opsi.models + +.. autoclass:: ExadataInsightSummaryCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/opsi/models/oci.opsi.models.ExadataInsights.rst b/docs/api/opsi/models/oci.opsi.models.ExadataInsights.rst new file mode 100644 index 0000000000..d63c71fc3b --- /dev/null +++ b/docs/api/opsi/models/oci.opsi.models.ExadataInsights.rst @@ -0,0 +1,11 @@ +ExadataInsights +=============== + +.. currentmodule:: oci.opsi.models + +.. autoclass:: ExadataInsights + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/opsi/models/oci.opsi.models.ExadataMemberCollection.rst b/docs/api/opsi/models/oci.opsi.models.ExadataMemberCollection.rst new file mode 100644 index 0000000000..d28af8b092 --- /dev/null +++ b/docs/api/opsi/models/oci.opsi.models.ExadataMemberCollection.rst @@ -0,0 +1,11 @@ +ExadataMemberCollection +======================= + +.. currentmodule:: oci.opsi.models + +.. autoclass:: ExadataMemberCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/opsi/models/oci.opsi.models.ExadataMemberSummary.rst b/docs/api/opsi/models/oci.opsi.models.ExadataMemberSummary.rst new file mode 100644 index 0000000000..43a9d85e8e --- /dev/null +++ b/docs/api/opsi/models/oci.opsi.models.ExadataMemberSummary.rst @@ -0,0 +1,11 @@ +ExadataMemberSummary +==================== + +.. currentmodule:: oci.opsi.models + +.. autoclass:: ExadataMemberSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/opsi/models/oci.opsi.models.ExadataStorageServerStatisticsSummary.rst b/docs/api/opsi/models/oci.opsi.models.ExadataStorageServerStatisticsSummary.rst new file mode 100644 index 0000000000..9a1a22a9a9 --- /dev/null +++ b/docs/api/opsi/models/oci.opsi.models.ExadataStorageServerStatisticsSummary.rst @@ -0,0 +1,11 @@ +ExadataStorageServerStatisticsSummary +===================================== + +.. currentmodule:: oci.opsi.models + +.. autoclass:: ExadataStorageServerStatisticsSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/opsi/models/oci.opsi.models.HostConfigurationCollection.rst b/docs/api/opsi/models/oci.opsi.models.HostConfigurationCollection.rst new file mode 100644 index 0000000000..691fe78583 --- /dev/null +++ b/docs/api/opsi/models/oci.opsi.models.HostConfigurationCollection.rst @@ -0,0 +1,11 @@ +HostConfigurationCollection +=========================== + +.. currentmodule:: oci.opsi.models + +.. autoclass:: HostConfigurationCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/opsi/models/oci.opsi.models.HostConfigurationSummary.rst b/docs/api/opsi/models/oci.opsi.models.HostConfigurationSummary.rst new file mode 100644 index 0000000000..760738517f --- /dev/null +++ b/docs/api/opsi/models/oci.opsi.models.HostConfigurationSummary.rst @@ -0,0 +1,11 @@ +HostConfigurationSummary +======================== + +.. currentmodule:: oci.opsi.models + +.. autoclass:: HostConfigurationSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/opsi/models/oci.opsi.models.InstanceMetrics.rst b/docs/api/opsi/models/oci.opsi.models.InstanceMetrics.rst new file mode 100644 index 0000000000..22c48d1b80 --- /dev/null +++ b/docs/api/opsi/models/oci.opsi.models.InstanceMetrics.rst @@ -0,0 +1,11 @@ +InstanceMetrics +=============== + +.. currentmodule:: oci.opsi.models + +.. autoclass:: InstanceMetrics + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/opsi/models/oci.opsi.models.MacsManagedExternalHostConfigurationSummary.rst b/docs/api/opsi/models/oci.opsi.models.MacsManagedExternalHostConfigurationSummary.rst new file mode 100644 index 0000000000..6940793ea7 --- /dev/null +++ b/docs/api/opsi/models/oci.opsi.models.MacsManagedExternalHostConfigurationSummary.rst @@ -0,0 +1,11 @@ +MacsManagedExternalHostConfigurationSummary +=========================================== + +.. currentmodule:: oci.opsi.models + +.. autoclass:: MacsManagedExternalHostConfigurationSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/opsi/models/oci.opsi.models.ResourceUsageSummary.rst b/docs/api/opsi/models/oci.opsi.models.ResourceUsageSummary.rst new file mode 100644 index 0000000000..94c135f089 --- /dev/null +++ b/docs/api/opsi/models/oci.opsi.models.ResourceUsageSummary.rst @@ -0,0 +1,11 @@ +ResourceUsageSummary +==================== + +.. currentmodule:: oci.opsi.models + +.. autoclass:: ResourceUsageSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/opsi/models/oci.opsi.models.StorageServerDetails.rst b/docs/api/opsi/models/oci.opsi.models.StorageServerDetails.rst new file mode 100644 index 0000000000..53fb0f3f35 --- /dev/null +++ b/docs/api/opsi/models/oci.opsi.models.StorageServerDetails.rst @@ -0,0 +1,11 @@ +StorageServerDetails +==================== + +.. currentmodule:: oci.opsi.models + +.. autoclass:: StorageServerDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/opsi/models/oci.opsi.models.SummarizeExadataInsightResourceCapacityTrendAggregation.rst b/docs/api/opsi/models/oci.opsi.models.SummarizeExadataInsightResourceCapacityTrendAggregation.rst new file mode 100644 index 0000000000..8bd777fd15 --- /dev/null +++ b/docs/api/opsi/models/oci.opsi.models.SummarizeExadataInsightResourceCapacityTrendAggregation.rst @@ -0,0 +1,11 @@ +SummarizeExadataInsightResourceCapacityTrendAggregation +======================================================= + +.. currentmodule:: oci.opsi.models + +.. autoclass:: SummarizeExadataInsightResourceCapacityTrendAggregation + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops/models/oci.devops.models.ComputeInstanceGroupCanaryDeployStageExecutionProgress.rst b/docs/api/opsi/models/oci.opsi.models.SummarizeExadataInsightResourceCapacityTrendCollection.rst similarity index 50% rename from docs/api/devops/models/oci.devops.models.ComputeInstanceGroupCanaryDeployStageExecutionProgress.rst rename to docs/api/opsi/models/oci.opsi.models.SummarizeExadataInsightResourceCapacityTrendCollection.rst index 988a698ef3..4ddbd05a20 100644 --- a/docs/api/devops/models/oci.devops.models.ComputeInstanceGroupCanaryDeployStageExecutionProgress.rst +++ b/docs/api/opsi/models/oci.opsi.models.SummarizeExadataInsightResourceCapacityTrendCollection.rst @@ -1,9 +1,9 @@ -ComputeInstanceGroupCanaryDeployStageExecutionProgress +SummarizeExadataInsightResourceCapacityTrendCollection ====================================================== -.. currentmodule:: oci.devops.models +.. currentmodule:: oci.opsi.models -.. autoclass:: ComputeInstanceGroupCanaryDeployStageExecutionProgress +.. autoclass:: SummarizeExadataInsightResourceCapacityTrendCollection :show-inheritance: :special-members: __init__ :members: diff --git a/docs/api/opsi/models/oci.opsi.models.SummarizeExadataInsightResourceForecastTrendAggregation.rst b/docs/api/opsi/models/oci.opsi.models.SummarizeExadataInsightResourceForecastTrendAggregation.rst new file mode 100644 index 0000000000..9453f6a3bb --- /dev/null +++ b/docs/api/opsi/models/oci.opsi.models.SummarizeExadataInsightResourceForecastTrendAggregation.rst @@ -0,0 +1,11 @@ +SummarizeExadataInsightResourceForecastTrendAggregation +======================================================= + +.. currentmodule:: oci.opsi.models + +.. autoclass:: SummarizeExadataInsightResourceForecastTrendAggregation + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/opsi/models/oci.opsi.models.SummarizeExadataInsightResourceForecastTrendCollection.rst b/docs/api/opsi/models/oci.opsi.models.SummarizeExadataInsightResourceForecastTrendCollection.rst new file mode 100644 index 0000000000..dce3f0afb8 --- /dev/null +++ b/docs/api/opsi/models/oci.opsi.models.SummarizeExadataInsightResourceForecastTrendCollection.rst @@ -0,0 +1,11 @@ +SummarizeExadataInsightResourceForecastTrendCollection +====================================================== + +.. currentmodule:: oci.opsi.models + +.. autoclass:: SummarizeExadataInsightResourceForecastTrendCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/opsi/models/oci.opsi.models.SummarizeExadataInsightResourceStatisticsAggregationCollection.rst b/docs/api/opsi/models/oci.opsi.models.SummarizeExadataInsightResourceStatisticsAggregationCollection.rst new file mode 100644 index 0000000000..bc24221162 --- /dev/null +++ b/docs/api/opsi/models/oci.opsi.models.SummarizeExadataInsightResourceStatisticsAggregationCollection.rst @@ -0,0 +1,11 @@ +SummarizeExadataInsightResourceStatisticsAggregationCollection +============================================================== + +.. currentmodule:: oci.opsi.models + +.. autoclass:: SummarizeExadataInsightResourceStatisticsAggregationCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/opsi/models/oci.opsi.models.SummarizeExadataInsightResourceUsageAggregation.rst b/docs/api/opsi/models/oci.opsi.models.SummarizeExadataInsightResourceUsageAggregation.rst new file mode 100644 index 0000000000..741f2c86a4 --- /dev/null +++ b/docs/api/opsi/models/oci.opsi.models.SummarizeExadataInsightResourceUsageAggregation.rst @@ -0,0 +1,11 @@ +SummarizeExadataInsightResourceUsageAggregation +=============================================== + +.. currentmodule:: oci.opsi.models + +.. autoclass:: SummarizeExadataInsightResourceUsageAggregation + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/opsi/models/oci.opsi.models.SummarizeExadataInsightResourceUsageCollection.rst b/docs/api/opsi/models/oci.opsi.models.SummarizeExadataInsightResourceUsageCollection.rst new file mode 100644 index 0000000000..d79f1be8e9 --- /dev/null +++ b/docs/api/opsi/models/oci.opsi.models.SummarizeExadataInsightResourceUsageCollection.rst @@ -0,0 +1,11 @@ +SummarizeExadataInsightResourceUsageCollection +============================================== + +.. currentmodule:: oci.opsi.models + +.. autoclass:: SummarizeExadataInsightResourceUsageCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/opsi/models/oci.opsi.models.SummarizeExadataInsightResourceUtilizationInsightAggregation.rst b/docs/api/opsi/models/oci.opsi.models.SummarizeExadataInsightResourceUtilizationInsightAggregation.rst new file mode 100644 index 0000000000..7f6c47f05f --- /dev/null +++ b/docs/api/opsi/models/oci.opsi.models.SummarizeExadataInsightResourceUtilizationInsightAggregation.rst @@ -0,0 +1,11 @@ +SummarizeExadataInsightResourceUtilizationInsightAggregation +============================================================ + +.. currentmodule:: oci.opsi.models + +.. autoclass:: SummarizeExadataInsightResourceUtilizationInsightAggregation + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/opsi/models/oci.opsi.models.UpdateEmManagedExternalExadataInsightDetails.rst b/docs/api/opsi/models/oci.opsi.models.UpdateEmManagedExternalExadataInsightDetails.rst new file mode 100644 index 0000000000..5c0a79388d --- /dev/null +++ b/docs/api/opsi/models/oci.opsi.models.UpdateEmManagedExternalExadataInsightDetails.rst @@ -0,0 +1,11 @@ +UpdateEmManagedExternalExadataInsightDetails +============================================ + +.. currentmodule:: oci.opsi.models + +.. autoclass:: UpdateEmManagedExternalExadataInsightDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/opsi/models/oci.opsi.models.UpdateEmManagedExternalHostInsightDetails.rst b/docs/api/opsi/models/oci.opsi.models.UpdateEmManagedExternalHostInsightDetails.rst new file mode 100644 index 0000000000..1a1b603dfa --- /dev/null +++ b/docs/api/opsi/models/oci.opsi.models.UpdateEmManagedExternalHostInsightDetails.rst @@ -0,0 +1,11 @@ +UpdateEmManagedExternalHostInsightDetails +========================================= + +.. currentmodule:: oci.opsi.models + +.. autoclass:: UpdateEmManagedExternalHostInsightDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/opsi/models/oci.opsi.models.UpdateExadataInsightDetails.rst b/docs/api/opsi/models/oci.opsi.models.UpdateExadataInsightDetails.rst new file mode 100644 index 0000000000..d49863de8a --- /dev/null +++ b/docs/api/opsi/models/oci.opsi.models.UpdateExadataInsightDetails.rst @@ -0,0 +1,11 @@ +UpdateExadataInsightDetails +=========================== + +.. currentmodule:: oci.opsi.models + +.. autoclass:: UpdateExadataInsightDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/tenant_manager_control_plane.rst b/docs/api/tenant_manager_control_plane.rst index 7560fcb762..e4c0f90b00 100644 --- a/docs/api/tenant_manager_control_plane.rst +++ b/docs/api/tenant_manager_control_plane.rst @@ -10,15 +10,19 @@ Tenant Manager Control Plane oci.tenant_manager_control_plane.DomainGovernanceClient oci.tenant_manager_control_plane.LinkClient oci.tenant_manager_control_plane.OrdersClient + oci.tenant_manager_control_plane.OrganizationClient oci.tenant_manager_control_plane.RecipientInvitationClient oci.tenant_manager_control_plane.SenderInvitationClient + oci.tenant_manager_control_plane.SubscriptionClient oci.tenant_manager_control_plane.WorkRequestClient oci.tenant_manager_control_plane.DomainClientCompositeOperations oci.tenant_manager_control_plane.DomainGovernanceClientCompositeOperations oci.tenant_manager_control_plane.LinkClientCompositeOperations oci.tenant_manager_control_plane.OrdersClientCompositeOperations + oci.tenant_manager_control_plane.OrganizationClientCompositeOperations oci.tenant_manager_control_plane.RecipientInvitationClientCompositeOperations oci.tenant_manager_control_plane.SenderInvitationClientCompositeOperations + oci.tenant_manager_control_plane.SubscriptionClientCompositeOperations oci.tenant_manager_control_plane.WorkRequestClientCompositeOperations -------- @@ -31,9 +35,16 @@ Tenant Manager Control Plane :template: autosummary/model_class.rst oci.tenant_manager_control_plane.models.ActivateOrderDetails + oci.tenant_manager_control_plane.models.AssignedSubscription + oci.tenant_manager_control_plane.models.AssignedSubscriptionCollection + oci.tenant_manager_control_plane.models.AssignedSubscriptionSummary + oci.tenant_manager_control_plane.models.AvailableRegionCollection + oci.tenant_manager_control_plane.models.AvailableRegionSummary + oci.tenant_manager_control_plane.models.CreateChildTenancyDetails oci.tenant_manager_control_plane.models.CreateDomainDetails oci.tenant_manager_control_plane.models.CreateDomainGovernanceDetails oci.tenant_manager_control_plane.models.CreateSenderInvitationDetails + oci.tenant_manager_control_plane.models.CreateSubscriptionMappingDetails oci.tenant_manager_control_plane.models.Domain oci.tenant_manager_control_plane.models.DomainCollection oci.tenant_manager_control_plane.models.DomainGovernance @@ -44,6 +55,12 @@ Tenant Manager Control Plane oci.tenant_manager_control_plane.models.LinkCollection oci.tenant_manager_control_plane.models.LinkSummary oci.tenant_manager_control_plane.models.Order + oci.tenant_manager_control_plane.models.Organization + oci.tenant_manager_control_plane.models.OrganizationCollection + oci.tenant_manager_control_plane.models.OrganizationSummary + oci.tenant_manager_control_plane.models.OrganizationTenancy + oci.tenant_manager_control_plane.models.OrganizationTenancyCollection + oci.tenant_manager_control_plane.models.OrganizationTenancySummary oci.tenant_manager_control_plane.models.RecipientInvitation oci.tenant_manager_control_plane.models.RecipientInvitationCollection oci.tenant_manager_control_plane.models.RecipientInvitationSummary @@ -51,9 +68,17 @@ Tenant Manager Control Plane oci.tenant_manager_control_plane.models.SenderInvitationCollection oci.tenant_manager_control_plane.models.SenderInvitationSummary oci.tenant_manager_control_plane.models.Sku + oci.tenant_manager_control_plane.models.Subscription + oci.tenant_manager_control_plane.models.SubscriptionCollection oci.tenant_manager_control_plane.models.SubscriptionInfo + oci.tenant_manager_control_plane.models.SubscriptionMapping + oci.tenant_manager_control_plane.models.SubscriptionMappingCollection + oci.tenant_manager_control_plane.models.SubscriptionMappingSummary + oci.tenant_manager_control_plane.models.SubscriptionSku + oci.tenant_manager_control_plane.models.SubscriptionSummary oci.tenant_manager_control_plane.models.UpdateDomainDetails oci.tenant_manager_control_plane.models.UpdateDomainGovernanceDetails + oci.tenant_manager_control_plane.models.UpdateOrganizationDetails oci.tenant_manager_control_plane.models.UpdateRecipientInvitationDetails oci.tenant_manager_control_plane.models.UpdateSenderInvitationDetails oci.tenant_manager_control_plane.models.WorkRequest diff --git a/docs/api/tenant_manager_control_plane/client/oci.tenant_manager_control_plane.OrganizationClient.rst b/docs/api/tenant_manager_control_plane/client/oci.tenant_manager_control_plane.OrganizationClient.rst new file mode 100644 index 0000000000..05adaf1eeb --- /dev/null +++ b/docs/api/tenant_manager_control_plane/client/oci.tenant_manager_control_plane.OrganizationClient.rst @@ -0,0 +1,8 @@ +OrganizationClient +================== + +.. currentmodule:: oci.tenant_manager_control_plane + +.. autoclass:: OrganizationClient + :special-members: __init__ + :members: \ No newline at end of file diff --git a/docs/api/tenant_manager_control_plane/client/oci.tenant_manager_control_plane.OrganizationClientCompositeOperations.rst b/docs/api/tenant_manager_control_plane/client/oci.tenant_manager_control_plane.OrganizationClientCompositeOperations.rst new file mode 100644 index 0000000000..f559ff61e2 --- /dev/null +++ b/docs/api/tenant_manager_control_plane/client/oci.tenant_manager_control_plane.OrganizationClientCompositeOperations.rst @@ -0,0 +1,8 @@ +OrganizationClientCompositeOperations +===================================== + +.. currentmodule:: oci.tenant_manager_control_plane + +.. autoclass:: OrganizationClientCompositeOperations + :special-members: __init__ + :members: \ No newline at end of file diff --git a/docs/api/tenant_manager_control_plane/client/oci.tenant_manager_control_plane.SubscriptionClient.rst b/docs/api/tenant_manager_control_plane/client/oci.tenant_manager_control_plane.SubscriptionClient.rst new file mode 100644 index 0000000000..f59523d675 --- /dev/null +++ b/docs/api/tenant_manager_control_plane/client/oci.tenant_manager_control_plane.SubscriptionClient.rst @@ -0,0 +1,8 @@ +SubscriptionClient +================== + +.. currentmodule:: oci.tenant_manager_control_plane + +.. autoclass:: SubscriptionClient + :special-members: __init__ + :members: \ No newline at end of file diff --git a/docs/api/tenant_manager_control_plane/client/oci.tenant_manager_control_plane.SubscriptionClientCompositeOperations.rst b/docs/api/tenant_manager_control_plane/client/oci.tenant_manager_control_plane.SubscriptionClientCompositeOperations.rst new file mode 100644 index 0000000000..b24495c937 --- /dev/null +++ b/docs/api/tenant_manager_control_plane/client/oci.tenant_manager_control_plane.SubscriptionClientCompositeOperations.rst @@ -0,0 +1,8 @@ +SubscriptionClientCompositeOperations +===================================== + +.. currentmodule:: oci.tenant_manager_control_plane + +.. autoclass:: SubscriptionClientCompositeOperations + :special-members: __init__ + :members: \ No newline at end of file diff --git a/docs/api/tenant_manager_control_plane/models/oci.tenant_manager_control_plane.models.AssignedSubscription.rst b/docs/api/tenant_manager_control_plane/models/oci.tenant_manager_control_plane.models.AssignedSubscription.rst new file mode 100644 index 0000000000..860237fc23 --- /dev/null +++ b/docs/api/tenant_manager_control_plane/models/oci.tenant_manager_control_plane.models.AssignedSubscription.rst @@ -0,0 +1,11 @@ +AssignedSubscription +==================== + +.. currentmodule:: oci.tenant_manager_control_plane.models + +.. autoclass:: AssignedSubscription + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/tenant_manager_control_plane/models/oci.tenant_manager_control_plane.models.AssignedSubscriptionCollection.rst b/docs/api/tenant_manager_control_plane/models/oci.tenant_manager_control_plane.models.AssignedSubscriptionCollection.rst new file mode 100644 index 0000000000..391278e488 --- /dev/null +++ b/docs/api/tenant_manager_control_plane/models/oci.tenant_manager_control_plane.models.AssignedSubscriptionCollection.rst @@ -0,0 +1,11 @@ +AssignedSubscriptionCollection +============================== + +.. currentmodule:: oci.tenant_manager_control_plane.models + +.. autoclass:: AssignedSubscriptionCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/tenant_manager_control_plane/models/oci.tenant_manager_control_plane.models.AssignedSubscriptionSummary.rst b/docs/api/tenant_manager_control_plane/models/oci.tenant_manager_control_plane.models.AssignedSubscriptionSummary.rst new file mode 100644 index 0000000000..285db34786 --- /dev/null +++ b/docs/api/tenant_manager_control_plane/models/oci.tenant_manager_control_plane.models.AssignedSubscriptionSummary.rst @@ -0,0 +1,11 @@ +AssignedSubscriptionSummary +=========================== + +.. currentmodule:: oci.tenant_manager_control_plane.models + +.. autoclass:: AssignedSubscriptionSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/tenant_manager_control_plane/models/oci.tenant_manager_control_plane.models.AvailableRegionCollection.rst b/docs/api/tenant_manager_control_plane/models/oci.tenant_manager_control_plane.models.AvailableRegionCollection.rst new file mode 100644 index 0000000000..6dd7bde48b --- /dev/null +++ b/docs/api/tenant_manager_control_plane/models/oci.tenant_manager_control_plane.models.AvailableRegionCollection.rst @@ -0,0 +1,11 @@ +AvailableRegionCollection +========================= + +.. currentmodule:: oci.tenant_manager_control_plane.models + +.. autoclass:: AvailableRegionCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/tenant_manager_control_plane/models/oci.tenant_manager_control_plane.models.AvailableRegionSummary.rst b/docs/api/tenant_manager_control_plane/models/oci.tenant_manager_control_plane.models.AvailableRegionSummary.rst new file mode 100644 index 0000000000..1466b9f793 --- /dev/null +++ b/docs/api/tenant_manager_control_plane/models/oci.tenant_manager_control_plane.models.AvailableRegionSummary.rst @@ -0,0 +1,11 @@ +AvailableRegionSummary +====================== + +.. currentmodule:: oci.tenant_manager_control_plane.models + +.. autoclass:: AvailableRegionSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/tenant_manager_control_plane/models/oci.tenant_manager_control_plane.models.CreateChildTenancyDetails.rst b/docs/api/tenant_manager_control_plane/models/oci.tenant_manager_control_plane.models.CreateChildTenancyDetails.rst new file mode 100644 index 0000000000..510b4e3d5e --- /dev/null +++ b/docs/api/tenant_manager_control_plane/models/oci.tenant_manager_control_plane.models.CreateChildTenancyDetails.rst @@ -0,0 +1,11 @@ +CreateChildTenancyDetails +========================= + +.. currentmodule:: oci.tenant_manager_control_plane.models + +.. autoclass:: CreateChildTenancyDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/tenant_manager_control_plane/models/oci.tenant_manager_control_plane.models.CreateSubscriptionMappingDetails.rst b/docs/api/tenant_manager_control_plane/models/oci.tenant_manager_control_plane.models.CreateSubscriptionMappingDetails.rst new file mode 100644 index 0000000000..9195b5abe1 --- /dev/null +++ b/docs/api/tenant_manager_control_plane/models/oci.tenant_manager_control_plane.models.CreateSubscriptionMappingDetails.rst @@ -0,0 +1,11 @@ +CreateSubscriptionMappingDetails +================================ + +.. currentmodule:: oci.tenant_manager_control_plane.models + +.. autoclass:: CreateSubscriptionMappingDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/tenant_manager_control_plane/models/oci.tenant_manager_control_plane.models.Organization.rst b/docs/api/tenant_manager_control_plane/models/oci.tenant_manager_control_plane.models.Organization.rst new file mode 100644 index 0000000000..d0a4633223 --- /dev/null +++ b/docs/api/tenant_manager_control_plane/models/oci.tenant_manager_control_plane.models.Organization.rst @@ -0,0 +1,11 @@ +Organization +============ + +.. currentmodule:: oci.tenant_manager_control_plane.models + +.. autoclass:: Organization + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/tenant_manager_control_plane/models/oci.tenant_manager_control_plane.models.OrganizationCollection.rst b/docs/api/tenant_manager_control_plane/models/oci.tenant_manager_control_plane.models.OrganizationCollection.rst new file mode 100644 index 0000000000..5ec845a90c --- /dev/null +++ b/docs/api/tenant_manager_control_plane/models/oci.tenant_manager_control_plane.models.OrganizationCollection.rst @@ -0,0 +1,11 @@ +OrganizationCollection +====================== + +.. currentmodule:: oci.tenant_manager_control_plane.models + +.. autoclass:: OrganizationCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/tenant_manager_control_plane/models/oci.tenant_manager_control_plane.models.OrganizationSummary.rst b/docs/api/tenant_manager_control_plane/models/oci.tenant_manager_control_plane.models.OrganizationSummary.rst new file mode 100644 index 0000000000..98b74ce098 --- /dev/null +++ b/docs/api/tenant_manager_control_plane/models/oci.tenant_manager_control_plane.models.OrganizationSummary.rst @@ -0,0 +1,11 @@ +OrganizationSummary +=================== + +.. currentmodule:: oci.tenant_manager_control_plane.models + +.. autoclass:: OrganizationSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/tenant_manager_control_plane/models/oci.tenant_manager_control_plane.models.OrganizationTenancy.rst b/docs/api/tenant_manager_control_plane/models/oci.tenant_manager_control_plane.models.OrganizationTenancy.rst new file mode 100644 index 0000000000..7281abd944 --- /dev/null +++ b/docs/api/tenant_manager_control_plane/models/oci.tenant_manager_control_plane.models.OrganizationTenancy.rst @@ -0,0 +1,11 @@ +OrganizationTenancy +=================== + +.. currentmodule:: oci.tenant_manager_control_plane.models + +.. autoclass:: OrganizationTenancy + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/tenant_manager_control_plane/models/oci.tenant_manager_control_plane.models.OrganizationTenancyCollection.rst b/docs/api/tenant_manager_control_plane/models/oci.tenant_manager_control_plane.models.OrganizationTenancyCollection.rst new file mode 100644 index 0000000000..983b88910e --- /dev/null +++ b/docs/api/tenant_manager_control_plane/models/oci.tenant_manager_control_plane.models.OrganizationTenancyCollection.rst @@ -0,0 +1,11 @@ +OrganizationTenancyCollection +============================= + +.. currentmodule:: oci.tenant_manager_control_plane.models + +.. autoclass:: OrganizationTenancyCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/tenant_manager_control_plane/models/oci.tenant_manager_control_plane.models.OrganizationTenancySummary.rst b/docs/api/tenant_manager_control_plane/models/oci.tenant_manager_control_plane.models.OrganizationTenancySummary.rst new file mode 100644 index 0000000000..1f032f3bfd --- /dev/null +++ b/docs/api/tenant_manager_control_plane/models/oci.tenant_manager_control_plane.models.OrganizationTenancySummary.rst @@ -0,0 +1,11 @@ +OrganizationTenancySummary +========================== + +.. currentmodule:: oci.tenant_manager_control_plane.models + +.. autoclass:: OrganizationTenancySummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/tenant_manager_control_plane/models/oci.tenant_manager_control_plane.models.Subscription.rst b/docs/api/tenant_manager_control_plane/models/oci.tenant_manager_control_plane.models.Subscription.rst new file mode 100644 index 0000000000..e01b2f8667 --- /dev/null +++ b/docs/api/tenant_manager_control_plane/models/oci.tenant_manager_control_plane.models.Subscription.rst @@ -0,0 +1,11 @@ +Subscription +============ + +.. currentmodule:: oci.tenant_manager_control_plane.models + +.. autoclass:: Subscription + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/tenant_manager_control_plane/models/oci.tenant_manager_control_plane.models.SubscriptionCollection.rst b/docs/api/tenant_manager_control_plane/models/oci.tenant_manager_control_plane.models.SubscriptionCollection.rst new file mode 100644 index 0000000000..11da08a7d3 --- /dev/null +++ b/docs/api/tenant_manager_control_plane/models/oci.tenant_manager_control_plane.models.SubscriptionCollection.rst @@ -0,0 +1,11 @@ +SubscriptionCollection +====================== + +.. currentmodule:: oci.tenant_manager_control_plane.models + +.. autoclass:: SubscriptionCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/tenant_manager_control_plane/models/oci.tenant_manager_control_plane.models.SubscriptionMapping.rst b/docs/api/tenant_manager_control_plane/models/oci.tenant_manager_control_plane.models.SubscriptionMapping.rst new file mode 100644 index 0000000000..129b06123e --- /dev/null +++ b/docs/api/tenant_manager_control_plane/models/oci.tenant_manager_control_plane.models.SubscriptionMapping.rst @@ -0,0 +1,11 @@ +SubscriptionMapping +=================== + +.. currentmodule:: oci.tenant_manager_control_plane.models + +.. autoclass:: SubscriptionMapping + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/tenant_manager_control_plane/models/oci.tenant_manager_control_plane.models.SubscriptionMappingCollection.rst b/docs/api/tenant_manager_control_plane/models/oci.tenant_manager_control_plane.models.SubscriptionMappingCollection.rst new file mode 100644 index 0000000000..1225fad577 --- /dev/null +++ b/docs/api/tenant_manager_control_plane/models/oci.tenant_manager_control_plane.models.SubscriptionMappingCollection.rst @@ -0,0 +1,11 @@ +SubscriptionMappingCollection +============================= + +.. currentmodule:: oci.tenant_manager_control_plane.models + +.. autoclass:: SubscriptionMappingCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/tenant_manager_control_plane/models/oci.tenant_manager_control_plane.models.SubscriptionMappingSummary.rst b/docs/api/tenant_manager_control_plane/models/oci.tenant_manager_control_plane.models.SubscriptionMappingSummary.rst new file mode 100644 index 0000000000..d99eaa874c --- /dev/null +++ b/docs/api/tenant_manager_control_plane/models/oci.tenant_manager_control_plane.models.SubscriptionMappingSummary.rst @@ -0,0 +1,11 @@ +SubscriptionMappingSummary +========================== + +.. currentmodule:: oci.tenant_manager_control_plane.models + +.. autoclass:: SubscriptionMappingSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/tenant_manager_control_plane/models/oci.tenant_manager_control_plane.models.SubscriptionSku.rst b/docs/api/tenant_manager_control_plane/models/oci.tenant_manager_control_plane.models.SubscriptionSku.rst new file mode 100644 index 0000000000..c825270925 --- /dev/null +++ b/docs/api/tenant_manager_control_plane/models/oci.tenant_manager_control_plane.models.SubscriptionSku.rst @@ -0,0 +1,11 @@ +SubscriptionSku +=============== + +.. currentmodule:: oci.tenant_manager_control_plane.models + +.. autoclass:: SubscriptionSku + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/tenant_manager_control_plane/models/oci.tenant_manager_control_plane.models.SubscriptionSummary.rst b/docs/api/tenant_manager_control_plane/models/oci.tenant_manager_control_plane.models.SubscriptionSummary.rst new file mode 100644 index 0000000000..6990d4f5d3 --- /dev/null +++ b/docs/api/tenant_manager_control_plane/models/oci.tenant_manager_control_plane.models.SubscriptionSummary.rst @@ -0,0 +1,11 @@ +SubscriptionSummary +=================== + +.. currentmodule:: oci.tenant_manager_control_plane.models + +.. autoclass:: SubscriptionSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/tenant_manager_control_plane/models/oci.tenant_manager_control_plane.models.UpdateOrganizationDetails.rst b/docs/api/tenant_manager_control_plane/models/oci.tenant_manager_control_plane.models.UpdateOrganizationDetails.rst new file mode 100644 index 0000000000..50599748cb --- /dev/null +++ b/docs/api/tenant_manager_control_plane/models/oci.tenant_manager_control_plane.models.UpdateOrganizationDetails.rst @@ -0,0 +1,11 @@ +UpdateOrganizationDetails +========================= + +.. currentmodule:: oci.tenant_manager_control_plane.models + +.. autoclass:: UpdateOrganizationDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/examples/list_resources_in_tenancy/README.md b/examples/list_resources_in_tenancy/README.md new file mode 100644 index 0000000000..a225f3e83a --- /dev/null +++ b/examples/list_resources_in_tenancy/README.md @@ -0,0 +1,125 @@ +## List Resources in Tenancy + +Several utilities to help with producing reports from OCI + +**DISCLAIMER – This is not an official Oracle application, It does not supported by Oracle Support, It should NOT be used for utilization calculation purposes + +**Developed by Adi Zohar, 2021** + +## Executing using Cloud Shell: +``` + 1. install oci sdk package + pip3 install --user oci + + 2. clone the oci sdk repo + git clone https://github.com/oracle/oci-python-sdk + + 3. Execute + cd $HOME/oci-python-sdk/examples/list_resources_in_tenancy + python3 list_all_ipsec_tunnels_in_tenancy.py -dt + python3 list_all_virtual_circuits_in_tenancy.py -dt + python3 list_compute_tags_in_tenancy.py -dt + python3 list_dbsystem_with_maintenance_in_tenancy.py -dt + python3 list_bv_backups_in_tenancy.py -dt + python3 list_limits_per_compartments.py -dt + + 4. Help with --help +``` + +## list_all_ipsec_tunnels_in_tenancy.py +Produce list of all ipsec tunnels in tenancy - Useful when OCI published maintenance announcement of network components + +``` +usage: list_all_ipsec_tunnels_in_tenancy.py [-h] [-t CONFIG_PROFILE] + [-p PROXY] [-ip] [-dt] + +optional arguments: + -h, --help show this help message and exit + -t CONFIG_PROFILE Config file section to use (tenancy profile) + -p PROXY Set Proxy (i.e. www-proxy-server.com:80) + -ip Use Instance Principals for Authentication + -dt Use Delegation Token for Authentication +``` + +## list_all_virtual_circuits_in_tenancy.py +Produce list of all Virtual Circuits (fastconnects) in tenancy - Useful when OCI published maintenance announcement of network components + +``` +usage: list_all_virtual_circuits_in_tenancy.py [-h] [-t CONFIG_PROFILE] [-p PROXY] [-ip] [-dt] + +optional arguments: + -h, --help show this help message and exit + -t CONFIG_PROFILE Config file section to use (tenancy profile) + -p PROXY Set Proxy (i.e. www-proxy-server.com:80) + -ip Use Instance Principals for Authentication + -dt Use Delegation Token for Authentication +``` + +## list_bv_backups_in_tenancy.py +Produce list of all Boot and Block volume backups – Useful to produce backup list for Audit purposes + +``` +usage: list_bv_backups_in_tenancy.py [-h] [-t CONFIG_PROFILE] [-p PROXY] [-ip] [-dt] + +optional arguments: + -h, --help show this help message and exit + -t CONFIG_PROFILE Config file section to use (tenancy profile) + -p PROXY Set Proxy (i.e. www-proxy-server.com:80) + -ip Use Instance Principals for Authentication + -dt Use Delegation Token for Authentication + +``` + +## list_compute_tags_in_tenancy.py +Produce list of compute with tags + +``` +usage: list_compute_tags_in_tenancy.py [-h] [-t CONFIG_PROFILE] [-p PROXY] [-ip] [-dt] + +optional arguments: + -h, --help show this help message and exit + -t CONFIG_PROFILE Config file section to use (tenancy profile) + -p PROXY Set Proxy (i.e. www-proxy-server.com:80) + -ip Use Instance Principals for Authentication + -dt Use Delegation Token for Authentication +``` + +## list_dbsystem_with_maintenance_in_tenancy.py +Produce list of DB System and Exadata with maintenance details – Useful to alert when maintenance is due on the corresponding DB System or Exadata Infrastructure + +``` +usage: list_dbsystem_with_maintenance_in_tenancy.py [-h] [-t CONFIG_PROFILE] [-p PROXY] [-ip] [-dt] + +optional arguments: + -h, --help show this help message and exit + -t CONFIG_PROFILE Config file section to use (tenancy profile) + -p PROXY Set Proxy (i.e. www-proxy-server.com:80) + -ip Use Instance Principals for Authentication + -dt Use Delegation Token for Authentication +``` + +## list_limits_per_compartments.py +Produce list of limits per compartment, can be extracted to screen or CSV and allow admin to monitor limits efficiency and request additional limits if required. + +``` +usage: list_limits_per_compartments.py [-h] [-c CONFIG_FILE] + [-t CONFIG_PROFILE] [-p PROXY] + [-rg FILTER_REGION] [-cp FILTER_COMP] + [-sr FILTER_SERVICE] [-sc FILTER_SCOPE] + [-ip] [-dt] [-js] [-csv CSV] + +optional arguments: + -h, --help show this help message and exit + -c CONFIG_FILE OCI CLI Config file + -t CONFIG_PROFILE Config Profile inside the config file + -p PROXY Set Proxy (i.e. www-proxy-server.com:80) + -rg FILTER_REGION filter by region (i.e. us-ashburn-1) + -cp FILTER_COMP filter by compartment (i.e. production) + -sr FILTER_SERVICE filter by service (i.e. compute) + -sc FILTER_SCOPE filter by scope (i.e. AD,REGION,GLOBAL) + -ip Use Instance Principals for Authentication + -dt Use Delegation Token for Authentication + -js print in JSON format + -csv CSV Output to CSV files, Input as file header + +``` \ No newline at end of file diff --git a/examples/list_resources_in_tenancy/list_all_ipsec_tunnels_in_tenancy.py b/examples/list_resources_in_tenancy/list_all_ipsec_tunnels_in_tenancy.py index db958aeed0..0347d3be24 100755 --- a/examples/list_resources_in_tenancy/list_all_ipsec_tunnels_in_tenancy.py +++ b/examples/list_resources_in_tenancy/list_all_ipsec_tunnels_in_tenancy.py @@ -8,6 +8,8 @@ # @author: Adi Zohar # # Supports Python 3 +# +# DISCLAIMER – This is not an official Oracle application, It does not supported by Oracle Support, It should NOT be used for utilization calculation purposes ########################################################################## # Info: # List all IPSEC tunnels in Tenancy including DRG redundancy @@ -48,7 +50,6 @@ # -ip - Use Instance Principals for Authentication # -dt - Use Instance Principals with delegation token for cloud shell ########################################################################## - from __future__ import print_function import sys import argparse diff --git a/examples/list_resources_in_tenancy/list_all_virtual_circuits_in_tenancy.py b/examples/list_resources_in_tenancy/list_all_virtual_circuits_in_tenancy.py index e439fdcf31..dba338b494 100755 --- a/examples/list_resources_in_tenancy/list_all_virtual_circuits_in_tenancy.py +++ b/examples/list_resources_in_tenancy/list_all_virtual_circuits_in_tenancy.py @@ -8,6 +8,8 @@ # @author: Adi Zohar # # Supports Python 3 +# +# DISCLAIMER – This is not an official Oracle application, It does not supported by Oracle Support, It should NOT be used for utilization calculation purposes ########################################################################## # Info: # List all Virtual Circuits in Tenancy including DRG redundancy @@ -47,7 +49,6 @@ # -ip - Use Instance Principals for Authentication # -dt - Use Instance Principals with delegation token for cloud shell ########################################################################## - from __future__ import print_function import sys import argparse diff --git a/examples/list_resources_in_tenancy/list_bv_backups_in_tenancy.py b/examples/list_resources_in_tenancy/list_bv_backups_in_tenancy.py index ceedbe62b2..ae47189a7d 100644 --- a/examples/list_resources_in_tenancy/list_bv_backups_in_tenancy.py +++ b/examples/list_resources_in_tenancy/list_bv_backups_in_tenancy.py @@ -8,6 +8,8 @@ # @author: Adi Zohar # # Supports Python 3 +# +# DISCLAIMER – This is not an official Oracle application, It does not supported by Oracle Support, It should NOT be used for utilization calculation purposes ########################################################################## # Info: # List all boot volumes backups, volume backups and volume group backups in Tenancy diff --git a/examples/list_resources_in_tenancy/list_compute_tags_in_tenancy.py b/examples/list_resources_in_tenancy/list_compute_tags_in_tenancy.py index 8f13f7cf21..0cbf7a2aff 100755 --- a/examples/list_resources_in_tenancy/list_compute_tags_in_tenancy.py +++ b/examples/list_resources_in_tenancy/list_compute_tags_in_tenancy.py @@ -8,6 +8,8 @@ # @author: Adi Zohar # # Supports Python 3 +# +# DISCLAIMER – This is not an official Oracle application, It does not supported by Oracle Support, It should NOT be used for utilization calculation purposes ########################################################################## # Info: # List all compute tags in Tenancy diff --git a/examples/list_resources_in_tenancy/list_dbsystem_with_maintenance_in_tenancy.py b/examples/list_resources_in_tenancy/list_dbsystem_with_maintenance_in_tenancy.py index b1de136085..30447f2298 100755 --- a/examples/list_resources_in_tenancy/list_dbsystem_with_maintenance_in_tenancy.py +++ b/examples/list_resources_in_tenancy/list_dbsystem_with_maintenance_in_tenancy.py @@ -8,6 +8,8 @@ # @author: Adi Zohar # # Supports Python 3 +# +# DISCLAIMER – This is not an official Oracle application, It does not supported by Oracle Support, It should NOT be used for utilization calculation purposes ########################################################################## # Info: # List all dbsystems and exadatas including maintenance in Tenancy diff --git a/examples/list_resources_in_tenancy/list_limits_per_compartments.py b/examples/list_resources_in_tenancy/list_limits_per_compartments.py index 0c02a68579..e48ae5d2fc 100644 --- a/examples/list_resources_in_tenancy/list_limits_per_compartments.py +++ b/examples/list_resources_in_tenancy/list_limits_per_compartments.py @@ -8,6 +8,8 @@ # @author: Adi Zohar # # Supports Python 3 +# +# DISCLAIMER – This is not an official Oracle application, It does not supported by Oracle Support, It should NOT be used for utilization calculation purposes ########################################################################## # Application Command line parameters # diff --git a/examples/object_storage/README.md b/examples/object_storage/README.md new file mode 100644 index 0000000000..172dbb1b6b --- /dev/null +++ b/examples/object_storage/README.md @@ -0,0 +1,152 @@ +## Object Storage Utilities + +Object Storage Manipulation Tool allow customer to handle millions of object storage objects with simple scripts + +**DISCLAIMER – This is not an official Oracle application, It does not supported by Oracle Support, It should NOT be used for utilization calculation purposes + +**Developed by Adi Zohar, 2021** + +## Executing using Cloud Shell: +``` + 1. install oci sdk package + pip3 install --user oci + + 2. clone the oci sdk repo + git clone https://github.com/oracle/oci-python-sdk + + 3. Execute + cd $HOME/oci-python-sdk/examples/object_storage + python3 object_storage_bulk_copy.py -dt -parameters... + python3 object_storage_bulk_delete.py -dt -parameters... + python3 object_storage_bulk_restore.py -dt -parameters... + python3 object_storage_list_objects.py -dt -parameters... + python3 object_storage_bulk_rename.py -dt -parameters... +``` + +## object_storage_bulk_copy.py +Bulk Copy objects between buckets / tenants / regions + +``` +usage: object_storage_bulk_copy.py [-h] [-t CONFIG_PROFILE] [-p PROXY] [-ip] + [-dt] [-c CONFIG_FILE] [-sb SOURCE_BUCKET] + [-sr SOURCE_REGION] [-sn SOURCE_NAMESPACE] + [-sp SOURCE_PREFIX_INCLUDE] + [-se SOURCE_PREFIX_EXCLUDE] + [-db DESTINATION_BUCKET] + [-dr DESTINATION_REGION] + [-dn DESTINATION_NAMESPACE] [-ig] + +optional arguments: + -h, --help show this help message and exit + -t CONFIG_PROFILE Config file section to use (tenancy profile) + -p PROXY Set Proxy (i.e. www-proxy-server.com:80) + -ip Use Instance Principals for Authentication + -dt Use Delegation Token for Authentication + -c CONFIG_FILE Config File (default=~/.oci/config) + -sb SOURCE_BUCKET Source Bucket Name + -sr SOURCE_REGION Source Region (Default current connection) + -sn SOURCE_NAMESPACE Source Namespace (Default current connection) + -sp SOURCE_PREFIX_INCLUDE Source Prefix Include + -se SOURCE_PREFIX_EXCLUDE Source Prefix Exclude + -db DESTINATION_BUCKET Destination Bucket Name + -dr DESTINATION_REGION Destination Region + -dn DESTINATION_NAMESPACE Destination Namespace (Default current connection) + -ig Ignore Check if files exist at Destination +``` + +## object_storage_bulk_delete +Bulk delete bucket objects from a bucket with option to filter + +``` +usage: object_storage_bulk_delete.py [-h] [-t CONFIG_PROFILE] [-p PROXY] [-ip] + [-dt] [-c CONFIG_FILE] + [-sb SOURCE_BUCKET] [-sp SOURCE_PREFIX] + [-se SOURCE_PREFIX_EXCLUDE] + [-exclude_dirs] [-sr SOURCE_REGION] + +optional arguments: + -h, --help show this help message and exit + -t CONFIG_PROFILE Config file section to use (tenancy profile) + -p PROXY Set Proxy (i.e. www-proxy-server.com:80) + -ip Use Instance Principals for Authentication + -dt Use Delegation Token for Authentication + -c CONFIG_FILE Config File (default=~/.oci/config) + -sb SOURCE_BUCKET Source Bucket Name + -sp SOURCE_PREFIX Source Prefix Include + -se SOURCE_PREFIX_EXCLUDE Source Prefix Exclude + -exclude_dirs Exclude Directories + -sr SOURCE_REGION Source Region +``` + +## object_storage_bulk_restore +Bulk restore objects that in archive state +``` +usage: object_storage_bulk_restore.py [-h] [-t CONFIG_PROFILE] [-p PROXY] + [-ip] [-dt] [-c CONFIG_FILE] + [-sb SOURCE_BUCKET] + [-sp SOURCE_PREFIX_INCLUDE] + [-sr SOURCE_REGION] + +optional arguments: + -h, --help show this help message and exit + -t CONFIG_PROFILE Config file section to use (tenancy profile) + -p PROXY Set Proxy (i.e. www-proxy-server.com:80) + -ip Use Instance Principals for Authentication + -dt Use Delegation Token for Authentication + -c CONFIG_FILE Config File (default=~/.oci/config) + -sb SOURCE_BUCKET Source Bucket Name + -sp SOURCE_PREFIX_INCLUDE Source Prefix Include + -sr SOURCE_REGION Source Region +``` + +## object_storage_list_objects +Bulk list bucket objects or produce summary + +``` +usage: object_storage_list_objects.py [-h] [-t CONFIG_PROFILE] [-p PROXY] + [-ip] [-dt] [-c CONFIG_FILE] + [-sb SOURCE_BUCKET] [-sp SOURCE_PREFIX] + [-se SOURCE_PREFIX_EXCLUDE] + [-sr SOURCE_REGION] [-exclude_dirs] + [-f FILE] [-co] + +optional arguments: + -h, --help show this help message and exit + -t CONFIG_PROFILE Config file section to use (tenancy profile) + -p PROXY Set Proxy (i.e. www-proxy-server.com:80) + -ip Use Instance Principals for Authentication + -dt Use Delegation Token for Authentication + -c CONFIG_FILE Config File (default=~/.oci/config) + -sb SOURCE_BUCKET Source Bucket Name + -sp SOURCE_PREFIX Source Prefix Include + -se SOURCE_PREFIX_EXCLUDE Source Prefix Exclude + -sr SOURCE_REGION Source Region + -exclude_dirs Exclude Directories + -f FILE Output to file (as csv) + -co Count only files and size +``` + +## object_storage_bulk_rename.py +Bulk rename bucket objects, can be used to move objects to a "virtual" folder as well +``` +usage: object_storage_bulk_rename.py [-h] [-t CONFIG_PROFILE] [-p PROXY] [-ip] + [-dt] [-c CONFIG_FILE] + [-sb SOURCE_BUCKET] + [-sp SOURCE_PREFIX_INCLUDE] + [-sr SOURCE_REGION] + [-textrem TEXT_REMOVE] + [-textadd TEXT_APPEND] + +optional arguments: + -h, --help show this help message and exit + -t CONFIG_PROFILE Config file section to use (tenancy profile) + -p PROXY Set Proxy (i.e. www-proxy-server.com:80) + -ip Use Instance Principals for Authentication + -dt Use Delegation Token for Authentication + -c CONFIG_FILE Config File (default=~/.oci/config) + -sb SOURCE_BUCKET Source Bucket Name + -sp SOURCE_PREFIX_INCLUDE Source Prefix Include + -sr SOURCE_REGION Source Region + -textrem TEXT_REMOVE text remove prefix (can be used to remove folder) + -textadd TEXT_APPEND text append prefix (can be used to add folder) +``` \ No newline at end of file diff --git a/examples/object_storage/object_storage_bulk_copy.py b/examples/object_storage/object_storage_bulk_copy.py index 3478f88251..a2018fe069 100644 --- a/examples/object_storage/object_storage_bulk_copy.py +++ b/examples/object_storage/object_storage_bulk_copy.py @@ -8,6 +8,8 @@ # @author: Tim S and Adi Z # # Supports Python 3 +# +# DISCLAIMER – This is not an official Oracle application, It does not supported by Oracle Support, It should NOT be used for utilization calculation purposes ########################################################################## # Info: # Bulk copy object storage bucket to other bucket with parallel threads diff --git a/examples/object_storage/object_storage_bulk_delete.py b/examples/object_storage/object_storage_bulk_delete.py index d57e0d733f..bcec7fe208 100644 --- a/examples/object_storage/object_storage_bulk_delete.py +++ b/examples/object_storage/object_storage_bulk_delete.py @@ -8,6 +8,8 @@ # @author: Adi Zohar # # Supports Python 3 +# +# DISCLAIMER – This is not an official Oracle application, It does not supported by Oracle Support, It should NOT be used for utilization calculation purposes ########################################################################## # Info: # Bulk delete with parallel threads diff --git a/examples/object_storage/object_storage_bulk_rename.py b/examples/object_storage/object_storage_bulk_rename.py index c60f2aa054..f75e8cfe86 100644 --- a/examples/object_storage/object_storage_bulk_rename.py +++ b/examples/object_storage/object_storage_bulk_rename.py @@ -8,6 +8,8 @@ # @author: Adi Z # # Supports Python 3 +# +# DISCLAIMER – This is not an official Oracle application, It does not supported by Oracle Support, It should NOT be used for utilization calculation purposes ########################################################################## # Info: # Bulk rename with parallel threads diff --git a/examples/object_storage/object_storage_bulk_restore.py b/examples/object_storage/object_storage_bulk_restore.py index 760d05f243..0c565d2989 100644 --- a/examples/object_storage/object_storage_bulk_restore.py +++ b/examples/object_storage/object_storage_bulk_restore.py @@ -8,6 +8,8 @@ # @author: Tim S and Adi Z # # Supports Python 3 +# +# DISCLAIMER – This is not an official Oracle application, It does not supported by Oracle Support, It should NOT be used for utilization calculation purposes ########################################################################## # Info: # Bulk restore with parallel threads diff --git a/examples/object_storage/object_storage_list_objects.py b/examples/object_storage/object_storage_list_objects.py index 504f34bea3..38f34eaa9b 100644 --- a/examples/object_storage/object_storage_list_objects.py +++ b/examples/object_storage/object_storage_list_objects.py @@ -8,6 +8,8 @@ # @author: Adi Zohar, Oct 18th 2020 # # Supports Python 3 +# +# DISCLAIMER – This is not an official Oracle application, It does not supported by Oracle Support, It should NOT be used for utilization calculation purposes ########################################################################## # Info: # count objects or list objects with option to filter by prefix and write to file diff --git a/examples/tag_resources_in_tenancy/tag_resources_in_tenancy.py b/examples/tag_resources_in_tenancy/tag_resources_in_tenancy.py index 15bb54c302..1a221c89bf 100644 --- a/examples/tag_resources_in_tenancy/tag_resources_in_tenancy.py +++ b/examples/tag_resources_in_tenancy/tag_resources_in_tenancy.py @@ -8,6 +8,8 @@ # @author: Adi Zohar # # Supports Python 3 +# +# DISCLAIMER – This is not an official Oracle application, It does not supported by Oracle Support, It should NOT be used for utilization calculation purposes ########################################################################## # Info: # Tag Resources in Tenancy @@ -104,7 +106,7 @@ def get_string_dict(dic, namespace=False): for key, val in dic.items(): if len(retval) > 0: retval += ", " - retval += key + "." + "".join("{}={}".format(k, v) for k, v in val.items()) + retval += ", ".join("{}.{}={}".format(key, k, v) for k, v in val.items()) # if free else: retval = ', '.join("{}={}".format(k, v) for k, v in dic.items()) @@ -150,7 +152,7 @@ def command_line(): if ("defined" in cmd.action): assign_tag_namespace = cmd.tag.split(".")[0] assign_tag_key = cmd.tag.split(".")[1].split("=")[0] - assign_tag_value = cmd.tag.split(".")[1].split("=")[1] + assign_tag_value = cmd.tag.split("=")[1] if not (assign_tag_namespace or assign_tag_key or assign_tag_value): print("Error with tag format, must be in format - namespace.key=value") raise SystemExit @@ -373,7 +375,7 @@ def handle_object(compartment, region_name, obj_name, list_object, update_object if availability_domains: array = oci.pagination.list_call_get_all_results(list_object, availability_domain, compartment.id, retry_strategy=oci.retry.DEFAULT_RETRY_STRATEGY).data elif namespace: - array = oci.pagination.list_call_get_all_results(list_object, namespace, compartment.id, retry_strategy=oci.retry.DEFAULT_RETRY_STRATEGY).data + array = oci.pagination.list_call_get_all_results(list_object, namespace, compartment.id, retry_strategy=oci.retry.DEFAULT_RETRY_STRATEGY, fields=['tags']).data else: array = oci.pagination.list_call_get_all_results(list_object, compartment.id, retry_strategy=oci.retry.DEFAULT_RETRY_STRATEGY).data except oci.exceptions.ServiceError as e: @@ -385,7 +387,7 @@ def handle_object(compartment, region_name, obj_name, list_object, update_object # loop on Array for arr in array: - if not namespace: + if not namespace and obj_name != "Network CPEs": if arr.lifecycle_state == "TERMINATING" or arr.lifecycle_state == "TERMINATED": continue @@ -462,7 +464,11 @@ def handle_tags(defined_tags, freeform_tags): # Del Key if "del" in cmd.action: if defined_tags_exist: - defined_tags.pop(assign_tag_namespace, None) + # remove the key value + defined_tags[assign_tag_namespace].pop(assign_tag_key, None) + # dict is empty + if not defined_tags[assign_tag_namespace]: + defined_tags.pop(assign_tag_namespace, None) tags_process = "Deleted" # Add Key @@ -470,7 +476,12 @@ def handle_tags(defined_tags, freeform_tags): if not defined_tags_exist: if not defined_tags: defined_tags = {} - defined_tags[assign_tag_namespace] = {assign_tag_key: assign_tag_value} + + # if namespace exist, add to the dict. + if assign_tag_namespace in defined_tags: + defined_tags[assign_tag_namespace][assign_tag_key] = assign_tag_value + else: + defined_tags[assign_tag_namespace] = {assign_tag_key: assign_tag_value} tags_process = "Added" ############################################ @@ -612,7 +623,6 @@ def main(): handle_object(compartment, region_name, "Network IPSECs", network_client.list_ip_sec_connections, network_client.update_ip_sec_connection, oci.core.models.UpdateIPSecConnectionDetails) handle_object(compartment, region_name, "Network LPGs", network_client.list_local_peering_gateways, network_client.update_local_peering_gateway, oci.core.models.UpdateLocalPeeringGatewayDetails) handle_object(compartment, region_name, "Network NATGWs", network_client.list_nat_gateways, network_client.update_nat_gateway, oci.core.models.UpdateNatGatewayDetails) - handle_object(compartment, region_name, "Network NSGs", network_client.list_network_security_groups, network_client.update_network_security_group, oci.core.models.UpdateNetworkSecurityGroupDetails) handle_object(compartment, region_name, "Network RPGs", network_client.list_remote_peering_connections, network_client.update_remote_peering_connection, oci.core.models.UpdateRemotePeeringConnectionDetails) handle_object(compartment, region_name, "Network Routes", network_client.list_route_tables, network_client.update_route_table, oci.core.models.UpdateRouteTableDetails) handle_object(compartment, region_name, "Network SLs", network_client.list_security_lists, network_client.update_security_list, oci.core.models.UpdateSecurityListDetails) diff --git a/requirements.txt b/requirements.txt index 984d3540a0..66c321360d 100755 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ autodocsumm==0.1.11 certifi -configparser==4.0.2 +configparser==4.0.2; python_version < '3' coverage==4.5.2 cryptography>=3.2.1,<=3.4.7 flake8==3.6.0 diff --git a/src/oci/__init__.py b/src/oci/__init__.py index 38ff20a943..d8773f9c71 100644 --- a/src/oci/__init__.py +++ b/src/oci/__init__.py @@ -16,9 +16,9 @@ if os.getenv("OCI_PYTHON_SDK_NO_SERVICE_IMPORTS", "").lower() in ["true", "1"]: pass else: - from . import ai_anomaly_detection, ai_language, analytics, announcements_service, apigateway, apm_config, apm_control_plane, apm_synthetics, apm_traces, application_migration, artifacts, audit, autoscaling, bastion, bds, blockchain, budget, cims, cloud_guard, compute_instance_agent, container_engine, core, data_catalog, data_flow, data_integration, data_labeling_service, data_labeling_service_dataplane, data_safe, data_science, database, database_management, database_migration, devops, dns, dts, email, events, file_storage, functions, generic_artifacts_content, golden_gate, healthchecks, identity, integration, jms, key_management, limits, load_balancer, log_analytics, logging, loggingingestion, loggingsearch, management_agent, management_dashboard, marketplace, monitoring, mysql, network_load_balancer, nosql, object_storage, oce, ocvp, oda, ons, operator_access_control, opsi, optimizer, os_management, resource_manager, resource_search, rover, sch, secrets, service_catalog, streaming, tenant_manager_control_plane, usage_api, vault, vulnerability_scanning, waas, waf, work_requests + from . import ai_anomaly_detection, ai_language, analytics, announcements_service, apigateway, apm_config, apm_control_plane, apm_synthetics, apm_traces, application_migration, artifacts, audit, autoscaling, bastion, bds, blockchain, budget, certificates, certificates_management, cims, cloud_guard, compute_instance_agent, container_engine, core, data_catalog, data_flow, data_integration, data_labeling_service, data_labeling_service_dataplane, data_safe, data_science, database, database_management, database_migration, devops, dns, dts, email, events, file_storage, functions, generic_artifacts_content, golden_gate, healthchecks, identity, integration, jms, key_management, limits, load_balancer, log_analytics, logging, loggingingestion, loggingsearch, management_agent, management_dashboard, marketplace, monitoring, mysql, network_load_balancer, nosql, object_storage, oce, ocvp, oda, ons, operator_access_control, opsi, optimizer, os_management, resource_manager, resource_search, rover, sch, secrets, service_catalog, streaming, tenant_manager_control_plane, usage_api, vault, vulnerability_scanning, waas, waf, work_requests __all__ = [ "BaseClient", "Error", "Request", "Response", "Signer", "config", "constants", "decorators", "exceptions", "regions", "wait_until", "pagination", "auth", "retry", "fips", "circuit_breaker", - "ai_anomaly_detection", "ai_language", "analytics", "announcements_service", "apigateway", "apm_config", "apm_control_plane", "apm_synthetics", "apm_traces", "application_migration", "artifacts", "audit", "autoscaling", "bastion", "bds", "blockchain", "budget", "cims", "cloud_guard", "compute_instance_agent", "container_engine", "core", "data_catalog", "data_flow", "data_integration", "data_labeling_service", "data_labeling_service_dataplane", "data_safe", "data_science", "database", "database_management", "database_migration", "devops", "dns", "dts", "email", "events", "file_storage", "functions", "generic_artifacts_content", "golden_gate", "healthchecks", "identity", "integration", "jms", "key_management", "limits", "load_balancer", "log_analytics", "logging", "loggingingestion", "loggingsearch", "management_agent", "management_dashboard", "marketplace", "monitoring", "mysql", "network_load_balancer", "nosql", "object_storage", "oce", "ocvp", "oda", "ons", "operator_access_control", "opsi", "optimizer", "os_management", "resource_manager", "resource_search", "rover", "sch", "secrets", "service_catalog", "streaming", "tenant_manager_control_plane", "usage_api", "vault", "vulnerability_scanning", "waas", "waf", "work_requests" + "ai_anomaly_detection", "ai_language", "analytics", "announcements_service", "apigateway", "apm_config", "apm_control_plane", "apm_synthetics", "apm_traces", "application_migration", "artifacts", "audit", "autoscaling", "bastion", "bds", "blockchain", "budget", "certificates", "certificates_management", "cims", "cloud_guard", "compute_instance_agent", "container_engine", "core", "data_catalog", "data_flow", "data_integration", "data_labeling_service", "data_labeling_service_dataplane", "data_safe", "data_science", "database", "database_management", "database_migration", "devops", "dns", "dts", "email", "events", "file_storage", "functions", "generic_artifacts_content", "golden_gate", "healthchecks", "identity", "integration", "jms", "key_management", "limits", "load_balancer", "log_analytics", "logging", "loggingingestion", "loggingsearch", "management_agent", "management_dashboard", "marketplace", "monitoring", "mysql", "network_load_balancer", "nosql", "object_storage", "oce", "ocvp", "oda", "ons", "operator_access_control", "opsi", "optimizer", "os_management", "resource_manager", "resource_search", "rover", "sch", "secrets", "service_catalog", "streaming", "tenant_manager_control_plane", "usage_api", "vault", "vulnerability_scanning", "waas", "waf", "work_requests" ] diff --git a/src/oci/certificates/__init__.py b/src/oci/certificates/__init__.py new file mode 100644 index 0000000000..3bb61317a9 --- /dev/null +++ b/src/oci/certificates/__init__.py @@ -0,0 +1,12 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from __future__ import absolute_import + + +from .certificates_client import CertificatesClient +from .certificates_client_composite_operations import CertificatesClientCompositeOperations +from . import models + +__all__ = ["CertificatesClient", "CertificatesClientCompositeOperations", "models"] diff --git a/src/oci/certificates/certificates_client.py b/src/oci/certificates/certificates_client.py new file mode 100644 index 0000000000..28c6c50620 --- /dev/null +++ b/src/oci/certificates/certificates_client.py @@ -0,0 +1,646 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from __future__ import absolute_import + +from oci._vendor import requests # noqa: F401 +from oci._vendor import six + +from oci import retry, circuit_breaker # 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, get_signer_from_authentication_type, AUTHENTICATION_TYPE_FIELD_NAME +from .models import certificates_type_mapping +missing = Sentinel("Missing") + + +class CertificatesClient(object): + """ + API for retrieving certificates. + """ + + 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 `__. + + :param obj circuit_breaker_strategy: (optional) + A circuit breaker strategy to apply to all calls made by this service client (i.e. at the client level). + This client will not have circuit breakers enabled by default, users can use their own circuit breaker strategy or the convenient :py:data:`~oci.circuit_breaker.DEFAULT_CIRCUIT_BREAKER_STRATEGY` provided by the SDK to enable it. + The specifics of circuit breaker strategy are described `here `__. + + :param function circuit_breaker_callback: (optional) + Callback function to receive any exceptions triggerred by the circuit breaker. + """ + validate_config(config, signer=kwargs.get('signer')) + if 'signer' in kwargs: + signer = kwargs['signer'] + + elif AUTHENTICATION_TYPE_FIELD_NAME in config: + signer = get_signer_from_authentication_type(config) + + 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'), + 'base_path': '/20210224', + 'service_endpoint_template': 'https://certificates.{region}.oci.{secondLevelDomain}', + 'skip_deserialization': kwargs.get('skip_deserialization', False), + 'circuit_breaker_strategy': kwargs.get('circuit_breaker_strategy', circuit_breaker.GLOBAL_CIRCUIT_BREAKER_STRATEGY) + } + if 'timeout' in kwargs: + base_client_init_kwargs['timeout'] = kwargs.get('timeout') + self.base_client = BaseClient("certificates", config, signer, certificates_type_mapping, **base_client_init_kwargs) + self.retry_strategy = kwargs.get('retry_strategy') + self.circuit_breaker_callback = kwargs.get('circuit_breaker_callback') + + def get_ca_bundle(self, ca_bundle_id, **kwargs): + """ + Gets a ca-bundle bundle. + + + :param str ca_bundle_id: (required) + The OCID of the CA bundle. + + :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. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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.certificates.models.CaBundle` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_ca_bundle API. + """ + resource_path = "/caBundles/{caBundleId}" + 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_ca_bundle got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "caBundleId": ca_bundle_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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + 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="CaBundle") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="CaBundle") + + def get_certificate_authority_bundle(self, certificate_authority_id, **kwargs): + """ + Gets a certificate authority bundle that matches either the specified `stage`, `name`, or `versionNumber` parameter. + If none of these parameters are provided, the bundle for the certificate authority version marked as `CURRENT` will be returned. + + + :param str certificate_authority_id: (required) + The OCID of the certificate authority (CA). + + :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 version_number: (optional) + The version number of the certificate authority (CA). + + :param str certificate_authority_version_name: (optional) + The name of the certificate authority (CA). (This might be referred to as the name of the CA version, as every CA consists of at least one version.) Names are unique across versions of a given CA. + + :param str stage: (optional) + The rotation state of the certificate version. + + Allowed values are: "CURRENT", "PENDING", "LATEST", "PREVIOUS", "DEPRECATED" + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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.certificates.models.CertificateAuthorityBundle` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_certificate_authority_bundle API. + """ + resource_path = "/certificateAuthorityBundles/{certificateAuthorityId}" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "opc_request_id", + "version_number", + "certificate_authority_version_name", + "stage" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "get_certificate_authority_bundle got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "certificateAuthorityId": certificate_authority_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)) + + if 'stage' in kwargs: + stage_allowed_values = ["CURRENT", "PENDING", "LATEST", "PREVIOUS", "DEPRECATED"] + if kwargs['stage'] not in stage_allowed_values: + raise ValueError( + "Invalid value for `stage`, must be one of {0}".format(stage_allowed_values) + ) + + query_params = { + "versionNumber": kwargs.get("version_number", missing), + "certificateAuthorityVersionName": kwargs.get("certificate_authority_version_name", missing), + "stage": kwargs.get("stage", 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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="CertificateAuthorityBundle") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="CertificateAuthorityBundle") + + def get_certificate_bundle(self, certificate_id, **kwargs): + """ + Gets a certificate bundle that matches either the specified `stage`, `versionName`, or `versionNumber` parameter. + If none of these parameters are provided, the bundle for the certificate version marked as `CURRENT` will be returned. + + By default, the private key is not included in the query result, and a CertificateBundlePublicOnly is returned. + If the private key is needed, use the CertificateBundleTypeQueryParam parameter to get a CertificateBundleWithPrivateKey response. + + + :param str certificate_id: (required) + The OCID of the certificate. + + :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 version_number: (optional) + The version number of the certificate. The default value is 0, which means that this query parameter is ignored. + + :param str certificate_version_name: (optional) + The name of the certificate. (This might be referred to as the name of the certificate version, as every certificate consists of at least one version.) Names are unique across versions of a given certificate. + + :param str stage: (optional) + The rotation state of the certificate version. + + Allowed values are: "CURRENT", "PENDING", "LATEST", "PREVIOUS", "DEPRECATED" + + :param str certificate_bundle_type: (optional) + The type of certificate bundle. By default, the private key fields are not returned. When querying for certificate bundles, to return results with certificate contents, the private key in PEM format, and the private key passphrase, specify the value of this parameter as `CERTIFICATE_CONTENT_WITH_PRIVATE_KEY`. + + Allowed values are: "CERTIFICATE_CONTENT_PUBLIC_ONLY", "CERTIFICATE_CONTENT_WITH_PRIVATE_KEY" + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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.certificates.models.CertificateBundle` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_certificate_bundle API. + """ + resource_path = "/certificateBundles/{certificateId}" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "opc_request_id", + "version_number", + "certificate_version_name", + "stage", + "certificate_bundle_type" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "get_certificate_bundle got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "certificateId": certificate_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)) + + if 'stage' in kwargs: + stage_allowed_values = ["CURRENT", "PENDING", "LATEST", "PREVIOUS", "DEPRECATED"] + if kwargs['stage'] not in stage_allowed_values: + raise ValueError( + "Invalid value for `stage`, must be one of {0}".format(stage_allowed_values) + ) + + if 'certificate_bundle_type' in kwargs: + certificate_bundle_type_allowed_values = ["CERTIFICATE_CONTENT_PUBLIC_ONLY", "CERTIFICATE_CONTENT_WITH_PRIVATE_KEY"] + if kwargs['certificate_bundle_type'] not in certificate_bundle_type_allowed_values: + raise ValueError( + "Invalid value for `certificate_bundle_type`, must be one of {0}".format(certificate_bundle_type_allowed_values) + ) + + query_params = { + "versionNumber": kwargs.get("version_number", missing), + "certificateVersionName": kwargs.get("certificate_version_name", missing), + "stage": kwargs.get("stage", missing), + "certificateBundleType": kwargs.get("certificate_bundle_type", 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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="CertificateBundle") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="CertificateBundle") + + def list_certificate_authority_bundle_versions(self, certificate_authority_id, **kwargs): + """ + Lists all certificate authority bundle versions for the specified certificate authority. + + + :param str certificate_authority_id: (required) + The OCID of the certificate authority (CA). + + :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 sort_by: (optional) + The field to sort by. You can specify only one sort order. The default + order for `VERSION_NUMBER` is ascending. + + Allowed values are: "VERSION_NUMBER" + + :param str sort_order: (optional) + The sort order to use, either ascending (`ASC`) or descending (`DESC`). + + Allowed values are: "ASC", "DESC" + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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.certificates.models.CertificateAuthorityBundleVersionCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_certificate_authority_bundle_versions API. + """ + resource_path = "/certificateAuthorityBundles/{certificateAuthorityId}/versions" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "opc_request_id", + "sort_by", + "sort_order" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_certificate_authority_bundle_versions got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "certificateAuthorityId": certificate_authority_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)) + + if 'sort_by' in kwargs: + sort_by_allowed_values = ["VERSION_NUMBER"] + 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) + ) + + 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) + ) + + query_params = { + "sortBy": kwargs.get("sort_by", missing), + "sortOrder": kwargs.get("sort_order", 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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="CertificateAuthorityBundleVersionCollection") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="CertificateAuthorityBundleVersionCollection") + + def list_certificate_bundle_versions(self, certificate_id, **kwargs): + """ + Lists all certificate bundle versions for the specified certificate. + + + :param str certificate_id: (required) + The OCID of the certificate. + + :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 sort_by: (optional) + The field to sort by. You can specify only one sort order. The default + order for `VERSION_NUMBER` is ascending. + + Allowed values are: "VERSION_NUMBER" + + :param str sort_order: (optional) + The sort order to use, either ascending (`ASC`) or descending (`DESC`). + + Allowed values are: "ASC", "DESC" + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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.certificates.models.CertificateBundleVersionCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_certificate_bundle_versions API. + """ + resource_path = "/certificateBundles/{certificateId}/versions" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "opc_request_id", + "sort_by", + "sort_order" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_certificate_bundle_versions got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "certificateId": certificate_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)) + + if 'sort_by' in kwargs: + sort_by_allowed_values = ["VERSION_NUMBER"] + 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) + ) + + 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) + ) + + query_params = { + "sortBy": kwargs.get("sort_by", missing), + "sortOrder": kwargs.get("sort_order", 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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="CertificateBundleVersionCollection") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="CertificateBundleVersionCollection") diff --git a/src/oci/certificates/certificates_client_composite_operations.py b/src/oci/certificates/certificates_client_composite_operations.py new file mode 100644 index 0000000000..fc7901b2e9 --- /dev/null +++ b/src/oci/certificates/certificates_client_composite_operations.py @@ -0,0 +1,24 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +import oci # noqa: F401 +from oci.util import WAIT_RESOURCE_NOT_FOUND # noqa: F401 + + +class CertificatesClientCompositeOperations(object): + """ + This class provides a wrapper around :py:class:`~oci.certificates.CertificatesClient` 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 CertificatesClientCompositeOperations object + + :param CertificatesClient client: + The service client which will be wrapped by this object + """ + self.client = client diff --git a/src/oci/certificates/models/__init__.py b/src/oci/certificates/models/__init__.py new file mode 100644 index 0000000000..cf38a5fa00 --- /dev/null +++ b/src/oci/certificates/models/__init__.py @@ -0,0 +1,32 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from __future__ import absolute_import + +from .ca_bundle import CaBundle +from .certificate_authority_bundle import CertificateAuthorityBundle +from .certificate_authority_bundle_version_collection import CertificateAuthorityBundleVersionCollection +from .certificate_authority_bundle_version_summary import CertificateAuthorityBundleVersionSummary +from .certificate_bundle import CertificateBundle +from .certificate_bundle_public_only import CertificateBundlePublicOnly +from .certificate_bundle_version_collection import CertificateBundleVersionCollection +from .certificate_bundle_version_summary import CertificateBundleVersionSummary +from .certificate_bundle_with_private_key import CertificateBundleWithPrivateKey +from .revocation_status import RevocationStatus +from .validity import Validity + +# Maps type names to classes for certificates services. +certificates_type_mapping = { + "CaBundle": CaBundle, + "CertificateAuthorityBundle": CertificateAuthorityBundle, + "CertificateAuthorityBundleVersionCollection": CertificateAuthorityBundleVersionCollection, + "CertificateAuthorityBundleVersionSummary": CertificateAuthorityBundleVersionSummary, + "CertificateBundle": CertificateBundle, + "CertificateBundlePublicOnly": CertificateBundlePublicOnly, + "CertificateBundleVersionCollection": CertificateBundleVersionCollection, + "CertificateBundleVersionSummary": CertificateBundleVersionSummary, + "CertificateBundleWithPrivateKey": CertificateBundleWithPrivateKey, + "RevocationStatus": RevocationStatus, + "Validity": Validity +} diff --git a/src/oci/certificates/models/ca_bundle.py b/src/oci/certificates/models/ca_bundle.py new file mode 100644 index 0000000000..128965c26a --- /dev/null +++ b/src/oci/certificates/models/ca_bundle.py @@ -0,0 +1,132 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 CaBundle(object): + """ + The contents of the CA bundle (root and intermediate certificates), properties of the CA bundle, and user-provided contextual metadata for the CA bundle. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CaBundle 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 CaBundle. + :type id: str + + :param name: + The value to assign to the name property of this CaBundle. + :type name: str + + :param ca_bundle_pem: + The value to assign to the ca_bundle_pem property of this CaBundle. + :type ca_bundle_pem: str + + """ + self.swagger_types = { + 'id': 'str', + 'name': 'str', + 'ca_bundle_pem': 'str' + } + + self.attribute_map = { + 'id': 'id', + 'name': 'name', + 'ca_bundle_pem': 'caBundlePem' + } + + self._id = None + self._name = None + self._ca_bundle_pem = None + + @property + def id(self): + """ + **[Required]** Gets the id of this CaBundle. + The OCID of the CA bundle. + + + :return: The id of this CaBundle. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this CaBundle. + The OCID of the CA bundle. + + + :param id: The id of this CaBundle. + :type: str + """ + self._id = id + + @property + def name(self): + """ + **[Required]** Gets the name of this CaBundle. + A user-friendly name for the CA bundle. Names are unique within a compartment. Valid characters include uppercase or lowercase letters, numbers, hyphens, underscores, and periods. + + + :return: The name of this CaBundle. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """ + Sets the name of this CaBundle. + A user-friendly name for the CA bundle. Names are unique within a compartment. Valid characters include uppercase or lowercase letters, numbers, hyphens, underscores, and periods. + + + :param name: The name of this CaBundle. + :type: str + """ + self._name = name + + @property + def ca_bundle_pem(self): + """ + **[Required]** Gets the ca_bundle_pem of this CaBundle. + Certificates (in PEM format) in the CA bundle. Can be of arbitrary length. + + + :return: The ca_bundle_pem of this CaBundle. + :rtype: str + """ + return self._ca_bundle_pem + + @ca_bundle_pem.setter + def ca_bundle_pem(self, ca_bundle_pem): + """ + Sets the ca_bundle_pem of this CaBundle. + Certificates (in PEM format) in the CA bundle. Can be of arbitrary length. + + + :param ca_bundle_pem: The ca_bundle_pem of this CaBundle. + :type: str + """ + self._ca_bundle_pem = ca_bundle_pem + + 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/certificates/models/certificate_authority_bundle.py b/src/oci/certificates/models/certificate_authority_bundle.py new file mode 100644 index 0000000000..b7e790dcc5 --- /dev/null +++ b/src/oci/certificates/models/certificate_authority_bundle.py @@ -0,0 +1,412 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 CertificateAuthorityBundle(object): + """ + The contents of the certificate, properties of the certificate (and certificate version), and user-provided contextual metadata for the certificate. + """ + + #: A constant which can be used with the stages property of a CertificateAuthorityBundle. + #: This constant has a value of "CURRENT" + STAGES_CURRENT = "CURRENT" + + #: A constant which can be used with the stages property of a CertificateAuthorityBundle. + #: This constant has a value of "PENDING" + STAGES_PENDING = "PENDING" + + #: A constant which can be used with the stages property of a CertificateAuthorityBundle. + #: This constant has a value of "LATEST" + STAGES_LATEST = "LATEST" + + #: A constant which can be used with the stages property of a CertificateAuthorityBundle. + #: This constant has a value of "PREVIOUS" + STAGES_PREVIOUS = "PREVIOUS" + + #: A constant which can be used with the stages property of a CertificateAuthorityBundle. + #: This constant has a value of "DEPRECATED" + STAGES_DEPRECATED = "DEPRECATED" + + #: A constant which can be used with the stages property of a CertificateAuthorityBundle. + #: This constant has a value of "FAILED" + STAGES_FAILED = "FAILED" + + def __init__(self, **kwargs): + """ + Initializes a new CertificateAuthorityBundle object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param certificate_authority_id: + The value to assign to the certificate_authority_id property of this CertificateAuthorityBundle. + :type certificate_authority_id: str + + :param certificate_authority_name: + The value to assign to the certificate_authority_name property of this CertificateAuthorityBundle. + :type certificate_authority_name: str + + :param serial_number: + The value to assign to the serial_number property of this CertificateAuthorityBundle. + :type serial_number: str + + :param certificate_pem: + The value to assign to the certificate_pem property of this CertificateAuthorityBundle. + :type certificate_pem: str + + :param cert_chain_pem: + The value to assign to the cert_chain_pem property of this CertificateAuthorityBundle. + :type cert_chain_pem: str + + :param version_name: + The value to assign to the version_name property of this CertificateAuthorityBundle. + :type version_name: str + + :param time_created: + The value to assign to the time_created property of this CertificateAuthorityBundle. + :type time_created: datetime + + :param version_number: + The value to assign to the version_number property of this CertificateAuthorityBundle. + :type version_number: int + + :param validity: + The value to assign to the validity property of this CertificateAuthorityBundle. + :type validity: oci.certificates.models.Validity + + :param stages: + The value to assign to the stages property of this CertificateAuthorityBundle. + Allowed values for items in this list are: "CURRENT", "PENDING", "LATEST", "PREVIOUS", "DEPRECATED", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type stages: list[str] + + :param revocation_status: + The value to assign to the revocation_status property of this CertificateAuthorityBundle. + :type revocation_status: oci.certificates.models.RevocationStatus + + """ + self.swagger_types = { + 'certificate_authority_id': 'str', + 'certificate_authority_name': 'str', + 'serial_number': 'str', + 'certificate_pem': 'str', + 'cert_chain_pem': 'str', + 'version_name': 'str', + 'time_created': 'datetime', + 'version_number': 'int', + 'validity': 'Validity', + 'stages': 'list[str]', + 'revocation_status': 'RevocationStatus' + } + + self.attribute_map = { + 'certificate_authority_id': 'certificateAuthorityId', + 'certificate_authority_name': 'certificateAuthorityName', + 'serial_number': 'serialNumber', + 'certificate_pem': 'certificatePem', + 'cert_chain_pem': 'certChainPem', + 'version_name': 'versionName', + 'time_created': 'timeCreated', + 'version_number': 'versionNumber', + 'validity': 'validity', + 'stages': 'stages', + 'revocation_status': 'revocationStatus' + } + + self._certificate_authority_id = None + self._certificate_authority_name = None + self._serial_number = None + self._certificate_pem = None + self._cert_chain_pem = None + self._version_name = None + self._time_created = None + self._version_number = None + self._validity = None + self._stages = None + self._revocation_status = None + + @property + def certificate_authority_id(self): + """ + **[Required]** Gets the certificate_authority_id of this CertificateAuthorityBundle. + The OCID of the certificate authority (CA). + + + :return: The certificate_authority_id of this CertificateAuthorityBundle. + :rtype: str + """ + return self._certificate_authority_id + + @certificate_authority_id.setter + def certificate_authority_id(self, certificate_authority_id): + """ + Sets the certificate_authority_id of this CertificateAuthorityBundle. + The OCID of the certificate authority (CA). + + + :param certificate_authority_id: The certificate_authority_id of this CertificateAuthorityBundle. + :type: str + """ + self._certificate_authority_id = certificate_authority_id + + @property + def certificate_authority_name(self): + """ + **[Required]** Gets the certificate_authority_name of this CertificateAuthorityBundle. + The name of the CA. + + + :return: The certificate_authority_name of this CertificateAuthorityBundle. + :rtype: str + """ + return self._certificate_authority_name + + @certificate_authority_name.setter + def certificate_authority_name(self, certificate_authority_name): + """ + Sets the certificate_authority_name of this CertificateAuthorityBundle. + The name of the CA. + + + :param certificate_authority_name: The certificate_authority_name of this CertificateAuthorityBundle. + :type: str + """ + self._certificate_authority_name = certificate_authority_name + + @property + def serial_number(self): + """ + **[Required]** Gets the serial_number of this CertificateAuthorityBundle. + A unique certificate identifier used in certificate revocation tracking, formatted as octets. + Example: `03 AC FC FA CC B3 CB 02 B8 F8 DE F5 85 E7 7B FF` + + + :return: The serial_number of this CertificateAuthorityBundle. + :rtype: str + """ + return self._serial_number + + @serial_number.setter + def serial_number(self, serial_number): + """ + Sets the serial_number of this CertificateAuthorityBundle. + A unique certificate identifier used in certificate revocation tracking, formatted as octets. + Example: `03 AC FC FA CC B3 CB 02 B8 F8 DE F5 85 E7 7B FF` + + + :param serial_number: The serial_number of this CertificateAuthorityBundle. + :type: str + """ + self._serial_number = serial_number + + @property + def certificate_pem(self): + """ + **[Required]** Gets the certificate_pem of this CertificateAuthorityBundle. + The certificate (in PEM format) for this CA version. + + + :return: The certificate_pem of this CertificateAuthorityBundle. + :rtype: str + """ + return self._certificate_pem + + @certificate_pem.setter + def certificate_pem(self, certificate_pem): + """ + Sets the certificate_pem of this CertificateAuthorityBundle. + The certificate (in PEM format) for this CA version. + + + :param certificate_pem: The certificate_pem of this CertificateAuthorityBundle. + :type: str + """ + self._certificate_pem = certificate_pem + + @property + def cert_chain_pem(self): + """ + Gets the cert_chain_pem of this CertificateAuthorityBundle. + The certificate chain (in PEM format) for this CA version. + + + :return: The cert_chain_pem of this CertificateAuthorityBundle. + :rtype: str + """ + return self._cert_chain_pem + + @cert_chain_pem.setter + def cert_chain_pem(self, cert_chain_pem): + """ + Sets the cert_chain_pem of this CertificateAuthorityBundle. + The certificate chain (in PEM format) for this CA version. + + + :param cert_chain_pem: The cert_chain_pem of this CertificateAuthorityBundle. + :type: str + """ + self._cert_chain_pem = cert_chain_pem + + @property + def version_name(self): + """ + Gets the version_name of this CertificateAuthorityBundle. + The name of the CA. + + + :return: The version_name of this CertificateAuthorityBundle. + :rtype: str + """ + return self._version_name + + @version_name.setter + def version_name(self, version_name): + """ + Sets the version_name of this CertificateAuthorityBundle. + The name of the CA. + + + :param version_name: The version_name of this CertificateAuthorityBundle. + :type: str + """ + self._version_name = version_name + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this CertificateAuthorityBundle. + A property indicating when the CA was created, expressed in `RFC 3339`__ timestamp format. + Example: `2019-04-03T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_created of this CertificateAuthorityBundle. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this CertificateAuthorityBundle. + A property indicating when the CA was created, expressed in `RFC 3339`__ timestamp format. + Example: `2019-04-03T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_created: The time_created of this CertificateAuthorityBundle. + :type: datetime + """ + self._time_created = time_created + + @property + def version_number(self): + """ + **[Required]** Gets the version_number of this CertificateAuthorityBundle. + The version number of the CA. + + + :return: The version_number of this CertificateAuthorityBundle. + :rtype: int + """ + return self._version_number + + @version_number.setter + def version_number(self, version_number): + """ + Sets the version_number of this CertificateAuthorityBundle. + The version number of the CA. + + + :param version_number: The version_number of this CertificateAuthorityBundle. + :type: int + """ + self._version_number = version_number + + @property + def validity(self): + """ + **[Required]** Gets the validity of this CertificateAuthorityBundle. + + :return: The validity of this CertificateAuthorityBundle. + :rtype: oci.certificates.models.Validity + """ + return self._validity + + @validity.setter + def validity(self, validity): + """ + Sets the validity of this CertificateAuthorityBundle. + + :param validity: The validity of this CertificateAuthorityBundle. + :type: oci.certificates.models.Validity + """ + self._validity = validity + + @property + def stages(self): + """ + **[Required]** Gets the stages of this CertificateAuthorityBundle. + A list of rotation states for this CA. + + Allowed values for items in this list are: "CURRENT", "PENDING", "LATEST", "PREVIOUS", "DEPRECATED", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The stages of this CertificateAuthorityBundle. + :rtype: list[str] + """ + return self._stages + + @stages.setter + def stages(self, stages): + """ + Sets the stages of this CertificateAuthorityBundle. + A list of rotation states for this CA. + + + :param stages: The stages of this CertificateAuthorityBundle. + :type: list[str] + """ + allowed_values = ["CURRENT", "PENDING", "LATEST", "PREVIOUS", "DEPRECATED", "FAILED"] + if stages: + stages[:] = ['UNKNOWN_ENUM_VALUE' if not value_allowed_none_or_none_sentinel(x, allowed_values) else x for x in stages] + self._stages = stages + + @property + def revocation_status(self): + """ + Gets the revocation_status of this CertificateAuthorityBundle. + + :return: The revocation_status of this CertificateAuthorityBundle. + :rtype: oci.certificates.models.RevocationStatus + """ + return self._revocation_status + + @revocation_status.setter + def revocation_status(self, revocation_status): + """ + Sets the revocation_status of this CertificateAuthorityBundle. + + :param revocation_status: The revocation_status of this CertificateAuthorityBundle. + :type: oci.certificates.models.RevocationStatus + """ + self._revocation_status = revocation_status + + 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/certificates/models/certificate_authority_bundle_version_collection.py b/src/oci/certificates/models/certificate_authority_bundle_version_collection.py new file mode 100644 index 0000000000..81d91f6f57 --- /dev/null +++ b/src/oci/certificates/models/certificate_authority_bundle_version_collection.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 CertificateAuthorityBundleVersionCollection(object): + """ + The results of a certificate authority (CA) version search. Results contain CA version summary objects and other data. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CertificateAuthorityBundleVersionCollection object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param items: + The value to assign to the items property of this CertificateAuthorityBundleVersionCollection. + :type items: list[oci.certificates.models.CertificateAuthorityBundleVersionSummary] + + """ + self.swagger_types = { + 'items': 'list[CertificateAuthorityBundleVersionSummary]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this CertificateAuthorityBundleVersionCollection. + A list of CA version summary objects. + + + :return: The items of this CertificateAuthorityBundleVersionCollection. + :rtype: list[oci.certificates.models.CertificateAuthorityBundleVersionSummary] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this CertificateAuthorityBundleVersionCollection. + A list of CA version summary objects. + + + :param items: The items of this CertificateAuthorityBundleVersionCollection. + :type: list[oci.certificates.models.CertificateAuthorityBundleVersionSummary] + """ + self._items = items + + 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/certificates/models/certificate_authority_bundle_version_summary.py b/src/oci/certificates/models/certificate_authority_bundle_version_summary.py new file mode 100644 index 0000000000..249d60c47c --- /dev/null +++ b/src/oci/certificates/models/certificate_authority_bundle_version_summary.py @@ -0,0 +1,387 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 CertificateAuthorityBundleVersionSummary(object): + """ + The properties of a version of a bundle for a certificate authority (CA). Certificate authority bundle version summary objects do not include the actual contents of the certificate. + """ + + #: A constant which can be used with the stages property of a CertificateAuthorityBundleVersionSummary. + #: This constant has a value of "CURRENT" + STAGES_CURRENT = "CURRENT" + + #: A constant which can be used with the stages property of a CertificateAuthorityBundleVersionSummary. + #: This constant has a value of "PENDING" + STAGES_PENDING = "PENDING" + + #: A constant which can be used with the stages property of a CertificateAuthorityBundleVersionSummary. + #: This constant has a value of "LATEST" + STAGES_LATEST = "LATEST" + + #: A constant which can be used with the stages property of a CertificateAuthorityBundleVersionSummary. + #: This constant has a value of "PREVIOUS" + STAGES_PREVIOUS = "PREVIOUS" + + #: A constant which can be used with the stages property of a CertificateAuthorityBundleVersionSummary. + #: This constant has a value of "DEPRECATED" + STAGES_DEPRECATED = "DEPRECATED" + + #: A constant which can be used with the stages property of a CertificateAuthorityBundleVersionSummary. + #: This constant has a value of "FAILED" + STAGES_FAILED = "FAILED" + + def __init__(self, **kwargs): + """ + Initializes a new CertificateAuthorityBundleVersionSummary object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param certificate_authority_id: + The value to assign to the certificate_authority_id property of this CertificateAuthorityBundleVersionSummary. + :type certificate_authority_id: str + + :param serial_number: + The value to assign to the serial_number property of this CertificateAuthorityBundleVersionSummary. + :type serial_number: str + + :param time_created: + The value to assign to the time_created property of this CertificateAuthorityBundleVersionSummary. + :type time_created: datetime + + :param version_number: + The value to assign to the version_number property of this CertificateAuthorityBundleVersionSummary. + :type version_number: int + + :param version_name: + The value to assign to the version_name property of this CertificateAuthorityBundleVersionSummary. + :type version_name: str + + :param certificate_authority_name: + The value to assign to the certificate_authority_name property of this CertificateAuthorityBundleVersionSummary. + :type certificate_authority_name: str + + :param time_of_deletion: + The value to assign to the time_of_deletion property of this CertificateAuthorityBundleVersionSummary. + :type time_of_deletion: datetime + + :param validity: + The value to assign to the validity property of this CertificateAuthorityBundleVersionSummary. + :type validity: oci.certificates.models.Validity + + :param stages: + The value to assign to the stages property of this CertificateAuthorityBundleVersionSummary. + Allowed values for items in this list are: "CURRENT", "PENDING", "LATEST", "PREVIOUS", "DEPRECATED", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type stages: list[str] + + :param revocation_status: + The value to assign to the revocation_status property of this CertificateAuthorityBundleVersionSummary. + :type revocation_status: oci.certificates.models.RevocationStatus + + """ + self.swagger_types = { + 'certificate_authority_id': 'str', + 'serial_number': 'str', + 'time_created': 'datetime', + 'version_number': 'int', + 'version_name': 'str', + 'certificate_authority_name': 'str', + 'time_of_deletion': 'datetime', + 'validity': 'Validity', + 'stages': 'list[str]', + 'revocation_status': 'RevocationStatus' + } + + self.attribute_map = { + 'certificate_authority_id': 'certificateAuthorityId', + 'serial_number': 'serialNumber', + 'time_created': 'timeCreated', + 'version_number': 'versionNumber', + 'version_name': 'versionName', + 'certificate_authority_name': 'certificateAuthorityName', + 'time_of_deletion': 'timeOfDeletion', + 'validity': 'validity', + 'stages': 'stages', + 'revocation_status': 'revocationStatus' + } + + self._certificate_authority_id = None + self._serial_number = None + self._time_created = None + self._version_number = None + self._version_name = None + self._certificate_authority_name = None + self._time_of_deletion = None + self._validity = None + self._stages = None + self._revocation_status = None + + @property + def certificate_authority_id(self): + """ + **[Required]** Gets the certificate_authority_id of this CertificateAuthorityBundleVersionSummary. + The OCID of the certificate authority (CA). + + + :return: The certificate_authority_id of this CertificateAuthorityBundleVersionSummary. + :rtype: str + """ + return self._certificate_authority_id + + @certificate_authority_id.setter + def certificate_authority_id(self, certificate_authority_id): + """ + Sets the certificate_authority_id of this CertificateAuthorityBundleVersionSummary. + The OCID of the certificate authority (CA). + + + :param certificate_authority_id: The certificate_authority_id of this CertificateAuthorityBundleVersionSummary. + :type: str + """ + self._certificate_authority_id = certificate_authority_id + + @property + def serial_number(self): + """ + Gets the serial_number of this CertificateAuthorityBundleVersionSummary. + A unique certificate identifier used in certificate revocation tracking, formatted as octets. + Example: `03 AC FC FA CC B3 CB 02 B8 F8 DE F5 85 E7 7B FF` + + + :return: The serial_number of this CertificateAuthorityBundleVersionSummary. + :rtype: str + """ + return self._serial_number + + @serial_number.setter + def serial_number(self, serial_number): + """ + Sets the serial_number of this CertificateAuthorityBundleVersionSummary. + A unique certificate identifier used in certificate revocation tracking, formatted as octets. + Example: `03 AC FC FA CC B3 CB 02 B8 F8 DE F5 85 E7 7B FF` + + + :param serial_number: The serial_number of this CertificateAuthorityBundleVersionSummary. + :type: str + """ + self._serial_number = serial_number + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this CertificateAuthorityBundleVersionSummary. + An optional property indicating when the CA version was created, expressed in `RFC 3339`__ timestamp format. + Example: `2019-04-03T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_created of this CertificateAuthorityBundleVersionSummary. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this CertificateAuthorityBundleVersionSummary. + An optional property indicating when the CA version was created, expressed in `RFC 3339`__ timestamp format. + Example: `2019-04-03T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_created: The time_created of this CertificateAuthorityBundleVersionSummary. + :type: datetime + """ + self._time_created = time_created + + @property + def version_number(self): + """ + **[Required]** Gets the version_number of this CertificateAuthorityBundleVersionSummary. + The version number of the CA. + + + :return: The version_number of this CertificateAuthorityBundleVersionSummary. + :rtype: int + """ + return self._version_number + + @version_number.setter + def version_number(self, version_number): + """ + Sets the version_number of this CertificateAuthorityBundleVersionSummary. + The version number of the CA. + + + :param version_number: The version_number of this CertificateAuthorityBundleVersionSummary. + :type: int + """ + self._version_number = version_number + + @property + def version_name(self): + """ + Gets the version_name of this CertificateAuthorityBundleVersionSummary. + The name of the CA version. When this value is not null, the name is unique across CA versions for a given CA. + + + :return: The version_name of this CertificateAuthorityBundleVersionSummary. + :rtype: str + """ + return self._version_name + + @version_name.setter + def version_name(self, version_name): + """ + Sets the version_name of this CertificateAuthorityBundleVersionSummary. + The name of the CA version. When this value is not null, the name is unique across CA versions for a given CA. + + + :param version_name: The version_name of this CertificateAuthorityBundleVersionSummary. + :type: str + """ + self._version_name = version_name + + @property + def certificate_authority_name(self): + """ + **[Required]** Gets the certificate_authority_name of this CertificateAuthorityBundleVersionSummary. + The name of the CA. + + + :return: The certificate_authority_name of this CertificateAuthorityBundleVersionSummary. + :rtype: str + """ + return self._certificate_authority_name + + @certificate_authority_name.setter + def certificate_authority_name(self, certificate_authority_name): + """ + Sets the certificate_authority_name of this CertificateAuthorityBundleVersionSummary. + The name of the CA. + + + :param certificate_authority_name: The certificate_authority_name of this CertificateAuthorityBundleVersionSummary. + :type: str + """ + self._certificate_authority_name = certificate_authority_name + + @property + def time_of_deletion(self): + """ + Gets the time_of_deletion of this CertificateAuthorityBundleVersionSummary. + An optional property indicating when to delete the CA version, expressed in `RFC 3339`__ timestamp format. + Example: `2019-04-03T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_of_deletion of this CertificateAuthorityBundleVersionSummary. + :rtype: datetime + """ + return self._time_of_deletion + + @time_of_deletion.setter + def time_of_deletion(self, time_of_deletion): + """ + Sets the time_of_deletion of this CertificateAuthorityBundleVersionSummary. + An optional property indicating when to delete the CA version, expressed in `RFC 3339`__ timestamp format. + Example: `2019-04-03T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_of_deletion: The time_of_deletion of this CertificateAuthorityBundleVersionSummary. + :type: datetime + """ + self._time_of_deletion = time_of_deletion + + @property + def validity(self): + """ + Gets the validity of this CertificateAuthorityBundleVersionSummary. + + :return: The validity of this CertificateAuthorityBundleVersionSummary. + :rtype: oci.certificates.models.Validity + """ + return self._validity + + @validity.setter + def validity(self, validity): + """ + Sets the validity of this CertificateAuthorityBundleVersionSummary. + + :param validity: The validity of this CertificateAuthorityBundleVersionSummary. + :type: oci.certificates.models.Validity + """ + self._validity = validity + + @property + def stages(self): + """ + **[Required]** Gets the stages of this CertificateAuthorityBundleVersionSummary. + A list of rotation states for this CA version. + + Allowed values for items in this list are: "CURRENT", "PENDING", "LATEST", "PREVIOUS", "DEPRECATED", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The stages of this CertificateAuthorityBundleVersionSummary. + :rtype: list[str] + """ + return self._stages + + @stages.setter + def stages(self, stages): + """ + Sets the stages of this CertificateAuthorityBundleVersionSummary. + A list of rotation states for this CA version. + + + :param stages: The stages of this CertificateAuthorityBundleVersionSummary. + :type: list[str] + """ + allowed_values = ["CURRENT", "PENDING", "LATEST", "PREVIOUS", "DEPRECATED", "FAILED"] + if stages: + stages[:] = ['UNKNOWN_ENUM_VALUE' if not value_allowed_none_or_none_sentinel(x, allowed_values) else x for x in stages] + self._stages = stages + + @property + def revocation_status(self): + """ + Gets the revocation_status of this CertificateAuthorityBundleVersionSummary. + + :return: The revocation_status of this CertificateAuthorityBundleVersionSummary. + :rtype: oci.certificates.models.RevocationStatus + """ + return self._revocation_status + + @revocation_status.setter + def revocation_status(self, revocation_status): + """ + Sets the revocation_status of this CertificateAuthorityBundleVersionSummary. + + :param revocation_status: The revocation_status of this CertificateAuthorityBundleVersionSummary. + :type: oci.certificates.models.RevocationStatus + """ + self._revocation_status = revocation_status + + 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/certificates/models/certificate_bundle.py b/src/oci/certificates/models/certificate_bundle.py new file mode 100644 index 0000000000..4d2de300f3 --- /dev/null +++ b/src/oci/certificates/models/certificate_bundle.py @@ -0,0 +1,480 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 CertificateBundle(object): + """ + The contents of the certificate, properties of the certificate (and certificate version), and user-provided contextual metadata for the certificate. + """ + + #: A constant which can be used with the certificate_bundle_type property of a CertificateBundle. + #: This constant has a value of "CERTIFICATE_CONTENT_PUBLIC_ONLY" + CERTIFICATE_BUNDLE_TYPE_CERTIFICATE_CONTENT_PUBLIC_ONLY = "CERTIFICATE_CONTENT_PUBLIC_ONLY" + + #: A constant which can be used with the certificate_bundle_type property of a CertificateBundle. + #: This constant has a value of "CERTIFICATE_CONTENT_WITH_PRIVATE_KEY" + CERTIFICATE_BUNDLE_TYPE_CERTIFICATE_CONTENT_WITH_PRIVATE_KEY = "CERTIFICATE_CONTENT_WITH_PRIVATE_KEY" + + #: A constant which can be used with the stages property of a CertificateBundle. + #: This constant has a value of "CURRENT" + STAGES_CURRENT = "CURRENT" + + #: A constant which can be used with the stages property of a CertificateBundle. + #: This constant has a value of "PENDING" + STAGES_PENDING = "PENDING" + + #: A constant which can be used with the stages property of a CertificateBundle. + #: This constant has a value of "LATEST" + STAGES_LATEST = "LATEST" + + #: A constant which can be used with the stages property of a CertificateBundle. + #: This constant has a value of "PREVIOUS" + STAGES_PREVIOUS = "PREVIOUS" + + #: A constant which can be used with the stages property of a CertificateBundle. + #: This constant has a value of "DEPRECATED" + STAGES_DEPRECATED = "DEPRECATED" + + #: A constant which can be used with the stages property of a CertificateBundle. + #: This constant has a value of "FAILED" + STAGES_FAILED = "FAILED" + + def __init__(self, **kwargs): + """ + Initializes a new CertificateBundle object with values from keyword arguments. This class has the following subclasses and if you are using this class as input + to a service operations then you should favor using a subclass over the base class: + + * :class:`~oci.certificates.models.CertificateBundlePublicOnly` + * :class:`~oci.certificates.models.CertificateBundleWithPrivateKey` + + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param certificate_bundle_type: + The value to assign to the certificate_bundle_type property of this CertificateBundle. + Allowed values for this property are: "CERTIFICATE_CONTENT_PUBLIC_ONLY", "CERTIFICATE_CONTENT_WITH_PRIVATE_KEY", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type certificate_bundle_type: str + + :param certificate_id: + The value to assign to the certificate_id property of this CertificateBundle. + :type certificate_id: str + + :param certificate_name: + The value to assign to the certificate_name property of this CertificateBundle. + :type certificate_name: str + + :param version_number: + The value to assign to the version_number property of this CertificateBundle. + :type version_number: int + + :param serial_number: + The value to assign to the serial_number property of this CertificateBundle. + :type serial_number: str + + :param certificate_pem: + The value to assign to the certificate_pem property of this CertificateBundle. + :type certificate_pem: str + + :param cert_chain_pem: + The value to assign to the cert_chain_pem property of this CertificateBundle. + :type cert_chain_pem: str + + :param time_created: + The value to assign to the time_created property of this CertificateBundle. + :type time_created: datetime + + :param validity: + The value to assign to the validity property of this CertificateBundle. + :type validity: oci.certificates.models.Validity + + :param version_name: + The value to assign to the version_name property of this CertificateBundle. + :type version_name: str + + :param stages: + The value to assign to the stages property of this CertificateBundle. + Allowed values for items in this list are: "CURRENT", "PENDING", "LATEST", "PREVIOUS", "DEPRECATED", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type stages: list[str] + + :param revocation_status: + The value to assign to the revocation_status property of this CertificateBundle. + :type revocation_status: oci.certificates.models.RevocationStatus + + """ + self.swagger_types = { + 'certificate_bundle_type': 'str', + 'certificate_id': 'str', + 'certificate_name': 'str', + 'version_number': 'int', + 'serial_number': 'str', + 'certificate_pem': 'str', + 'cert_chain_pem': 'str', + 'time_created': 'datetime', + 'validity': 'Validity', + 'version_name': 'str', + 'stages': 'list[str]', + 'revocation_status': 'RevocationStatus' + } + + self.attribute_map = { + 'certificate_bundle_type': 'certificateBundleType', + 'certificate_id': 'certificateId', + 'certificate_name': 'certificateName', + 'version_number': 'versionNumber', + 'serial_number': 'serialNumber', + 'certificate_pem': 'certificatePem', + 'cert_chain_pem': 'certChainPem', + 'time_created': 'timeCreated', + 'validity': 'validity', + 'version_name': 'versionName', + 'stages': 'stages', + 'revocation_status': 'revocationStatus' + } + + self._certificate_bundle_type = None + self._certificate_id = None + self._certificate_name = None + self._version_number = None + self._serial_number = None + self._certificate_pem = None + self._cert_chain_pem = None + self._time_created = None + self._validity = None + self._version_name = None + self._stages = None + self._revocation_status = None + + @staticmethod + def get_subtype(object_dictionary): + """ + Given the hash representation of a subtype of this class, + use the info in the hash to return the class of the subtype. + """ + type = object_dictionary['certificateBundleType'] + + if type == 'CERTIFICATE_CONTENT_PUBLIC_ONLY': + return 'CertificateBundlePublicOnly' + + if type == 'CERTIFICATE_CONTENT_WITH_PRIVATE_KEY': + return 'CertificateBundleWithPrivateKey' + else: + return 'CertificateBundle' + + @property + def certificate_bundle_type(self): + """ + **[Required]** Gets the certificate_bundle_type of this CertificateBundle. + The type of certificate bundle, which indicates whether the private key fields are included. + + Allowed values for this property are: "CERTIFICATE_CONTENT_PUBLIC_ONLY", "CERTIFICATE_CONTENT_WITH_PRIVATE_KEY", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The certificate_bundle_type of this CertificateBundle. + :rtype: str + """ + return self._certificate_bundle_type + + @certificate_bundle_type.setter + def certificate_bundle_type(self, certificate_bundle_type): + """ + Sets the certificate_bundle_type of this CertificateBundle. + The type of certificate bundle, which indicates whether the private key fields are included. + + + :param certificate_bundle_type: The certificate_bundle_type of this CertificateBundle. + :type: str + """ + allowed_values = ["CERTIFICATE_CONTENT_PUBLIC_ONLY", "CERTIFICATE_CONTENT_WITH_PRIVATE_KEY"] + if not value_allowed_none_or_none_sentinel(certificate_bundle_type, allowed_values): + certificate_bundle_type = 'UNKNOWN_ENUM_VALUE' + self._certificate_bundle_type = certificate_bundle_type + + @property + def certificate_id(self): + """ + **[Required]** Gets the certificate_id of this CertificateBundle. + The OCID of the certificate. + + + :return: The certificate_id of this CertificateBundle. + :rtype: str + """ + return self._certificate_id + + @certificate_id.setter + def certificate_id(self, certificate_id): + """ + Sets the certificate_id of this CertificateBundle. + The OCID of the certificate. + + + :param certificate_id: The certificate_id of this CertificateBundle. + :type: str + """ + self._certificate_id = certificate_id + + @property + def certificate_name(self): + """ + **[Required]** Gets the certificate_name of this CertificateBundle. + The name of the certificate. + + + :return: The certificate_name of this CertificateBundle. + :rtype: str + """ + return self._certificate_name + + @certificate_name.setter + def certificate_name(self, certificate_name): + """ + Sets the certificate_name of this CertificateBundle. + The name of the certificate. + + + :param certificate_name: The certificate_name of this CertificateBundle. + :type: str + """ + self._certificate_name = certificate_name + + @property + def version_number(self): + """ + **[Required]** Gets the version_number of this CertificateBundle. + The version number of the certificate. + + + :return: The version_number of this CertificateBundle. + :rtype: int + """ + return self._version_number + + @version_number.setter + def version_number(self, version_number): + """ + Sets the version_number of this CertificateBundle. + The version number of the certificate. + + + :param version_number: The version_number of this CertificateBundle. + :type: int + """ + self._version_number = version_number + + @property + def serial_number(self): + """ + **[Required]** Gets the serial_number of this CertificateBundle. + A unique certificate identifier used in certificate revocation tracking, formatted as octets. + Example: `03 AC FC FA CC B3 CB 02 B8 F8 DE F5 85 E7 7B FF` + + + :return: The serial_number of this CertificateBundle. + :rtype: str + """ + return self._serial_number + + @serial_number.setter + def serial_number(self, serial_number): + """ + Sets the serial_number of this CertificateBundle. + A unique certificate identifier used in certificate revocation tracking, formatted as octets. + Example: `03 AC FC FA CC B3 CB 02 B8 F8 DE F5 85 E7 7B FF` + + + :param serial_number: The serial_number of this CertificateBundle. + :type: str + """ + self._serial_number = serial_number + + @property + def certificate_pem(self): + """ + Gets the certificate_pem of this CertificateBundle. + The certificate in PEM format. + + + :return: The certificate_pem of this CertificateBundle. + :rtype: str + """ + return self._certificate_pem + + @certificate_pem.setter + def certificate_pem(self, certificate_pem): + """ + Sets the certificate_pem of this CertificateBundle. + The certificate in PEM format. + + + :param certificate_pem: The certificate_pem of this CertificateBundle. + :type: str + """ + self._certificate_pem = certificate_pem + + @property + def cert_chain_pem(self): + """ + Gets the cert_chain_pem of this CertificateBundle. + The certificate chain (in PEM format) for the certificate bundle. + + + :return: The cert_chain_pem of this CertificateBundle. + :rtype: str + """ + return self._cert_chain_pem + + @cert_chain_pem.setter + def cert_chain_pem(self, cert_chain_pem): + """ + Sets the cert_chain_pem of this CertificateBundle. + The certificate chain (in PEM format) for the certificate bundle. + + + :param cert_chain_pem: The cert_chain_pem of this CertificateBundle. + :type: str + """ + self._cert_chain_pem = cert_chain_pem + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this CertificateBundle. + An optional property indicating when the certificate version was created, expressed in `RFC 3339`__ timestamp format. + Example: `2019-04-03T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_created of this CertificateBundle. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this CertificateBundle. + An optional property indicating when the certificate version was created, expressed in `RFC 3339`__ timestamp format. + Example: `2019-04-03T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_created: The time_created of this CertificateBundle. + :type: datetime + """ + self._time_created = time_created + + @property + def validity(self): + """ + **[Required]** Gets the validity of this CertificateBundle. + + :return: The validity of this CertificateBundle. + :rtype: oci.certificates.models.Validity + """ + return self._validity + + @validity.setter + def validity(self, validity): + """ + Sets the validity of this CertificateBundle. + + :param validity: The validity of this CertificateBundle. + :type: oci.certificates.models.Validity + """ + self._validity = validity + + @property + def version_name(self): + """ + Gets the version_name of this CertificateBundle. + The name of the certificate version. + + + :return: The version_name of this CertificateBundle. + :rtype: str + """ + return self._version_name + + @version_name.setter + def version_name(self, version_name): + """ + Sets the version_name of this CertificateBundle. + The name of the certificate version. + + + :param version_name: The version_name of this CertificateBundle. + :type: str + """ + self._version_name = version_name + + @property + def stages(self): + """ + **[Required]** Gets the stages of this CertificateBundle. + A list of rotation states for the certificate bundle. + + Allowed values for items in this list are: "CURRENT", "PENDING", "LATEST", "PREVIOUS", "DEPRECATED", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The stages of this CertificateBundle. + :rtype: list[str] + """ + return self._stages + + @stages.setter + def stages(self, stages): + """ + Sets the stages of this CertificateBundle. + A list of rotation states for the certificate bundle. + + + :param stages: The stages of this CertificateBundle. + :type: list[str] + """ + allowed_values = ["CURRENT", "PENDING", "LATEST", "PREVIOUS", "DEPRECATED", "FAILED"] + if stages: + stages[:] = ['UNKNOWN_ENUM_VALUE' if not value_allowed_none_or_none_sentinel(x, allowed_values) else x for x in stages] + self._stages = stages + + @property + def revocation_status(self): + """ + Gets the revocation_status of this CertificateBundle. + + :return: The revocation_status of this CertificateBundle. + :rtype: oci.certificates.models.RevocationStatus + """ + return self._revocation_status + + @revocation_status.setter + def revocation_status(self, revocation_status): + """ + Sets the revocation_status of this CertificateBundle. + + :param revocation_status: The revocation_status of this CertificateBundle. + :type: oci.certificates.models.RevocationStatus + """ + self._revocation_status = revocation_status + + 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/certificates/models/certificate_bundle_public_only.py b/src/oci/certificates/models/certificate_bundle_public_only.py new file mode 100644 index 0000000000..e425fde871 --- /dev/null +++ b/src/oci/certificates/models/certificate_bundle_public_only.py @@ -0,0 +1,127 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .certificate_bundle import CertificateBundle +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 CertificateBundlePublicOnly(CertificateBundle): + """ + A certificate bundle, not including the private key. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CertificateBundlePublicOnly object with values from keyword arguments. The default value of the :py:attr:`~oci.certificates.models.CertificateBundlePublicOnly.certificate_bundle_type` attribute + of this class is ``CERTIFICATE_CONTENT_PUBLIC_ONLY`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param certificate_bundle_type: + The value to assign to the certificate_bundle_type property of this CertificateBundlePublicOnly. + Allowed values for this property are: "CERTIFICATE_CONTENT_PUBLIC_ONLY", "CERTIFICATE_CONTENT_WITH_PRIVATE_KEY" + :type certificate_bundle_type: str + + :param certificate_id: + The value to assign to the certificate_id property of this CertificateBundlePublicOnly. + :type certificate_id: str + + :param certificate_name: + The value to assign to the certificate_name property of this CertificateBundlePublicOnly. + :type certificate_name: str + + :param version_number: + The value to assign to the version_number property of this CertificateBundlePublicOnly. + :type version_number: int + + :param serial_number: + The value to assign to the serial_number property of this CertificateBundlePublicOnly. + :type serial_number: str + + :param certificate_pem: + The value to assign to the certificate_pem property of this CertificateBundlePublicOnly. + :type certificate_pem: str + + :param cert_chain_pem: + The value to assign to the cert_chain_pem property of this CertificateBundlePublicOnly. + :type cert_chain_pem: str + + :param time_created: + The value to assign to the time_created property of this CertificateBundlePublicOnly. + :type time_created: datetime + + :param validity: + The value to assign to the validity property of this CertificateBundlePublicOnly. + :type validity: oci.certificates.models.Validity + + :param version_name: + The value to assign to the version_name property of this CertificateBundlePublicOnly. + :type version_name: str + + :param stages: + The value to assign to the stages property of this CertificateBundlePublicOnly. + Allowed values for items in this list are: "CURRENT", "PENDING", "LATEST", "PREVIOUS", "DEPRECATED", "FAILED" + :type stages: list[str] + + :param revocation_status: + The value to assign to the revocation_status property of this CertificateBundlePublicOnly. + :type revocation_status: oci.certificates.models.RevocationStatus + + """ + self.swagger_types = { + 'certificate_bundle_type': 'str', + 'certificate_id': 'str', + 'certificate_name': 'str', + 'version_number': 'int', + 'serial_number': 'str', + 'certificate_pem': 'str', + 'cert_chain_pem': 'str', + 'time_created': 'datetime', + 'validity': 'Validity', + 'version_name': 'str', + 'stages': 'list[str]', + 'revocation_status': 'RevocationStatus' + } + + self.attribute_map = { + 'certificate_bundle_type': 'certificateBundleType', + 'certificate_id': 'certificateId', + 'certificate_name': 'certificateName', + 'version_number': 'versionNumber', + 'serial_number': 'serialNumber', + 'certificate_pem': 'certificatePem', + 'cert_chain_pem': 'certChainPem', + 'time_created': 'timeCreated', + 'validity': 'validity', + 'version_name': 'versionName', + 'stages': 'stages', + 'revocation_status': 'revocationStatus' + } + + self._certificate_bundle_type = None + self._certificate_id = None + self._certificate_name = None + self._version_number = None + self._serial_number = None + self._certificate_pem = None + self._cert_chain_pem = None + self._time_created = None + self._validity = None + self._version_name = None + self._stages = None + self._revocation_status = None + self._certificate_bundle_type = 'CERTIFICATE_CONTENT_PUBLIC_ONLY' + + 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/certificates/models/certificate_bundle_version_collection.py b/src/oci/certificates/models/certificate_bundle_version_collection.py new file mode 100644 index 0000000000..9b92b0cb98 --- /dev/null +++ b/src/oci/certificates/models/certificate_bundle_version_collection.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 CertificateBundleVersionCollection(object): + """ + The results of a certificate bundle versions search. Results contain certificate bundle version summary objects. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CertificateBundleVersionCollection object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param items: + The value to assign to the items property of this CertificateBundleVersionCollection. + :type items: list[oci.certificates.models.CertificateBundleVersionSummary] + + """ + self.swagger_types = { + 'items': 'list[CertificateBundleVersionSummary]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this CertificateBundleVersionCollection. + A list of certificate bundle version summary objects. + + + :return: The items of this CertificateBundleVersionCollection. + :rtype: list[oci.certificates.models.CertificateBundleVersionSummary] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this CertificateBundleVersionCollection. + A list of certificate bundle version summary objects. + + + :param items: The items of this CertificateBundleVersionCollection. + :type: list[oci.certificates.models.CertificateBundleVersionSummary] + """ + self._items = items + + 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/certificates/models/certificate_bundle_version_summary.py b/src/oci/certificates/models/certificate_bundle_version_summary.py new file mode 100644 index 0000000000..144f6ceeba --- /dev/null +++ b/src/oci/certificates/models/certificate_bundle_version_summary.py @@ -0,0 +1,387 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 CertificateBundleVersionSummary(object): + """ + The properties of the certificate bundle. Certificate bundle version summary objects do not include the actual contents of the certificate. + """ + + #: A constant which can be used with the stages property of a CertificateBundleVersionSummary. + #: This constant has a value of "CURRENT" + STAGES_CURRENT = "CURRENT" + + #: A constant which can be used with the stages property of a CertificateBundleVersionSummary. + #: This constant has a value of "PENDING" + STAGES_PENDING = "PENDING" + + #: A constant which can be used with the stages property of a CertificateBundleVersionSummary. + #: This constant has a value of "LATEST" + STAGES_LATEST = "LATEST" + + #: A constant which can be used with the stages property of a CertificateBundleVersionSummary. + #: This constant has a value of "PREVIOUS" + STAGES_PREVIOUS = "PREVIOUS" + + #: A constant which can be used with the stages property of a CertificateBundleVersionSummary. + #: This constant has a value of "DEPRECATED" + STAGES_DEPRECATED = "DEPRECATED" + + #: A constant which can be used with the stages property of a CertificateBundleVersionSummary. + #: This constant has a value of "FAILED" + STAGES_FAILED = "FAILED" + + def __init__(self, **kwargs): + """ + Initializes a new CertificateBundleVersionSummary object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param certificate_id: + The value to assign to the certificate_id property of this CertificateBundleVersionSummary. + :type certificate_id: str + + :param serial_number: + The value to assign to the serial_number property of this CertificateBundleVersionSummary. + :type serial_number: str + + :param version_name: + The value to assign to the version_name property of this CertificateBundleVersionSummary. + :type version_name: str + + :param certificate_name: + The value to assign to the certificate_name property of this CertificateBundleVersionSummary. + :type certificate_name: str + + :param version_number: + The value to assign to the version_number property of this CertificateBundleVersionSummary. + :type version_number: int + + :param time_created: + The value to assign to the time_created property of this CertificateBundleVersionSummary. + :type time_created: datetime + + :param validity: + The value to assign to the validity property of this CertificateBundleVersionSummary. + :type validity: oci.certificates.models.Validity + + :param time_of_deletion: + The value to assign to the time_of_deletion property of this CertificateBundleVersionSummary. + :type time_of_deletion: datetime + + :param stages: + The value to assign to the stages property of this CertificateBundleVersionSummary. + Allowed values for items in this list are: "CURRENT", "PENDING", "LATEST", "PREVIOUS", "DEPRECATED", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type stages: list[str] + + :param revocation_status: + The value to assign to the revocation_status property of this CertificateBundleVersionSummary. + :type revocation_status: oci.certificates.models.RevocationStatus + + """ + self.swagger_types = { + 'certificate_id': 'str', + 'serial_number': 'str', + 'version_name': 'str', + 'certificate_name': 'str', + 'version_number': 'int', + 'time_created': 'datetime', + 'validity': 'Validity', + 'time_of_deletion': 'datetime', + 'stages': 'list[str]', + 'revocation_status': 'RevocationStatus' + } + + self.attribute_map = { + 'certificate_id': 'certificateId', + 'serial_number': 'serialNumber', + 'version_name': 'versionName', + 'certificate_name': 'certificateName', + 'version_number': 'versionNumber', + 'time_created': 'timeCreated', + 'validity': 'validity', + 'time_of_deletion': 'timeOfDeletion', + 'stages': 'stages', + 'revocation_status': 'revocationStatus' + } + + self._certificate_id = None + self._serial_number = None + self._version_name = None + self._certificate_name = None + self._version_number = None + self._time_created = None + self._validity = None + self._time_of_deletion = None + self._stages = None + self._revocation_status = None + + @property + def certificate_id(self): + """ + **[Required]** Gets the certificate_id of this CertificateBundleVersionSummary. + The OCID of the certificate. + + + :return: The certificate_id of this CertificateBundleVersionSummary. + :rtype: str + """ + return self._certificate_id + + @certificate_id.setter + def certificate_id(self, certificate_id): + """ + Sets the certificate_id of this CertificateBundleVersionSummary. + The OCID of the certificate. + + + :param certificate_id: The certificate_id of this CertificateBundleVersionSummary. + :type: str + """ + self._certificate_id = certificate_id + + @property + def serial_number(self): + """ + Gets the serial_number of this CertificateBundleVersionSummary. + A unique certificate identifier used in certificate revocation tracking, formatted as octets. + Example: `03 AC FC FA CC B3 CB 02 B8 F8 DE F5 85 E7 7B FF` + + + :return: The serial_number of this CertificateBundleVersionSummary. + :rtype: str + """ + return self._serial_number + + @serial_number.setter + def serial_number(self, serial_number): + """ + Sets the serial_number of this CertificateBundleVersionSummary. + A unique certificate identifier used in certificate revocation tracking, formatted as octets. + Example: `03 AC FC FA CC B3 CB 02 B8 F8 DE F5 85 E7 7B FF` + + + :param serial_number: The serial_number of this CertificateBundleVersionSummary. + :type: str + """ + self._serial_number = serial_number + + @property + def version_name(self): + """ + Gets the version_name of this CertificateBundleVersionSummary. + The name of the certificate version. + + + :return: The version_name of this CertificateBundleVersionSummary. + :rtype: str + """ + return self._version_name + + @version_name.setter + def version_name(self, version_name): + """ + Sets the version_name of this CertificateBundleVersionSummary. + The name of the certificate version. + + + :param version_name: The version_name of this CertificateBundleVersionSummary. + :type: str + """ + self._version_name = version_name + + @property + def certificate_name(self): + """ + **[Required]** Gets the certificate_name of this CertificateBundleVersionSummary. + The name of the certificate. + + + :return: The certificate_name of this CertificateBundleVersionSummary. + :rtype: str + """ + return self._certificate_name + + @certificate_name.setter + def certificate_name(self, certificate_name): + """ + Sets the certificate_name of this CertificateBundleVersionSummary. + The name of the certificate. + + + :param certificate_name: The certificate_name of this CertificateBundleVersionSummary. + :type: str + """ + self._certificate_name = certificate_name + + @property + def version_number(self): + """ + **[Required]** Gets the version_number of this CertificateBundleVersionSummary. + The version number of the certificate. + + + :return: The version_number of this CertificateBundleVersionSummary. + :rtype: int + """ + return self._version_number + + @version_number.setter + def version_number(self, version_number): + """ + Sets the version_number of this CertificateBundleVersionSummary. + The version number of the certificate. + + + :param version_number: The version_number of this CertificateBundleVersionSummary. + :type: int + """ + self._version_number = version_number + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this CertificateBundleVersionSummary. + An optional property indicating when the certificate version was created, expressed in `RFC 3339`__ timestamp format. + Example: `2019-04-03T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_created of this CertificateBundleVersionSummary. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this CertificateBundleVersionSummary. + An optional property indicating when the certificate version was created, expressed in `RFC 3339`__ timestamp format. + Example: `2019-04-03T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_created: The time_created of this CertificateBundleVersionSummary. + :type: datetime + """ + self._time_created = time_created + + @property + def validity(self): + """ + Gets the validity of this CertificateBundleVersionSummary. + + :return: The validity of this CertificateBundleVersionSummary. + :rtype: oci.certificates.models.Validity + """ + return self._validity + + @validity.setter + def validity(self, validity): + """ + Sets the validity of this CertificateBundleVersionSummary. + + :param validity: The validity of this CertificateBundleVersionSummary. + :type: oci.certificates.models.Validity + """ + self._validity = validity + + @property + def time_of_deletion(self): + """ + Gets the time_of_deletion of this CertificateBundleVersionSummary. + An optional property indicating when to delete the certificate version, expressed in `RFC 3339`__ timestamp format. + Example: `2019-04-03T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_of_deletion of this CertificateBundleVersionSummary. + :rtype: datetime + """ + return self._time_of_deletion + + @time_of_deletion.setter + def time_of_deletion(self, time_of_deletion): + """ + Sets the time_of_deletion of this CertificateBundleVersionSummary. + An optional property indicating when to delete the certificate version, expressed in `RFC 3339`__ timestamp format. + Example: `2019-04-03T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_of_deletion: The time_of_deletion of this CertificateBundleVersionSummary. + :type: datetime + """ + self._time_of_deletion = time_of_deletion + + @property + def stages(self): + """ + **[Required]** Gets the stages of this CertificateBundleVersionSummary. + A list of rotation states for this certificate bundle version. + + Allowed values for items in this list are: "CURRENT", "PENDING", "LATEST", "PREVIOUS", "DEPRECATED", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The stages of this CertificateBundleVersionSummary. + :rtype: list[str] + """ + return self._stages + + @stages.setter + def stages(self, stages): + """ + Sets the stages of this CertificateBundleVersionSummary. + A list of rotation states for this certificate bundle version. + + + :param stages: The stages of this CertificateBundleVersionSummary. + :type: list[str] + """ + allowed_values = ["CURRENT", "PENDING", "LATEST", "PREVIOUS", "DEPRECATED", "FAILED"] + if stages: + stages[:] = ['UNKNOWN_ENUM_VALUE' if not value_allowed_none_or_none_sentinel(x, allowed_values) else x for x in stages] + self._stages = stages + + @property + def revocation_status(self): + """ + Gets the revocation_status of this CertificateBundleVersionSummary. + + :return: The revocation_status of this CertificateBundleVersionSummary. + :rtype: oci.certificates.models.RevocationStatus + """ + return self._revocation_status + + @revocation_status.setter + def revocation_status(self, revocation_status): + """ + Sets the revocation_status of this CertificateBundleVersionSummary. + + :param revocation_status: The revocation_status of this CertificateBundleVersionSummary. + :type: oci.certificates.models.RevocationStatus + """ + self._revocation_status = revocation_status + + 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/certificates/models/certificate_bundle_with_private_key.py b/src/oci/certificates/models/certificate_bundle_with_private_key.py new file mode 100644 index 0000000000..06ff3ae129 --- /dev/null +++ b/src/oci/certificates/models/certificate_bundle_with_private_key.py @@ -0,0 +1,189 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .certificate_bundle import CertificateBundle +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 CertificateBundleWithPrivateKey(CertificateBundle): + """ + A certificate bundle, including the private key. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CertificateBundleWithPrivateKey object with values from keyword arguments. The default value of the :py:attr:`~oci.certificates.models.CertificateBundleWithPrivateKey.certificate_bundle_type` attribute + of this class is ``CERTIFICATE_CONTENT_WITH_PRIVATE_KEY`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param certificate_bundle_type: + The value to assign to the certificate_bundle_type property of this CertificateBundleWithPrivateKey. + Allowed values for this property are: "CERTIFICATE_CONTENT_PUBLIC_ONLY", "CERTIFICATE_CONTENT_WITH_PRIVATE_KEY" + :type certificate_bundle_type: str + + :param certificate_id: + The value to assign to the certificate_id property of this CertificateBundleWithPrivateKey. + :type certificate_id: str + + :param certificate_name: + The value to assign to the certificate_name property of this CertificateBundleWithPrivateKey. + :type certificate_name: str + + :param version_number: + The value to assign to the version_number property of this CertificateBundleWithPrivateKey. + :type version_number: int + + :param serial_number: + The value to assign to the serial_number property of this CertificateBundleWithPrivateKey. + :type serial_number: str + + :param certificate_pem: + The value to assign to the certificate_pem property of this CertificateBundleWithPrivateKey. + :type certificate_pem: str + + :param cert_chain_pem: + The value to assign to the cert_chain_pem property of this CertificateBundleWithPrivateKey. + :type cert_chain_pem: str + + :param time_created: + The value to assign to the time_created property of this CertificateBundleWithPrivateKey. + :type time_created: datetime + + :param validity: + The value to assign to the validity property of this CertificateBundleWithPrivateKey. + :type validity: oci.certificates.models.Validity + + :param version_name: + The value to assign to the version_name property of this CertificateBundleWithPrivateKey. + :type version_name: str + + :param stages: + The value to assign to the stages property of this CertificateBundleWithPrivateKey. + Allowed values for items in this list are: "CURRENT", "PENDING", "LATEST", "PREVIOUS", "DEPRECATED", "FAILED" + :type stages: list[str] + + :param revocation_status: + The value to assign to the revocation_status property of this CertificateBundleWithPrivateKey. + :type revocation_status: oci.certificates.models.RevocationStatus + + :param private_key_pem: + The value to assign to the private_key_pem property of this CertificateBundleWithPrivateKey. + :type private_key_pem: str + + :param private_key_pem_passphrase: + The value to assign to the private_key_pem_passphrase property of this CertificateBundleWithPrivateKey. + :type private_key_pem_passphrase: str + + """ + self.swagger_types = { + 'certificate_bundle_type': 'str', + 'certificate_id': 'str', + 'certificate_name': 'str', + 'version_number': 'int', + 'serial_number': 'str', + 'certificate_pem': 'str', + 'cert_chain_pem': 'str', + 'time_created': 'datetime', + 'validity': 'Validity', + 'version_name': 'str', + 'stages': 'list[str]', + 'revocation_status': 'RevocationStatus', + 'private_key_pem': 'str', + 'private_key_pem_passphrase': 'str' + } + + self.attribute_map = { + 'certificate_bundle_type': 'certificateBundleType', + 'certificate_id': 'certificateId', + 'certificate_name': 'certificateName', + 'version_number': 'versionNumber', + 'serial_number': 'serialNumber', + 'certificate_pem': 'certificatePem', + 'cert_chain_pem': 'certChainPem', + 'time_created': 'timeCreated', + 'validity': 'validity', + 'version_name': 'versionName', + 'stages': 'stages', + 'revocation_status': 'revocationStatus', + 'private_key_pem': 'privateKeyPem', + 'private_key_pem_passphrase': 'privateKeyPemPassphrase' + } + + self._certificate_bundle_type = None + self._certificate_id = None + self._certificate_name = None + self._version_number = None + self._serial_number = None + self._certificate_pem = None + self._cert_chain_pem = None + self._time_created = None + self._validity = None + self._version_name = None + self._stages = None + self._revocation_status = None + self._private_key_pem = None + self._private_key_pem_passphrase = None + self._certificate_bundle_type = 'CERTIFICATE_CONTENT_WITH_PRIVATE_KEY' + + @property + def private_key_pem(self): + """ + **[Required]** Gets the private_key_pem of this CertificateBundleWithPrivateKey. + The private key (in PEM format) for the certificate. + + + :return: The private_key_pem of this CertificateBundleWithPrivateKey. + :rtype: str + """ + return self._private_key_pem + + @private_key_pem.setter + def private_key_pem(self, private_key_pem): + """ + Sets the private_key_pem of this CertificateBundleWithPrivateKey. + The private key (in PEM format) for the certificate. + + + :param private_key_pem: The private_key_pem of this CertificateBundleWithPrivateKey. + :type: str + """ + self._private_key_pem = private_key_pem + + @property + def private_key_pem_passphrase(self): + """ + Gets the private_key_pem_passphrase of this CertificateBundleWithPrivateKey. + An optional passphrase for the private key. + + + :return: The private_key_pem_passphrase of this CertificateBundleWithPrivateKey. + :rtype: str + """ + return self._private_key_pem_passphrase + + @private_key_pem_passphrase.setter + def private_key_pem_passphrase(self, private_key_pem_passphrase): + """ + Sets the private_key_pem_passphrase of this CertificateBundleWithPrivateKey. + An optional passphrase for the private key. + + + :param private_key_pem_passphrase: The private_key_pem_passphrase of this CertificateBundleWithPrivateKey. + :type: str + """ + self._private_key_pem_passphrase = private_key_pem_passphrase + + 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/certificates/models/revocation_status.py b/src/oci/certificates/models/revocation_status.py new file mode 100644 index 0000000000..38d30da30e --- /dev/null +++ b/src/oci/certificates/models/revocation_status.py @@ -0,0 +1,141 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 RevocationStatus(object): + """ + The current revocation status of the certificate or certificate authority (CA). + """ + + #: A constant which can be used with the revocation_reason property of a RevocationStatus. + #: This constant has a value of "UNSPECIFIED" + REVOCATION_REASON_UNSPECIFIED = "UNSPECIFIED" + + #: A constant which can be used with the revocation_reason property of a RevocationStatus. + #: This constant has a value of "KEY_COMPROMISE" + REVOCATION_REASON_KEY_COMPROMISE = "KEY_COMPROMISE" + + #: A constant which can be used with the revocation_reason property of a RevocationStatus. + #: This constant has a value of "CA_COMPROMISE" + REVOCATION_REASON_CA_COMPROMISE = "CA_COMPROMISE" + + #: A constant which can be used with the revocation_reason property of a RevocationStatus. + #: This constant has a value of "AFFILIATION_CHANGED" + REVOCATION_REASON_AFFILIATION_CHANGED = "AFFILIATION_CHANGED" + + #: A constant which can be used with the revocation_reason property of a RevocationStatus. + #: This constant has a value of "SUPERSEDED" + REVOCATION_REASON_SUPERSEDED = "SUPERSEDED" + + #: A constant which can be used with the revocation_reason property of a RevocationStatus. + #: This constant has a value of "CESSATION_OF_OPERATION" + REVOCATION_REASON_CESSATION_OF_OPERATION = "CESSATION_OF_OPERATION" + + #: A constant which can be used with the revocation_reason property of a RevocationStatus. + #: This constant has a value of "PRIVILEGE_WITHDRAWN" + REVOCATION_REASON_PRIVILEGE_WITHDRAWN = "PRIVILEGE_WITHDRAWN" + + #: A constant which can be used with the revocation_reason property of a RevocationStatus. + #: This constant has a value of "AA_COMPROMISE" + REVOCATION_REASON_AA_COMPROMISE = "AA_COMPROMISE" + + def __init__(self, **kwargs): + """ + Initializes a new RevocationStatus object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param time_revoked: + The value to assign to the time_revoked property of this RevocationStatus. + :type time_revoked: datetime + + :param revocation_reason: + The value to assign to the revocation_reason property of this RevocationStatus. + Allowed values for this property are: "UNSPECIFIED", "KEY_COMPROMISE", "CA_COMPROMISE", "AFFILIATION_CHANGED", "SUPERSEDED", "CESSATION_OF_OPERATION", "PRIVILEGE_WITHDRAWN", "AA_COMPROMISE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type revocation_reason: str + + """ + self.swagger_types = { + 'time_revoked': 'datetime', + 'revocation_reason': 'str' + } + + self.attribute_map = { + 'time_revoked': 'timeRevoked', + 'revocation_reason': 'revocationReason' + } + + self._time_revoked = None + self._revocation_reason = None + + @property + def time_revoked(self): + """ + **[Required]** Gets the time_revoked of this RevocationStatus. + The time when the certificate or CA was revoked. + + + :return: The time_revoked of this RevocationStatus. + :rtype: datetime + """ + return self._time_revoked + + @time_revoked.setter + def time_revoked(self, time_revoked): + """ + Sets the time_revoked of this RevocationStatus. + The time when the certificate or CA was revoked. + + + :param time_revoked: The time_revoked of this RevocationStatus. + :type: datetime + """ + self._time_revoked = time_revoked + + @property + def revocation_reason(self): + """ + **[Required]** Gets the revocation_reason of this RevocationStatus. + The reason that the certificate or CA was revoked. + + Allowed values for this property are: "UNSPECIFIED", "KEY_COMPROMISE", "CA_COMPROMISE", "AFFILIATION_CHANGED", "SUPERSEDED", "CESSATION_OF_OPERATION", "PRIVILEGE_WITHDRAWN", "AA_COMPROMISE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The revocation_reason of this RevocationStatus. + :rtype: str + """ + return self._revocation_reason + + @revocation_reason.setter + def revocation_reason(self, revocation_reason): + """ + Sets the revocation_reason of this RevocationStatus. + The reason that the certificate or CA was revoked. + + + :param revocation_reason: The revocation_reason of this RevocationStatus. + :type: str + """ + allowed_values = ["UNSPECIFIED", "KEY_COMPROMISE", "CA_COMPROMISE", "AFFILIATION_CHANGED", "SUPERSEDED", "CESSATION_OF_OPERATION", "PRIVILEGE_WITHDRAWN", "AA_COMPROMISE"] + if not value_allowed_none_or_none_sentinel(revocation_reason, allowed_values): + revocation_reason = 'UNKNOWN_ENUM_VALUE' + self._revocation_reason = revocation_reason + + 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/certificates/models/validity.py b/src/oci/certificates/models/validity.py new file mode 100644 index 0000000000..ad92cf8a58 --- /dev/null +++ b/src/oci/certificates/models/validity.py @@ -0,0 +1,113 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 Validity(object): + """ + An object that describes a period of time during which an entity is valid. + """ + + def __init__(self, **kwargs): + """ + Initializes a new Validity object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param time_of_validity_not_before: + The value to assign to the time_of_validity_not_before property of this Validity. + :type time_of_validity_not_before: datetime + + :param time_of_validity_not_after: + The value to assign to the time_of_validity_not_after property of this Validity. + :type time_of_validity_not_after: datetime + + """ + self.swagger_types = { + 'time_of_validity_not_before': 'datetime', + 'time_of_validity_not_after': 'datetime' + } + + self.attribute_map = { + 'time_of_validity_not_before': 'timeOfValidityNotBefore', + 'time_of_validity_not_after': 'timeOfValidityNotAfter' + } + + self._time_of_validity_not_before = None + self._time_of_validity_not_after = None + + @property + def time_of_validity_not_before(self): + """ + **[Required]** Gets the time_of_validity_not_before of this Validity. + The date on which the certificate validity period begins, expressed in `RFC 3339`__ timestamp format. + Example: `2019-04-03T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_of_validity_not_before of this Validity. + :rtype: datetime + """ + return self._time_of_validity_not_before + + @time_of_validity_not_before.setter + def time_of_validity_not_before(self, time_of_validity_not_before): + """ + Sets the time_of_validity_not_before of this Validity. + The date on which the certificate validity period begins, expressed in `RFC 3339`__ timestamp format. + Example: `2019-04-03T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_of_validity_not_before: The time_of_validity_not_before of this Validity. + :type: datetime + """ + self._time_of_validity_not_before = time_of_validity_not_before + + @property + def time_of_validity_not_after(self): + """ + **[Required]** Gets the time_of_validity_not_after of this Validity. + The date on which the certificate validity period ends, expressed in `RFC 3339`__ timestamp format. + Example: `2019-04-03T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_of_validity_not_after of this Validity. + :rtype: datetime + """ + return self._time_of_validity_not_after + + @time_of_validity_not_after.setter + def time_of_validity_not_after(self, time_of_validity_not_after): + """ + Sets the time_of_validity_not_after of this Validity. + The date on which the certificate validity period ends, expressed in `RFC 3339`__ timestamp format. + Example: `2019-04-03T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_of_validity_not_after: The time_of_validity_not_after of this Validity. + :type: datetime + """ + self._time_of_validity_not_after = time_of_validity_not_after + + 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/certificates_management/__init__.py b/src/oci/certificates_management/__init__.py new file mode 100644 index 0000000000..929e0fed7d --- /dev/null +++ b/src/oci/certificates_management/__init__.py @@ -0,0 +1,12 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from __future__ import absolute_import + + +from .certificates_management_client import CertificatesManagementClient +from .certificates_management_client_composite_operations import CertificatesManagementClientCompositeOperations +from . import models + +__all__ = ["CertificatesManagementClient", "CertificatesManagementClientCompositeOperations", "models"] diff --git a/src/oci/certificates_management/certificates_management_client.py b/src/oci/certificates_management/certificates_management_client.py new file mode 100644 index 0000000000..e354ee2e1b --- /dev/null +++ b/src/oci/certificates_management/certificates_management_client.py @@ -0,0 +1,3361 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from __future__ import absolute_import + +from oci._vendor import requests # noqa: F401 +from oci._vendor import six + +from oci import retry, circuit_breaker # 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, get_signer_from_authentication_type, AUTHENTICATION_TYPE_FIELD_NAME +from .models import certificates_management_type_mapping +missing = Sentinel("Missing") + + +class CertificatesManagementClient(object): + """ + API for managing certificates. + """ + + 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 `__. + + :param obj circuit_breaker_strategy: (optional) + A circuit breaker strategy to apply to all calls made by this service client (i.e. at the client level). + This client will not have circuit breakers enabled by default, users can use their own circuit breaker strategy or the convenient :py:data:`~oci.circuit_breaker.DEFAULT_CIRCUIT_BREAKER_STRATEGY` provided by the SDK to enable it. + The specifics of circuit breaker strategy are described `here `__. + + :param function circuit_breaker_callback: (optional) + Callback function to receive any exceptions triggerred by the circuit breaker. + """ + validate_config(config, signer=kwargs.get('signer')) + if 'signer' in kwargs: + signer = kwargs['signer'] + + elif AUTHENTICATION_TYPE_FIELD_NAME in config: + signer = get_signer_from_authentication_type(config) + + 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'), + 'base_path': '/20210224', + 'service_endpoint_template': 'https://certificatesmanagement.{region}.oci.{secondLevelDomain}', + 'skip_deserialization': kwargs.get('skip_deserialization', False), + 'circuit_breaker_strategy': kwargs.get('circuit_breaker_strategy', circuit_breaker.GLOBAL_CIRCUIT_BREAKER_STRATEGY) + } + if 'timeout' in kwargs: + base_client_init_kwargs['timeout'] = kwargs.get('timeout') + self.base_client = BaseClient("certificates_management", config, signer, certificates_management_type_mapping, **base_client_init_kwargs) + self.retry_strategy = kwargs.get('retry_strategy') + self.circuit_breaker_callback = kwargs.get('circuit_breaker_callback') + + def cancel_certificate_authority_deletion(self, certificate_authority_id, **kwargs): + """ + Cancels the scheduled deletion of the specified certificate authority (CA). + + + :param str certificate_authority_id: (required) + The OCID of the certificate authority (CA). + + :param str opc_request_id: (optional) + Unique Oracle-assigned identifier for the request. If provided, the returned request ID + will include this value. Otherwise, a random request ID will be + generated by the service. + + :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. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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` + + :example: + Click `here `__ to see an example of how to use cancel_certificate_authority_deletion API. + """ + resource_path = "/certificateAuthorities/{certificateAuthorityId}/actions/cancelDeletion" + method = "POST" + + # 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( + "cancel_certificate_authority_deletion got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "certificateAuthorityId": certificate_authority_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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + 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_certificate_authority_version_deletion(self, certificate_authority_id, certificate_authority_version_number, **kwargs): + """ + Cancels the scheduled deletion of the specified certificate authority (CA) version. Canceling + a scheduled deletion restores the CA version's lifecycle state to what + it was before its scheduled deletion. + + + :param str certificate_authority_id: (required) + The OCID of the certificate authority (CA). + + :param int certificate_authority_version_number: (required) + The version number of the certificate authority (CA). + + :param str opc_request_id: (optional) + Unique Oracle-assigned identifier for the request. If provided, the returned request ID + will include this value. Otherwise, a random request ID will be + generated by the service. + + :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. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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` + + :example: + Click `here `__ to see an example of how to use cancel_certificate_authority_version_deletion API. + """ + resource_path = "/certificateAuthorities/{certificateAuthorityId}/version/{certificateAuthorityVersionNumber}/actions/cancelDeletion" + method = "POST" + + # 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( + "cancel_certificate_authority_version_deletion got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "certificateAuthorityId": certificate_authority_id, + "certificateAuthorityVersionNumber": certificate_authority_version_number + } + + 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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + 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_certificate_deletion(self, certificate_id, **kwargs): + """ + Cancels the pending deletion of the specified certificate. Canceling + a scheduled deletion restores the certificate's lifecycle state to what + it was before you scheduled the certificate for deletion. + + + :param str certificate_id: (required) + The OCID of the certificate. + + :param str opc_request_id: (optional) + Unique Oracle-assigned identifier for the request. If provided, the returned request ID + will include this value. Otherwise, a random request ID will be + generated by the service. + + :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. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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` + + :example: + Click `here `__ to see an example of how to use cancel_certificate_deletion API. + """ + resource_path = "/certificates/{certificateId}/actions/cancelDeletion" + method = "POST" + + # 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( + "cancel_certificate_deletion got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "certificateId": certificate_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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + 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_certificate_version_deletion(self, certificate_id, certificate_version_number, **kwargs): + """ + Cancels the scheduled deletion of the specified certificate version. + + + :param str certificate_id: (required) + The OCID of the certificate. + + :param int certificate_version_number: (required) + The version number of the certificate. + + :param str opc_request_id: (optional) + Unique Oracle-assigned identifier for the request. If provided, the returned request ID + will include this value. Otherwise, a random request ID will be + generated by the service. + + :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. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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` + + :example: + Click `here `__ to see an example of how to use cancel_certificate_version_deletion API. + """ + resource_path = "/certificates/{certificateId}/version/{certificateVersionNumber}/actions/cancelDeletion" + method = "POST" + + # 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( + "cancel_certificate_version_deletion got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "certificateId": certificate_id, + "certificateVersionNumber": certificate_version_number + } + + 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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + 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_ca_bundle_compartment(self, ca_bundle_id, change_ca_bundle_compartment_details, **kwargs): + """ + Moves a CA bundle to a different compartment in the same tenancy. For information about + moving resources between compartments, see `Moving Resources to a Different Compartment`__. + + When provided, if-match is checked against the ETag values of the secret. + + __ https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes + + + :param str ca_bundle_id: (required) + The OCID of the CA bundle. + + :param oci.certificates_management.models.ChangeCaBundleCompartmentDetails change_ca_bundle_compartment_details: (required) + The updated compartment details. + + :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 provided, the returned request ID + will include this value. Otherwise, a random request ID will be + generated by the service. + + :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 may be rejected). + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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` + + :example: + Click `here `__ to see an example of how to use change_ca_bundle_compartment API. + """ + resource_path = "/caBundles/{caBundleId}/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_ca_bundle_compartment got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "caBundleId": ca_bundle_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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + 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_ca_bundle_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_ca_bundle_compartment_details) + + def change_certificate_authority_compartment(self, certificate_authority_id, change_certificate_authority_compartment_details, **kwargs): + """ + Moves a certificate authority (CA) to a different compartment within the same tenancy. For information about + moving resources between compartments, see `Moving Resources to a Different Compartment`__. + + When provided, If-Match is checked against the ETag values of the source. + + __ https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes + + + :param str certificate_authority_id: (required) + The OCID of the certificate authority (CA). + + :param oci.certificates_management.models.ChangeCertificateAuthorityCompartmentDetails change_certificate_authority_compartment_details: (required) + The updated compartment details + + :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 provided, the returned request ID + will include this value. Otherwise, a random request ID will be + generated by the service. + + :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 may be rejected). + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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` + + :example: + Click `here `__ to see an example of how to use change_certificate_authority_compartment API. + """ + resource_path = "/certificateAuthorities/{certificateAuthorityId}/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_certificate_authority_compartment got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "certificateAuthorityId": certificate_authority_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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + 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_certificate_authority_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_certificate_authority_compartment_details) + + def change_certificate_compartment(self, certificate_id, change_certificate_compartment_details, **kwargs): + """ + Moves a certificate to a different compartment within the same tenancy. For information about + moving resources between compartments, see `Moving Resources to a Different Compartment`__. + + When provided, if-match is checked against the ETag values of the secret. + + __ https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes + + + :param str certificate_id: (required) + The OCID of the certificate. + + :param oci.certificates_management.models.ChangeCertificateCompartmentDetails change_certificate_compartment_details: (required) + The updated compartment details. + + :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 provided, the returned request ID + will include this value. Otherwise, a random request ID will be + generated by the service. + + :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 may be rejected). + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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` + + :example: + Click `here `__ to see an example of how to use change_certificate_compartment API. + """ + resource_path = "/certificates/{certificateId}/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_certificate_compartment got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "certificateId": certificate_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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + 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_certificate_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_certificate_compartment_details) + + def create_ca_bundle(self, create_ca_bundle_details, **kwargs): + """ + Creates a new CA bundle according to the details of the request. + + + :param oci.certificates_management.models.CreateCaBundleDetails create_ca_bundle_details: (required) + The details of the request to create a new CA bundle. + + :param str opc_request_id: (optional) + Unique Oracle-assigned identifier for the request. If provided, the returned request ID + will include this value. Otherwise, a random request ID will be + generated by the service. + + :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 may be rejected). + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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.certificates_management.models.CaBundle` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use create_ca_bundle API. + """ + resource_path = "/caBundles" + 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_ca_bundle 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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + header_params=header_params, + body=create_ca_bundle_details, + response_type="CaBundle") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + header_params=header_params, + body=create_ca_bundle_details, + response_type="CaBundle") + + def create_certificate(self, create_certificate_details, **kwargs): + """ + Creates a new certificate according to the details of the request. + + + :param oci.certificates_management.models.CreateCertificateDetails create_certificate_details: (required) + The details of the request to create a new certificate. + + :param str opc_request_id: (optional) + Unique Oracle-assigned identifier for the request. If provided, the returned request ID + will include this value. Otherwise, a random request ID will be + generated by the service. + + :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 may be rejected). + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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.certificates_management.models.Certificate` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use create_certificate API. + """ + resource_path = "/certificates" + 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_certificate 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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + header_params=header_params, + body=create_certificate_details, + response_type="Certificate") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + header_params=header_params, + body=create_certificate_details, + response_type="Certificate") + + def create_certificate_authority(self, create_certificate_authority_details, **kwargs): + """ + Creates a new certificate authority (CA) according to the details of the request. + + + :param oci.certificates_management.models.CreateCertificateAuthorityDetails create_certificate_authority_details: (required) + The details of the request to create a new CA. + + :param str opc_request_id: (optional) + Unique Oracle-assigned identifier for the request. If provided, the returned request ID + will include this value. Otherwise, a random request ID will be + generated by the service. + + :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 may be rejected). + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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.certificates_management.models.CertificateAuthority` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use create_certificate_authority API. + """ + resource_path = "/certificateAuthorities" + 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_certificate_authority 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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + header_params=header_params, + body=create_certificate_authority_details, + response_type="CertificateAuthority") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + header_params=header_params, + body=create_certificate_authority_details, + response_type="CertificateAuthority") + + def delete_ca_bundle(self, ca_bundle_id, **kwargs): + """ + Deletes the specified CA bundle. + + + :param str ca_bundle_id: (required) + The OCID of the CA bundle. + + :param str opc_request_id: (optional) + Unique Oracle-assigned identifier for the request. If provided, the returned request ID + will include this value. Otherwise, a random request ID will be + generated by the service. + + :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. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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` + + :example: + Click `here `__ to see an example of how to use delete_ca_bundle API. + """ + resource_path = "/caBundles/{caBundleId}" + method = "DELETE" + + # 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( + "delete_ca_bundle got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "caBundleId": ca_bundle_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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + 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_association(self, association_id, **kwargs): + """ + Gets details about the specified association. + + + :param str association_id: (required) + The OCID of an association between a certificate-related resource and another Oracle Cloud Infrastructure resource. + + :param str opc_request_id: (optional) + Unique Oracle-assigned identifier for the request. If provided, the returned request ID + will include this value. Otherwise, a random request ID will be + generated by the service. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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.certificates_management.models.Association` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_association API. + """ + resource_path = "/associations/{associationId}" + 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_association got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "associationId": association_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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + 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="Association") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="Association") + + def get_ca_bundle(self, ca_bundle_id, **kwargs): + """ + Gets details about the specified CA bundle. + + + :param str ca_bundle_id: (required) + The OCID of the CA bundle. + + :param str opc_request_id: (optional) + Unique Oracle-assigned identifier for the request. If provided, the returned request ID + will include this value. Otherwise, a random request ID will be + generated by the service. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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.certificates_management.models.CaBundle` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_ca_bundle API. + """ + resource_path = "/caBundles/{caBundleId}" + 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_ca_bundle got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "caBundleId": ca_bundle_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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + 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="CaBundle") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="CaBundle") + + def get_certificate(self, certificate_id, **kwargs): + """ + Gets details about the specified certificate. + + + :param str certificate_id: (required) + The OCID of the certificate. + + :param str opc_request_id: (optional) + Unique Oracle-assigned identifier for the request. If provided, the returned request ID + will include this value. Otherwise, a random request ID will be + generated by the service. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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.certificates_management.models.Certificate` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_certificate API. + """ + resource_path = "/certificates/{certificateId}" + 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_certificate got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "certificateId": certificate_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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + 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="Certificate") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="Certificate") + + def get_certificate_authority(self, certificate_authority_id, **kwargs): + """ + Gets details about the specified certificate authority (CA). + + + :param str certificate_authority_id: (required) + The OCID of the certificate authority (CA). + + :param str opc_request_id: (optional) + Unique Oracle-assigned identifier for the request. If provided, the returned request ID + will include this value. Otherwise, a random request ID will be + generated by the service. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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.certificates_management.models.CertificateAuthority` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_certificate_authority API. + """ + resource_path = "/certificateAuthorities/{certificateAuthorityId}" + 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_certificate_authority got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "certificateAuthorityId": certificate_authority_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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + 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="CertificateAuthority") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="CertificateAuthority") + + def get_certificate_authority_version(self, certificate_authority_id, certificate_authority_version_number, **kwargs): + """ + Gets details about the specified certificate authority (CA) version. + + + :param str certificate_authority_id: (required) + The OCID of the certificate authority (CA). + + :param int certificate_authority_version_number: (required) + The version number of the certificate authority (CA). + + :param str opc_request_id: (optional) + Unique Oracle-assigned identifier for the request. If provided, the returned request ID + will include this value. Otherwise, a random request ID will be + generated by the service. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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.certificates_management.models.CertificateAuthorityVersion` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_certificate_authority_version API. + """ + resource_path = "/certificateAuthorities/{certificateAuthorityId}/version/{certificateAuthorityVersionNumber}" + 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_certificate_authority_version got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "certificateAuthorityId": certificate_authority_id, + "certificateAuthorityVersionNumber": certificate_authority_version_number + } + + 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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + 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="CertificateAuthorityVersion") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="CertificateAuthorityVersion") + + def get_certificate_version(self, certificate_id, certificate_version_number, **kwargs): + """ + Gets details about the specified version of a certificate. + + + :param str certificate_id: (required) + The OCID of the certificate. + + :param int certificate_version_number: (required) + The version number of the certificate. + + :param str opc_request_id: (optional) + Unique Oracle-assigned identifier for the request. If provided, the returned request ID + will include this value. Otherwise, a random request ID will be + generated by the service. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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.certificates_management.models.CertificateVersion` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_certificate_version API. + """ + resource_path = "/certificates/{certificateId}/version/{certificateVersionNumber}" + 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_certificate_version got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "certificateId": certificate_id, + "certificateVersionNumber": certificate_version_number + } + + 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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + 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="CertificateVersion") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="CertificateVersion") + + def list_associations(self, **kwargs): + """ + Lists all associations that match the query parameters. + Optionally, you can use the parameter `FilterByAssociationIdQueryParam` to limit the result set to a single item that matches the specified association. + + + :param str opc_request_id: (optional) + Unique Oracle-assigned identifier for the request. If provided, the returned request ID + will include this value. Otherwise, a random request ID will be + generated by the service. + + :param str compartment_id: (optional) + A filter that returns only resources that match the given compartment OCID. + + :param str certificates_resource_id: (optional) + A filter that returns only resources that match the given OCID of a certificate-related resource. + + :param str associated_resource_id: (optional) + A filter that returns only resources that match the given OCID of an associated Oracle Cloud Infrastructure resource. + + :param str association_id: (optional) + The OCID of the association. If the parameter is set to null, the service lists all associations. + + :param str name: (optional) + A filter that returns only resources that match the specified name. + + :param str sort_by: (optional) + The field to sort by. You can specify only one sort order. The default order for `TIMECREATED` is descending. + The default order for `NAME` is ascending. + + Allowed values are: "NAME", "TIMECREATED" + + :param str sort_order: (optional) + The sort order to use, either ascending (`ASC`) or descending (`DESC`). + + Allowed values are: "ASC", "DESC" + + :param int limit: (optional) + The maximum number of items to return in a paginated \"List\" call. + + :param str page: (optional) + The value of the `opc-next-page` response header + from the previous \"List\" call. + + :param str association_type: (optional) + Type of associations to list. If the parameter is set to null, the service lists all types of associations. + + Allowed values are: "CERTIFICATE", "CERTIFICATE_AUTHORITY", "CA_BUNDLE" + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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.certificates_management.models.AssociationCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_associations API. + """ + resource_path = "/associations" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "opc_request_id", + "compartment_id", + "certificates_resource_id", + "associated_resource_id", + "association_id", + "name", + "sort_by", + "sort_order", + "limit", + "page", + "association_type" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_associations got unknown kwargs: {!r}".format(extra_kwargs)) + + if 'sort_by' in kwargs: + sort_by_allowed_values = ["NAME", "TIMECREATED"] + 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) + ) + + 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 'association_type' in kwargs: + association_type_allowed_values = ["CERTIFICATE", "CERTIFICATE_AUTHORITY", "CA_BUNDLE"] + if kwargs['association_type'] not in association_type_allowed_values: + raise ValueError( + "Invalid value for `association_type`, must be one of {0}".format(association_type_allowed_values) + ) + + query_params = { + "compartmentId": kwargs.get("compartment_id", missing), + "certificatesResourceId": kwargs.get("certificates_resource_id", missing), + "associatedResourceId": kwargs.get("associated_resource_id", missing), + "associationId": kwargs.get("association_id", missing), + "name": kwargs.get("name", missing), + "sortBy": kwargs.get("sort_by", missing), + "sortOrder": kwargs.get("sort_order", missing), + "limit": kwargs.get("limit", missing), + "page": kwargs.get("page", missing), + "associationType": kwargs.get("association_type", 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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + 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="AssociationCollection") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="AssociationCollection") + + def list_ca_bundles(self, **kwargs): + """ + Lists all CA bundles that match the query parameters. + Optionally, you can use the parameter `FilterByCaBundleIdQueryParam` to limit the result set to a single item that matches the specified CA bundle. + + + :param str opc_request_id: (optional) + Unique Oracle-assigned identifier for the request. If provided, the returned request ID + will include this value. Otherwise, a random request ID will be + generated by the service. + + :param str compartment_id: (optional) + A filter that returns only resources that match the given compartment OCID. + + :param str lifecycle_state: (optional) + A filter that returns only resources that match the given lifecycle state. The state value is case-insensitive. + + Allowed values are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED" + + :param str name: (optional) + A filter that returns only resources that match the specified name. + + :param str sort_by: (optional) + The field to sort by. You can specify only one sort order. The default order for `TIMECREATED` is descending. + The default order for `NAME` is ascending. + + Allowed values are: "NAME", "TIMECREATED" + + :param str sort_order: (optional) + The sort order to use, either ascending (`ASC`) or descending (`DESC`). + + Allowed values are: "ASC", "DESC" + + :param int limit: (optional) + The maximum number of items to return in a paginated \"List\" call. + + :param str page: (optional) + The value of the `opc-next-page` response header + from the previous \"List\" call. + + :param str ca_bundle_id: (optional) + The OCID of the CA bundle. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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.certificates_management.models.CaBundleCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_ca_bundles API. + """ + resource_path = "/caBundles" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "opc_request_id", + "compartment_id", + "lifecycle_state", + "name", + "sort_by", + "sort_order", + "limit", + "page", + "ca_bundle_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_ca_bundles got unknown kwargs: {!r}".format(extra_kwargs)) + + if 'lifecycle_state' in kwargs: + lifecycle_state_allowed_values = ["CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED"] + 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_by' in kwargs: + sort_by_allowed_values = ["NAME", "TIMECREATED"] + 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) + ) + + 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) + ) + + query_params = { + "compartmentId": kwargs.get("compartment_id", missing), + "lifecycleState": kwargs.get("lifecycle_state", missing), + "name": kwargs.get("name", missing), + "sortBy": kwargs.get("sort_by", missing), + "sortOrder": kwargs.get("sort_order", missing), + "limit": kwargs.get("limit", missing), + "page": kwargs.get("page", missing), + "caBundleId": kwargs.get("ca_bundle_id", 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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + 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="CaBundleCollection") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="CaBundleCollection") + + def list_certificate_authorities(self, **kwargs): + """ + Lists all certificate authorities (CAs) in the specified compartment. + Optionally, you can use the parameter `FilterByCertificateAuthorityIdQueryParam` to limit the results to a single item that matches the specified CA. + + + :param str opc_request_id: (optional) + Unique Oracle-assigned identifier for the request. If provided, the returned request ID + will include this value. Otherwise, a random request ID will be + generated by the service. + + :param str compartment_id: (optional) + A filter that returns only resources that match the given compartment OCID. + + :param str lifecycle_state: (optional) + A filter that returns only resources that match the given lifecycle state. The state value is case-insensitive. + + Allowed values are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "SCHEDULING_DELETION", "PENDING_DELETION", "CANCELLING_DELETION", "FAILED" + + :param str name: (optional) + A filter that returns only resources that match the specified name. + + :param str issuer_certificate_authority_id: (optional) + The OCID of the certificate authority (CA). If the parameter is set to null, the service lists all CAs. + + :param str certificate_authority_id: (optional) + The OCID of the certificate authority (CA). If the parameter is set to null, the service lists all CAs. + + :param str sort_by: (optional) + The field to sort by. You can specify only one sort order. The default + order for `EXPIRATIONDATE` and 'TIMECREATED' is descending. The default order for `NAME` + is ascending. + + Allowed values are: "NAME", "EXPIRATIONDATE", "TIMECREATED" + + :param str sort_order: (optional) + The sort order to use, either ascending (`ASC`) or descending (`DESC`). + + Allowed values are: "ASC", "DESC" + + :param int limit: (optional) + The maximum number of items to return in a paginated \"List\" call. + + :param str page: (optional) + The value of the `opc-next-page` response header + from the previous \"List\" call. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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.certificates_management.models.CertificateAuthorityCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_certificate_authorities API. + """ + resource_path = "/certificateAuthorities" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "opc_request_id", + "compartment_id", + "lifecycle_state", + "name", + "issuer_certificate_authority_id", + "certificate_authority_id", + "sort_by", + "sort_order", + "limit", + "page" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_certificate_authorities got unknown kwargs: {!r}".format(extra_kwargs)) + + if 'lifecycle_state' in kwargs: + lifecycle_state_allowed_values = ["CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "SCHEDULING_DELETION", "PENDING_DELETION", "CANCELLING_DELETION", "FAILED"] + 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_by' in kwargs: + sort_by_allowed_values = ["NAME", "EXPIRATIONDATE", "TIMECREATED"] + 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) + ) + + 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) + ) + + query_params = { + "compartmentId": kwargs.get("compartment_id", missing), + "lifecycleState": kwargs.get("lifecycle_state", missing), + "name": kwargs.get("name", missing), + "issuerCertificateAuthorityId": kwargs.get("issuer_certificate_authority_id", missing), + "certificateAuthorityId": kwargs.get("certificate_authority_id", missing), + "sortBy": kwargs.get("sort_by", missing), + "sortOrder": kwargs.get("sort_order", missing), + "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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + 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="CertificateAuthorityCollection") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="CertificateAuthorityCollection") + + def list_certificate_authority_versions(self, certificate_authority_id, **kwargs): + """ + Lists all versions for the specified certificate authority (CA). + Optionally, you can use the parameter `FilterByVersionNumberQueryParam` to limit the results to a single item that matches the specified version number. + + + :param str certificate_authority_id: (required) + The OCID of the certificate authority (CA). + + :param str opc_request_id: (optional) + Unique Oracle-assigned identifier for the request. If provided, the returned request ID + will include this value. Otherwise, a random request ID will be + generated by the service. + + :param int version_number: (optional) + A filter that returns only resources that match the specified version number. The default value is 0, which means that this filter is not applied. + + :param int limit: (optional) + The maximum number of items to return in a paginated \"List\" call. + + :param str page: (optional) + The value of the `opc-next-page` response header + from the previous \"List\" call. + + :param str sort_by: (optional) + The field to sort by. You can specify only one sort order. The default order for 'VERSION_NUMBER' is ascending. + + Allowed values are: "VERSION_NUMBER" + + :param str sort_order: (optional) + The sort order to use, either ascending (`ASC`) or descending (`DESC`). + + Allowed values are: "ASC", "DESC" + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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.certificates_management.models.CertificateAuthorityVersionCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_certificate_authority_versions API. + """ + resource_path = "/certificateAuthorities/{certificateAuthorityId}/versions" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "opc_request_id", + "version_number", + "limit", + "page", + "sort_by", + "sort_order" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_certificate_authority_versions got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "certificateAuthorityId": certificate_authority_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)) + + if 'sort_by' in kwargs: + sort_by_allowed_values = ["VERSION_NUMBER"] + 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) + ) + + 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) + ) + + query_params = { + "versionNumber": kwargs.get("version_number", missing), + "limit": kwargs.get("limit", missing), + "page": kwargs.get("page", missing), + "sortBy": kwargs.get("sort_by", missing), + "sortOrder": kwargs.get("sort_order", 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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="CertificateAuthorityVersionCollection") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="CertificateAuthorityVersionCollection") + + def list_certificate_versions(self, certificate_id, **kwargs): + """ + Lists all certificate versions for the specified certificate. + Optionally, you can use the parameter `FilterByVersionNumberQueryParam` to limit the result set to a single item that matches the specified version number. + + + :param str certificate_id: (required) + The OCID of the certificate. + + :param str opc_request_id: (optional) + Unique Oracle-assigned identifier for the request. If provided, the returned request ID + will include this value. Otherwise, a random request ID will be + generated by the service. + + :param int version_number: (optional) + A filter that returns only resources that match the specified version number. The default value is 0, which means that this filter is not applied. + + :param int limit: (optional) + The maximum number of items to return in a paginated \"List\" call. + + :param str page: (optional) + The value of the `opc-next-page` response header + from the previous \"List\" call. + + :param str sort_by: (optional) + The field to sort by. You can specify only one sort order. The default order for 'VERSION_NUMBER' is ascending. + + Allowed values are: "VERSION_NUMBER" + + :param str sort_order: (optional) + The sort order to use, either ascending (`ASC`) or descending (`DESC`). + + Allowed values are: "ASC", "DESC" + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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.certificates_management.models.CertificateVersionCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_certificate_versions API. + """ + resource_path = "/certificates/{certificateId}/versions" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "opc_request_id", + "version_number", + "limit", + "page", + "sort_by", + "sort_order" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_certificate_versions got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "certificateId": certificate_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)) + + if 'sort_by' in kwargs: + sort_by_allowed_values = ["VERSION_NUMBER"] + 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) + ) + + 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) + ) + + query_params = { + "versionNumber": kwargs.get("version_number", missing), + "limit": kwargs.get("limit", missing), + "page": kwargs.get("page", missing), + "sortBy": kwargs.get("sort_by", missing), + "sortOrder": kwargs.get("sort_order", 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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="CertificateVersionCollection") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="CertificateVersionCollection") + + def list_certificates(self, **kwargs): + """ + Lists all certificates that match the query parameters. + Optionally, you can use the parameter `FilterByCertificateIdQueryParam` to limit the result set to a single item that matches the specified certificate. + + + :param str opc_request_id: (optional) + Unique Oracle-assigned identifier for the request. If provided, the returned request ID + will include this value. Otherwise, a random request ID will be + generated by the service. + + :param str compartment_id: (optional) + A filter that returns only resources that match the given compartment OCID. + + :param str lifecycle_state: (optional) + A filter that returns only resources that match the given lifecycle state. The state value is case-insensitive. + + Allowed values are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "SCHEDULING_DELETION", "PENDING_DELETION", "CANCELLING_DELETION", "FAILED" + + :param str name: (optional) + A filter that returns only resources that match the specified name. + + :param str sort_by: (optional) + The field to sort by. You can specify only one sort order. The default + order for `EXPIRATIONDATE` and 'TIMECREATED' is descending. The default order for `NAME` + is ascending. + + Allowed values are: "NAME", "EXPIRATIONDATE", "TIMECREATED" + + :param str sort_order: (optional) + The sort order to use, either ascending (`ASC`) or descending (`DESC`). + + Allowed values are: "ASC", "DESC" + + :param int limit: (optional) + The maximum number of items to return in a paginated \"List\" call. + + :param str page: (optional) + The value of the `opc-next-page` response header + from the previous \"List\" call. + + :param str issuer_certificate_authority_id: (optional) + The OCID of the certificate authority (CA). If the parameter is set to null, the service lists all CAs. + + :param str certificate_id: (optional) + The OCID of the certificate. If the parameter is set to null, the service lists all certificates. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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.certificates_management.models.CertificateCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_certificates API. + """ + resource_path = "/certificates" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "opc_request_id", + "compartment_id", + "lifecycle_state", + "name", + "sort_by", + "sort_order", + "limit", + "page", + "issuer_certificate_authority_id", + "certificate_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_certificates got unknown kwargs: {!r}".format(extra_kwargs)) + + if 'lifecycle_state' in kwargs: + lifecycle_state_allowed_values = ["CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "SCHEDULING_DELETION", "PENDING_DELETION", "CANCELLING_DELETION", "FAILED"] + 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_by' in kwargs: + sort_by_allowed_values = ["NAME", "EXPIRATIONDATE", "TIMECREATED"] + 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) + ) + + 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) + ) + + query_params = { + "compartmentId": kwargs.get("compartment_id", missing), + "lifecycleState": kwargs.get("lifecycle_state", missing), + "name": kwargs.get("name", missing), + "sortBy": kwargs.get("sort_by", missing), + "sortOrder": kwargs.get("sort_order", missing), + "limit": kwargs.get("limit", missing), + "page": kwargs.get("page", missing), + "issuerCertificateAuthorityId": kwargs.get("issuer_certificate_authority_id", missing), + "certificateId": kwargs.get("certificate_id", 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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + 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="CertificateCollection") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="CertificateCollection") + + def revoke_certificate_authority_version(self, certificate_authority_id, certificate_authority_version_number, revoke_certificate_authority_version_details, **kwargs): + """ + Revokes a certificate authority (CA) version. + + + :param str certificate_authority_id: (required) + The OCID of the certificate authority (CA). + + :param int certificate_authority_version_number: (required) + The version number of the certificate authority (CA). + + :param oci.certificates_management.models.RevokeCertificateAuthorityVersionDetails revoke_certificate_authority_version_details: (required) + The details of the request to revoke a CA version. + + :param str opc_request_id: (optional) + Unique Oracle-assigned identifier for the request. If provided, the returned request ID + will include this value. Otherwise, a random request ID will be + generated by the service. + + :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 may be rejected). + + :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. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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` + + :example: + Click `here `__ to see an example of how to use revoke_certificate_authority_version API. + """ + resource_path = "/certificateAuthorities/{certificateAuthorityId}/version/{certificateAuthorityVersionNumber}/actions/revoke" + method = "POST" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "opc_request_id", + "opc_retry_token", + "if_match" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "revoke_certificate_authority_version got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "certificateAuthorityId": certificate_authority_id, + "certificateAuthorityVersionNumber": certificate_authority_version_number + } + + 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), + "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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + 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=revoke_certificate_authority_version_details) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=revoke_certificate_authority_version_details) + + def revoke_certificate_version(self, certificate_id, certificate_version_number, revoke_certificate_version_details, **kwargs): + """ + Revokes the specified certificate version. + + + :param str certificate_id: (required) + The OCID of the certificate. + + :param int certificate_version_number: (required) + The version number of the certificate. + + :param oci.certificates_management.models.RevokeCertificateVersionDetails revoke_certificate_version_details: (required) + The details of the request to revoke a certificate version. + + :param str opc_request_id: (optional) + Unique Oracle-assigned identifier for the request. If provided, the returned request ID + will include this value. Otherwise, a random request ID will be + generated by the service. + + :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 may be rejected). + + :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. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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` + + :example: + Click `here `__ to see an example of how to use revoke_certificate_version API. + """ + resource_path = "/certificates/{certificateId}/version/{certificateVersionNumber}/actions/revoke" + method = "POST" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "opc_request_id", + "opc_retry_token", + "if_match" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "revoke_certificate_version got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "certificateId": certificate_id, + "certificateVersionNumber": certificate_version_number + } + + 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), + "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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + 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=revoke_certificate_version_details) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=revoke_certificate_version_details) + + def schedule_certificate_authority_deletion(self, certificate_authority_id, schedule_certificate_authority_deletion_details, **kwargs): + """ + Schedules the deletion of the specified certificate authority (CA). This sets the lifecycle state of the CA to `PENDING_DELETION` and then deletes it after the specified retention period ends. If needed, you can determine the status of the deletion by using `GetCertificateAuthority`. + + + :param str certificate_authority_id: (required) + The OCID of the certificate authority (CA). + + :param oci.certificates_management.models.ScheduleCertificateAuthorityDeletionDetails schedule_certificate_authority_deletion_details: (required) + The details of the request to schedule the deletion of a CA. + + :param str opc_request_id: (optional) + Unique Oracle-assigned identifier for the request. If provided, the returned request ID + will include this value. Otherwise, a random request ID will be + generated by the service. + + :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. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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` + + :example: + Click `here `__ to see an example of how to use schedule_certificate_authority_deletion API. + """ + resource_path = "/certificateAuthorities/{certificateAuthorityId}/actions/scheduleDeletion" + method = "POST" + + # 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( + "schedule_certificate_authority_deletion got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "certificateAuthorityId": certificate_authority_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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + 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=schedule_certificate_authority_deletion_details) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=schedule_certificate_authority_deletion_details) + + def schedule_certificate_authority_version_deletion(self, certificate_authority_id, certificate_authority_version_number, schedule_certificate_authority_version_deletion_details, **kwargs): + """ + Schedules the deletion of the specified certificate authority (CA) version. + This sets the lifecycle state of the CA version to `PENDING_DELETION` + and then deletes it after the specified retention period ends. If needed, you can determine the status of the deletion by using `GetCertificateAuthorityVersion`. + + + :param str certificate_authority_id: (required) + The OCID of the certificate authority (CA). + + :param int certificate_authority_version_number: (required) + The version number of the certificate authority (CA). + + :param oci.certificates_management.models.ScheduleCertificateAuthorityVersionDeletionDetails schedule_certificate_authority_version_deletion_details: (required) + The details of the request to delete a CA version. + + :param str opc_request_id: (optional) + Unique Oracle-assigned identifier for the request. If provided, the returned request ID + will include this value. Otherwise, a random request ID will be + generated by the service. + + :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. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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` + + :example: + Click `here `__ to see an example of how to use schedule_certificate_authority_version_deletion API. + """ + resource_path = "/certificateAuthorities/{certificateAuthorityId}/version/{certificateAuthorityVersionNumber}/actions/scheduleDeletion" + method = "POST" + + # 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( + "schedule_certificate_authority_version_deletion got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "certificateAuthorityId": certificate_authority_id, + "certificateAuthorityVersionNumber": certificate_authority_version_number + } + + 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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + 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=schedule_certificate_authority_version_deletion_details) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=schedule_certificate_authority_version_deletion_details) + + def schedule_certificate_deletion(self, certificate_id, schedule_certificate_deletion_details, **kwargs): + """ + Schedules the deletion of the specified certificate. This sets the lifecycle state of the certificate + to `PENDING_DELETION` and then deletes it after the specified retention period ends. + You can subsequently use `GetCertificate` to determine the current deletion status. + + + :param str certificate_id: (required) + The OCID of the certificate. + + :param oci.certificates_management.models.ScheduleCertificateDeletionDetails schedule_certificate_deletion_details: (required) + The details of the request to schedule a certificate deletion. + This sets the lifecycle state of the certificate to `PENDING_DELETION` and then deletes it + after the specified retention period ends. + You can subsequently use `GetCertificate` to determine the current deletion status. + + :param str opc_request_id: (optional) + Unique Oracle-assigned identifier for the request. If provided, the returned request ID + will include this value. Otherwise, a random request ID will be + generated by the service. + + :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. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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` + + :example: + Click `here `__ to see an example of how to use schedule_certificate_deletion API. + """ + resource_path = "/certificates/{certificateId}/actions/scheduleDeletion" + method = "POST" + + # 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( + "schedule_certificate_deletion got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "certificateId": certificate_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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + 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=schedule_certificate_deletion_details) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=schedule_certificate_deletion_details) + + def schedule_certificate_version_deletion(self, certificate_id, certificate_version_number, schedule_certificate_version_deletion_details, **kwargs): + """ + Schedules the deletion of the specified certificate version. This sets the lifecycle state of the certificate version to `PENDING_DELETION` and then deletes it after the specified retention period ends. You can only + delete a certificate version if the certificate version rotation state is marked as `DEPRECATED`. + + You can subsequently use `GetCertificateVersion` to determine the current certificate version deletion status. + + + :param str certificate_id: (required) + The OCID of the certificate. + + :param int certificate_version_number: (required) + The version number of the certificate. + + :param oci.certificates_management.models.ScheduleCertificateVersionDeletionDetails schedule_certificate_version_deletion_details: (required) + The details of the request to delete a certificate version. + + :param str opc_request_id: (optional) + Unique Oracle-assigned identifier for the request. If provided, the returned request ID + will include this value. Otherwise, a random request ID will be + generated by the service. + + :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. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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` + + :example: + Click `here `__ to see an example of how to use schedule_certificate_version_deletion API. + """ + resource_path = "/certificates/{certificateId}/version/{certificateVersionNumber}/actions/scheduleDeletion" + method = "POST" + + # 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( + "schedule_certificate_version_deletion got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "certificateId": certificate_id, + "certificateVersionNumber": certificate_version_number + } + + 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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + 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=schedule_certificate_version_deletion_details) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=schedule_certificate_version_deletion_details) + + def update_ca_bundle(self, ca_bundle_id, update_ca_bundle_details, **kwargs): + """ + Updates the properties of a CA bundle. + + + :param str ca_bundle_id: (required) + The OCID of the CA bundle. + + :param oci.certificates_management.models.UpdateCaBundleDetails update_ca_bundle_details: (required) + The details of the request to update a CA bundle. + + :param str opc_request_id: (optional) + Unique Oracle-assigned identifier for the request. If provided, the returned request ID + will include this value. Otherwise, a random request ID will be + generated by the service. + + :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. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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.certificates_management.models.CaBundle` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use update_ca_bundle API. + """ + resource_path = "/caBundles/{caBundleId}" + 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_ca_bundle got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "caBundleId": ca_bundle_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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + 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_ca_bundle_details, + response_type="CaBundle") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=update_ca_bundle_details, + response_type="CaBundle") + + def update_certificate(self, certificate_id, update_certificate_details, **kwargs): + """ + Updates the properties of a certificate. + + + :param str certificate_id: (required) + The OCID of the certificate. + + :param oci.certificates_management.models.UpdateCertificateDetails update_certificate_details: (required) + The details of the request to update a certificate. + + :param str opc_request_id: (optional) + Unique Oracle-assigned identifier for the request. If provided, the returned request ID + will include this value. Otherwise, a random request ID will be + generated by the service. + + :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. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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.certificates_management.models.Certificate` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use update_certificate API. + """ + resource_path = "/certificates/{certificateId}" + 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_certificate got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "certificateId": certificate_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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + 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_certificate_details, + response_type="Certificate") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=update_certificate_details, + response_type="Certificate") + + def update_certificate_authority(self, certificate_authority_id, update_certificate_authority_details, **kwargs): + """ + Updates the properties of the specified certificate authority (CA). + + + :param str certificate_authority_id: (required) + The OCID of the certificate authority (CA). + + :param oci.certificates_management.models.UpdateCertificateAuthorityDetails update_certificate_authority_details: (required) + The details of the request to update a CA. + + :param str opc_request_id: (optional) + Unique Oracle-assigned identifier for the request. If provided, the returned request ID + will include this value. Otherwise, a random request ID will be + generated by the service. + + :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. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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.certificates_management.models.CertificateAuthority` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use update_certificate_authority API. + """ + resource_path = "/certificateAuthorities/{certificateAuthorityId}" + 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_certificate_authority got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "certificateAuthorityId": certificate_authority_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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + 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_certificate_authority_details, + response_type="CertificateAuthority") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=update_certificate_authority_details, + response_type="CertificateAuthority") diff --git a/src/oci/certificates_management/certificates_management_client_composite_operations.py b/src/oci/certificates_management/certificates_management_client_composite_operations.py new file mode 100644 index 0000000000..6ef3ea7eeb --- /dev/null +++ b/src/oci/certificates_management/certificates_management_client_composite_operations.py @@ -0,0 +1,308 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +import oci # noqa: F401 +from oci.util import WAIT_RESOURCE_NOT_FOUND # noqa: F401 + + +class CertificatesManagementClientCompositeOperations(object): + """ + This class provides a wrapper around :py:class:`~oci.certificates_management.CertificatesManagementClient` 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 CertificatesManagementClientCompositeOperations object + + :param CertificatesManagementClient client: + The service client which will be wrapped by this object + """ + self.client = client + + def create_ca_bundle_and_wait_for_state(self, create_ca_bundle_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.certificates_management.CertificatesManagementClient.create_ca_bundle` and waits for the :py:class:`~oci.certificates_management.models.CaBundle` acted upon + to enter the given state(s). + + :param oci.certificates_management.models.CreateCaBundleDetails create_ca_bundle_details: (required) + The details of the request to create a new CA bundle. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.certificates_management.models.CaBundle.lifecycle_state` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.certificates_management.CertificatesManagementClient.create_ca_bundle` + + :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_ca_bundle(create_ca_bundle_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_ca_bundle(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_certificate_and_wait_for_state(self, create_certificate_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.certificates_management.CertificatesManagementClient.create_certificate` and waits for the :py:class:`~oci.certificates_management.models.Certificate` acted upon + to enter the given state(s). + + :param oci.certificates_management.models.CreateCertificateDetails create_certificate_details: (required) + The details of the request to create a new certificate. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.certificates_management.models.Certificate.lifecycle_state` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.certificates_management.CertificatesManagementClient.create_certificate` + + :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_certificate(create_certificate_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_certificate(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_certificate_authority_and_wait_for_state(self, create_certificate_authority_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.certificates_management.CertificatesManagementClient.create_certificate_authority` and waits for the :py:class:`~oci.certificates_management.models.CertificateAuthority` acted upon + to enter the given state(s). + + :param oci.certificates_management.models.CreateCertificateAuthorityDetails create_certificate_authority_details: (required) + The details of the request to create a new CA. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.certificates_management.models.CertificateAuthority.lifecycle_state` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.certificates_management.CertificatesManagementClient.create_certificate_authority` + + :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_certificate_authority(create_certificate_authority_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_certificate_authority(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 delete_ca_bundle_and_wait_for_state(self, ca_bundle_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.certificates_management.CertificatesManagementClient.delete_ca_bundle` and waits for the :py:class:`~oci.certificates_management.models.CaBundle` acted upon + to enter the given state(s). + + :param str ca_bundle_id: (required) + The OCID of the CA bundle. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.certificates_management.models.CaBundle.lifecycle_state` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.certificates_management.CertificatesManagementClient.delete_ca_bundle` + + :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_ca_bundle(ca_bundle_id) + operation_result = None + try: + operation_result = self.client.delete_ca_bundle(ca_bundle_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 update_ca_bundle_and_wait_for_state(self, ca_bundle_id, update_ca_bundle_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.certificates_management.CertificatesManagementClient.update_ca_bundle` and waits for the :py:class:`~oci.certificates_management.models.CaBundle` acted upon + to enter the given state(s). + + :param str ca_bundle_id: (required) + The OCID of the CA bundle. + + :param oci.certificates_management.models.UpdateCaBundleDetails update_ca_bundle_details: (required) + The details of the request to update a CA bundle. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.certificates_management.models.CaBundle.lifecycle_state` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.certificates_management.CertificatesManagementClient.update_ca_bundle` + + :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_ca_bundle(ca_bundle_id, update_ca_bundle_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_ca_bundle(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_certificate_and_wait_for_state(self, certificate_id, update_certificate_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.certificates_management.CertificatesManagementClient.update_certificate` and waits for the :py:class:`~oci.certificates_management.models.Certificate` acted upon + to enter the given state(s). + + :param str certificate_id: (required) + The OCID of the certificate. + + :param oci.certificates_management.models.UpdateCertificateDetails update_certificate_details: (required) + The details of the request to update a certificate. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.certificates_management.models.Certificate.lifecycle_state` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.certificates_management.CertificatesManagementClient.update_certificate` + + :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_certificate(certificate_id, update_certificate_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_certificate(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_certificate_authority_and_wait_for_state(self, certificate_authority_id, update_certificate_authority_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.certificates_management.CertificatesManagementClient.update_certificate_authority` and waits for the :py:class:`~oci.certificates_management.models.CertificateAuthority` acted upon + to enter the given state(s). + + :param str certificate_authority_id: (required) + The OCID of the certificate authority (CA). + + :param oci.certificates_management.models.UpdateCertificateAuthorityDetails update_certificate_authority_details: (required) + The details of the request to update a CA. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.certificates_management.models.CertificateAuthority.lifecycle_state` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.certificates_management.CertificatesManagementClient.update_certificate_authority` + + :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_certificate_authority(certificate_authority_id, update_certificate_authority_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_certificate_authority(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/certificates_management/models/__init__.py b/src/oci/certificates_management/models/__init__.py new file mode 100644 index 0000000000..d3765e307c --- /dev/null +++ b/src/oci/certificates_management/models/__init__.py @@ -0,0 +1,124 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from __future__ import absolute_import + +from .association import Association +from .association_collection import AssociationCollection +from .association_summary import AssociationSummary +from .ca_bundle import CaBundle +from .ca_bundle_collection import CaBundleCollection +from .ca_bundle_summary import CaBundleSummary +from .certificate import Certificate +from .certificate_authority import CertificateAuthority +from .certificate_authority_collection import CertificateAuthorityCollection +from .certificate_authority_issuance_expiry_rule import CertificateAuthorityIssuanceExpiryRule +from .certificate_authority_rule import CertificateAuthorityRule +from .certificate_authority_summary import CertificateAuthoritySummary +from .certificate_authority_version import CertificateAuthorityVersion +from .certificate_authority_version_collection import CertificateAuthorityVersionCollection +from .certificate_authority_version_summary import CertificateAuthorityVersionSummary +from .certificate_collection import CertificateCollection +from .certificate_renewal_rule import CertificateRenewalRule +from .certificate_revocation_list_details import CertificateRevocationListDetails +from .certificate_rule import CertificateRule +from .certificate_subject import CertificateSubject +from .certificate_subject_alternative_name import CertificateSubjectAlternativeName +from .certificate_summary import CertificateSummary +from .certificate_version import CertificateVersion +from .certificate_version_collection import CertificateVersionCollection +from .certificate_version_summary import CertificateVersionSummary +from .change_ca_bundle_compartment_details import ChangeCaBundleCompartmentDetails +from .change_certificate_authority_compartment_details import ChangeCertificateAuthorityCompartmentDetails +from .change_certificate_compartment_details import ChangeCertificateCompartmentDetails +from .create_ca_bundle_details import CreateCaBundleDetails +from .create_certificate_authority_config_details import CreateCertificateAuthorityConfigDetails +from .create_certificate_authority_details import CreateCertificateAuthorityDetails +from .create_certificate_by_importing_config_details import CreateCertificateByImportingConfigDetails +from .create_certificate_config_details import CreateCertificateConfigDetails +from .create_certificate_details import CreateCertificateDetails +from .create_certificate_issued_by_internal_ca_config_details import CreateCertificateIssuedByInternalCaConfigDetails +from .create_certificate_managed_externally_issued_by_internal_ca_config_details import CreateCertificateManagedExternallyIssuedByInternalCaConfigDetails +from .create_root_ca_by_generating_internally_config_details import CreateRootCaByGeneratingInternallyConfigDetails +from .create_subordinate_ca_issued_by_internal_ca_config_details import CreateSubordinateCaIssuedByInternalCaConfigDetails +from .object_storage_bucket_config_details import ObjectStorageBucketConfigDetails +from .revocation_status import RevocationStatus +from .revoke_certificate_authority_version_details import RevokeCertificateAuthorityVersionDetails +from .revoke_certificate_version_details import RevokeCertificateVersionDetails +from .schedule_certificate_authority_deletion_details import ScheduleCertificateAuthorityDeletionDetails +from .schedule_certificate_authority_version_deletion_details import ScheduleCertificateAuthorityVersionDeletionDetails +from .schedule_certificate_deletion_details import ScheduleCertificateDeletionDetails +from .schedule_certificate_version_deletion_details import ScheduleCertificateVersionDeletionDetails +from .update_ca_bundle_details import UpdateCaBundleDetails +from .update_certificate_authority_config_details import UpdateCertificateAuthorityConfigDetails +from .update_certificate_authority_details import UpdateCertificateAuthorityDetails +from .update_certificate_by_importing_config_details import UpdateCertificateByImportingConfigDetails +from .update_certificate_config_details import UpdateCertificateConfigDetails +from .update_certificate_details import UpdateCertificateDetails +from .update_certificate_issued_by_internal_ca_config_details import UpdateCertificateIssuedByInternalCaConfigDetails +from .update_certificate_managed_externally_issued_by_internal_ca_config_details import UpdateCertificateManagedExternallyIssuedByInternalCaConfigDetails +from .update_root_ca_by_generating_internally_config_details import UpdateRootCaByGeneratingInternallyConfigDetails +from .update_subordinate_ca_issued_by_internal_ca_config_details import UpdateSubordinateCaIssuedByInternalCaConfigDetails +from .validity import Validity + +# Maps type names to classes for certificates_management services. +certificates_management_type_mapping = { + "Association": Association, + "AssociationCollection": AssociationCollection, + "AssociationSummary": AssociationSummary, + "CaBundle": CaBundle, + "CaBundleCollection": CaBundleCollection, + "CaBundleSummary": CaBundleSummary, + "Certificate": Certificate, + "CertificateAuthority": CertificateAuthority, + "CertificateAuthorityCollection": CertificateAuthorityCollection, + "CertificateAuthorityIssuanceExpiryRule": CertificateAuthorityIssuanceExpiryRule, + "CertificateAuthorityRule": CertificateAuthorityRule, + "CertificateAuthoritySummary": CertificateAuthoritySummary, + "CertificateAuthorityVersion": CertificateAuthorityVersion, + "CertificateAuthorityVersionCollection": CertificateAuthorityVersionCollection, + "CertificateAuthorityVersionSummary": CertificateAuthorityVersionSummary, + "CertificateCollection": CertificateCollection, + "CertificateRenewalRule": CertificateRenewalRule, + "CertificateRevocationListDetails": CertificateRevocationListDetails, + "CertificateRule": CertificateRule, + "CertificateSubject": CertificateSubject, + "CertificateSubjectAlternativeName": CertificateSubjectAlternativeName, + "CertificateSummary": CertificateSummary, + "CertificateVersion": CertificateVersion, + "CertificateVersionCollection": CertificateVersionCollection, + "CertificateVersionSummary": CertificateVersionSummary, + "ChangeCaBundleCompartmentDetails": ChangeCaBundleCompartmentDetails, + "ChangeCertificateAuthorityCompartmentDetails": ChangeCertificateAuthorityCompartmentDetails, + "ChangeCertificateCompartmentDetails": ChangeCertificateCompartmentDetails, + "CreateCaBundleDetails": CreateCaBundleDetails, + "CreateCertificateAuthorityConfigDetails": CreateCertificateAuthorityConfigDetails, + "CreateCertificateAuthorityDetails": CreateCertificateAuthorityDetails, + "CreateCertificateByImportingConfigDetails": CreateCertificateByImportingConfigDetails, + "CreateCertificateConfigDetails": CreateCertificateConfigDetails, + "CreateCertificateDetails": CreateCertificateDetails, + "CreateCertificateIssuedByInternalCaConfigDetails": CreateCertificateIssuedByInternalCaConfigDetails, + "CreateCertificateManagedExternallyIssuedByInternalCaConfigDetails": CreateCertificateManagedExternallyIssuedByInternalCaConfigDetails, + "CreateRootCaByGeneratingInternallyConfigDetails": CreateRootCaByGeneratingInternallyConfigDetails, + "CreateSubordinateCaIssuedByInternalCaConfigDetails": CreateSubordinateCaIssuedByInternalCaConfigDetails, + "ObjectStorageBucketConfigDetails": ObjectStorageBucketConfigDetails, + "RevocationStatus": RevocationStatus, + "RevokeCertificateAuthorityVersionDetails": RevokeCertificateAuthorityVersionDetails, + "RevokeCertificateVersionDetails": RevokeCertificateVersionDetails, + "ScheduleCertificateAuthorityDeletionDetails": ScheduleCertificateAuthorityDeletionDetails, + "ScheduleCertificateAuthorityVersionDeletionDetails": ScheduleCertificateAuthorityVersionDeletionDetails, + "ScheduleCertificateDeletionDetails": ScheduleCertificateDeletionDetails, + "ScheduleCertificateVersionDeletionDetails": ScheduleCertificateVersionDeletionDetails, + "UpdateCaBundleDetails": UpdateCaBundleDetails, + "UpdateCertificateAuthorityConfigDetails": UpdateCertificateAuthorityConfigDetails, + "UpdateCertificateAuthorityDetails": UpdateCertificateAuthorityDetails, + "UpdateCertificateByImportingConfigDetails": UpdateCertificateByImportingConfigDetails, + "UpdateCertificateConfigDetails": UpdateCertificateConfigDetails, + "UpdateCertificateDetails": UpdateCertificateDetails, + "UpdateCertificateIssuedByInternalCaConfigDetails": UpdateCertificateIssuedByInternalCaConfigDetails, + "UpdateCertificateManagedExternallyIssuedByInternalCaConfigDetails": UpdateCertificateManagedExternallyIssuedByInternalCaConfigDetails, + "UpdateRootCaByGeneratingInternallyConfigDetails": UpdateRootCaByGeneratingInternallyConfigDetails, + "UpdateSubordinateCaIssuedByInternalCaConfigDetails": UpdateSubordinateCaIssuedByInternalCaConfigDetails, + "Validity": Validity +} diff --git a/src/oci/certificates_management/models/association.py b/src/oci/certificates_management/models/association.py new file mode 100644 index 0000000000..62d29a4a1c --- /dev/null +++ b/src/oci/certificates_management/models/association.py @@ -0,0 +1,341 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 Association(object): + """ + The details of the association. + """ + + #: A constant which can be used with the lifecycle_state property of a Association. + #: This constant has a value of "CREATING" + LIFECYCLE_STATE_CREATING = "CREATING" + + #: A constant which can be used with the lifecycle_state property of a Association. + #: This constant has a value of "ACTIVE" + LIFECYCLE_STATE_ACTIVE = "ACTIVE" + + #: A constant which can be used with the lifecycle_state property of a Association. + #: This constant has a value of "UPDATING" + LIFECYCLE_STATE_UPDATING = "UPDATING" + + #: A constant which can be used with the lifecycle_state property of a Association. + #: This constant has a value of "DELETING" + LIFECYCLE_STATE_DELETING = "DELETING" + + #: A constant which can be used with the lifecycle_state property of a Association. + #: This constant has a value of "FAILED" + LIFECYCLE_STATE_FAILED = "FAILED" + + #: A constant which can be used with the association_type property of a Association. + #: This constant has a value of "CERTIFICATE" + ASSOCIATION_TYPE_CERTIFICATE = "CERTIFICATE" + + #: A constant which can be used with the association_type property of a Association. + #: This constant has a value of "CERTIFICATE_AUTHORITY" + ASSOCIATION_TYPE_CERTIFICATE_AUTHORITY = "CERTIFICATE_AUTHORITY" + + #: A constant which can be used with the association_type property of a Association. + #: This constant has a value of "CA_BUNDLE" + ASSOCIATION_TYPE_CA_BUNDLE = "CA_BUNDLE" + + def __init__(self, **kwargs): + """ + Initializes a new Association 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 Association. + :type id: str + + :param name: + The value to assign to the name property of this Association. + :type name: str + + :param time_created: + The value to assign to the time_created property of this Association. + :type time_created: datetime + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this Association. + Allowed values for this property are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type lifecycle_state: str + + :param certificates_resource_id: + The value to assign to the certificates_resource_id property of this Association. + :type certificates_resource_id: str + + :param associated_resource_id: + The value to assign to the associated_resource_id property of this Association. + :type associated_resource_id: str + + :param compartment_id: + The value to assign to the compartment_id property of this Association. + :type compartment_id: str + + :param association_type: + The value to assign to the association_type property of this Association. + Allowed values for this property are: "CERTIFICATE", "CERTIFICATE_AUTHORITY", "CA_BUNDLE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type association_type: str + + """ + self.swagger_types = { + 'id': 'str', + 'name': 'str', + 'time_created': 'datetime', + 'lifecycle_state': 'str', + 'certificates_resource_id': 'str', + 'associated_resource_id': 'str', + 'compartment_id': 'str', + 'association_type': 'str' + } + + self.attribute_map = { + 'id': 'id', + 'name': 'name', + 'time_created': 'timeCreated', + 'lifecycle_state': 'lifecycleState', + 'certificates_resource_id': 'certificatesResourceId', + 'associated_resource_id': 'associatedResourceId', + 'compartment_id': 'compartmentId', + 'association_type': 'associationType' + } + + self._id = None + self._name = None + self._time_created = None + self._lifecycle_state = None + self._certificates_resource_id = None + self._associated_resource_id = None + self._compartment_id = None + self._association_type = None + + @property + def id(self): + """ + **[Required]** Gets the id of this Association. + The OCID of the association. + + + :return: The id of this Association. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this Association. + The OCID of the association. + + + :param id: The id of this Association. + :type: str + """ + self._id = id + + @property + def name(self): + """ + **[Required]** Gets the name of this Association. + A user-friendly name generated by the service for the association, expressed in a format that follows the pattern: [certificatesResourceEntityType]-[associatedResourceEntityType]-UUID. + + + :return: The name of this Association. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """ + Sets the name of this Association. + A user-friendly name generated by the service for the association, expressed in a format that follows the pattern: [certificatesResourceEntityType]-[associatedResourceEntityType]-UUID. + + + :param name: The name of this Association. + :type: str + """ + self._name = name + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this Association. + A property indicating when the association was created, expressed in `RFC 3339`__ timestamp format. + Example: `2019-04-03T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_created of this Association. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this Association. + A property indicating when the association was created, expressed in `RFC 3339`__ timestamp format. + Example: `2019-04-03T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_created: The time_created of this Association. + :type: datetime + """ + self._time_created = time_created + + @property + def lifecycle_state(self): + """ + **[Required]** Gets the lifecycle_state of this Association. + The current lifecycle state of the association. + + Allowed values for this property are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The lifecycle_state of this Association. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this Association. + The current lifecycle state of the association. + + + :param lifecycle_state: The lifecycle_state of this Association. + :type: str + """ + allowed_values = ["CREATING", "ACTIVE", "UPDATING", "DELETING", "FAILED"] + if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values): + lifecycle_state = 'UNKNOWN_ENUM_VALUE' + self._lifecycle_state = lifecycle_state + + @property + def certificates_resource_id(self): + """ + **[Required]** Gets the certificates_resource_id of this Association. + The OCID of the certificate-related resource associated with another Oracle Cloud Infrastructure resource. + + + :return: The certificates_resource_id of this Association. + :rtype: str + """ + return self._certificates_resource_id + + @certificates_resource_id.setter + def certificates_resource_id(self, certificates_resource_id): + """ + Sets the certificates_resource_id of this Association. + The OCID of the certificate-related resource associated with another Oracle Cloud Infrastructure resource. + + + :param certificates_resource_id: The certificates_resource_id of this Association. + :type: str + """ + self._certificates_resource_id = certificates_resource_id + + @property + def associated_resource_id(self): + """ + **[Required]** Gets the associated_resource_id of this Association. + The OCID of the associated resource. + + + :return: The associated_resource_id of this Association. + :rtype: str + """ + return self._associated_resource_id + + @associated_resource_id.setter + def associated_resource_id(self, associated_resource_id): + """ + Sets the associated_resource_id of this Association. + The OCID of the associated resource. + + + :param associated_resource_id: The associated_resource_id of this Association. + :type: str + """ + self._associated_resource_id = associated_resource_id + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this Association. + The compartment OCID of the association, which is strongly tied to the compartment OCID of the certificate-related resource. + + + :return: The compartment_id of this Association. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this Association. + The compartment OCID of the association, which is strongly tied to the compartment OCID of the certificate-related resource. + + + :param compartment_id: The compartment_id of this Association. + :type: str + """ + self._compartment_id = compartment_id + + @property + def association_type(self): + """ + **[Required]** Gets the association_type of this Association. + Type of the association. + + Allowed values for this property are: "CERTIFICATE", "CERTIFICATE_AUTHORITY", "CA_BUNDLE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The association_type of this Association. + :rtype: str + """ + return self._association_type + + @association_type.setter + def association_type(self, association_type): + """ + Sets the association_type of this Association. + Type of the association. + + + :param association_type: The association_type of this Association. + :type: str + """ + allowed_values = ["CERTIFICATE", "CERTIFICATE_AUTHORITY", "CA_BUNDLE"] + if not value_allowed_none_or_none_sentinel(association_type, allowed_values): + association_type = 'UNKNOWN_ENUM_VALUE' + self._association_type = association_type + + 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/certificates_management/models/association_collection.py b/src/oci/certificates_management/models/association_collection.py new file mode 100644 index 0000000000..898a1824e0 --- /dev/null +++ b/src/oci/certificates_management/models/association_collection.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 AssociationCollection(object): + """ + The results of an association search. + """ + + def __init__(self, **kwargs): + """ + Initializes a new AssociationCollection object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param items: + The value to assign to the items property of this AssociationCollection. + :type items: list[oci.certificates_management.models.AssociationSummary] + + """ + self.swagger_types = { + 'items': 'list[AssociationSummary]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this AssociationCollection. + A list of association summary objects. + + + :return: The items of this AssociationCollection. + :rtype: list[oci.certificates_management.models.AssociationSummary] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this AssociationCollection. + A list of association summary objects. + + + :param items: The items of this AssociationCollection. + :type: list[oci.certificates_management.models.AssociationSummary] + """ + self._items = items + + 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/certificates_management/models/association_summary.py b/src/oci/certificates_management/models/association_summary.py new file mode 100644 index 0000000000..057fa49560 --- /dev/null +++ b/src/oci/certificates_management/models/association_summary.py @@ -0,0 +1,341 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 AssociationSummary(object): + """ + The details of the association. + """ + + #: A constant which can be used with the lifecycle_state property of a AssociationSummary. + #: This constant has a value of "CREATING" + LIFECYCLE_STATE_CREATING = "CREATING" + + #: A constant which can be used with the lifecycle_state property of a AssociationSummary. + #: This constant has a value of "ACTIVE" + LIFECYCLE_STATE_ACTIVE = "ACTIVE" + + #: A constant which can be used with the lifecycle_state property of a AssociationSummary. + #: This constant has a value of "UPDATING" + LIFECYCLE_STATE_UPDATING = "UPDATING" + + #: A constant which can be used with the lifecycle_state property of a AssociationSummary. + #: This constant has a value of "DELETING" + LIFECYCLE_STATE_DELETING = "DELETING" + + #: A constant which can be used with the lifecycle_state property of a AssociationSummary. + #: This constant has a value of "FAILED" + LIFECYCLE_STATE_FAILED = "FAILED" + + #: A constant which can be used with the association_type property of a AssociationSummary. + #: This constant has a value of "CERTIFICATE" + ASSOCIATION_TYPE_CERTIFICATE = "CERTIFICATE" + + #: A constant which can be used with the association_type property of a AssociationSummary. + #: This constant has a value of "CERTIFICATE_AUTHORITY" + ASSOCIATION_TYPE_CERTIFICATE_AUTHORITY = "CERTIFICATE_AUTHORITY" + + #: A constant which can be used with the association_type property of a AssociationSummary. + #: This constant has a value of "CA_BUNDLE" + ASSOCIATION_TYPE_CA_BUNDLE = "CA_BUNDLE" + + def __init__(self, **kwargs): + """ + Initializes a new AssociationSummary 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 AssociationSummary. + :type id: str + + :param name: + The value to assign to the name property of this AssociationSummary. + :type name: str + + :param time_created: + The value to assign to the time_created property of this AssociationSummary. + :type time_created: datetime + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this AssociationSummary. + Allowed values for this property are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type lifecycle_state: str + + :param certificates_resource_id: + The value to assign to the certificates_resource_id property of this AssociationSummary. + :type certificates_resource_id: str + + :param associated_resource_id: + The value to assign to the associated_resource_id property of this AssociationSummary. + :type associated_resource_id: str + + :param compartment_id: + The value to assign to the compartment_id property of this AssociationSummary. + :type compartment_id: str + + :param association_type: + The value to assign to the association_type property of this AssociationSummary. + Allowed values for this property are: "CERTIFICATE", "CERTIFICATE_AUTHORITY", "CA_BUNDLE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type association_type: str + + """ + self.swagger_types = { + 'id': 'str', + 'name': 'str', + 'time_created': 'datetime', + 'lifecycle_state': 'str', + 'certificates_resource_id': 'str', + 'associated_resource_id': 'str', + 'compartment_id': 'str', + 'association_type': 'str' + } + + self.attribute_map = { + 'id': 'id', + 'name': 'name', + 'time_created': 'timeCreated', + 'lifecycle_state': 'lifecycleState', + 'certificates_resource_id': 'certificatesResourceId', + 'associated_resource_id': 'associatedResourceId', + 'compartment_id': 'compartmentId', + 'association_type': 'associationType' + } + + self._id = None + self._name = None + self._time_created = None + self._lifecycle_state = None + self._certificates_resource_id = None + self._associated_resource_id = None + self._compartment_id = None + self._association_type = None + + @property + def id(self): + """ + **[Required]** Gets the id of this AssociationSummary. + The OCID of the association. + + + :return: The id of this AssociationSummary. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this AssociationSummary. + The OCID of the association. + + + :param id: The id of this AssociationSummary. + :type: str + """ + self._id = id + + @property + def name(self): + """ + **[Required]** Gets the name of this AssociationSummary. + A user-friendly name generated by the service for the association. Name format follows the pattern [certificatesResourceEntityType]-[associatedResourceEntityType]-UUID. + + + :return: The name of this AssociationSummary. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """ + Sets the name of this AssociationSummary. + A user-friendly name generated by the service for the association. Name format follows the pattern [certificatesResourceEntityType]-[associatedResourceEntityType]-UUID. + + + :param name: The name of this AssociationSummary. + :type: str + """ + self._name = name + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this AssociationSummary. + A property indicating when the association was created, expressed in `RFC 3339`__ timestamp format. + Example: `2019-04-03T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_created of this AssociationSummary. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this AssociationSummary. + A property indicating when the association was created, expressed in `RFC 3339`__ timestamp format. + Example: `2019-04-03T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_created: The time_created of this AssociationSummary. + :type: datetime + """ + self._time_created = time_created + + @property + def lifecycle_state(self): + """ + **[Required]** Gets the lifecycle_state of this AssociationSummary. + The current lifecycle state of the association. + + Allowed values for this property are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The lifecycle_state of this AssociationSummary. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this AssociationSummary. + The current lifecycle state of the association. + + + :param lifecycle_state: The lifecycle_state of this AssociationSummary. + :type: str + """ + allowed_values = ["CREATING", "ACTIVE", "UPDATING", "DELETING", "FAILED"] + if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values): + lifecycle_state = 'UNKNOWN_ENUM_VALUE' + self._lifecycle_state = lifecycle_state + + @property + def certificates_resource_id(self): + """ + **[Required]** Gets the certificates_resource_id of this AssociationSummary. + The OCID of the certificate-related resource associated with another Oracle Cloud Infrastructure resource. + + + :return: The certificates_resource_id of this AssociationSummary. + :rtype: str + """ + return self._certificates_resource_id + + @certificates_resource_id.setter + def certificates_resource_id(self, certificates_resource_id): + """ + Sets the certificates_resource_id of this AssociationSummary. + The OCID of the certificate-related resource associated with another Oracle Cloud Infrastructure resource. + + + :param certificates_resource_id: The certificates_resource_id of this AssociationSummary. + :type: str + """ + self._certificates_resource_id = certificates_resource_id + + @property + def associated_resource_id(self): + """ + **[Required]** Gets the associated_resource_id of this AssociationSummary. + The OCID of the associated resource. + + + :return: The associated_resource_id of this AssociationSummary. + :rtype: str + """ + return self._associated_resource_id + + @associated_resource_id.setter + def associated_resource_id(self, associated_resource_id): + """ + Sets the associated_resource_id of this AssociationSummary. + The OCID of the associated resource. + + + :param associated_resource_id: The associated_resource_id of this AssociationSummary. + :type: str + """ + self._associated_resource_id = associated_resource_id + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this AssociationSummary. + The compartment OCID of the association. This is strongly tied to the compartment OCID of the certificate-related resource. + + + :return: The compartment_id of this AssociationSummary. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this AssociationSummary. + The compartment OCID of the association. This is strongly tied to the compartment OCID of the certificate-related resource. + + + :param compartment_id: The compartment_id of this AssociationSummary. + :type: str + """ + self._compartment_id = compartment_id + + @property + def association_type(self): + """ + **[Required]** Gets the association_type of this AssociationSummary. + Type of the association. + + Allowed values for this property are: "CERTIFICATE", "CERTIFICATE_AUTHORITY", "CA_BUNDLE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The association_type of this AssociationSummary. + :rtype: str + """ + return self._association_type + + @association_type.setter + def association_type(self, association_type): + """ + Sets the association_type of this AssociationSummary. + Type of the association. + + + :param association_type: The association_type of this AssociationSummary. + :type: str + """ + allowed_values = ["CERTIFICATE", "CERTIFICATE_AUTHORITY", "CA_BUNDLE"] + if not value_allowed_none_or_none_sentinel(association_type, allowed_values): + association_type = 'UNKNOWN_ENUM_VALUE' + self._association_type = association_type + + 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/certificates_management/models/ca_bundle.py b/src/oci/certificates_management/models/ca_bundle.py new file mode 100644 index 0000000000..ca4bc81b46 --- /dev/null +++ b/src/oci/certificates_management/models/ca_bundle.py @@ -0,0 +1,372 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 CaBundle(object): + """ + CA bundle metadata. This object does not contain the CA bundle certificates. + """ + + #: A constant which can be used with the lifecycle_state property of a CaBundle. + #: This constant has a value of "CREATING" + LIFECYCLE_STATE_CREATING = "CREATING" + + #: A constant which can be used with the lifecycle_state property of a CaBundle. + #: This constant has a value of "ACTIVE" + LIFECYCLE_STATE_ACTIVE = "ACTIVE" + + #: A constant which can be used with the lifecycle_state property of a CaBundle. + #: This constant has a value of "UPDATING" + LIFECYCLE_STATE_UPDATING = "UPDATING" + + #: A constant which can be used with the lifecycle_state property of a CaBundle. + #: This constant has a value of "DELETING" + LIFECYCLE_STATE_DELETING = "DELETING" + + #: A constant which can be used with the lifecycle_state property of a CaBundle. + #: This constant has a value of "DELETED" + LIFECYCLE_STATE_DELETED = "DELETED" + + #: A constant which can be used with the lifecycle_state property of a CaBundle. + #: This constant has a value of "FAILED" + LIFECYCLE_STATE_FAILED = "FAILED" + + def __init__(self, **kwargs): + """ + Initializes a new CaBundle 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 CaBundle. + :type id: str + + :param name: + The value to assign to the name property of this CaBundle. + :type name: str + + :param description: + The value to assign to the description property of this CaBundle. + :type description: str + + :param time_created: + The value to assign to the time_created property of this CaBundle. + :type time_created: datetime + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this CaBundle. + Allowed values for this property are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type lifecycle_state: str + + :param lifecycle_details: + The value to assign to the lifecycle_details property of this CaBundle. + :type lifecycle_details: str + + :param compartment_id: + The value to assign to the compartment_id property of this CaBundle. + :type compartment_id: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this CaBundle. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this CaBundle. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'id': 'str', + 'name': 'str', + 'description': 'str', + 'time_created': 'datetime', + 'lifecycle_state': 'str', + 'lifecycle_details': 'str', + 'compartment_id': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'id': 'id', + 'name': 'name', + 'description': 'description', + 'time_created': 'timeCreated', + 'lifecycle_state': 'lifecycleState', + 'lifecycle_details': 'lifecycleDetails', + 'compartment_id': 'compartmentId', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._id = None + self._name = None + self._description = None + self._time_created = None + self._lifecycle_state = None + self._lifecycle_details = None + self._compartment_id = None + self._freeform_tags = None + self._defined_tags = None + + @property + def id(self): + """ + **[Required]** Gets the id of this CaBundle. + The OCID of the CA bundle. + + + :return: The id of this CaBundle. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this CaBundle. + The OCID of the CA bundle. + + + :param id: The id of this CaBundle. + :type: str + """ + self._id = id + + @property + def name(self): + """ + **[Required]** Gets the name of this CaBundle. + A user-friendly name for the CA bundle. Names are unique within a compartment. Avoid entering confidential information. Valid characters include uppercase or lowercase letters, numbers, hyphens, underscores, and periods. + + + :return: The name of this CaBundle. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """ + Sets the name of this CaBundle. + A user-friendly name for the CA bundle. Names are unique within a compartment. Avoid entering confidential information. Valid characters include uppercase or lowercase letters, numbers, hyphens, underscores, and periods. + + + :param name: The name of this CaBundle. + :type: str + """ + self._name = name + + @property + def description(self): + """ + Gets the description of this CaBundle. + A brief description of the CA bundle. + + + :return: The description of this CaBundle. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this CaBundle. + A brief description of the CA bundle. + + + :param description: The description of this CaBundle. + :type: str + """ + self._description = description + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this CaBundle. + A property indicating when the CA bundle was created, expressed in `RFC 3339`__ timestamp format. + Example: `2019-04-03T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_created of this CaBundle. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this CaBundle. + A property indicating when the CA bundle was created, expressed in `RFC 3339`__ timestamp format. + Example: `2019-04-03T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_created: The time_created of this CaBundle. + :type: datetime + """ + self._time_created = time_created + + @property + def lifecycle_state(self): + """ + **[Required]** Gets the lifecycle_state of this CaBundle. + The current lifecycle state of the CA bundle. + + Allowed values for this property are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The lifecycle_state of this CaBundle. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this CaBundle. + The current lifecycle state of the CA bundle. + + + :param lifecycle_state: The lifecycle_state of this CaBundle. + :type: str + """ + allowed_values = ["CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED"] + 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 CaBundle. + Additional information about the current lifecycle state of the CA bundle. + + + :return: The lifecycle_details of this CaBundle. + :rtype: str + """ + return self._lifecycle_details + + @lifecycle_details.setter + def lifecycle_details(self, lifecycle_details): + """ + Sets the lifecycle_details of this CaBundle. + Additional information about the current lifecycle state of the CA bundle. + + + :param lifecycle_details: The lifecycle_details of this CaBundle. + :type: str + """ + self._lifecycle_details = lifecycle_details + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this CaBundle. + The OCID of the compartment for the CA bundle. + + + :return: The compartment_id of this CaBundle. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this CaBundle. + The OCID of the compartment for the CA bundle. + + + :param compartment_id: The compartment_id of this CaBundle. + :type: str + """ + self._compartment_id = compartment_id + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this CaBundle. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + For more information, see `Resource Tags`__. + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this CaBundle. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this CaBundle. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + For more information, see `Resource Tags`__. + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this CaBundle. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this CaBundle. + Defined tags for this resource. Each key is predefined and scoped to a namespace. + For more information, see `Resource Tags`__. + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this CaBundle. + :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 CaBundle. + Defined tags for this resource. Each key is predefined and scoped to a namespace. + For more information, see `Resource Tags`__. + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this CaBundle. + :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/certificates_management/models/ca_bundle_collection.py b/src/oci/certificates_management/models/ca_bundle_collection.py new file mode 100644 index 0000000000..584266fb78 --- /dev/null +++ b/src/oci/certificates_management/models/ca_bundle_collection.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 CaBundleCollection(object): + """ + The results of a CA bundle search. This object contains CA bundle summary objects. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CaBundleCollection object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param items: + The value to assign to the items property of this CaBundleCollection. + :type items: list[oci.certificates_management.models.CaBundleSummary] + + """ + self.swagger_types = { + 'items': 'list[CaBundleSummary]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this CaBundleCollection. + A list of CA bundle summary objects. + + + :return: The items of this CaBundleCollection. + :rtype: list[oci.certificates_management.models.CaBundleSummary] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this CaBundleCollection. + A list of CA bundle summary objects. + + + :param items: The items of this CaBundleCollection. + :type: list[oci.certificates_management.models.CaBundleSummary] + """ + self._items = items + + 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/certificates_management/models/ca_bundle_summary.py b/src/oci/certificates_management/models/ca_bundle_summary.py new file mode 100644 index 0000000000..708a39a571 --- /dev/null +++ b/src/oci/certificates_management/models/ca_bundle_summary.py @@ -0,0 +1,372 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 CaBundleSummary(object): + """ + CA bundle metadata. This summary object does not contain the CA bundle certificates. + """ + + #: A constant which can be used with the lifecycle_state property of a CaBundleSummary. + #: This constant has a value of "CREATING" + LIFECYCLE_STATE_CREATING = "CREATING" + + #: A constant which can be used with the lifecycle_state property of a CaBundleSummary. + #: This constant has a value of "ACTIVE" + LIFECYCLE_STATE_ACTIVE = "ACTIVE" + + #: A constant which can be used with the lifecycle_state property of a CaBundleSummary. + #: This constant has a value of "UPDATING" + LIFECYCLE_STATE_UPDATING = "UPDATING" + + #: A constant which can be used with the lifecycle_state property of a CaBundleSummary. + #: This constant has a value of "DELETING" + LIFECYCLE_STATE_DELETING = "DELETING" + + #: A constant which can be used with the lifecycle_state property of a CaBundleSummary. + #: This constant has a value of "DELETED" + LIFECYCLE_STATE_DELETED = "DELETED" + + #: A constant which can be used with the lifecycle_state property of a CaBundleSummary. + #: This constant has a value of "FAILED" + LIFECYCLE_STATE_FAILED = "FAILED" + + def __init__(self, **kwargs): + """ + Initializes a new CaBundleSummary 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 CaBundleSummary. + :type id: str + + :param name: + The value to assign to the name property of this CaBundleSummary. + :type name: str + + :param description: + The value to assign to the description property of this CaBundleSummary. + :type description: str + + :param time_created: + The value to assign to the time_created property of this CaBundleSummary. + :type time_created: datetime + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this CaBundleSummary. + Allowed values for this property are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type lifecycle_state: str + + :param lifecycle_details: + The value to assign to the lifecycle_details property of this CaBundleSummary. + :type lifecycle_details: str + + :param compartment_id: + The value to assign to the compartment_id property of this CaBundleSummary. + :type compartment_id: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this CaBundleSummary. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this CaBundleSummary. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'id': 'str', + 'name': 'str', + 'description': 'str', + 'time_created': 'datetime', + 'lifecycle_state': 'str', + 'lifecycle_details': 'str', + 'compartment_id': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'id': 'id', + 'name': 'name', + 'description': 'description', + 'time_created': 'timeCreated', + 'lifecycle_state': 'lifecycleState', + 'lifecycle_details': 'lifecycleDetails', + 'compartment_id': 'compartmentId', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._id = None + self._name = None + self._description = None + self._time_created = None + self._lifecycle_state = None + self._lifecycle_details = None + self._compartment_id = None + self._freeform_tags = None + self._defined_tags = None + + @property + def id(self): + """ + **[Required]** Gets the id of this CaBundleSummary. + The OCID of the CA bundle. + + + :return: The id of this CaBundleSummary. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this CaBundleSummary. + The OCID of the CA bundle. + + + :param id: The id of this CaBundleSummary. + :type: str + """ + self._id = id + + @property + def name(self): + """ + **[Required]** Gets the name of this CaBundleSummary. + A user-friendly name for the CA bundle. Names are unique within a compartment. Avoid entering confidential information. Valid characters include uppercase or lowercase letters, numbers, hyphens, underscores, and periods. + + + :return: The name of this CaBundleSummary. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """ + Sets the name of this CaBundleSummary. + A user-friendly name for the CA bundle. Names are unique within a compartment. Avoid entering confidential information. Valid characters include uppercase or lowercase letters, numbers, hyphens, underscores, and periods. + + + :param name: The name of this CaBundleSummary. + :type: str + """ + self._name = name + + @property + def description(self): + """ + Gets the description of this CaBundleSummary. + A brief description of the CA bundle. + + + :return: The description of this CaBundleSummary. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this CaBundleSummary. + A brief description of the CA bundle. + + + :param description: The description of this CaBundleSummary. + :type: str + """ + self._description = description + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this CaBundleSummary. + A property indicating when the CA bundle was created, expressed in `RFC 3339`__ timestamp format. + Example: `2019-04-03T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_created of this CaBundleSummary. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this CaBundleSummary. + A property indicating when the CA bundle was created, expressed in `RFC 3339`__ timestamp format. + Example: `2019-04-03T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_created: The time_created of this CaBundleSummary. + :type: datetime + """ + self._time_created = time_created + + @property + def lifecycle_state(self): + """ + **[Required]** Gets the lifecycle_state of this CaBundleSummary. + The current lifecycle state of the CA bundle. + + Allowed values for this property are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The lifecycle_state of this CaBundleSummary. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this CaBundleSummary. + The current lifecycle state of the CA bundle. + + + :param lifecycle_state: The lifecycle_state of this CaBundleSummary. + :type: str + """ + allowed_values = ["CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED"] + 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 CaBundleSummary. + Additional information about the current lifecycle state of the CA bundle. + + + :return: The lifecycle_details of this CaBundleSummary. + :rtype: str + """ + return self._lifecycle_details + + @lifecycle_details.setter + def lifecycle_details(self, lifecycle_details): + """ + Sets the lifecycle_details of this CaBundleSummary. + Additional information about the current lifecycle state of the CA bundle. + + + :param lifecycle_details: The lifecycle_details of this CaBundleSummary. + :type: str + """ + self._lifecycle_details = lifecycle_details + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this CaBundleSummary. + The OCID of the compartment for the CA bundle. + + + :return: The compartment_id of this CaBundleSummary. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this CaBundleSummary. + The OCID of the compartment for the CA bundle. + + + :param compartment_id: The compartment_id of this CaBundleSummary. + :type: str + """ + self._compartment_id = compartment_id + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this CaBundleSummary. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + For more information, see `Resource Tags`__. + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this CaBundleSummary. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this CaBundleSummary. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + For more information, see `Resource Tags`__. + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this CaBundleSummary. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this CaBundleSummary. + Defined tags for this resource. Each key is predefined and scoped to a namespace. + For more information, see `Resource Tags`__. + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this CaBundleSummary. + :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 CaBundleSummary. + Defined tags for this resource. Each key is predefined and scoped to a namespace. + For more information, see `Resource Tags`__. + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this CaBundleSummary. + :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/certificates_management/models/certificate.py b/src/oci/certificates_management/models/certificate.py new file mode 100644 index 0000000000..9248d85f21 --- /dev/null +++ b/src/oci/certificates_management/models/certificate.py @@ -0,0 +1,788 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 Certificate(object): + """ + The details of the certificate. This object does not contain the certificate contents. + """ + + #: A constant which can be used with the lifecycle_state property of a Certificate. + #: This constant has a value of "CREATING" + LIFECYCLE_STATE_CREATING = "CREATING" + + #: A constant which can be used with the lifecycle_state property of a Certificate. + #: This constant has a value of "ACTIVE" + LIFECYCLE_STATE_ACTIVE = "ACTIVE" + + #: A constant which can be used with the lifecycle_state property of a Certificate. + #: This constant has a value of "UPDATING" + LIFECYCLE_STATE_UPDATING = "UPDATING" + + #: A constant which can be used with the lifecycle_state property of a Certificate. + #: This constant has a value of "DELETING" + LIFECYCLE_STATE_DELETING = "DELETING" + + #: A constant which can be used with the lifecycle_state property of a Certificate. + #: This constant has a value of "DELETED" + LIFECYCLE_STATE_DELETED = "DELETED" + + #: A constant which can be used with the lifecycle_state property of a Certificate. + #: This constant has a value of "SCHEDULING_DELETION" + LIFECYCLE_STATE_SCHEDULING_DELETION = "SCHEDULING_DELETION" + + #: A constant which can be used with the lifecycle_state property of a Certificate. + #: This constant has a value of "PENDING_DELETION" + LIFECYCLE_STATE_PENDING_DELETION = "PENDING_DELETION" + + #: A constant which can be used with the lifecycle_state property of a Certificate. + #: This constant has a value of "CANCELLING_DELETION" + LIFECYCLE_STATE_CANCELLING_DELETION = "CANCELLING_DELETION" + + #: A constant which can be used with the lifecycle_state property of a Certificate. + #: This constant has a value of "FAILED" + LIFECYCLE_STATE_FAILED = "FAILED" + + #: A constant which can be used with the config_type property of a Certificate. + #: This constant has a value of "ISSUED_BY_INTERNAL_CA" + CONFIG_TYPE_ISSUED_BY_INTERNAL_CA = "ISSUED_BY_INTERNAL_CA" + + #: A constant which can be used with the config_type property of a Certificate. + #: This constant has a value of "MANAGED_EXTERNALLY_ISSUED_BY_INTERNAL_CA" + CONFIG_TYPE_MANAGED_EXTERNALLY_ISSUED_BY_INTERNAL_CA = "MANAGED_EXTERNALLY_ISSUED_BY_INTERNAL_CA" + + #: A constant which can be used with the config_type property of a Certificate. + #: This constant has a value of "IMPORTED" + CONFIG_TYPE_IMPORTED = "IMPORTED" + + #: A constant which can be used with the key_algorithm property of a Certificate. + #: This constant has a value of "RSA2048" + KEY_ALGORITHM_RSA2048 = "RSA2048" + + #: A constant which can be used with the key_algorithm property of a Certificate. + #: This constant has a value of "RSA4096" + KEY_ALGORITHM_RSA4096 = "RSA4096" + + #: A constant which can be used with the key_algorithm property of a Certificate. + #: This constant has a value of "ECDSA_P256" + KEY_ALGORITHM_ECDSA_P256 = "ECDSA_P256" + + #: A constant which can be used with the key_algorithm property of a Certificate. + #: This constant has a value of "ECDSA_P384" + KEY_ALGORITHM_ECDSA_P384 = "ECDSA_P384" + + #: A constant which can be used with the signature_algorithm property of a Certificate. + #: This constant has a value of "SHA256_WITH_RSA" + SIGNATURE_ALGORITHM_SHA256_WITH_RSA = "SHA256_WITH_RSA" + + #: A constant which can be used with the signature_algorithm property of a Certificate. + #: This constant has a value of "SHA384_WITH_RSA" + SIGNATURE_ALGORITHM_SHA384_WITH_RSA = "SHA384_WITH_RSA" + + #: A constant which can be used with the signature_algorithm property of a Certificate. + #: This constant has a value of "SHA512_WITH_RSA" + SIGNATURE_ALGORITHM_SHA512_WITH_RSA = "SHA512_WITH_RSA" + + #: A constant which can be used with the signature_algorithm property of a Certificate. + #: This constant has a value of "SHA256_WITH_ECDSA" + SIGNATURE_ALGORITHM_SHA256_WITH_ECDSA = "SHA256_WITH_ECDSA" + + #: A constant which can be used with the signature_algorithm property of a Certificate. + #: This constant has a value of "SHA384_WITH_ECDSA" + SIGNATURE_ALGORITHM_SHA384_WITH_ECDSA = "SHA384_WITH_ECDSA" + + #: A constant which can be used with the signature_algorithm property of a Certificate. + #: This constant has a value of "SHA512_WITH_ECDSA" + SIGNATURE_ALGORITHM_SHA512_WITH_ECDSA = "SHA512_WITH_ECDSA" + + #: A constant which can be used with the certificate_profile_type property of a Certificate. + #: This constant has a value of "TLS_SERVER_OR_CLIENT" + CERTIFICATE_PROFILE_TYPE_TLS_SERVER_OR_CLIENT = "TLS_SERVER_OR_CLIENT" + + #: A constant which can be used with the certificate_profile_type property of a Certificate. + #: This constant has a value of "TLS_SERVER" + CERTIFICATE_PROFILE_TYPE_TLS_SERVER = "TLS_SERVER" + + #: A constant which can be used with the certificate_profile_type property of a Certificate. + #: This constant has a value of "TLS_CLIENT" + CERTIFICATE_PROFILE_TYPE_TLS_CLIENT = "TLS_CLIENT" + + #: A constant which can be used with the certificate_profile_type property of a Certificate. + #: This constant has a value of "TLS_CODE_SIGN" + CERTIFICATE_PROFILE_TYPE_TLS_CODE_SIGN = "TLS_CODE_SIGN" + + def __init__(self, **kwargs): + """ + Initializes a new Certificate 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 Certificate. + :type id: str + + :param issuer_certificate_authority_id: + The value to assign to the issuer_certificate_authority_id property of this Certificate. + :type issuer_certificate_authority_id: str + + :param name: + The value to assign to the name property of this Certificate. + :type name: str + + :param description: + The value to assign to the description property of this Certificate. + :type description: str + + :param certificate_rules: + The value to assign to the certificate_rules property of this Certificate. + :type certificate_rules: list[oci.certificates_management.models.CertificateRule] + + :param time_created: + The value to assign to the time_created property of this Certificate. + :type time_created: datetime + + :param time_of_deletion: + The value to assign to the time_of_deletion property of this Certificate. + :type time_of_deletion: datetime + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this Certificate. + Allowed values for this property are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "SCHEDULING_DELETION", "PENDING_DELETION", "CANCELLING_DELETION", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type lifecycle_state: str + + :param lifecycle_details: + The value to assign to the lifecycle_details property of this Certificate. + :type lifecycle_details: str + + :param compartment_id: + The value to assign to the compartment_id property of this Certificate. + :type compartment_id: str + + :param current_version: + The value to assign to the current_version property of this Certificate. + :type current_version: oci.certificates_management.models.CertificateVersionSummary + + :param subject: + The value to assign to the subject property of this Certificate. + :type subject: oci.certificates_management.models.CertificateSubject + + :param certificate_revocation_list_details: + The value to assign to the certificate_revocation_list_details property of this Certificate. + :type certificate_revocation_list_details: oci.certificates_management.models.CertificateRevocationListDetails + + :param config_type: + The value to assign to the config_type property of this Certificate. + Allowed values for this property are: "ISSUED_BY_INTERNAL_CA", "MANAGED_EXTERNALLY_ISSUED_BY_INTERNAL_CA", "IMPORTED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type config_type: str + + :param key_algorithm: + The value to assign to the key_algorithm property of this Certificate. + Allowed values for this property are: "RSA2048", "RSA4096", "ECDSA_P256", "ECDSA_P384", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type key_algorithm: str + + :param signature_algorithm: + The value to assign to the signature_algorithm property of this Certificate. + Allowed values for this property are: "SHA256_WITH_RSA", "SHA384_WITH_RSA", "SHA512_WITH_RSA", "SHA256_WITH_ECDSA", "SHA384_WITH_ECDSA", "SHA512_WITH_ECDSA", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type signature_algorithm: str + + :param certificate_profile_type: + The value to assign to the certificate_profile_type property of this Certificate. + Allowed values for this property are: "TLS_SERVER_OR_CLIENT", "TLS_SERVER", "TLS_CLIENT", "TLS_CODE_SIGN", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type certificate_profile_type: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this Certificate. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this Certificate. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'id': 'str', + 'issuer_certificate_authority_id': 'str', + 'name': 'str', + 'description': 'str', + 'certificate_rules': 'list[CertificateRule]', + 'time_created': 'datetime', + 'time_of_deletion': 'datetime', + 'lifecycle_state': 'str', + 'lifecycle_details': 'str', + 'compartment_id': 'str', + 'current_version': 'CertificateVersionSummary', + 'subject': 'CertificateSubject', + 'certificate_revocation_list_details': 'CertificateRevocationListDetails', + 'config_type': 'str', + 'key_algorithm': 'str', + 'signature_algorithm': 'str', + 'certificate_profile_type': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'id': 'id', + 'issuer_certificate_authority_id': 'issuerCertificateAuthorityId', + 'name': 'name', + 'description': 'description', + 'certificate_rules': 'certificateRules', + 'time_created': 'timeCreated', + 'time_of_deletion': 'timeOfDeletion', + 'lifecycle_state': 'lifecycleState', + 'lifecycle_details': 'lifecycleDetails', + 'compartment_id': 'compartmentId', + 'current_version': 'currentVersion', + 'subject': 'subject', + 'certificate_revocation_list_details': 'certificateRevocationListDetails', + 'config_type': 'configType', + 'key_algorithm': 'keyAlgorithm', + 'signature_algorithm': 'signatureAlgorithm', + 'certificate_profile_type': 'certificateProfileType', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._id = None + self._issuer_certificate_authority_id = None + self._name = None + self._description = None + self._certificate_rules = None + self._time_created = None + self._time_of_deletion = None + self._lifecycle_state = None + self._lifecycle_details = None + self._compartment_id = None + self._current_version = None + self._subject = None + self._certificate_revocation_list_details = None + self._config_type = None + self._key_algorithm = None + self._signature_algorithm = None + self._certificate_profile_type = None + self._freeform_tags = None + self._defined_tags = None + + @property + def id(self): + """ + **[Required]** Gets the id of this Certificate. + The OCID of the certificate. + + + :return: The id of this Certificate. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this Certificate. + The OCID of the certificate. + + + :param id: The id of this Certificate. + :type: str + """ + self._id = id + + @property + def issuer_certificate_authority_id(self): + """ + Gets the issuer_certificate_authority_id of this Certificate. + The OCID of the certificate authority (CA) that issued the certificate. + + + :return: The issuer_certificate_authority_id of this Certificate. + :rtype: str + """ + return self._issuer_certificate_authority_id + + @issuer_certificate_authority_id.setter + def issuer_certificate_authority_id(self, issuer_certificate_authority_id): + """ + Sets the issuer_certificate_authority_id of this Certificate. + The OCID of the certificate authority (CA) that issued the certificate. + + + :param issuer_certificate_authority_id: The issuer_certificate_authority_id of this Certificate. + :type: str + """ + self._issuer_certificate_authority_id = issuer_certificate_authority_id + + @property + def name(self): + """ + **[Required]** Gets the name of this Certificate. + A user-friendly name for the certificate. Names are unique within a compartment. Avoid entering confidential information. Valid characters are uppercase or lowercase letters, numbers, hyphens, underscores, and periods. + + + :return: The name of this Certificate. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """ + Sets the name of this Certificate. + A user-friendly name for the certificate. Names are unique within a compartment. Avoid entering confidential information. Valid characters are uppercase or lowercase letters, numbers, hyphens, underscores, and periods. + + + :param name: The name of this Certificate. + :type: str + """ + self._name = name + + @property + def description(self): + """ + Gets the description of this Certificate. + A brief description of the certificate. Avoid entering confidential information. + + + :return: The description of this Certificate. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this Certificate. + A brief description of the certificate. Avoid entering confidential information. + + + :param description: The description of this Certificate. + :type: str + """ + self._description = description + + @property + def certificate_rules(self): + """ + Gets the certificate_rules of this Certificate. + A list of rules that control how the certificate is used and managed. + + + :return: The certificate_rules of this Certificate. + :rtype: list[oci.certificates_management.models.CertificateRule] + """ + return self._certificate_rules + + @certificate_rules.setter + def certificate_rules(self, certificate_rules): + """ + Sets the certificate_rules of this Certificate. + A list of rules that control how the certificate is used and managed. + + + :param certificate_rules: The certificate_rules of this Certificate. + :type: list[oci.certificates_management.models.CertificateRule] + """ + self._certificate_rules = certificate_rules + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this Certificate. + A property indicating when the certificate was created, expressed in `RFC 3339`__ timestamp format. + Example: `2019-04-03T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_created of this Certificate. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this Certificate. + A property indicating when the certificate was created, expressed in `RFC 3339`__ timestamp format. + Example: `2019-04-03T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_created: The time_created of this Certificate. + :type: datetime + """ + self._time_created = time_created + + @property + def time_of_deletion(self): + """ + Gets the time_of_deletion of this Certificate. + An optional property indicating when to delete the certificate version, expressed in `RFC 3339`__ timestamp format. + Example: `2019-04-03T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_of_deletion of this Certificate. + :rtype: datetime + """ + return self._time_of_deletion + + @time_of_deletion.setter + def time_of_deletion(self, time_of_deletion): + """ + Sets the time_of_deletion of this Certificate. + An optional property indicating when to delete the certificate version, expressed in `RFC 3339`__ timestamp format. + Example: `2019-04-03T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_of_deletion: The time_of_deletion of this Certificate. + :type: datetime + """ + self._time_of_deletion = time_of_deletion + + @property + def lifecycle_state(self): + """ + **[Required]** Gets the lifecycle_state of this Certificate. + The current lifecycle state of the certificate. + + Allowed values for this property are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "SCHEDULING_DELETION", "PENDING_DELETION", "CANCELLING_DELETION", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The lifecycle_state of this Certificate. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this Certificate. + The current lifecycle state of the certificate. + + + :param lifecycle_state: The lifecycle_state of this Certificate. + :type: str + """ + allowed_values = ["CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "SCHEDULING_DELETION", "PENDING_DELETION", "CANCELLING_DELETION", "FAILED"] + 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 Certificate. + Additional information about the current lifecycle state of the certificate. + + + :return: The lifecycle_details of this Certificate. + :rtype: str + """ + return self._lifecycle_details + + @lifecycle_details.setter + def lifecycle_details(self, lifecycle_details): + """ + Sets the lifecycle_details of this Certificate. + Additional information about the current lifecycle state of the certificate. + + + :param lifecycle_details: The lifecycle_details of this Certificate. + :type: str + """ + self._lifecycle_details = lifecycle_details + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this Certificate. + The OCID of the compartment where you want to create the certificate. + + + :return: The compartment_id of this Certificate. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this Certificate. + The OCID of the compartment where you want to create the certificate. + + + :param compartment_id: The compartment_id of this Certificate. + :type: str + """ + self._compartment_id = compartment_id + + @property + def current_version(self): + """ + Gets the current_version of this Certificate. + + :return: The current_version of this Certificate. + :rtype: oci.certificates_management.models.CertificateVersionSummary + """ + return self._current_version + + @current_version.setter + def current_version(self, current_version): + """ + Sets the current_version of this Certificate. + + :param current_version: The current_version of this Certificate. + :type: oci.certificates_management.models.CertificateVersionSummary + """ + self._current_version = current_version + + @property + def subject(self): + """ + Gets the subject of this Certificate. + + :return: The subject of this Certificate. + :rtype: oci.certificates_management.models.CertificateSubject + """ + return self._subject + + @subject.setter + def subject(self, subject): + """ + Sets the subject of this Certificate. + + :param subject: The subject of this Certificate. + :type: oci.certificates_management.models.CertificateSubject + """ + self._subject = subject + + @property + def certificate_revocation_list_details(self): + """ + Gets the certificate_revocation_list_details of this Certificate. + + :return: The certificate_revocation_list_details of this Certificate. + :rtype: oci.certificates_management.models.CertificateRevocationListDetails + """ + return self._certificate_revocation_list_details + + @certificate_revocation_list_details.setter + def certificate_revocation_list_details(self, certificate_revocation_list_details): + """ + Sets the certificate_revocation_list_details of this Certificate. + + :param certificate_revocation_list_details: The certificate_revocation_list_details of this Certificate. + :type: oci.certificates_management.models.CertificateRevocationListDetails + """ + self._certificate_revocation_list_details = certificate_revocation_list_details + + @property + def config_type(self): + """ + **[Required]** Gets the config_type of this Certificate. + The origin of the certificate. + + Allowed values for this property are: "ISSUED_BY_INTERNAL_CA", "MANAGED_EXTERNALLY_ISSUED_BY_INTERNAL_CA", "IMPORTED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The config_type of this Certificate. + :rtype: str + """ + return self._config_type + + @config_type.setter + def config_type(self, config_type): + """ + Sets the config_type of this Certificate. + The origin of the certificate. + + + :param config_type: The config_type of this Certificate. + :type: str + """ + allowed_values = ["ISSUED_BY_INTERNAL_CA", "MANAGED_EXTERNALLY_ISSUED_BY_INTERNAL_CA", "IMPORTED"] + if not value_allowed_none_or_none_sentinel(config_type, allowed_values): + config_type = 'UNKNOWN_ENUM_VALUE' + self._config_type = config_type + + @property + def key_algorithm(self): + """ + Gets the key_algorithm of this Certificate. + The algorithm used to create key pairs. + + Allowed values for this property are: "RSA2048", "RSA4096", "ECDSA_P256", "ECDSA_P384", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The key_algorithm of this Certificate. + :rtype: str + """ + return self._key_algorithm + + @key_algorithm.setter + def key_algorithm(self, key_algorithm): + """ + Sets the key_algorithm of this Certificate. + The algorithm used to create key pairs. + + + :param key_algorithm: The key_algorithm of this Certificate. + :type: str + """ + allowed_values = ["RSA2048", "RSA4096", "ECDSA_P256", "ECDSA_P384"] + if not value_allowed_none_or_none_sentinel(key_algorithm, allowed_values): + key_algorithm = 'UNKNOWN_ENUM_VALUE' + self._key_algorithm = key_algorithm + + @property + def signature_algorithm(self): + """ + Gets the signature_algorithm of this Certificate. + The algorithm used to sign the public key certificate. + + Allowed values for this property are: "SHA256_WITH_RSA", "SHA384_WITH_RSA", "SHA512_WITH_RSA", "SHA256_WITH_ECDSA", "SHA384_WITH_ECDSA", "SHA512_WITH_ECDSA", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The signature_algorithm of this Certificate. + :rtype: str + """ + return self._signature_algorithm + + @signature_algorithm.setter + def signature_algorithm(self, signature_algorithm): + """ + Sets the signature_algorithm of this Certificate. + The algorithm used to sign the public key certificate. + + + :param signature_algorithm: The signature_algorithm of this Certificate. + :type: str + """ + allowed_values = ["SHA256_WITH_RSA", "SHA384_WITH_RSA", "SHA512_WITH_RSA", "SHA256_WITH_ECDSA", "SHA384_WITH_ECDSA", "SHA512_WITH_ECDSA"] + if not value_allowed_none_or_none_sentinel(signature_algorithm, allowed_values): + signature_algorithm = 'UNKNOWN_ENUM_VALUE' + self._signature_algorithm = signature_algorithm + + @property + def certificate_profile_type(self): + """ + Gets the certificate_profile_type of this Certificate. + The name of the profile used to create the certificate, which depends on the type of certificate you need. + + Allowed values for this property are: "TLS_SERVER_OR_CLIENT", "TLS_SERVER", "TLS_CLIENT", "TLS_CODE_SIGN", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The certificate_profile_type of this Certificate. + :rtype: str + """ + return self._certificate_profile_type + + @certificate_profile_type.setter + def certificate_profile_type(self, certificate_profile_type): + """ + Sets the certificate_profile_type of this Certificate. + The name of the profile used to create the certificate, which depends on the type of certificate you need. + + + :param certificate_profile_type: The certificate_profile_type of this Certificate. + :type: str + """ + allowed_values = ["TLS_SERVER_OR_CLIENT", "TLS_SERVER", "TLS_CLIENT", "TLS_CODE_SIGN"] + if not value_allowed_none_or_none_sentinel(certificate_profile_type, allowed_values): + certificate_profile_type = 'UNKNOWN_ENUM_VALUE' + self._certificate_profile_type = certificate_profile_type + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this Certificate. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + For more information, see `Resource Tags`__. + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this Certificate. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this Certificate. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + For more information, see `Resource Tags`__. + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this Certificate. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this Certificate. + Defined tags for this resource. Each key is predefined and scoped to a namespace. + For more information, see `Resource Tags`__. + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this Certificate. + :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 Certificate. + Defined tags for this resource. Each key is predefined and scoped to a namespace. + For more information, see `Resource Tags`__. + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this Certificate. + :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/certificates_management/models/certificate_authority.py b/src/oci/certificates_management/models/certificate_authority.py new file mode 100644 index 0000000000..3f5f5c814d --- /dev/null +++ b/src/oci/certificates_management/models/certificate_authority.py @@ -0,0 +1,693 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 CertificateAuthority(object): + """ + The metadata details of the certificate authority (CA). This object does not contain the CA contents. + """ + + #: A constant which can be used with the lifecycle_state property of a CertificateAuthority. + #: This constant has a value of "CREATING" + LIFECYCLE_STATE_CREATING = "CREATING" + + #: A constant which can be used with the lifecycle_state property of a CertificateAuthority. + #: This constant has a value of "ACTIVE" + LIFECYCLE_STATE_ACTIVE = "ACTIVE" + + #: A constant which can be used with the lifecycle_state property of a CertificateAuthority. + #: This constant has a value of "UPDATING" + LIFECYCLE_STATE_UPDATING = "UPDATING" + + #: A constant which can be used with the lifecycle_state property of a CertificateAuthority. + #: This constant has a value of "DELETING" + LIFECYCLE_STATE_DELETING = "DELETING" + + #: A constant which can be used with the lifecycle_state property of a CertificateAuthority. + #: This constant has a value of "DELETED" + LIFECYCLE_STATE_DELETED = "DELETED" + + #: A constant which can be used with the lifecycle_state property of a CertificateAuthority. + #: This constant has a value of "SCHEDULING_DELETION" + LIFECYCLE_STATE_SCHEDULING_DELETION = "SCHEDULING_DELETION" + + #: A constant which can be used with the lifecycle_state property of a CertificateAuthority. + #: This constant has a value of "PENDING_DELETION" + LIFECYCLE_STATE_PENDING_DELETION = "PENDING_DELETION" + + #: A constant which can be used with the lifecycle_state property of a CertificateAuthority. + #: This constant has a value of "CANCELLING_DELETION" + LIFECYCLE_STATE_CANCELLING_DELETION = "CANCELLING_DELETION" + + #: A constant which can be used with the lifecycle_state property of a CertificateAuthority. + #: This constant has a value of "FAILED" + LIFECYCLE_STATE_FAILED = "FAILED" + + #: A constant which can be used with the config_type property of a CertificateAuthority. + #: This constant has a value of "ROOT_CA_GENERATED_INTERNALLY" + CONFIG_TYPE_ROOT_CA_GENERATED_INTERNALLY = "ROOT_CA_GENERATED_INTERNALLY" + + #: A constant which can be used with the config_type property of a CertificateAuthority. + #: This constant has a value of "SUBORDINATE_CA_ISSUED_BY_INTERNAL_CA" + CONFIG_TYPE_SUBORDINATE_CA_ISSUED_BY_INTERNAL_CA = "SUBORDINATE_CA_ISSUED_BY_INTERNAL_CA" + + #: A constant which can be used with the signing_algorithm property of a CertificateAuthority. + #: This constant has a value of "SHA256_WITH_RSA" + SIGNING_ALGORITHM_SHA256_WITH_RSA = "SHA256_WITH_RSA" + + #: A constant which can be used with the signing_algorithm property of a CertificateAuthority. + #: This constant has a value of "SHA384_WITH_RSA" + SIGNING_ALGORITHM_SHA384_WITH_RSA = "SHA384_WITH_RSA" + + #: A constant which can be used with the signing_algorithm property of a CertificateAuthority. + #: This constant has a value of "SHA512_WITH_RSA" + SIGNING_ALGORITHM_SHA512_WITH_RSA = "SHA512_WITH_RSA" + + #: A constant which can be used with the signing_algorithm property of a CertificateAuthority. + #: This constant has a value of "SHA256_WITH_ECDSA" + SIGNING_ALGORITHM_SHA256_WITH_ECDSA = "SHA256_WITH_ECDSA" + + #: A constant which can be used with the signing_algorithm property of a CertificateAuthority. + #: This constant has a value of "SHA384_WITH_ECDSA" + SIGNING_ALGORITHM_SHA384_WITH_ECDSA = "SHA384_WITH_ECDSA" + + #: A constant which can be used with the signing_algorithm property of a CertificateAuthority. + #: This constant has a value of "SHA512_WITH_ECDSA" + SIGNING_ALGORITHM_SHA512_WITH_ECDSA = "SHA512_WITH_ECDSA" + + def __init__(self, **kwargs): + """ + Initializes a new CertificateAuthority 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 CertificateAuthority. + :type id: str + + :param issuer_certificate_authority_id: + The value to assign to the issuer_certificate_authority_id property of this CertificateAuthority. + :type issuer_certificate_authority_id: str + + :param name: + The value to assign to the name property of this CertificateAuthority. + :type name: str + + :param description: + The value to assign to the description property of this CertificateAuthority. + :type description: str + + :param time_created: + The value to assign to the time_created property of this CertificateAuthority. + :type time_created: datetime + + :param time_of_deletion: + The value to assign to the time_of_deletion property of this CertificateAuthority. + :type time_of_deletion: datetime + + :param kms_key_id: + The value to assign to the kms_key_id property of this CertificateAuthority. + :type kms_key_id: str + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this CertificateAuthority. + Allowed values for this property are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "SCHEDULING_DELETION", "PENDING_DELETION", "CANCELLING_DELETION", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type lifecycle_state: str + + :param lifecycle_details: + The value to assign to the lifecycle_details property of this CertificateAuthority. + :type lifecycle_details: str + + :param compartment_id: + The value to assign to the compartment_id property of this CertificateAuthority. + :type compartment_id: str + + :param certificate_authority_rules: + The value to assign to the certificate_authority_rules property of this CertificateAuthority. + :type certificate_authority_rules: list[oci.certificates_management.models.CertificateAuthorityRule] + + :param current_version: + The value to assign to the current_version property of this CertificateAuthority. + :type current_version: oci.certificates_management.models.CertificateAuthorityVersionSummary + + :param certificate_revocation_list_details: + The value to assign to the certificate_revocation_list_details property of this CertificateAuthority. + :type certificate_revocation_list_details: oci.certificates_management.models.CertificateRevocationListDetails + + :param config_type: + The value to assign to the config_type property of this CertificateAuthority. + Allowed values for this property are: "ROOT_CA_GENERATED_INTERNALLY", "SUBORDINATE_CA_ISSUED_BY_INTERNAL_CA", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type config_type: str + + :param subject: + The value to assign to the subject property of this CertificateAuthority. + :type subject: oci.certificates_management.models.CertificateSubject + + :param signing_algorithm: + The value to assign to the signing_algorithm property of this CertificateAuthority. + Allowed values for this property are: "SHA256_WITH_RSA", "SHA384_WITH_RSA", "SHA512_WITH_RSA", "SHA256_WITH_ECDSA", "SHA384_WITH_ECDSA", "SHA512_WITH_ECDSA", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type signing_algorithm: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this CertificateAuthority. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this CertificateAuthority. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'id': 'str', + 'issuer_certificate_authority_id': 'str', + 'name': 'str', + 'description': 'str', + 'time_created': 'datetime', + 'time_of_deletion': 'datetime', + 'kms_key_id': 'str', + 'lifecycle_state': 'str', + 'lifecycle_details': 'str', + 'compartment_id': 'str', + 'certificate_authority_rules': 'list[CertificateAuthorityRule]', + 'current_version': 'CertificateAuthorityVersionSummary', + 'certificate_revocation_list_details': 'CertificateRevocationListDetails', + 'config_type': 'str', + 'subject': 'CertificateSubject', + 'signing_algorithm': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'id': 'id', + 'issuer_certificate_authority_id': 'issuerCertificateAuthorityId', + 'name': 'name', + 'description': 'description', + 'time_created': 'timeCreated', + 'time_of_deletion': 'timeOfDeletion', + 'kms_key_id': 'kmsKeyId', + 'lifecycle_state': 'lifecycleState', + 'lifecycle_details': 'lifecycleDetails', + 'compartment_id': 'compartmentId', + 'certificate_authority_rules': 'certificateAuthorityRules', + 'current_version': 'currentVersion', + 'certificate_revocation_list_details': 'certificateRevocationListDetails', + 'config_type': 'configType', + 'subject': 'subject', + 'signing_algorithm': 'signingAlgorithm', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._id = None + self._issuer_certificate_authority_id = None + self._name = None + self._description = None + self._time_created = None + self._time_of_deletion = None + self._kms_key_id = None + self._lifecycle_state = None + self._lifecycle_details = None + self._compartment_id = None + self._certificate_authority_rules = None + self._current_version = None + self._certificate_revocation_list_details = None + self._config_type = None + self._subject = None + self._signing_algorithm = None + self._freeform_tags = None + self._defined_tags = None + + @property + def id(self): + """ + **[Required]** Gets the id of this CertificateAuthority. + The OCID of the CA. + + + :return: The id of this CertificateAuthority. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this CertificateAuthority. + The OCID of the CA. + + + :param id: The id of this CertificateAuthority. + :type: str + """ + self._id = id + + @property + def issuer_certificate_authority_id(self): + """ + Gets the issuer_certificate_authority_id of this CertificateAuthority. + The OCID of the parent CA that issued this CA. If this is the root CA, then this value is null. + + + :return: The issuer_certificate_authority_id of this CertificateAuthority. + :rtype: str + """ + return self._issuer_certificate_authority_id + + @issuer_certificate_authority_id.setter + def issuer_certificate_authority_id(self, issuer_certificate_authority_id): + """ + Sets the issuer_certificate_authority_id of this CertificateAuthority. + The OCID of the parent CA that issued this CA. If this is the root CA, then this value is null. + + + :param issuer_certificate_authority_id: The issuer_certificate_authority_id of this CertificateAuthority. + :type: str + """ + self._issuer_certificate_authority_id = issuer_certificate_authority_id + + @property + def name(self): + """ + **[Required]** Gets the name of this CertificateAuthority. + A user-friendly name for the CA. Names are unique within a compartment. Avoid entering confidential information. Valid characters include uppercase or lowercase letters, numbers, hyphens, underscores, and periods. + + + :return: The name of this CertificateAuthority. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """ + Sets the name of this CertificateAuthority. + A user-friendly name for the CA. Names are unique within a compartment. Avoid entering confidential information. Valid characters include uppercase or lowercase letters, numbers, hyphens, underscores, and periods. + + + :param name: The name of this CertificateAuthority. + :type: str + """ + self._name = name + + @property + def description(self): + """ + Gets the description of this CertificateAuthority. + A brief description of the CA. + + + :return: The description of this CertificateAuthority. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this CertificateAuthority. + A brief description of the CA. + + + :param description: The description of this CertificateAuthority. + :type: str + """ + self._description = description + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this CertificateAuthority. + A property indicating when the CA was created, expressed in `RFC 3339`__ timestamp format. + Example: `2019-04-03T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_created of this CertificateAuthority. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this CertificateAuthority. + A property indicating when the CA was created, expressed in `RFC 3339`__ timestamp format. + Example: `2019-04-03T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_created: The time_created of this CertificateAuthority. + :type: datetime + """ + self._time_created = time_created + + @property + def time_of_deletion(self): + """ + Gets the time_of_deletion of this CertificateAuthority. + An optional property indicating when to delete the CA version, expressed in `RFC 3339`__ timestamp format. + Example: `2019-04-03T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_of_deletion of this CertificateAuthority. + :rtype: datetime + """ + return self._time_of_deletion + + @time_of_deletion.setter + def time_of_deletion(self, time_of_deletion): + """ + Sets the time_of_deletion of this CertificateAuthority. + An optional property indicating when to delete the CA version, expressed in `RFC 3339`__ timestamp format. + Example: `2019-04-03T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_of_deletion: The time_of_deletion of this CertificateAuthority. + :type: datetime + """ + self._time_of_deletion = time_of_deletion + + @property + def kms_key_id(self): + """ + Gets the kms_key_id of this CertificateAuthority. + The OCID of the Oracle Cloud Infrastructure Vault key used to encrypt the CA. + + + :return: The kms_key_id of this CertificateAuthority. + :rtype: str + """ + return self._kms_key_id + + @kms_key_id.setter + def kms_key_id(self, kms_key_id): + """ + Sets the kms_key_id of this CertificateAuthority. + The OCID of the Oracle Cloud Infrastructure Vault key used to encrypt the CA. + + + :param kms_key_id: The kms_key_id of this CertificateAuthority. + :type: str + """ + self._kms_key_id = kms_key_id + + @property + def lifecycle_state(self): + """ + **[Required]** Gets the lifecycle_state of this CertificateAuthority. + The current lifecycle state of the certificate authority. + + Allowed values for this property are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "SCHEDULING_DELETION", "PENDING_DELETION", "CANCELLING_DELETION", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The lifecycle_state of this CertificateAuthority. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this CertificateAuthority. + The current lifecycle state of the certificate authority. + + + :param lifecycle_state: The lifecycle_state of this CertificateAuthority. + :type: str + """ + allowed_values = ["CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "SCHEDULING_DELETION", "PENDING_DELETION", "CANCELLING_DELETION", "FAILED"] + 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 CertificateAuthority. + Additional information about the current CA lifecycle state. + + + :return: The lifecycle_details of this CertificateAuthority. + :rtype: str + """ + return self._lifecycle_details + + @lifecycle_details.setter + def lifecycle_details(self, lifecycle_details): + """ + Sets the lifecycle_details of this CertificateAuthority. + Additional information about the current CA lifecycle state. + + + :param lifecycle_details: The lifecycle_details of this CertificateAuthority. + :type: str + """ + self._lifecycle_details = lifecycle_details + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this CertificateAuthority. + The OCID of the compartment under which the CA is created. + + + :return: The compartment_id of this CertificateAuthority. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this CertificateAuthority. + The OCID of the compartment under which the CA is created. + + + :param compartment_id: The compartment_id of this CertificateAuthority. + :type: str + """ + self._compartment_id = compartment_id + + @property + def certificate_authority_rules(self): + """ + Gets the certificate_authority_rules of this CertificateAuthority. + An optional list of rules that control how the CA is used and managed. + + + :return: The certificate_authority_rules of this CertificateAuthority. + :rtype: list[oci.certificates_management.models.CertificateAuthorityRule] + """ + return self._certificate_authority_rules + + @certificate_authority_rules.setter + def certificate_authority_rules(self, certificate_authority_rules): + """ + Sets the certificate_authority_rules of this CertificateAuthority. + An optional list of rules that control how the CA is used and managed. + + + :param certificate_authority_rules: The certificate_authority_rules of this CertificateAuthority. + :type: list[oci.certificates_management.models.CertificateAuthorityRule] + """ + self._certificate_authority_rules = certificate_authority_rules + + @property + def current_version(self): + """ + Gets the current_version of this CertificateAuthority. + + :return: The current_version of this CertificateAuthority. + :rtype: oci.certificates_management.models.CertificateAuthorityVersionSummary + """ + return self._current_version + + @current_version.setter + def current_version(self, current_version): + """ + Sets the current_version of this CertificateAuthority. + + :param current_version: The current_version of this CertificateAuthority. + :type: oci.certificates_management.models.CertificateAuthorityVersionSummary + """ + self._current_version = current_version + + @property + def certificate_revocation_list_details(self): + """ + Gets the certificate_revocation_list_details of this CertificateAuthority. + + :return: The certificate_revocation_list_details of this CertificateAuthority. + :rtype: oci.certificates_management.models.CertificateRevocationListDetails + """ + return self._certificate_revocation_list_details + + @certificate_revocation_list_details.setter + def certificate_revocation_list_details(self, certificate_revocation_list_details): + """ + Sets the certificate_revocation_list_details of this CertificateAuthority. + + :param certificate_revocation_list_details: The certificate_revocation_list_details of this CertificateAuthority. + :type: oci.certificates_management.models.CertificateRevocationListDetails + """ + self._certificate_revocation_list_details = certificate_revocation_list_details + + @property + def config_type(self): + """ + **[Required]** Gets the config_type of this CertificateAuthority. + The origin of the CA. + + Allowed values for this property are: "ROOT_CA_GENERATED_INTERNALLY", "SUBORDINATE_CA_ISSUED_BY_INTERNAL_CA", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The config_type of this CertificateAuthority. + :rtype: str + """ + return self._config_type + + @config_type.setter + def config_type(self, config_type): + """ + Sets the config_type of this CertificateAuthority. + The origin of the CA. + + + :param config_type: The config_type of this CertificateAuthority. + :type: str + """ + allowed_values = ["ROOT_CA_GENERATED_INTERNALLY", "SUBORDINATE_CA_ISSUED_BY_INTERNAL_CA"] + if not value_allowed_none_or_none_sentinel(config_type, allowed_values): + config_type = 'UNKNOWN_ENUM_VALUE' + self._config_type = config_type + + @property + def subject(self): + """ + Gets the subject of this CertificateAuthority. + + :return: The subject of this CertificateAuthority. + :rtype: oci.certificates_management.models.CertificateSubject + """ + return self._subject + + @subject.setter + def subject(self, subject): + """ + Sets the subject of this CertificateAuthority. + + :param subject: The subject of this CertificateAuthority. + :type: oci.certificates_management.models.CertificateSubject + """ + self._subject = subject + + @property + def signing_algorithm(self): + """ + Gets the signing_algorithm of this CertificateAuthority. + The algorithm used to sign public key certificates that the CA issues. + + Allowed values for this property are: "SHA256_WITH_RSA", "SHA384_WITH_RSA", "SHA512_WITH_RSA", "SHA256_WITH_ECDSA", "SHA384_WITH_ECDSA", "SHA512_WITH_ECDSA", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The signing_algorithm of this CertificateAuthority. + :rtype: str + """ + return self._signing_algorithm + + @signing_algorithm.setter + def signing_algorithm(self, signing_algorithm): + """ + Sets the signing_algorithm of this CertificateAuthority. + The algorithm used to sign public key certificates that the CA issues. + + + :param signing_algorithm: The signing_algorithm of this CertificateAuthority. + :type: str + """ + allowed_values = ["SHA256_WITH_RSA", "SHA384_WITH_RSA", "SHA512_WITH_RSA", "SHA256_WITH_ECDSA", "SHA384_WITH_ECDSA", "SHA512_WITH_ECDSA"] + if not value_allowed_none_or_none_sentinel(signing_algorithm, allowed_values): + signing_algorithm = 'UNKNOWN_ENUM_VALUE' + self._signing_algorithm = signing_algorithm + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this CertificateAuthority. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + Example: `{\"bar-key\": \"value\"}` + + + :return: The freeform_tags of this CertificateAuthority. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this CertificateAuthority. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + Example: `{\"bar-key\": \"value\"}` + + + :param freeform_tags: The freeform_tags of this CertificateAuthority. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this CertificateAuthority. + Usage of predefined tag keys. These predefined keys are scoped to namespaces. + Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + + :return: The defined_tags of this CertificateAuthority. + :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 CertificateAuthority. + Usage of predefined tag keys. These predefined keys are scoped to namespaces. + Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + + :param defined_tags: The defined_tags of this CertificateAuthority. + :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/certificates_management/models/certificate_authority_collection.py b/src/oci/certificates_management/models/certificate_authority_collection.py new file mode 100644 index 0000000000..a768022131 --- /dev/null +++ b/src/oci/certificates_management/models/certificate_authority_collection.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 CertificateAuthorityCollection(object): + """ + The results of a certificate authority (CA) search. This object contains CA summary objects and other data. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CertificateAuthorityCollection object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param items: + The value to assign to the items property of this CertificateAuthorityCollection. + :type items: list[oci.certificates_management.models.CertificateAuthoritySummary] + + """ + self.swagger_types = { + 'items': 'list[CertificateAuthoritySummary]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this CertificateAuthorityCollection. + List of CertificateAuthoritySummary. + + + :return: The items of this CertificateAuthorityCollection. + :rtype: list[oci.certificates_management.models.CertificateAuthoritySummary] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this CertificateAuthorityCollection. + List of CertificateAuthoritySummary. + + + :param items: The items of this CertificateAuthorityCollection. + :type: list[oci.certificates_management.models.CertificateAuthoritySummary] + """ + self._items = items + + 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/certificates_management/models/certificate_authority_issuance_expiry_rule.py b/src/oci/certificates_management/models/certificate_authority_issuance_expiry_rule.py new file mode 100644 index 0000000000..766336f9f6 --- /dev/null +++ b/src/oci/certificates_management/models/certificate_authority_issuance_expiry_rule.py @@ -0,0 +1,124 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .certificate_authority_rule import CertificateAuthorityRule +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 CertificateAuthorityIssuanceExpiryRule(CertificateAuthorityRule): + """ + A rule that enforces how long certificates or certificate authorities (CAs) issued by this particular CA are valid. + You must include either or both `leafCertificateMaxValidityDuration` and `certificateAuthorityMaxValidityDuration`. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CertificateAuthorityIssuanceExpiryRule object with values from keyword arguments. The default value of the :py:attr:`~oci.certificates_management.models.CertificateAuthorityIssuanceExpiryRule.rule_type` attribute + of this class is ``CERTIFICATE_AUTHORITY_ISSUANCE_EXPIRY_RULE`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param rule_type: + The value to assign to the rule_type property of this CertificateAuthorityIssuanceExpiryRule. + Allowed values for this property are: "CERTIFICATE_AUTHORITY_ISSUANCE_EXPIRY_RULE" + :type rule_type: str + + :param leaf_certificate_max_validity_duration: + The value to assign to the leaf_certificate_max_validity_duration property of this CertificateAuthorityIssuanceExpiryRule. + :type leaf_certificate_max_validity_duration: str + + :param certificate_authority_max_validity_duration: + The value to assign to the certificate_authority_max_validity_duration property of this CertificateAuthorityIssuanceExpiryRule. + :type certificate_authority_max_validity_duration: str + + """ + self.swagger_types = { + 'rule_type': 'str', + 'leaf_certificate_max_validity_duration': 'str', + 'certificate_authority_max_validity_duration': 'str' + } + + self.attribute_map = { + 'rule_type': 'ruleType', + 'leaf_certificate_max_validity_duration': 'leafCertificateMaxValidityDuration', + 'certificate_authority_max_validity_duration': 'certificateAuthorityMaxValidityDuration' + } + + self._rule_type = None + self._leaf_certificate_max_validity_duration = None + self._certificate_authority_max_validity_duration = None + self._rule_type = 'CERTIFICATE_AUTHORITY_ISSUANCE_EXPIRY_RULE' + + @property + def leaf_certificate_max_validity_duration(self): + """ + Gets the leaf_certificate_max_validity_duration of this CertificateAuthorityIssuanceExpiryRule. + A property indicating the maximum validity duration, in days, of leaf certificates issued by this CA. + Expressed in `ISO 8601`__ format. + + __ https://en.wikipedia.org/wiki/ISO_8601#Time_intervals + + + :return: The leaf_certificate_max_validity_duration of this CertificateAuthorityIssuanceExpiryRule. + :rtype: str + """ + return self._leaf_certificate_max_validity_duration + + @leaf_certificate_max_validity_duration.setter + def leaf_certificate_max_validity_duration(self, leaf_certificate_max_validity_duration): + """ + Sets the leaf_certificate_max_validity_duration of this CertificateAuthorityIssuanceExpiryRule. + A property indicating the maximum validity duration, in days, of leaf certificates issued by this CA. + Expressed in `ISO 8601`__ format. + + __ https://en.wikipedia.org/wiki/ISO_8601#Time_intervals + + + :param leaf_certificate_max_validity_duration: The leaf_certificate_max_validity_duration of this CertificateAuthorityIssuanceExpiryRule. + :type: str + """ + self._leaf_certificate_max_validity_duration = leaf_certificate_max_validity_duration + + @property + def certificate_authority_max_validity_duration(self): + """ + Gets the certificate_authority_max_validity_duration of this CertificateAuthorityIssuanceExpiryRule. + A property indicating the maximum validity duration, in days, of subordinate CA's issued by this CA. + Expressed in `ISO 8601`__ format. + + __ https://en.wikipedia.org/wiki/ISO_8601#Time_intervals + + + :return: The certificate_authority_max_validity_duration of this CertificateAuthorityIssuanceExpiryRule. + :rtype: str + """ + return self._certificate_authority_max_validity_duration + + @certificate_authority_max_validity_duration.setter + def certificate_authority_max_validity_duration(self, certificate_authority_max_validity_duration): + """ + Sets the certificate_authority_max_validity_duration of this CertificateAuthorityIssuanceExpiryRule. + A property indicating the maximum validity duration, in days, of subordinate CA's issued by this CA. + Expressed in `ISO 8601`__ format. + + __ https://en.wikipedia.org/wiki/ISO_8601#Time_intervals + + + :param certificate_authority_max_validity_duration: The certificate_authority_max_validity_duration of this CertificateAuthorityIssuanceExpiryRule. + :type: str + """ + self._certificate_authority_max_validity_duration = certificate_authority_max_validity_duration + + 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/certificates_management/models/certificate_authority_rule.py b/src/oci/certificates_management/models/certificate_authority_rule.py new file mode 100644 index 0000000000..f68b4d0ad2 --- /dev/null +++ b/src/oci/certificates_management/models/certificate_authority_rule.py @@ -0,0 +1,99 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 CertificateAuthorityRule(object): + """ + A rule that you can apply to a certificate authority (CA) to enforce certain conditions on its usage and management. + """ + + #: A constant which can be used with the rule_type property of a CertificateAuthorityRule. + #: This constant has a value of "CERTIFICATE_AUTHORITY_ISSUANCE_EXPIRY_RULE" + RULE_TYPE_CERTIFICATE_AUTHORITY_ISSUANCE_EXPIRY_RULE = "CERTIFICATE_AUTHORITY_ISSUANCE_EXPIRY_RULE" + + def __init__(self, **kwargs): + """ + Initializes a new CertificateAuthorityRule object with values from keyword arguments. This class has the following subclasses and if you are using this class as input + to a service operations then you should favor using a subclass over the base class: + + * :class:`~oci.certificates_management.models.CertificateAuthorityIssuanceExpiryRule` + + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param rule_type: + The value to assign to the rule_type property of this CertificateAuthorityRule. + Allowed values for this property are: "CERTIFICATE_AUTHORITY_ISSUANCE_EXPIRY_RULE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type rule_type: str + + """ + self.swagger_types = { + 'rule_type': 'str' + } + + self.attribute_map = { + 'rule_type': 'ruleType' + } + + self._rule_type = None + + @staticmethod + def get_subtype(object_dictionary): + """ + Given the hash representation of a subtype of this class, + use the info in the hash to return the class of the subtype. + """ + type = object_dictionary['ruleType'] + + if type == 'CERTIFICATE_AUTHORITY_ISSUANCE_EXPIRY_RULE': + return 'CertificateAuthorityIssuanceExpiryRule' + else: + return 'CertificateAuthorityRule' + + @property + def rule_type(self): + """ + **[Required]** Gets the rule_type of this CertificateAuthorityRule. + The type of rule, whether a renewal rule regarding when to renew the CA or an issuance expiry rule that governs how long the certificates and CAs issued by the CA are valid. (For internal use only) An internal issuance rule defines the number and type of certificates that the CA can issue. + + Allowed values for this property are: "CERTIFICATE_AUTHORITY_ISSUANCE_EXPIRY_RULE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The rule_type of this CertificateAuthorityRule. + :rtype: str + """ + return self._rule_type + + @rule_type.setter + def rule_type(self, rule_type): + """ + Sets the rule_type of this CertificateAuthorityRule. + The type of rule, whether a renewal rule regarding when to renew the CA or an issuance expiry rule that governs how long the certificates and CAs issued by the CA are valid. (For internal use only) An internal issuance rule defines the number and type of certificates that the CA can issue. + + + :param rule_type: The rule_type of this CertificateAuthorityRule. + :type: str + """ + allowed_values = ["CERTIFICATE_AUTHORITY_ISSUANCE_EXPIRY_RULE"] + if not value_allowed_none_or_none_sentinel(rule_type, allowed_values): + rule_type = 'UNKNOWN_ENUM_VALUE' + self._rule_type = rule_type + + 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/certificates_management/models/certificate_authority_summary.py b/src/oci/certificates_management/models/certificate_authority_summary.py new file mode 100644 index 0000000000..8f4f7c5540 --- /dev/null +++ b/src/oci/certificates_management/models/certificate_authority_summary.py @@ -0,0 +1,635 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 CertificateAuthoritySummary(object): + """ + The metadata details of the certificate authority (CA). This summary object does not contain the CA contents. + """ + + #: A constant which can be used with the lifecycle_state property of a CertificateAuthoritySummary. + #: This constant has a value of "CREATING" + LIFECYCLE_STATE_CREATING = "CREATING" + + #: A constant which can be used with the lifecycle_state property of a CertificateAuthoritySummary. + #: This constant has a value of "ACTIVE" + LIFECYCLE_STATE_ACTIVE = "ACTIVE" + + #: A constant which can be used with the lifecycle_state property of a CertificateAuthoritySummary. + #: This constant has a value of "UPDATING" + LIFECYCLE_STATE_UPDATING = "UPDATING" + + #: A constant which can be used with the lifecycle_state property of a CertificateAuthoritySummary. + #: This constant has a value of "DELETING" + LIFECYCLE_STATE_DELETING = "DELETING" + + #: A constant which can be used with the lifecycle_state property of a CertificateAuthoritySummary. + #: This constant has a value of "DELETED" + LIFECYCLE_STATE_DELETED = "DELETED" + + #: A constant which can be used with the lifecycle_state property of a CertificateAuthoritySummary. + #: This constant has a value of "SCHEDULING_DELETION" + LIFECYCLE_STATE_SCHEDULING_DELETION = "SCHEDULING_DELETION" + + #: A constant which can be used with the lifecycle_state property of a CertificateAuthoritySummary. + #: This constant has a value of "PENDING_DELETION" + LIFECYCLE_STATE_PENDING_DELETION = "PENDING_DELETION" + + #: A constant which can be used with the lifecycle_state property of a CertificateAuthoritySummary. + #: This constant has a value of "CANCELLING_DELETION" + LIFECYCLE_STATE_CANCELLING_DELETION = "CANCELLING_DELETION" + + #: A constant which can be used with the lifecycle_state property of a CertificateAuthoritySummary. + #: This constant has a value of "FAILED" + LIFECYCLE_STATE_FAILED = "FAILED" + + #: A constant which can be used with the config_type property of a CertificateAuthoritySummary. + #: This constant has a value of "ROOT_CA_GENERATED_INTERNALLY" + CONFIG_TYPE_ROOT_CA_GENERATED_INTERNALLY = "ROOT_CA_GENERATED_INTERNALLY" + + #: A constant which can be used with the config_type property of a CertificateAuthoritySummary. + #: This constant has a value of "SUBORDINATE_CA_ISSUED_BY_INTERNAL_CA" + CONFIG_TYPE_SUBORDINATE_CA_ISSUED_BY_INTERNAL_CA = "SUBORDINATE_CA_ISSUED_BY_INTERNAL_CA" + + #: A constant which can be used with the signing_algorithm property of a CertificateAuthoritySummary. + #: This constant has a value of "SHA256_WITH_RSA" + SIGNING_ALGORITHM_SHA256_WITH_RSA = "SHA256_WITH_RSA" + + #: A constant which can be used with the signing_algorithm property of a CertificateAuthoritySummary. + #: This constant has a value of "SHA384_WITH_RSA" + SIGNING_ALGORITHM_SHA384_WITH_RSA = "SHA384_WITH_RSA" + + #: A constant which can be used with the signing_algorithm property of a CertificateAuthoritySummary. + #: This constant has a value of "SHA512_WITH_RSA" + SIGNING_ALGORITHM_SHA512_WITH_RSA = "SHA512_WITH_RSA" + + #: A constant which can be used with the signing_algorithm property of a CertificateAuthoritySummary. + #: This constant has a value of "SHA256_WITH_ECDSA" + SIGNING_ALGORITHM_SHA256_WITH_ECDSA = "SHA256_WITH_ECDSA" + + #: A constant which can be used with the signing_algorithm property of a CertificateAuthoritySummary. + #: This constant has a value of "SHA384_WITH_ECDSA" + SIGNING_ALGORITHM_SHA384_WITH_ECDSA = "SHA384_WITH_ECDSA" + + #: A constant which can be used with the signing_algorithm property of a CertificateAuthoritySummary. + #: This constant has a value of "SHA512_WITH_ECDSA" + SIGNING_ALGORITHM_SHA512_WITH_ECDSA = "SHA512_WITH_ECDSA" + + def __init__(self, **kwargs): + """ + Initializes a new CertificateAuthoritySummary 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 CertificateAuthoritySummary. + :type id: str + + :param issuer_certificate_authority_id: + The value to assign to the issuer_certificate_authority_id property of this CertificateAuthoritySummary. + :type issuer_certificate_authority_id: str + + :param name: + The value to assign to the name property of this CertificateAuthoritySummary. + :type name: str + + :param description: + The value to assign to the description property of this CertificateAuthoritySummary. + :type description: str + + :param time_created: + The value to assign to the time_created property of this CertificateAuthoritySummary. + :type time_created: datetime + + :param time_of_deletion: + The value to assign to the time_of_deletion property of this CertificateAuthoritySummary. + :type time_of_deletion: datetime + + :param kms_key_id: + The value to assign to the kms_key_id property of this CertificateAuthoritySummary. + :type kms_key_id: str + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this CertificateAuthoritySummary. + Allowed values for this property are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "SCHEDULING_DELETION", "PENDING_DELETION", "CANCELLING_DELETION", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type lifecycle_state: str + + :param compartment_id: + The value to assign to the compartment_id property of this CertificateAuthoritySummary. + :type compartment_id: str + + :param certificate_authority_rules: + The value to assign to the certificate_authority_rules property of this CertificateAuthoritySummary. + :type certificate_authority_rules: list[oci.certificates_management.models.CertificateAuthorityRule] + + :param current_version_summary: + The value to assign to the current_version_summary property of this CertificateAuthoritySummary. + :type current_version_summary: oci.certificates_management.models.CertificateAuthorityVersionSummary + + :param subject: + The value to assign to the subject property of this CertificateAuthoritySummary. + :type subject: oci.certificates_management.models.CertificateSubject + + :param config_type: + The value to assign to the config_type property of this CertificateAuthoritySummary. + Allowed values for this property are: "ROOT_CA_GENERATED_INTERNALLY", "SUBORDINATE_CA_ISSUED_BY_INTERNAL_CA", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type config_type: str + + :param signing_algorithm: + The value to assign to the signing_algorithm property of this CertificateAuthoritySummary. + Allowed values for this property are: "SHA256_WITH_RSA", "SHA384_WITH_RSA", "SHA512_WITH_RSA", "SHA256_WITH_ECDSA", "SHA384_WITH_ECDSA", "SHA512_WITH_ECDSA", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type signing_algorithm: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this CertificateAuthoritySummary. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this CertificateAuthoritySummary. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'id': 'str', + 'issuer_certificate_authority_id': 'str', + 'name': 'str', + 'description': 'str', + 'time_created': 'datetime', + 'time_of_deletion': 'datetime', + 'kms_key_id': 'str', + 'lifecycle_state': 'str', + 'compartment_id': 'str', + 'certificate_authority_rules': 'list[CertificateAuthorityRule]', + 'current_version_summary': 'CertificateAuthorityVersionSummary', + 'subject': 'CertificateSubject', + 'config_type': 'str', + 'signing_algorithm': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'id': 'id', + 'issuer_certificate_authority_id': 'issuerCertificateAuthorityId', + 'name': 'name', + 'description': 'description', + 'time_created': 'timeCreated', + 'time_of_deletion': 'timeOfDeletion', + 'kms_key_id': 'kmsKeyId', + 'lifecycle_state': 'lifecycleState', + 'compartment_id': 'compartmentId', + 'certificate_authority_rules': 'certificateAuthorityRules', + 'current_version_summary': 'currentVersionSummary', + 'subject': 'subject', + 'config_type': 'configType', + 'signing_algorithm': 'signingAlgorithm', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._id = None + self._issuer_certificate_authority_id = None + self._name = None + self._description = None + self._time_created = None + self._time_of_deletion = None + self._kms_key_id = None + self._lifecycle_state = None + self._compartment_id = None + self._certificate_authority_rules = None + self._current_version_summary = None + self._subject = None + self._config_type = None + self._signing_algorithm = None + self._freeform_tags = None + self._defined_tags = None + + @property + def id(self): + """ + **[Required]** Gets the id of this CertificateAuthoritySummary. + The OCID of the certificate authority (CA). + + + :return: The id of this CertificateAuthoritySummary. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this CertificateAuthoritySummary. + The OCID of the certificate authority (CA). + + + :param id: The id of this CertificateAuthoritySummary. + :type: str + """ + self._id = id + + @property + def issuer_certificate_authority_id(self): + """ + Gets the issuer_certificate_authority_id of this CertificateAuthoritySummary. + The OCID of the parent CA which issued this CA. If this is the root CA, then this value is the same as the `id`. + + + :return: The issuer_certificate_authority_id of this CertificateAuthoritySummary. + :rtype: str + """ + return self._issuer_certificate_authority_id + + @issuer_certificate_authority_id.setter + def issuer_certificate_authority_id(self, issuer_certificate_authority_id): + """ + Sets the issuer_certificate_authority_id of this CertificateAuthoritySummary. + The OCID of the parent CA which issued this CA. If this is the root CA, then this value is the same as the `id`. + + + :param issuer_certificate_authority_id: The issuer_certificate_authority_id of this CertificateAuthoritySummary. + :type: str + """ + self._issuer_certificate_authority_id = issuer_certificate_authority_id + + @property + def name(self): + """ + **[Required]** Gets the name of this CertificateAuthoritySummary. + A user-friendly name for the CA. Names are unique within a compartment. Avoid entering confidential information. Valid characters include uppercase or lowercase letters, numbers, hyphens, underscores, and periods. + + + :return: The name of this CertificateAuthoritySummary. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """ + Sets the name of this CertificateAuthoritySummary. + A user-friendly name for the CA. Names are unique within a compartment. Avoid entering confidential information. Valid characters include uppercase or lowercase letters, numbers, hyphens, underscores, and periods. + + + :param name: The name of this CertificateAuthoritySummary. + :type: str + """ + self._name = name + + @property + def description(self): + """ + Gets the description of this CertificateAuthoritySummary. + A brief description of the CA. + + + :return: The description of this CertificateAuthoritySummary. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this CertificateAuthoritySummary. + A brief description of the CA. + + + :param description: The description of this CertificateAuthoritySummary. + :type: str + """ + self._description = description + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this CertificateAuthoritySummary. + A property indicating when the CA was created, expressed in `RFC 3339`__ timestamp format. + Example: `2019-04-03T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_created of this CertificateAuthoritySummary. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this CertificateAuthoritySummary. + A property indicating when the CA was created, expressed in `RFC 3339`__ timestamp format. + Example: `2019-04-03T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_created: The time_created of this CertificateAuthoritySummary. + :type: datetime + """ + self._time_created = time_created + + @property + def time_of_deletion(self): + """ + Gets the time_of_deletion of this CertificateAuthoritySummary. + An optional property indicating when to delete the CA version, expressed in `RFC 3339`__ timestamp format. + Example: `2019-04-03T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_of_deletion of this CertificateAuthoritySummary. + :rtype: datetime + """ + return self._time_of_deletion + + @time_of_deletion.setter + def time_of_deletion(self, time_of_deletion): + """ + Sets the time_of_deletion of this CertificateAuthoritySummary. + An optional property indicating when to delete the CA version, expressed in `RFC 3339`__ timestamp format. + Example: `2019-04-03T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_of_deletion: The time_of_deletion of this CertificateAuthoritySummary. + :type: datetime + """ + self._time_of_deletion = time_of_deletion + + @property + def kms_key_id(self): + """ + Gets the kms_key_id of this CertificateAuthoritySummary. + The OCID of the Oracle Cloud Infrastructure Vault key used to encrypt the CA. + + + :return: The kms_key_id of this CertificateAuthoritySummary. + :rtype: str + """ + return self._kms_key_id + + @kms_key_id.setter + def kms_key_id(self, kms_key_id): + """ + Sets the kms_key_id of this CertificateAuthoritySummary. + The OCID of the Oracle Cloud Infrastructure Vault key used to encrypt the CA. + + + :param kms_key_id: The kms_key_id of this CertificateAuthoritySummary. + :type: str + """ + self._kms_key_id = kms_key_id + + @property + def lifecycle_state(self): + """ + **[Required]** Gets the lifecycle_state of this CertificateAuthoritySummary. + The current lifecycle state of the CA. + + Allowed values for this property are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "SCHEDULING_DELETION", "PENDING_DELETION", "CANCELLING_DELETION", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The lifecycle_state of this CertificateAuthoritySummary. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this CertificateAuthoritySummary. + The current lifecycle state of the CA. + + + :param lifecycle_state: The lifecycle_state of this CertificateAuthoritySummary. + :type: str + """ + allowed_values = ["CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "SCHEDULING_DELETION", "PENDING_DELETION", "CANCELLING_DELETION", "FAILED"] + if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values): + lifecycle_state = 'UNKNOWN_ENUM_VALUE' + self._lifecycle_state = lifecycle_state + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this CertificateAuthoritySummary. + The OCID of the compartment under which the CA is created. + + + :return: The compartment_id of this CertificateAuthoritySummary. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this CertificateAuthoritySummary. + The OCID of the compartment under which the CA is created. + + + :param compartment_id: The compartment_id of this CertificateAuthoritySummary. + :type: str + """ + self._compartment_id = compartment_id + + @property + def certificate_authority_rules(self): + """ + Gets the certificate_authority_rules of this CertificateAuthoritySummary. + An optional list of rules that control how the CA is used and managed. + + + :return: The certificate_authority_rules of this CertificateAuthoritySummary. + :rtype: list[oci.certificates_management.models.CertificateAuthorityRule] + """ + return self._certificate_authority_rules + + @certificate_authority_rules.setter + def certificate_authority_rules(self, certificate_authority_rules): + """ + Sets the certificate_authority_rules of this CertificateAuthoritySummary. + An optional list of rules that control how the CA is used and managed. + + + :param certificate_authority_rules: The certificate_authority_rules of this CertificateAuthoritySummary. + :type: list[oci.certificates_management.models.CertificateAuthorityRule] + """ + self._certificate_authority_rules = certificate_authority_rules + + @property + def current_version_summary(self): + """ + Gets the current_version_summary of this CertificateAuthoritySummary. + + :return: The current_version_summary of this CertificateAuthoritySummary. + :rtype: oci.certificates_management.models.CertificateAuthorityVersionSummary + """ + return self._current_version_summary + + @current_version_summary.setter + def current_version_summary(self, current_version_summary): + """ + Sets the current_version_summary of this CertificateAuthoritySummary. + + :param current_version_summary: The current_version_summary of this CertificateAuthoritySummary. + :type: oci.certificates_management.models.CertificateAuthorityVersionSummary + """ + self._current_version_summary = current_version_summary + + @property + def subject(self): + """ + Gets the subject of this CertificateAuthoritySummary. + + :return: The subject of this CertificateAuthoritySummary. + :rtype: oci.certificates_management.models.CertificateSubject + """ + return self._subject + + @subject.setter + def subject(self, subject): + """ + Sets the subject of this CertificateAuthoritySummary. + + :param subject: The subject of this CertificateAuthoritySummary. + :type: oci.certificates_management.models.CertificateSubject + """ + self._subject = subject + + @property + def config_type(self): + """ + **[Required]** Gets the config_type of this CertificateAuthoritySummary. + The origin of the CA. + + Allowed values for this property are: "ROOT_CA_GENERATED_INTERNALLY", "SUBORDINATE_CA_ISSUED_BY_INTERNAL_CA", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The config_type of this CertificateAuthoritySummary. + :rtype: str + """ + return self._config_type + + @config_type.setter + def config_type(self, config_type): + """ + Sets the config_type of this CertificateAuthoritySummary. + The origin of the CA. + + + :param config_type: The config_type of this CertificateAuthoritySummary. + :type: str + """ + allowed_values = ["ROOT_CA_GENERATED_INTERNALLY", "SUBORDINATE_CA_ISSUED_BY_INTERNAL_CA"] + if not value_allowed_none_or_none_sentinel(config_type, allowed_values): + config_type = 'UNKNOWN_ENUM_VALUE' + self._config_type = config_type + + @property + def signing_algorithm(self): + """ + Gets the signing_algorithm of this CertificateAuthoritySummary. + The algorithm used to sign public key certificates that the CA issues. + + Allowed values for this property are: "SHA256_WITH_RSA", "SHA384_WITH_RSA", "SHA512_WITH_RSA", "SHA256_WITH_ECDSA", "SHA384_WITH_ECDSA", "SHA512_WITH_ECDSA", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The signing_algorithm of this CertificateAuthoritySummary. + :rtype: str + """ + return self._signing_algorithm + + @signing_algorithm.setter + def signing_algorithm(self, signing_algorithm): + """ + Sets the signing_algorithm of this CertificateAuthoritySummary. + The algorithm used to sign public key certificates that the CA issues. + + + :param signing_algorithm: The signing_algorithm of this CertificateAuthoritySummary. + :type: str + """ + allowed_values = ["SHA256_WITH_RSA", "SHA384_WITH_RSA", "SHA512_WITH_RSA", "SHA256_WITH_ECDSA", "SHA384_WITH_ECDSA", "SHA512_WITH_ECDSA"] + if not value_allowed_none_or_none_sentinel(signing_algorithm, allowed_values): + signing_algorithm = 'UNKNOWN_ENUM_VALUE' + self._signing_algorithm = signing_algorithm + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this CertificateAuthoritySummary. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + Example: `{\"bar-key\": \"value\"}` + + + :return: The freeform_tags of this CertificateAuthoritySummary. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this CertificateAuthoritySummary. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + Example: `{\"bar-key\": \"value\"}` + + + :param freeform_tags: The freeform_tags of this CertificateAuthoritySummary. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this CertificateAuthoritySummary. + Usage of predefined tag keys. These predefined keys are scoped to namespaces. + Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + + :return: The defined_tags of this CertificateAuthoritySummary. + :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 CertificateAuthoritySummary. + Usage of predefined tag keys. These predefined keys are scoped to namespaces. + Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + + :param defined_tags: The defined_tags of this CertificateAuthoritySummary. + :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/certificates_management/models/certificate_authority_version.py b/src/oci/certificates_management/models/certificate_authority_version.py new file mode 100644 index 0000000000..6d1b09da9f --- /dev/null +++ b/src/oci/certificates_management/models/certificate_authority_version.py @@ -0,0 +1,386 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 CertificateAuthorityVersion(object): + """ + The metadata details of the certificate authority (CA) version. This object does not contain the CA contents. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CertificateAuthorityVersion object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param certificate_authority_id: + The value to assign to the certificate_authority_id property of this CertificateAuthorityVersion. + :type certificate_authority_id: str + + :param serial_number: + The value to assign to the serial_number property of this CertificateAuthorityVersion. + :type serial_number: str + + :param time_created: + The value to assign to the time_created property of this CertificateAuthorityVersion. + :type time_created: datetime + + :param version_number: + The value to assign to the version_number property of this CertificateAuthorityVersion. + :type version_number: int + + :param issuer_ca_version_number: + The value to assign to the issuer_ca_version_number property of this CertificateAuthorityVersion. + :type issuer_ca_version_number: int + + :param version_name: + The value to assign to the version_name property of this CertificateAuthorityVersion. + :type version_name: str + + :param subject_alternative_names: + The value to assign to the subject_alternative_names property of this CertificateAuthorityVersion. + :type subject_alternative_names: list[oci.certificates_management.models.CertificateSubjectAlternativeName] + + :param time_of_deletion: + The value to assign to the time_of_deletion property of this CertificateAuthorityVersion. + :type time_of_deletion: datetime + + :param validity: + The value to assign to the validity property of this CertificateAuthorityVersion. + :type validity: oci.certificates_management.models.Validity + + :param stages: + The value to assign to the stages property of this CertificateAuthorityVersion. + :type stages: list[oci.certificates_management.models.VersionStage] + + :param revocation_status: + The value to assign to the revocation_status property of this CertificateAuthorityVersion. + :type revocation_status: oci.certificates_management.models.RevocationStatus + + """ + self.swagger_types = { + 'certificate_authority_id': 'str', + 'serial_number': 'str', + 'time_created': 'datetime', + 'version_number': 'int', + 'issuer_ca_version_number': 'int', + 'version_name': 'str', + 'subject_alternative_names': 'list[CertificateSubjectAlternativeName]', + 'time_of_deletion': 'datetime', + 'validity': 'Validity', + 'stages': 'list[VersionStage]', + 'revocation_status': 'RevocationStatus' + } + + self.attribute_map = { + 'certificate_authority_id': 'certificateAuthorityId', + 'serial_number': 'serialNumber', + 'time_created': 'timeCreated', + 'version_number': 'versionNumber', + 'issuer_ca_version_number': 'issuerCaVersionNumber', + 'version_name': 'versionName', + 'subject_alternative_names': 'subjectAlternativeNames', + 'time_of_deletion': 'timeOfDeletion', + 'validity': 'validity', + 'stages': 'stages', + 'revocation_status': 'revocationStatus' + } + + self._certificate_authority_id = None + self._serial_number = None + self._time_created = None + self._version_number = None + self._issuer_ca_version_number = None + self._version_name = None + self._subject_alternative_names = None + self._time_of_deletion = None + self._validity = None + self._stages = None + self._revocation_status = None + + @property + def certificate_authority_id(self): + """ + **[Required]** Gets the certificate_authority_id of this CertificateAuthorityVersion. + The OCID of the CA. + + + :return: The certificate_authority_id of this CertificateAuthorityVersion. + :rtype: str + """ + return self._certificate_authority_id + + @certificate_authority_id.setter + def certificate_authority_id(self, certificate_authority_id): + """ + Sets the certificate_authority_id of this CertificateAuthorityVersion. + The OCID of the CA. + + + :param certificate_authority_id: The certificate_authority_id of this CertificateAuthorityVersion. + :type: str + """ + self._certificate_authority_id = certificate_authority_id + + @property + def serial_number(self): + """ + Gets the serial_number of this CertificateAuthorityVersion. + A unique certificate identifier used in certificate revocation tracking, formatted as octets. + Example: `03 AC FC FA CC B3 CB 02 B8 F8 DE F5 85 E7 7B FF` + + + :return: The serial_number of this CertificateAuthorityVersion. + :rtype: str + """ + return self._serial_number + + @serial_number.setter + def serial_number(self, serial_number): + """ + Sets the serial_number of this CertificateAuthorityVersion. + A unique certificate identifier used in certificate revocation tracking, formatted as octets. + Example: `03 AC FC FA CC B3 CB 02 B8 F8 DE F5 85 E7 7B FF` + + + :param serial_number: The serial_number of this CertificateAuthorityVersion. + :type: str + """ + self._serial_number = serial_number + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this CertificateAuthorityVersion. + A optional property indicating when the CA version was created, expressed in `RFC 3339`__ timestamp format. + Example: `2019-04-03T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_created of this CertificateAuthorityVersion. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this CertificateAuthorityVersion. + A optional property indicating when the CA version was created, expressed in `RFC 3339`__ timestamp format. + Example: `2019-04-03T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_created: The time_created of this CertificateAuthorityVersion. + :type: datetime + """ + self._time_created = time_created + + @property + def version_number(self): + """ + **[Required]** Gets the version_number of this CertificateAuthorityVersion. + The version number of this CA. + + + :return: The version_number of this CertificateAuthorityVersion. + :rtype: int + """ + return self._version_number + + @version_number.setter + def version_number(self, version_number): + """ + Sets the version_number of this CertificateAuthorityVersion. + The version number of this CA. + + + :param version_number: The version_number of this CertificateAuthorityVersion. + :type: int + """ + self._version_number = version_number + + @property + def issuer_ca_version_number(self): + """ + Gets the issuer_ca_version_number of this CertificateAuthorityVersion. + The version number of the issuing CA. + + + :return: The issuer_ca_version_number of this CertificateAuthorityVersion. + :rtype: int + """ + return self._issuer_ca_version_number + + @issuer_ca_version_number.setter + def issuer_ca_version_number(self, issuer_ca_version_number): + """ + Sets the issuer_ca_version_number of this CertificateAuthorityVersion. + The version number of the issuing CA. + + + :param issuer_ca_version_number: The issuer_ca_version_number of this CertificateAuthorityVersion. + :type: int + """ + self._issuer_ca_version_number = issuer_ca_version_number + + @property + def version_name(self): + """ + Gets the version_name of this CertificateAuthorityVersion. + The name of the CA version. When the value is not null, a name is unique across versions for a given CA. + + + :return: The version_name of this CertificateAuthorityVersion. + :rtype: str + """ + return self._version_name + + @version_name.setter + def version_name(self, version_name): + """ + Sets the version_name of this CertificateAuthorityVersion. + The name of the CA version. When the value is not null, a name is unique across versions for a given CA. + + + :param version_name: The version_name of this CertificateAuthorityVersion. + :type: str + """ + self._version_name = version_name + + @property + def subject_alternative_names(self): + """ + Gets the subject_alternative_names of this CertificateAuthorityVersion. + A list of subject alternative names. A subject alternative name specifies the domain names, including subdomains, and IP addresses covered by the certificates issued by this CA. + + + :return: The subject_alternative_names of this CertificateAuthorityVersion. + :rtype: list[oci.certificates_management.models.CertificateSubjectAlternativeName] + """ + return self._subject_alternative_names + + @subject_alternative_names.setter + def subject_alternative_names(self, subject_alternative_names): + """ + Sets the subject_alternative_names of this CertificateAuthorityVersion. + A list of subject alternative names. A subject alternative name specifies the domain names, including subdomains, and IP addresses covered by the certificates issued by this CA. + + + :param subject_alternative_names: The subject_alternative_names of this CertificateAuthorityVersion. + :type: list[oci.certificates_management.models.CertificateSubjectAlternativeName] + """ + self._subject_alternative_names = subject_alternative_names + + @property + def time_of_deletion(self): + """ + Gets the time_of_deletion of this CertificateAuthorityVersion. + An optional property indicating when to delete the CA version, expressed in `RFC 3339`__ timestamp format. + Example: `2019-04-03T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_of_deletion of this CertificateAuthorityVersion. + :rtype: datetime + """ + return self._time_of_deletion + + @time_of_deletion.setter + def time_of_deletion(self, time_of_deletion): + """ + Sets the time_of_deletion of this CertificateAuthorityVersion. + An optional property indicating when to delete the CA version, expressed in `RFC 3339`__ timestamp format. + Example: `2019-04-03T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_of_deletion: The time_of_deletion of this CertificateAuthorityVersion. + :type: datetime + """ + self._time_of_deletion = time_of_deletion + + @property + def validity(self): + """ + Gets the validity of this CertificateAuthorityVersion. + + :return: The validity of this CertificateAuthorityVersion. + :rtype: oci.certificates_management.models.Validity + """ + return self._validity + + @validity.setter + def validity(self, validity): + """ + Sets the validity of this CertificateAuthorityVersion. + + :param validity: The validity of this CertificateAuthorityVersion. + :type: oci.certificates_management.models.Validity + """ + self._validity = validity + + @property + def stages(self): + """ + **[Required]** Gets the stages of this CertificateAuthorityVersion. + A list of rotation states for this CA version. + + + :return: The stages of this CertificateAuthorityVersion. + :rtype: list[oci.certificates_management.models.VersionStage] + """ + return self._stages + + @stages.setter + def stages(self, stages): + """ + Sets the stages of this CertificateAuthorityVersion. + A list of rotation states for this CA version. + + + :param stages: The stages of this CertificateAuthorityVersion. + :type: list[oci.certificates_management.models.VersionStage] + """ + self._stages = stages + + @property + def revocation_status(self): + """ + Gets the revocation_status of this CertificateAuthorityVersion. + + :return: The revocation_status of this CertificateAuthorityVersion. + :rtype: oci.certificates_management.models.RevocationStatus + """ + return self._revocation_status + + @revocation_status.setter + def revocation_status(self, revocation_status): + """ + Sets the revocation_status of this CertificateAuthorityVersion. + + :param revocation_status: The revocation_status of this CertificateAuthorityVersion. + :type: oci.certificates_management.models.RevocationStatus + """ + self._revocation_status = revocation_status + + 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/certificates_management/models/certificate_authority_version_collection.py b/src/oci/certificates_management/models/certificate_authority_version_collection.py new file mode 100644 index 0000000000..1fe6ac8c3b --- /dev/null +++ b/src/oci/certificates_management/models/certificate_authority_version_collection.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 CertificateAuthorityVersionCollection(object): + """ + The results of a certificate authority (CA) version search. This object contains CA version summary objects and other data. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CertificateAuthorityVersionCollection object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param items: + The value to assign to the items property of this CertificateAuthorityVersionCollection. + :type items: list[oci.certificates_management.models.CertificateAuthorityVersionSummary] + + """ + self.swagger_types = { + 'items': 'list[CertificateAuthorityVersionSummary]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this CertificateAuthorityVersionCollection. + A list of certificate authority version summary objects. + + + :return: The items of this CertificateAuthorityVersionCollection. + :rtype: list[oci.certificates_management.models.CertificateAuthorityVersionSummary] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this CertificateAuthorityVersionCollection. + A list of certificate authority version summary objects. + + + :param items: The items of this CertificateAuthorityVersionCollection. + :type: list[oci.certificates_management.models.CertificateAuthorityVersionSummary] + """ + self._items = items + + 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/certificates_management/models/certificate_authority_version_summary.py b/src/oci/certificates_management/models/certificate_authority_version_summary.py new file mode 100644 index 0000000000..c0b9745bd4 --- /dev/null +++ b/src/oci/certificates_management/models/certificate_authority_version_summary.py @@ -0,0 +1,355 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 CertificateAuthorityVersionSummary(object): + """ + The metadata details of the certificate authority (CA) version. This summary object does not contain the CA contents. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CertificateAuthorityVersionSummary object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param certificate_authority_id: + The value to assign to the certificate_authority_id property of this CertificateAuthorityVersionSummary. + :type certificate_authority_id: str + + :param issuer_ca_version_number: + The value to assign to the issuer_ca_version_number property of this CertificateAuthorityVersionSummary. + :type issuer_ca_version_number: int + + :param serial_number: + The value to assign to the serial_number property of this CertificateAuthorityVersionSummary. + :type serial_number: str + + :param time_created: + The value to assign to the time_created property of this CertificateAuthorityVersionSummary. + :type time_created: datetime + + :param version_number: + The value to assign to the version_number property of this CertificateAuthorityVersionSummary. + :type version_number: int + + :param version_name: + The value to assign to the version_name property of this CertificateAuthorityVersionSummary. + :type version_name: str + + :param time_of_deletion: + The value to assign to the time_of_deletion property of this CertificateAuthorityVersionSummary. + :type time_of_deletion: datetime + + :param validity: + The value to assign to the validity property of this CertificateAuthorityVersionSummary. + :type validity: oci.certificates_management.models.Validity + + :param stages: + The value to assign to the stages property of this CertificateAuthorityVersionSummary. + :type stages: list[oci.certificates_management.models.VersionStage] + + :param revocation_status: + The value to assign to the revocation_status property of this CertificateAuthorityVersionSummary. + :type revocation_status: oci.certificates_management.models.RevocationStatus + + """ + self.swagger_types = { + 'certificate_authority_id': 'str', + 'issuer_ca_version_number': 'int', + 'serial_number': 'str', + 'time_created': 'datetime', + 'version_number': 'int', + 'version_name': 'str', + 'time_of_deletion': 'datetime', + 'validity': 'Validity', + 'stages': 'list[VersionStage]', + 'revocation_status': 'RevocationStatus' + } + + self.attribute_map = { + 'certificate_authority_id': 'certificateAuthorityId', + 'issuer_ca_version_number': 'issuerCaVersionNumber', + 'serial_number': 'serialNumber', + 'time_created': 'timeCreated', + 'version_number': 'versionNumber', + 'version_name': 'versionName', + 'time_of_deletion': 'timeOfDeletion', + 'validity': 'validity', + 'stages': 'stages', + 'revocation_status': 'revocationStatus' + } + + self._certificate_authority_id = None + self._issuer_ca_version_number = None + self._serial_number = None + self._time_created = None + self._version_number = None + self._version_name = None + self._time_of_deletion = None + self._validity = None + self._stages = None + self._revocation_status = None + + @property + def certificate_authority_id(self): + """ + **[Required]** Gets the certificate_authority_id of this CertificateAuthorityVersionSummary. + The OCID of the CA. + + + :return: The certificate_authority_id of this CertificateAuthorityVersionSummary. + :rtype: str + """ + return self._certificate_authority_id + + @certificate_authority_id.setter + def certificate_authority_id(self, certificate_authority_id): + """ + Sets the certificate_authority_id of this CertificateAuthorityVersionSummary. + The OCID of the CA. + + + :param certificate_authority_id: The certificate_authority_id of this CertificateAuthorityVersionSummary. + :type: str + """ + self._certificate_authority_id = certificate_authority_id + + @property + def issuer_ca_version_number(self): + """ + Gets the issuer_ca_version_number of this CertificateAuthorityVersionSummary. + The version number of the issuing CA. + + + :return: The issuer_ca_version_number of this CertificateAuthorityVersionSummary. + :rtype: int + """ + return self._issuer_ca_version_number + + @issuer_ca_version_number.setter + def issuer_ca_version_number(self, issuer_ca_version_number): + """ + Sets the issuer_ca_version_number of this CertificateAuthorityVersionSummary. + The version number of the issuing CA. + + + :param issuer_ca_version_number: The issuer_ca_version_number of this CertificateAuthorityVersionSummary. + :type: int + """ + self._issuer_ca_version_number = issuer_ca_version_number + + @property + def serial_number(self): + """ + Gets the serial_number of this CertificateAuthorityVersionSummary. + A unique certificate identifier used in certificate revocation tracking, formatted as octets. + Example: `03 AC FC FA CC B3 CB 02 B8 F8 DE F5 85 E7 7B FF` + + + :return: The serial_number of this CertificateAuthorityVersionSummary. + :rtype: str + """ + return self._serial_number + + @serial_number.setter + def serial_number(self, serial_number): + """ + Sets the serial_number of this CertificateAuthorityVersionSummary. + A unique certificate identifier used in certificate revocation tracking, formatted as octets. + Example: `03 AC FC FA CC B3 CB 02 B8 F8 DE F5 85 E7 7B FF` + + + :param serial_number: The serial_number of this CertificateAuthorityVersionSummary. + :type: str + """ + self._serial_number = serial_number + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this CertificateAuthorityVersionSummary. + A optional property indicating when the CA version was created, expressed in `RFC 3339`__ timestamp format. + Example: `2019-04-03T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_created of this CertificateAuthorityVersionSummary. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this CertificateAuthorityVersionSummary. + A optional property indicating when the CA version was created, expressed in `RFC 3339`__ timestamp format. + Example: `2019-04-03T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_created: The time_created of this CertificateAuthorityVersionSummary. + :type: datetime + """ + self._time_created = time_created + + @property + def version_number(self): + """ + **[Required]** Gets the version_number of this CertificateAuthorityVersionSummary. + The version number of the CA. + + + :return: The version_number of this CertificateAuthorityVersionSummary. + :rtype: int + """ + return self._version_number + + @version_number.setter + def version_number(self, version_number): + """ + Sets the version_number of this CertificateAuthorityVersionSummary. + The version number of the CA. + + + :param version_number: The version_number of this CertificateAuthorityVersionSummary. + :type: int + """ + self._version_number = version_number + + @property + def version_name(self): + """ + Gets the version_name of this CertificateAuthorityVersionSummary. + The name of the CA version. When this value is not null, the name is unique across CA versions for a given CA. + + + :return: The version_name of this CertificateAuthorityVersionSummary. + :rtype: str + """ + return self._version_name + + @version_name.setter + def version_name(self, version_name): + """ + Sets the version_name of this CertificateAuthorityVersionSummary. + The name of the CA version. When this value is not null, the name is unique across CA versions for a given CA. + + + :param version_name: The version_name of this CertificateAuthorityVersionSummary. + :type: str + """ + self._version_name = version_name + + @property + def time_of_deletion(self): + """ + Gets the time_of_deletion of this CertificateAuthorityVersionSummary. + An optional property indicating when to delete the CA version, expressed in `RFC 3339`__ timestamp format. + Example: `2019-04-03T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_of_deletion of this CertificateAuthorityVersionSummary. + :rtype: datetime + """ + return self._time_of_deletion + + @time_of_deletion.setter + def time_of_deletion(self, time_of_deletion): + """ + Sets the time_of_deletion of this CertificateAuthorityVersionSummary. + An optional property indicating when to delete the CA version, expressed in `RFC 3339`__ timestamp format. + Example: `2019-04-03T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_of_deletion: The time_of_deletion of this CertificateAuthorityVersionSummary. + :type: datetime + """ + self._time_of_deletion = time_of_deletion + + @property + def validity(self): + """ + Gets the validity of this CertificateAuthorityVersionSummary. + + :return: The validity of this CertificateAuthorityVersionSummary. + :rtype: oci.certificates_management.models.Validity + """ + return self._validity + + @validity.setter + def validity(self, validity): + """ + Sets the validity of this CertificateAuthorityVersionSummary. + + :param validity: The validity of this CertificateAuthorityVersionSummary. + :type: oci.certificates_management.models.Validity + """ + self._validity = validity + + @property + def stages(self): + """ + **[Required]** Gets the stages of this CertificateAuthorityVersionSummary. + A list of rotation states for this CA version. + + + :return: The stages of this CertificateAuthorityVersionSummary. + :rtype: list[oci.certificates_management.models.VersionStage] + """ + return self._stages + + @stages.setter + def stages(self, stages): + """ + Sets the stages of this CertificateAuthorityVersionSummary. + A list of rotation states for this CA version. + + + :param stages: The stages of this CertificateAuthorityVersionSummary. + :type: list[oci.certificates_management.models.VersionStage] + """ + self._stages = stages + + @property + def revocation_status(self): + """ + Gets the revocation_status of this CertificateAuthorityVersionSummary. + + :return: The revocation_status of this CertificateAuthorityVersionSummary. + :rtype: oci.certificates_management.models.RevocationStatus + """ + return self._revocation_status + + @revocation_status.setter + def revocation_status(self, revocation_status): + """ + Sets the revocation_status of this CertificateAuthorityVersionSummary. + + :param revocation_status: The revocation_status of this CertificateAuthorityVersionSummary. + :type: oci.certificates_management.models.RevocationStatus + """ + self._revocation_status = revocation_status + + 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/certificates_management/models/certificate_collection.py b/src/oci/certificates_management/models/certificate_collection.py new file mode 100644 index 0000000000..aab683e249 --- /dev/null +++ b/src/oci/certificates_management/models/certificate_collection.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 CertificateCollection(object): + """ + The results of a certificate search. This object contains certificate summary objects and other data. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CertificateCollection object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param items: + The value to assign to the items property of this CertificateCollection. + :type items: list[oci.certificates_management.models.CertificateSummary] + + """ + self.swagger_types = { + 'items': 'list[CertificateSummary]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this CertificateCollection. + A list of certificate summary objects. + + + :return: The items of this CertificateCollection. + :rtype: list[oci.certificates_management.models.CertificateSummary] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this CertificateCollection. + A list of certificate summary objects. + + + :param items: The items of this CertificateCollection. + :type: list[oci.certificates_management.models.CertificateSummary] + """ + self._items = items + + 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/certificates_management/models/certificate_renewal_rule.py b/src/oci/certificates_management/models/certificate_renewal_rule.py new file mode 100644 index 0000000000..9164772f1b --- /dev/null +++ b/src/oci/certificates_management/models/certificate_renewal_rule.py @@ -0,0 +1,123 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .certificate_rule import CertificateRule +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 CertificateRenewalRule(CertificateRule): + """ + A rule that imposes constraints on certificate renewal. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CertificateRenewalRule object with values from keyword arguments. The default value of the :py:attr:`~oci.certificates_management.models.CertificateRenewalRule.rule_type` attribute + of this class is ``CERTIFICATE_RENEWAL_RULE`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param rule_type: + The value to assign to the rule_type property of this CertificateRenewalRule. + Allowed values for this property are: "CERTIFICATE_RENEWAL_RULE" + :type rule_type: str + + :param renewal_interval: + The value to assign to the renewal_interval property of this CertificateRenewalRule. + :type renewal_interval: str + + :param advance_renewal_period: + The value to assign to the advance_renewal_period property of this CertificateRenewalRule. + :type advance_renewal_period: str + + """ + self.swagger_types = { + 'rule_type': 'str', + 'renewal_interval': 'str', + 'advance_renewal_period': 'str' + } + + self.attribute_map = { + 'rule_type': 'ruleType', + 'renewal_interval': 'renewalInterval', + 'advance_renewal_period': 'advanceRenewalPeriod' + } + + self._rule_type = None + self._renewal_interval = None + self._advance_renewal_period = None + self._rule_type = 'CERTIFICATE_RENEWAL_RULE' + + @property + def renewal_interval(self): + """ + **[Required]** Gets the renewal_interval of this CertificateRenewalRule. + A property specifying how often, in days, a certificate should be renewed. + Expressed in `ISO 8601`__ format. + + __ https://en.wikipedia.org/wiki/ISO_8601#Time_intervals + + + :return: The renewal_interval of this CertificateRenewalRule. + :rtype: str + """ + return self._renewal_interval + + @renewal_interval.setter + def renewal_interval(self, renewal_interval): + """ + Sets the renewal_interval of this CertificateRenewalRule. + A property specifying how often, in days, a certificate should be renewed. + Expressed in `ISO 8601`__ format. + + __ https://en.wikipedia.org/wiki/ISO_8601#Time_intervals + + + :param renewal_interval: The renewal_interval of this CertificateRenewalRule. + :type: str + """ + self._renewal_interval = renewal_interval + + @property + def advance_renewal_period(self): + """ + **[Required]** Gets the advance_renewal_period of this CertificateRenewalRule. + A property specifying the period of time, in days, before the certificate's targeted renewal that the process should occur. + Expressed in `ISO 8601`__ format. + + __ https://en.wikipedia.org/wiki/ISO_8601#Time_intervals + + + :return: The advance_renewal_period of this CertificateRenewalRule. + :rtype: str + """ + return self._advance_renewal_period + + @advance_renewal_period.setter + def advance_renewal_period(self, advance_renewal_period): + """ + Sets the advance_renewal_period of this CertificateRenewalRule. + A property specifying the period of time, in days, before the certificate's targeted renewal that the process should occur. + Expressed in `ISO 8601`__ format. + + __ https://en.wikipedia.org/wiki/ISO_8601#Time_intervals + + + :param advance_renewal_period: The advance_renewal_period of this CertificateRenewalRule. + :type: str + """ + self._advance_renewal_period = advance_renewal_period + + 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/certificates_management/models/certificate_revocation_list_details.py b/src/oci/certificates_management/models/certificate_revocation_list_details.py new file mode 100644 index 0000000000..6fb02f0e13 --- /dev/null +++ b/src/oci/certificates_management/models/certificate_revocation_list_details.py @@ -0,0 +1,97 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 CertificateRevocationListDetails(object): + """ + The details of the certificate revocation list (CRL). + """ + + def __init__(self, **kwargs): + """ + Initializes a new CertificateRevocationListDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param object_storage_config: + The value to assign to the object_storage_config property of this CertificateRevocationListDetails. + :type object_storage_config: oci.certificates_management.models.ObjectStorageBucketConfigDetails + + :param custom_formatted_urls: + The value to assign to the custom_formatted_urls property of this CertificateRevocationListDetails. + :type custom_formatted_urls: list[str] + + """ + self.swagger_types = { + 'object_storage_config': 'ObjectStorageBucketConfigDetails', + 'custom_formatted_urls': 'list[str]' + } + + self.attribute_map = { + 'object_storage_config': 'objectStorageConfig', + 'custom_formatted_urls': 'customFormattedUrls' + } + + self._object_storage_config = None + self._custom_formatted_urls = None + + @property + def object_storage_config(self): + """ + **[Required]** Gets the object_storage_config of this CertificateRevocationListDetails. + + :return: The object_storage_config of this CertificateRevocationListDetails. + :rtype: oci.certificates_management.models.ObjectStorageBucketConfigDetails + """ + return self._object_storage_config + + @object_storage_config.setter + def object_storage_config(self, object_storage_config): + """ + Sets the object_storage_config of this CertificateRevocationListDetails. + + :param object_storage_config: The object_storage_config of this CertificateRevocationListDetails. + :type: oci.certificates_management.models.ObjectStorageBucketConfigDetails + """ + self._object_storage_config = object_storage_config + + @property + def custom_formatted_urls(self): + """ + Gets the custom_formatted_urls of this CertificateRevocationListDetails. + Optional CRL access points, expressed using a format where the version number of the issuing CA is inserted wherever you include a pair of curly braces. This versioning scheme helps avoid collisions when new CA versions are created. For example, myCrlFileIssuedFromCAVersion{}.crl becomes myCrlFileIssuedFromCAVersion2.crl for CA version 2. + + + :return: The custom_formatted_urls of this CertificateRevocationListDetails. + :rtype: list[str] + """ + return self._custom_formatted_urls + + @custom_formatted_urls.setter + def custom_formatted_urls(self, custom_formatted_urls): + """ + Sets the custom_formatted_urls of this CertificateRevocationListDetails. + Optional CRL access points, expressed using a format where the version number of the issuing CA is inserted wherever you include a pair of curly braces. This versioning scheme helps avoid collisions when new CA versions are created. For example, myCrlFileIssuedFromCAVersion{}.crl becomes myCrlFileIssuedFromCAVersion2.crl for CA version 2. + + + :param custom_formatted_urls: The custom_formatted_urls of this CertificateRevocationListDetails. + :type: list[str] + """ + self._custom_formatted_urls = custom_formatted_urls + + 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/certificates_management/models/certificate_rule.py b/src/oci/certificates_management/models/certificate_rule.py new file mode 100644 index 0000000000..cb68e3a42f --- /dev/null +++ b/src/oci/certificates_management/models/certificate_rule.py @@ -0,0 +1,99 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 CertificateRule(object): + """ + A rule that you can apply to a certificate to enforce certain conditions on the certificate's usage and management. + """ + + #: A constant which can be used with the rule_type property of a CertificateRule. + #: This constant has a value of "CERTIFICATE_RENEWAL_RULE" + RULE_TYPE_CERTIFICATE_RENEWAL_RULE = "CERTIFICATE_RENEWAL_RULE" + + def __init__(self, **kwargs): + """ + Initializes a new CertificateRule object with values from keyword arguments. This class has the following subclasses and if you are using this class as input + to a service operations then you should favor using a subclass over the base class: + + * :class:`~oci.certificates_management.models.CertificateRenewalRule` + + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param rule_type: + The value to assign to the rule_type property of this CertificateRule. + Allowed values for this property are: "CERTIFICATE_RENEWAL_RULE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type rule_type: str + + """ + self.swagger_types = { + 'rule_type': 'str' + } + + self.attribute_map = { + 'rule_type': 'ruleType' + } + + self._rule_type = None + + @staticmethod + def get_subtype(object_dictionary): + """ + Given the hash representation of a subtype of this class, + use the info in the hash to return the class of the subtype. + """ + type = object_dictionary['ruleType'] + + if type == 'CERTIFICATE_RENEWAL_RULE': + return 'CertificateRenewalRule' + else: + return 'CertificateRule' + + @property + def rule_type(self): + """ + **[Required]** Gets the rule_type of this CertificateRule. + The type of rule. + + Allowed values for this property are: "CERTIFICATE_RENEWAL_RULE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The rule_type of this CertificateRule. + :rtype: str + """ + return self._rule_type + + @rule_type.setter + def rule_type(self, rule_type): + """ + Sets the rule_type of this CertificateRule. + The type of rule. + + + :param rule_type: The rule_type of this CertificateRule. + :type: str + """ + allowed_values = ["CERTIFICATE_RENEWAL_RULE"] + if not value_allowed_none_or_none_sentinel(rule_type, allowed_values): + rule_type = 'UNKNOWN_ENUM_VALUE' + self._rule_type = rule_type + + 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/certificates_management/models/certificate_subject.py b/src/oci/certificates_management/models/certificate_subject.py new file mode 100644 index 0000000000..41934b3de1 --- /dev/null +++ b/src/oci/certificates_management/models/certificate_subject.py @@ -0,0 +1,566 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 CertificateSubject(object): + """ + The subject of the certificate, which is a distinguished name that identifies the entity that owns the public key in the certificate. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CertificateSubject object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param common_name: + The value to assign to the common_name property of this CertificateSubject. + :type common_name: str + + :param country: + The value to assign to the country property of this CertificateSubject. + :type country: str + + :param domain_component: + The value to assign to the domain_component property of this CertificateSubject. + :type domain_component: str + + :param distinguished_name_qualifier: + The value to assign to the distinguished_name_qualifier property of this CertificateSubject. + :type distinguished_name_qualifier: str + + :param generation_qualifier: + The value to assign to the generation_qualifier property of this CertificateSubject. + :type generation_qualifier: str + + :param given_name: + The value to assign to the given_name property of this CertificateSubject. + :type given_name: str + + :param initials: + The value to assign to the initials property of this CertificateSubject. + :type initials: str + + :param locality_name: + The value to assign to the locality_name property of this CertificateSubject. + :type locality_name: str + + :param organization: + The value to assign to the organization property of this CertificateSubject. + :type organization: str + + :param organizational_unit: + The value to assign to the organizational_unit property of this CertificateSubject. + :type organizational_unit: str + + :param pseudonym: + The value to assign to the pseudonym property of this CertificateSubject. + :type pseudonym: str + + :param serial_number: + The value to assign to the serial_number property of this CertificateSubject. + :type serial_number: str + + :param state_or_province_name: + The value to assign to the state_or_province_name property of this CertificateSubject. + :type state_or_province_name: str + + :param street: + The value to assign to the street property of this CertificateSubject. + :type street: str + + :param surname: + The value to assign to the surname property of this CertificateSubject. + :type surname: str + + :param title: + The value to assign to the title property of this CertificateSubject. + :type title: str + + :param user_id: + The value to assign to the user_id property of this CertificateSubject. + :type user_id: str + + """ + self.swagger_types = { + 'common_name': 'str', + 'country': 'str', + 'domain_component': 'str', + 'distinguished_name_qualifier': 'str', + 'generation_qualifier': 'str', + 'given_name': 'str', + 'initials': 'str', + 'locality_name': 'str', + 'organization': 'str', + 'organizational_unit': 'str', + 'pseudonym': 'str', + 'serial_number': 'str', + 'state_or_province_name': 'str', + 'street': 'str', + 'surname': 'str', + 'title': 'str', + 'user_id': 'str' + } + + self.attribute_map = { + 'common_name': 'commonName', + 'country': 'country', + 'domain_component': 'domainComponent', + 'distinguished_name_qualifier': 'distinguishedNameQualifier', + 'generation_qualifier': 'generationQualifier', + 'given_name': 'givenName', + 'initials': 'initials', + 'locality_name': 'localityName', + 'organization': 'organization', + 'organizational_unit': 'organizationalUnit', + 'pseudonym': 'pseudonym', + 'serial_number': 'serialNumber', + 'state_or_province_name': 'stateOrProvinceName', + 'street': 'street', + 'surname': 'surname', + 'title': 'title', + 'user_id': 'userId' + } + + self._common_name = None + self._country = None + self._domain_component = None + self._distinguished_name_qualifier = None + self._generation_qualifier = None + self._given_name = None + self._initials = None + self._locality_name = None + self._organization = None + self._organizational_unit = None + self._pseudonym = None + self._serial_number = None + self._state_or_province_name = None + self._street = None + self._surname = None + self._title = None + self._user_id = None + + @property + def common_name(self): + """ + **[Required]** Gets the common_name of this CertificateSubject. + Common name or fully-qualified domain name (RDN CN). + + + :return: The common_name of this CertificateSubject. + :rtype: str + """ + return self._common_name + + @common_name.setter + def common_name(self, common_name): + """ + Sets the common_name of this CertificateSubject. + Common name or fully-qualified domain name (RDN CN). + + + :param common_name: The common_name of this CertificateSubject. + :type: str + """ + self._common_name = common_name + + @property + def country(self): + """ + Gets the country of this CertificateSubject. + Country name (RDN C). + + + :return: The country of this CertificateSubject. + :rtype: str + """ + return self._country + + @country.setter + def country(self, country): + """ + Sets the country of this CertificateSubject. + Country name (RDN C). + + + :param country: The country of this CertificateSubject. + :type: str + """ + self._country = country + + @property + def domain_component(self): + """ + Gets the domain_component of this CertificateSubject. + Domain component (RDN DC). + + + :return: The domain_component of this CertificateSubject. + :rtype: str + """ + return self._domain_component + + @domain_component.setter + def domain_component(self, domain_component): + """ + Sets the domain_component of this CertificateSubject. + Domain component (RDN DC). + + + :param domain_component: The domain_component of this CertificateSubject. + :type: str + """ + self._domain_component = domain_component + + @property + def distinguished_name_qualifier(self): + """ + Gets the distinguished_name_qualifier of this CertificateSubject. + Distinguished name qualifier(RDN DNQ). + + + :return: The distinguished_name_qualifier of this CertificateSubject. + :rtype: str + """ + return self._distinguished_name_qualifier + + @distinguished_name_qualifier.setter + def distinguished_name_qualifier(self, distinguished_name_qualifier): + """ + Sets the distinguished_name_qualifier of this CertificateSubject. + Distinguished name qualifier(RDN DNQ). + + + :param distinguished_name_qualifier: The distinguished_name_qualifier of this CertificateSubject. + :type: str + """ + self._distinguished_name_qualifier = distinguished_name_qualifier + + @property + def generation_qualifier(self): + """ + Gets the generation_qualifier of this CertificateSubject. + Personal generational qualifier (for example, Sr., Jr. 3rd, or IV). + + + :return: The generation_qualifier of this CertificateSubject. + :rtype: str + """ + return self._generation_qualifier + + @generation_qualifier.setter + def generation_qualifier(self, generation_qualifier): + """ + Sets the generation_qualifier of this CertificateSubject. + Personal generational qualifier (for example, Sr., Jr. 3rd, or IV). + + + :param generation_qualifier: The generation_qualifier of this CertificateSubject. + :type: str + """ + self._generation_qualifier = generation_qualifier + + @property + def given_name(self): + """ + Gets the given_name of this CertificateSubject. + Personal given name (RDN G or GN). + + + :return: The given_name of this CertificateSubject. + :rtype: str + """ + return self._given_name + + @given_name.setter + def given_name(self, given_name): + """ + Sets the given_name of this CertificateSubject. + Personal given name (RDN G or GN). + + + :param given_name: The given_name of this CertificateSubject. + :type: str + """ + self._given_name = given_name + + @property + def initials(self): + """ + Gets the initials of this CertificateSubject. + Personal initials. + + + :return: The initials of this CertificateSubject. + :rtype: str + """ + return self._initials + + @initials.setter + def initials(self, initials): + """ + Sets the initials of this CertificateSubject. + Personal initials. + + + :param initials: The initials of this CertificateSubject. + :type: str + """ + self._initials = initials + + @property + def locality_name(self): + """ + Gets the locality_name of this CertificateSubject. + Locality (RDN L). + + + :return: The locality_name of this CertificateSubject. + :rtype: str + """ + return self._locality_name + + @locality_name.setter + def locality_name(self, locality_name): + """ + Sets the locality_name of this CertificateSubject. + Locality (RDN L). + + + :param locality_name: The locality_name of this CertificateSubject. + :type: str + """ + self._locality_name = locality_name + + @property + def organization(self): + """ + Gets the organization of this CertificateSubject. + Organization (RDN O). + + + :return: The organization of this CertificateSubject. + :rtype: str + """ + return self._organization + + @organization.setter + def organization(self, organization): + """ + Sets the organization of this CertificateSubject. + Organization (RDN O). + + + :param organization: The organization of this CertificateSubject. + :type: str + """ + self._organization = organization + + @property + def organizational_unit(self): + """ + Gets the organizational_unit of this CertificateSubject. + Organizational unit (RDN OU). + + + :return: The organizational_unit of this CertificateSubject. + :rtype: str + """ + return self._organizational_unit + + @organizational_unit.setter + def organizational_unit(self, organizational_unit): + """ + Sets the organizational_unit of this CertificateSubject. + Organizational unit (RDN OU). + + + :param organizational_unit: The organizational_unit of this CertificateSubject. + :type: str + """ + self._organizational_unit = organizational_unit + + @property + def pseudonym(self): + """ + Gets the pseudonym of this CertificateSubject. + Subject pseudonym. + + + :return: The pseudonym of this CertificateSubject. + :rtype: str + """ + return self._pseudonym + + @pseudonym.setter + def pseudonym(self, pseudonym): + """ + Sets the pseudonym of this CertificateSubject. + Subject pseudonym. + + + :param pseudonym: The pseudonym of this CertificateSubject. + :type: str + """ + self._pseudonym = pseudonym + + @property + def serial_number(self): + """ + Gets the serial_number of this CertificateSubject. + Unique subject identifier, which is not the same as the certificate serial number (RDN SERIALNUMBER). + + + :return: The serial_number of this CertificateSubject. + :rtype: str + """ + return self._serial_number + + @serial_number.setter + def serial_number(self, serial_number): + """ + Sets the serial_number of this CertificateSubject. + Unique subject identifier, which is not the same as the certificate serial number (RDN SERIALNUMBER). + + + :param serial_number: The serial_number of this CertificateSubject. + :type: str + """ + self._serial_number = serial_number + + @property + def state_or_province_name(self): + """ + Gets the state_or_province_name of this CertificateSubject. + State or province name (RDN ST or S). + + + :return: The state_or_province_name of this CertificateSubject. + :rtype: str + """ + return self._state_or_province_name + + @state_or_province_name.setter + def state_or_province_name(self, state_or_province_name): + """ + Sets the state_or_province_name of this CertificateSubject. + State or province name (RDN ST or S). + + + :param state_or_province_name: The state_or_province_name of this CertificateSubject. + :type: str + """ + self._state_or_province_name = state_or_province_name + + @property + def street(self): + """ + Gets the street of this CertificateSubject. + Street address (RDN STREET). + + + :return: The street of this CertificateSubject. + :rtype: str + """ + return self._street + + @street.setter + def street(self, street): + """ + Sets the street of this CertificateSubject. + Street address (RDN STREET). + + + :param street: The street of this CertificateSubject. + :type: str + """ + self._street = street + + @property + def surname(self): + """ + Gets the surname of this CertificateSubject. + Personal surname (RDN SN). + + + :return: The surname of this CertificateSubject. + :rtype: str + """ + return self._surname + + @surname.setter + def surname(self, surname): + """ + Sets the surname of this CertificateSubject. + Personal surname (RDN SN). + + + :param surname: The surname of this CertificateSubject. + :type: str + """ + self._surname = surname + + @property + def title(self): + """ + Gets the title of this CertificateSubject. + Title (RDN T or TITLE). + + + :return: The title of this CertificateSubject. + :rtype: str + """ + return self._title + + @title.setter + def title(self, title): + """ + Sets the title of this CertificateSubject. + Title (RDN T or TITLE). + + + :param title: The title of this CertificateSubject. + :type: str + """ + self._title = title + + @property + def user_id(self): + """ + Gets the user_id of this CertificateSubject. + User ID (RDN UID). + + + :return: The user_id of this CertificateSubject. + :rtype: str + """ + return self._user_id + + @user_id.setter + def user_id(self, user_id): + """ + Sets the user_id of this CertificateSubject. + User ID (RDN UID). + + + :param user_id: The user_id of this CertificateSubject. + :type: str + """ + self._user_id = user_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/certificates_management/models/certificate_subject_alternative_name.py b/src/oci/certificates_management/models/certificate_subject_alternative_name.py new file mode 100644 index 0000000000..b7b43f64f4 --- /dev/null +++ b/src/oci/certificates_management/models/certificate_subject_alternative_name.py @@ -0,0 +1,117 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 CertificateSubjectAlternativeName(object): + """ + A subject alternative name for the certificate that binds additional or alternate names to the subject of the certificate. In the certificate, the alternate subject name format is \"type:name\". + """ + + #: A constant which can be used with the type property of a CertificateSubjectAlternativeName. + #: This constant has a value of "DNS" + TYPE_DNS = "DNS" + + #: A constant which can be used with the type property of a CertificateSubjectAlternativeName. + #: This constant has a value of "IP" + TYPE_IP = "IP" + + def __init__(self, **kwargs): + """ + Initializes a new CertificateSubjectAlternativeName object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param type: + The value to assign to the type property of this CertificateSubjectAlternativeName. + Allowed values for this property are: "DNS", "IP", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type type: str + + :param value: + The value to assign to the value property of this CertificateSubjectAlternativeName. + :type value: str + + """ + self.swagger_types = { + 'type': 'str', + 'value': 'str' + } + + self.attribute_map = { + 'type': 'type', + 'value': 'value' + } + + self._type = None + self._value = None + + @property + def type(self): + """ + **[Required]** Gets the type of this CertificateSubjectAlternativeName. + The subject alternative name type. Currently only DNS domain or host names and IP addresses are supported. + + Allowed values for this property are: "DNS", "IP", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The type of this CertificateSubjectAlternativeName. + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """ + Sets the type of this CertificateSubjectAlternativeName. + The subject alternative name type. Currently only DNS domain or host names and IP addresses are supported. + + + :param type: The type of this CertificateSubjectAlternativeName. + :type: str + """ + allowed_values = ["DNS", "IP"] + if not value_allowed_none_or_none_sentinel(type, allowed_values): + type = 'UNKNOWN_ENUM_VALUE' + self._type = type + + @property + def value(self): + """ + **[Required]** Gets the value of this CertificateSubjectAlternativeName. + The subject alternative name. + + + :return: The value of this CertificateSubjectAlternativeName. + :rtype: str + """ + return self._value + + @value.setter + def value(self, value): + """ + Sets the value of this CertificateSubjectAlternativeName. + The subject alternative name. + + + :param value: The value of this CertificateSubjectAlternativeName. + :type: str + """ + self._value = value + + 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/certificates_management/models/certificate_summary.py b/src/oci/certificates_management/models/certificate_summary.py new file mode 100644 index 0000000000..e7bb3e9d62 --- /dev/null +++ b/src/oci/certificates_management/models/certificate_summary.py @@ -0,0 +1,730 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 CertificateSummary(object): + """ + The details of the certificate. This object does not contain the certificate contents. + """ + + #: A constant which can be used with the lifecycle_state property of a CertificateSummary. + #: This constant has a value of "CREATING" + LIFECYCLE_STATE_CREATING = "CREATING" + + #: A constant which can be used with the lifecycle_state property of a CertificateSummary. + #: This constant has a value of "ACTIVE" + LIFECYCLE_STATE_ACTIVE = "ACTIVE" + + #: A constant which can be used with the lifecycle_state property of a CertificateSummary. + #: This constant has a value of "UPDATING" + LIFECYCLE_STATE_UPDATING = "UPDATING" + + #: A constant which can be used with the lifecycle_state property of a CertificateSummary. + #: This constant has a value of "DELETING" + LIFECYCLE_STATE_DELETING = "DELETING" + + #: A constant which can be used with the lifecycle_state property of a CertificateSummary. + #: This constant has a value of "DELETED" + LIFECYCLE_STATE_DELETED = "DELETED" + + #: A constant which can be used with the lifecycle_state property of a CertificateSummary. + #: This constant has a value of "SCHEDULING_DELETION" + LIFECYCLE_STATE_SCHEDULING_DELETION = "SCHEDULING_DELETION" + + #: A constant which can be used with the lifecycle_state property of a CertificateSummary. + #: This constant has a value of "PENDING_DELETION" + LIFECYCLE_STATE_PENDING_DELETION = "PENDING_DELETION" + + #: A constant which can be used with the lifecycle_state property of a CertificateSummary. + #: This constant has a value of "CANCELLING_DELETION" + LIFECYCLE_STATE_CANCELLING_DELETION = "CANCELLING_DELETION" + + #: A constant which can be used with the lifecycle_state property of a CertificateSummary. + #: This constant has a value of "FAILED" + LIFECYCLE_STATE_FAILED = "FAILED" + + #: A constant which can be used with the config_type property of a CertificateSummary. + #: This constant has a value of "ISSUED_BY_INTERNAL_CA" + CONFIG_TYPE_ISSUED_BY_INTERNAL_CA = "ISSUED_BY_INTERNAL_CA" + + #: A constant which can be used with the config_type property of a CertificateSummary. + #: This constant has a value of "MANAGED_EXTERNALLY_ISSUED_BY_INTERNAL_CA" + CONFIG_TYPE_MANAGED_EXTERNALLY_ISSUED_BY_INTERNAL_CA = "MANAGED_EXTERNALLY_ISSUED_BY_INTERNAL_CA" + + #: A constant which can be used with the config_type property of a CertificateSummary. + #: This constant has a value of "IMPORTED" + CONFIG_TYPE_IMPORTED = "IMPORTED" + + #: A constant which can be used with the key_algorithm property of a CertificateSummary. + #: This constant has a value of "RSA2048" + KEY_ALGORITHM_RSA2048 = "RSA2048" + + #: A constant which can be used with the key_algorithm property of a CertificateSummary. + #: This constant has a value of "RSA4096" + KEY_ALGORITHM_RSA4096 = "RSA4096" + + #: A constant which can be used with the key_algorithm property of a CertificateSummary. + #: This constant has a value of "ECDSA_P256" + KEY_ALGORITHM_ECDSA_P256 = "ECDSA_P256" + + #: A constant which can be used with the key_algorithm property of a CertificateSummary. + #: This constant has a value of "ECDSA_P384" + KEY_ALGORITHM_ECDSA_P384 = "ECDSA_P384" + + #: A constant which can be used with the signature_algorithm property of a CertificateSummary. + #: This constant has a value of "SHA256_WITH_RSA" + SIGNATURE_ALGORITHM_SHA256_WITH_RSA = "SHA256_WITH_RSA" + + #: A constant which can be used with the signature_algorithm property of a CertificateSummary. + #: This constant has a value of "SHA384_WITH_RSA" + SIGNATURE_ALGORITHM_SHA384_WITH_RSA = "SHA384_WITH_RSA" + + #: A constant which can be used with the signature_algorithm property of a CertificateSummary. + #: This constant has a value of "SHA512_WITH_RSA" + SIGNATURE_ALGORITHM_SHA512_WITH_RSA = "SHA512_WITH_RSA" + + #: A constant which can be used with the signature_algorithm property of a CertificateSummary. + #: This constant has a value of "SHA256_WITH_ECDSA" + SIGNATURE_ALGORITHM_SHA256_WITH_ECDSA = "SHA256_WITH_ECDSA" + + #: A constant which can be used with the signature_algorithm property of a CertificateSummary. + #: This constant has a value of "SHA384_WITH_ECDSA" + SIGNATURE_ALGORITHM_SHA384_WITH_ECDSA = "SHA384_WITH_ECDSA" + + #: A constant which can be used with the signature_algorithm property of a CertificateSummary. + #: This constant has a value of "SHA512_WITH_ECDSA" + SIGNATURE_ALGORITHM_SHA512_WITH_ECDSA = "SHA512_WITH_ECDSA" + + #: A constant which can be used with the certificate_profile_type property of a CertificateSummary. + #: This constant has a value of "TLS_SERVER_OR_CLIENT" + CERTIFICATE_PROFILE_TYPE_TLS_SERVER_OR_CLIENT = "TLS_SERVER_OR_CLIENT" + + #: A constant which can be used with the certificate_profile_type property of a CertificateSummary. + #: This constant has a value of "TLS_SERVER" + CERTIFICATE_PROFILE_TYPE_TLS_SERVER = "TLS_SERVER" + + #: A constant which can be used with the certificate_profile_type property of a CertificateSummary. + #: This constant has a value of "TLS_CLIENT" + CERTIFICATE_PROFILE_TYPE_TLS_CLIENT = "TLS_CLIENT" + + #: A constant which can be used with the certificate_profile_type property of a CertificateSummary. + #: This constant has a value of "TLS_CODE_SIGN" + CERTIFICATE_PROFILE_TYPE_TLS_CODE_SIGN = "TLS_CODE_SIGN" + + def __init__(self, **kwargs): + """ + Initializes a new CertificateSummary 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 CertificateSummary. + :type id: str + + :param issuer_certificate_authority_id: + The value to assign to the issuer_certificate_authority_id property of this CertificateSummary. + :type issuer_certificate_authority_id: str + + :param name: + The value to assign to the name property of this CertificateSummary. + :type name: str + + :param description: + The value to assign to the description property of this CertificateSummary. + :type description: str + + :param time_created: + The value to assign to the time_created property of this CertificateSummary. + :type time_created: datetime + + :param time_of_deletion: + The value to assign to the time_of_deletion property of this CertificateSummary. + :type time_of_deletion: datetime + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this CertificateSummary. + Allowed values for this property are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "SCHEDULING_DELETION", "PENDING_DELETION", "CANCELLING_DELETION", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type lifecycle_state: str + + :param compartment_id: + The value to assign to the compartment_id property of this CertificateSummary. + :type compartment_id: str + + :param certificate_rules: + The value to assign to the certificate_rules property of this CertificateSummary. + :type certificate_rules: list[oci.certificates_management.models.CertificateRule] + + :param current_version_summary: + The value to assign to the current_version_summary property of this CertificateSummary. + :type current_version_summary: oci.certificates_management.models.CertificateVersionSummary + + :param subject: + The value to assign to the subject property of this CertificateSummary. + :type subject: oci.certificates_management.models.CertificateSubject + + :param config_type: + The value to assign to the config_type property of this CertificateSummary. + Allowed values for this property are: "ISSUED_BY_INTERNAL_CA", "MANAGED_EXTERNALLY_ISSUED_BY_INTERNAL_CA", "IMPORTED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type config_type: str + + :param key_algorithm: + The value to assign to the key_algorithm property of this CertificateSummary. + Allowed values for this property are: "RSA2048", "RSA4096", "ECDSA_P256", "ECDSA_P384", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type key_algorithm: str + + :param signature_algorithm: + The value to assign to the signature_algorithm property of this CertificateSummary. + Allowed values for this property are: "SHA256_WITH_RSA", "SHA384_WITH_RSA", "SHA512_WITH_RSA", "SHA256_WITH_ECDSA", "SHA384_WITH_ECDSA", "SHA512_WITH_ECDSA", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type signature_algorithm: str + + :param certificate_profile_type: + The value to assign to the certificate_profile_type property of this CertificateSummary. + Allowed values for this property are: "TLS_SERVER_OR_CLIENT", "TLS_SERVER", "TLS_CLIENT", "TLS_CODE_SIGN", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type certificate_profile_type: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this CertificateSummary. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this CertificateSummary. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'id': 'str', + 'issuer_certificate_authority_id': 'str', + 'name': 'str', + 'description': 'str', + 'time_created': 'datetime', + 'time_of_deletion': 'datetime', + 'lifecycle_state': 'str', + 'compartment_id': 'str', + 'certificate_rules': 'list[CertificateRule]', + 'current_version_summary': 'CertificateVersionSummary', + 'subject': 'CertificateSubject', + 'config_type': 'str', + 'key_algorithm': 'str', + 'signature_algorithm': 'str', + 'certificate_profile_type': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'id': 'id', + 'issuer_certificate_authority_id': 'issuerCertificateAuthorityId', + 'name': 'name', + 'description': 'description', + 'time_created': 'timeCreated', + 'time_of_deletion': 'timeOfDeletion', + 'lifecycle_state': 'lifecycleState', + 'compartment_id': 'compartmentId', + 'certificate_rules': 'certificateRules', + 'current_version_summary': 'currentVersionSummary', + 'subject': 'subject', + 'config_type': 'configType', + 'key_algorithm': 'keyAlgorithm', + 'signature_algorithm': 'signatureAlgorithm', + 'certificate_profile_type': 'certificateProfileType', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._id = None + self._issuer_certificate_authority_id = None + self._name = None + self._description = None + self._time_created = None + self._time_of_deletion = None + self._lifecycle_state = None + self._compartment_id = None + self._certificate_rules = None + self._current_version_summary = None + self._subject = None + self._config_type = None + self._key_algorithm = None + self._signature_algorithm = None + self._certificate_profile_type = None + self._freeform_tags = None + self._defined_tags = None + + @property + def id(self): + """ + **[Required]** Gets the id of this CertificateSummary. + The OCID of the certificate. + + + :return: The id of this CertificateSummary. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this CertificateSummary. + The OCID of the certificate. + + + :param id: The id of this CertificateSummary. + :type: str + """ + self._id = id + + @property + def issuer_certificate_authority_id(self): + """ + Gets the issuer_certificate_authority_id of this CertificateSummary. + The OCID of the certificate authority (CA) that issued the certificate. + + + :return: The issuer_certificate_authority_id of this CertificateSummary. + :rtype: str + """ + return self._issuer_certificate_authority_id + + @issuer_certificate_authority_id.setter + def issuer_certificate_authority_id(self, issuer_certificate_authority_id): + """ + Sets the issuer_certificate_authority_id of this CertificateSummary. + The OCID of the certificate authority (CA) that issued the certificate. + + + :param issuer_certificate_authority_id: The issuer_certificate_authority_id of this CertificateSummary. + :type: str + """ + self._issuer_certificate_authority_id = issuer_certificate_authority_id + + @property + def name(self): + """ + **[Required]** Gets the name of this CertificateSummary. + A user-friendly name for the certificate. Names are unique within a compartment. Avoid entering confidential information. Valid characters are uppercase or lowercase letters, numbers, hyphens, underscores, and periods. + + + :return: The name of this CertificateSummary. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """ + Sets the name of this CertificateSummary. + A user-friendly name for the certificate. Names are unique within a compartment. Avoid entering confidential information. Valid characters are uppercase or lowercase letters, numbers, hyphens, underscores, and periods. + + + :param name: The name of this CertificateSummary. + :type: str + """ + self._name = name + + @property + def description(self): + """ + Gets the description of this CertificateSummary. + A brief description of the certificate. + + + :return: The description of this CertificateSummary. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this CertificateSummary. + A brief description of the certificate. + + + :param description: The description of this CertificateSummary. + :type: str + """ + self._description = description + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this CertificateSummary. + A property indicating when the certificate was created, expressed in `RFC 3339`__ timestamp format. + Example: `2019-04-03T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_created of this CertificateSummary. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this CertificateSummary. + A property indicating when the certificate was created, expressed in `RFC 3339`__ timestamp format. + Example: `2019-04-03T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_created: The time_created of this CertificateSummary. + :type: datetime + """ + self._time_created = time_created + + @property + def time_of_deletion(self): + """ + Gets the time_of_deletion of this CertificateSummary. + An optional property indicating when to delete the certificate version, expressed in `RFC 3339`__ timestamp format. + Example: `2019-04-03T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_of_deletion of this CertificateSummary. + :rtype: datetime + """ + return self._time_of_deletion + + @time_of_deletion.setter + def time_of_deletion(self, time_of_deletion): + """ + Sets the time_of_deletion of this CertificateSummary. + An optional property indicating when to delete the certificate version, expressed in `RFC 3339`__ timestamp format. + Example: `2019-04-03T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_of_deletion: The time_of_deletion of this CertificateSummary. + :type: datetime + """ + self._time_of_deletion = time_of_deletion + + @property + def lifecycle_state(self): + """ + **[Required]** Gets the lifecycle_state of this CertificateSummary. + The current lifecycle state of the certificate. + + Allowed values for this property are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "SCHEDULING_DELETION", "PENDING_DELETION", "CANCELLING_DELETION", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The lifecycle_state of this CertificateSummary. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this CertificateSummary. + The current lifecycle state of the certificate. + + + :param lifecycle_state: The lifecycle_state of this CertificateSummary. + :type: str + """ + allowed_values = ["CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "SCHEDULING_DELETION", "PENDING_DELETION", "CANCELLING_DELETION", "FAILED"] + if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values): + lifecycle_state = 'UNKNOWN_ENUM_VALUE' + self._lifecycle_state = lifecycle_state + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this CertificateSummary. + The OCID of the compartment that contains the certificate. + + + :return: The compartment_id of this CertificateSummary. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this CertificateSummary. + The OCID of the compartment that contains the certificate. + + + :param compartment_id: The compartment_id of this CertificateSummary. + :type: str + """ + self._compartment_id = compartment_id + + @property + def certificate_rules(self): + """ + Gets the certificate_rules of this CertificateSummary. + An optional list of rules that control how the certificate is used and managed. + + + :return: The certificate_rules of this CertificateSummary. + :rtype: list[oci.certificates_management.models.CertificateRule] + """ + return self._certificate_rules + + @certificate_rules.setter + def certificate_rules(self, certificate_rules): + """ + Sets the certificate_rules of this CertificateSummary. + An optional list of rules that control how the certificate is used and managed. + + + :param certificate_rules: The certificate_rules of this CertificateSummary. + :type: list[oci.certificates_management.models.CertificateRule] + """ + self._certificate_rules = certificate_rules + + @property + def current_version_summary(self): + """ + Gets the current_version_summary of this CertificateSummary. + + :return: The current_version_summary of this CertificateSummary. + :rtype: oci.certificates_management.models.CertificateVersionSummary + """ + return self._current_version_summary + + @current_version_summary.setter + def current_version_summary(self, current_version_summary): + """ + Sets the current_version_summary of this CertificateSummary. + + :param current_version_summary: The current_version_summary of this CertificateSummary. + :type: oci.certificates_management.models.CertificateVersionSummary + """ + self._current_version_summary = current_version_summary + + @property + def subject(self): + """ + Gets the subject of this CertificateSummary. + + :return: The subject of this CertificateSummary. + :rtype: oci.certificates_management.models.CertificateSubject + """ + return self._subject + + @subject.setter + def subject(self, subject): + """ + Sets the subject of this CertificateSummary. + + :param subject: The subject of this CertificateSummary. + :type: oci.certificates_management.models.CertificateSubject + """ + self._subject = subject + + @property + def config_type(self): + """ + **[Required]** Gets the config_type of this CertificateSummary. + The origin of the certificate. + + Allowed values for this property are: "ISSUED_BY_INTERNAL_CA", "MANAGED_EXTERNALLY_ISSUED_BY_INTERNAL_CA", "IMPORTED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The config_type of this CertificateSummary. + :rtype: str + """ + return self._config_type + + @config_type.setter + def config_type(self, config_type): + """ + Sets the config_type of this CertificateSummary. + The origin of the certificate. + + + :param config_type: The config_type of this CertificateSummary. + :type: str + """ + allowed_values = ["ISSUED_BY_INTERNAL_CA", "MANAGED_EXTERNALLY_ISSUED_BY_INTERNAL_CA", "IMPORTED"] + if not value_allowed_none_or_none_sentinel(config_type, allowed_values): + config_type = 'UNKNOWN_ENUM_VALUE' + self._config_type = config_type + + @property + def key_algorithm(self): + """ + Gets the key_algorithm of this CertificateSummary. + The algorithm used to create key pairs. + + Allowed values for this property are: "RSA2048", "RSA4096", "ECDSA_P256", "ECDSA_P384", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The key_algorithm of this CertificateSummary. + :rtype: str + """ + return self._key_algorithm + + @key_algorithm.setter + def key_algorithm(self, key_algorithm): + """ + Sets the key_algorithm of this CertificateSummary. + The algorithm used to create key pairs. + + + :param key_algorithm: The key_algorithm of this CertificateSummary. + :type: str + """ + allowed_values = ["RSA2048", "RSA4096", "ECDSA_P256", "ECDSA_P384"] + if not value_allowed_none_or_none_sentinel(key_algorithm, allowed_values): + key_algorithm = 'UNKNOWN_ENUM_VALUE' + self._key_algorithm = key_algorithm + + @property + def signature_algorithm(self): + """ + Gets the signature_algorithm of this CertificateSummary. + The algorithm used to sign the public key certificate. + + Allowed values for this property are: "SHA256_WITH_RSA", "SHA384_WITH_RSA", "SHA512_WITH_RSA", "SHA256_WITH_ECDSA", "SHA384_WITH_ECDSA", "SHA512_WITH_ECDSA", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The signature_algorithm of this CertificateSummary. + :rtype: str + """ + return self._signature_algorithm + + @signature_algorithm.setter + def signature_algorithm(self, signature_algorithm): + """ + Sets the signature_algorithm of this CertificateSummary. + The algorithm used to sign the public key certificate. + + + :param signature_algorithm: The signature_algorithm of this CertificateSummary. + :type: str + """ + allowed_values = ["SHA256_WITH_RSA", "SHA384_WITH_RSA", "SHA512_WITH_RSA", "SHA256_WITH_ECDSA", "SHA384_WITH_ECDSA", "SHA512_WITH_ECDSA"] + if not value_allowed_none_or_none_sentinel(signature_algorithm, allowed_values): + signature_algorithm = 'UNKNOWN_ENUM_VALUE' + self._signature_algorithm = signature_algorithm + + @property + def certificate_profile_type(self): + """ + Gets the certificate_profile_type of this CertificateSummary. + The name of the profile used to create the certificate, which depends on the type of certificate you need. + + Allowed values for this property are: "TLS_SERVER_OR_CLIENT", "TLS_SERVER", "TLS_CLIENT", "TLS_CODE_SIGN", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The certificate_profile_type of this CertificateSummary. + :rtype: str + """ + return self._certificate_profile_type + + @certificate_profile_type.setter + def certificate_profile_type(self, certificate_profile_type): + """ + Sets the certificate_profile_type of this CertificateSummary. + The name of the profile used to create the certificate, which depends on the type of certificate you need. + + + :param certificate_profile_type: The certificate_profile_type of this CertificateSummary. + :type: str + """ + allowed_values = ["TLS_SERVER_OR_CLIENT", "TLS_SERVER", "TLS_CLIENT", "TLS_CODE_SIGN"] + if not value_allowed_none_or_none_sentinel(certificate_profile_type, allowed_values): + certificate_profile_type = 'UNKNOWN_ENUM_VALUE' + self._certificate_profile_type = certificate_profile_type + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this CertificateSummary. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + For more information, see `Resource Tags`__. + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this CertificateSummary. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this CertificateSummary. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + For more information, see `Resource Tags`__. + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this CertificateSummary. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this CertificateSummary. + Defined tags for this resource. Each key is predefined and scoped to a namespace. + For more information, see `Resource Tags`__. + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this CertificateSummary. + :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 CertificateSummary. + Defined tags for this resource. Each key is predefined and scoped to a namespace. + For more information, see `Resource Tags`__. + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this CertificateSummary. + :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/certificates_management/models/certificate_version.py b/src/oci/certificates_management/models/certificate_version.py new file mode 100644 index 0000000000..015c9e5540 --- /dev/null +++ b/src/oci/certificates_management/models/certificate_version.py @@ -0,0 +1,386 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 CertificateVersion(object): + """ + The details of the certificate version. This object does not contain the certificate contents. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CertificateVersion object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param certificate_id: + The value to assign to the certificate_id property of this CertificateVersion. + :type certificate_id: str + + :param serial_number: + The value to assign to the serial_number property of this CertificateVersion. + :type serial_number: str + + :param time_created: + The value to assign to the time_created property of this CertificateVersion. + :type time_created: datetime + + :param version_number: + The value to assign to the version_number property of this CertificateVersion. + :type version_number: int + + :param issuer_ca_version_number: + The value to assign to the issuer_ca_version_number property of this CertificateVersion. + :type issuer_ca_version_number: int + + :param version_name: + The value to assign to the version_name property of this CertificateVersion. + :type version_name: str + + :param subject_alternative_names: + The value to assign to the subject_alternative_names property of this CertificateVersion. + :type subject_alternative_names: list[oci.certificates_management.models.CertificateSubjectAlternativeName] + + :param time_of_deletion: + The value to assign to the time_of_deletion property of this CertificateVersion. + :type time_of_deletion: datetime + + :param validity: + The value to assign to the validity property of this CertificateVersion. + :type validity: oci.certificates_management.models.Validity + + :param stages: + The value to assign to the stages property of this CertificateVersion. + :type stages: list[oci.certificates_management.models.VersionStage] + + :param revocation_status: + The value to assign to the revocation_status property of this CertificateVersion. + :type revocation_status: oci.certificates_management.models.RevocationStatus + + """ + self.swagger_types = { + 'certificate_id': 'str', + 'serial_number': 'str', + 'time_created': 'datetime', + 'version_number': 'int', + 'issuer_ca_version_number': 'int', + 'version_name': 'str', + 'subject_alternative_names': 'list[CertificateSubjectAlternativeName]', + 'time_of_deletion': 'datetime', + 'validity': 'Validity', + 'stages': 'list[VersionStage]', + 'revocation_status': 'RevocationStatus' + } + + self.attribute_map = { + 'certificate_id': 'certificateId', + 'serial_number': 'serialNumber', + 'time_created': 'timeCreated', + 'version_number': 'versionNumber', + 'issuer_ca_version_number': 'issuerCaVersionNumber', + 'version_name': 'versionName', + 'subject_alternative_names': 'subjectAlternativeNames', + 'time_of_deletion': 'timeOfDeletion', + 'validity': 'validity', + 'stages': 'stages', + 'revocation_status': 'revocationStatus' + } + + self._certificate_id = None + self._serial_number = None + self._time_created = None + self._version_number = None + self._issuer_ca_version_number = None + self._version_name = None + self._subject_alternative_names = None + self._time_of_deletion = None + self._validity = None + self._stages = None + self._revocation_status = None + + @property + def certificate_id(self): + """ + **[Required]** Gets the certificate_id of this CertificateVersion. + The OCID of the certificate. + + + :return: The certificate_id of this CertificateVersion. + :rtype: str + """ + return self._certificate_id + + @certificate_id.setter + def certificate_id(self, certificate_id): + """ + Sets the certificate_id of this CertificateVersion. + The OCID of the certificate. + + + :param certificate_id: The certificate_id of this CertificateVersion. + :type: str + """ + self._certificate_id = certificate_id + + @property + def serial_number(self): + """ + Gets the serial_number of this CertificateVersion. + A unique certificate identifier used in certificate revocation tracking, formatted as octets. + Example: `03 AC FC FA CC B3 CB 02 B8 F8 DE F5 85 E7 7B FF` + + + :return: The serial_number of this CertificateVersion. + :rtype: str + """ + return self._serial_number + + @serial_number.setter + def serial_number(self, serial_number): + """ + Sets the serial_number of this CertificateVersion. + A unique certificate identifier used in certificate revocation tracking, formatted as octets. + Example: `03 AC FC FA CC B3 CB 02 B8 F8 DE F5 85 E7 7B FF` + + + :param serial_number: The serial_number of this CertificateVersion. + :type: str + """ + self._serial_number = serial_number + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this CertificateVersion. + A optional property indicating when the certificate version was created, expressed in `RFC 3339`__ timestamp format. + Example: `2019-04-03T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_created of this CertificateVersion. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this CertificateVersion. + A optional property indicating when the certificate version was created, expressed in `RFC 3339`__ timestamp format. + Example: `2019-04-03T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_created: The time_created of this CertificateVersion. + :type: datetime + """ + self._time_created = time_created + + @property + def version_number(self): + """ + **[Required]** Gets the version_number of this CertificateVersion. + The version number of the certificate. + + + :return: The version_number of this CertificateVersion. + :rtype: int + """ + return self._version_number + + @version_number.setter + def version_number(self, version_number): + """ + Sets the version_number of this CertificateVersion. + The version number of the certificate. + + + :param version_number: The version_number of this CertificateVersion. + :type: int + """ + self._version_number = version_number + + @property + def issuer_ca_version_number(self): + """ + Gets the issuer_ca_version_number of this CertificateVersion. + The version number of the issuing certificate authority (CA). + + + :return: The issuer_ca_version_number of this CertificateVersion. + :rtype: int + """ + return self._issuer_ca_version_number + + @issuer_ca_version_number.setter + def issuer_ca_version_number(self, issuer_ca_version_number): + """ + Sets the issuer_ca_version_number of this CertificateVersion. + The version number of the issuing certificate authority (CA). + + + :param issuer_ca_version_number: The issuer_ca_version_number of this CertificateVersion. + :type: int + """ + self._issuer_ca_version_number = issuer_ca_version_number + + @property + def version_name(self): + """ + Gets the version_name of this CertificateVersion. + The name of the certificate version. When the value is not null, a name is unique across versions of a given certificate. + + + :return: The version_name of this CertificateVersion. + :rtype: str + """ + return self._version_name + + @version_name.setter + def version_name(self, version_name): + """ + Sets the version_name of this CertificateVersion. + The name of the certificate version. When the value is not null, a name is unique across versions of a given certificate. + + + :param version_name: The version_name of this CertificateVersion. + :type: str + """ + self._version_name = version_name + + @property + def subject_alternative_names(self): + """ + Gets the subject_alternative_names of this CertificateVersion. + A list of subject alternative names. + + + :return: The subject_alternative_names of this CertificateVersion. + :rtype: list[oci.certificates_management.models.CertificateSubjectAlternativeName] + """ + return self._subject_alternative_names + + @subject_alternative_names.setter + def subject_alternative_names(self, subject_alternative_names): + """ + Sets the subject_alternative_names of this CertificateVersion. + A list of subject alternative names. + + + :param subject_alternative_names: The subject_alternative_names of this CertificateVersion. + :type: list[oci.certificates_management.models.CertificateSubjectAlternativeName] + """ + self._subject_alternative_names = subject_alternative_names + + @property + def time_of_deletion(self): + """ + Gets the time_of_deletion of this CertificateVersion. + An optional property indicating when to delete the certificate version, expressed in `RFC 3339`__ timestamp format. + Example: `2019-04-03T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_of_deletion of this CertificateVersion. + :rtype: datetime + """ + return self._time_of_deletion + + @time_of_deletion.setter + def time_of_deletion(self, time_of_deletion): + """ + Sets the time_of_deletion of this CertificateVersion. + An optional property indicating when to delete the certificate version, expressed in `RFC 3339`__ timestamp format. + Example: `2019-04-03T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_of_deletion: The time_of_deletion of this CertificateVersion. + :type: datetime + """ + self._time_of_deletion = time_of_deletion + + @property + def validity(self): + """ + Gets the validity of this CertificateVersion. + + :return: The validity of this CertificateVersion. + :rtype: oci.certificates_management.models.Validity + """ + return self._validity + + @validity.setter + def validity(self, validity): + """ + Sets the validity of this CertificateVersion. + + :param validity: The validity of this CertificateVersion. + :type: oci.certificates_management.models.Validity + """ + self._validity = validity + + @property + def stages(self): + """ + **[Required]** Gets the stages of this CertificateVersion. + A list of stages of this entity. + + + :return: The stages of this CertificateVersion. + :rtype: list[oci.certificates_management.models.VersionStage] + """ + return self._stages + + @stages.setter + def stages(self, stages): + """ + Sets the stages of this CertificateVersion. + A list of stages of this entity. + + + :param stages: The stages of this CertificateVersion. + :type: list[oci.certificates_management.models.VersionStage] + """ + self._stages = stages + + @property + def revocation_status(self): + """ + Gets the revocation_status of this CertificateVersion. + + :return: The revocation_status of this CertificateVersion. + :rtype: oci.certificates_management.models.RevocationStatus + """ + return self._revocation_status + + @revocation_status.setter + def revocation_status(self, revocation_status): + """ + Sets the revocation_status of this CertificateVersion. + + :param revocation_status: The revocation_status of this CertificateVersion. + :type: oci.certificates_management.models.RevocationStatus + """ + self._revocation_status = revocation_status + + 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/certificates_management/models/certificate_version_collection.py b/src/oci/certificates_management/models/certificate_version_collection.py new file mode 100644 index 0000000000..069d78c6c4 --- /dev/null +++ b/src/oci/certificates_management/models/certificate_version_collection.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 CertificateVersionCollection(object): + """ + The results of a certificate version search. This object contains certificate version summary objects and other data. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CertificateVersionCollection object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param items: + The value to assign to the items property of this CertificateVersionCollection. + :type items: list[oci.certificates_management.models.CertificateVersionSummary] + + """ + self.swagger_types = { + 'items': 'list[CertificateVersionSummary]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this CertificateVersionCollection. + A list of certificate version summary objects. + + + :return: The items of this CertificateVersionCollection. + :rtype: list[oci.certificates_management.models.CertificateVersionSummary] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this CertificateVersionCollection. + A list of certificate version summary objects. + + + :param items: The items of this CertificateVersionCollection. + :type: list[oci.certificates_management.models.CertificateVersionSummary] + """ + self._items = items + + 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/certificates_management/models/certificate_version_summary.py b/src/oci/certificates_management/models/certificate_version_summary.py new file mode 100644 index 0000000000..e93c124c76 --- /dev/null +++ b/src/oci/certificates_management/models/certificate_version_summary.py @@ -0,0 +1,386 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 CertificateVersionSummary(object): + """ + The details of the certificate version. This object does not contain the certificate contents. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CertificateVersionSummary object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param certificate_id: + The value to assign to the certificate_id property of this CertificateVersionSummary. + :type certificate_id: str + + :param serial_number: + The value to assign to the serial_number property of this CertificateVersionSummary. + :type serial_number: str + + :param time_created: + The value to assign to the time_created property of this CertificateVersionSummary. + :type time_created: datetime + + :param version_number: + The value to assign to the version_number property of this CertificateVersionSummary. + :type version_number: int + + :param issuer_ca_version_number: + The value to assign to the issuer_ca_version_number property of this CertificateVersionSummary. + :type issuer_ca_version_number: int + + :param version_name: + The value to assign to the version_name property of this CertificateVersionSummary. + :type version_name: str + + :param subject_alternative_names: + The value to assign to the subject_alternative_names property of this CertificateVersionSummary. + :type subject_alternative_names: list[oci.certificates_management.models.CertificateSubjectAlternativeName] + + :param time_of_deletion: + The value to assign to the time_of_deletion property of this CertificateVersionSummary. + :type time_of_deletion: datetime + + :param validity: + The value to assign to the validity property of this CertificateVersionSummary. + :type validity: oci.certificates_management.models.Validity + + :param stages: + The value to assign to the stages property of this CertificateVersionSummary. + :type stages: list[oci.certificates_management.models.VersionStage] + + :param revocation_status: + The value to assign to the revocation_status property of this CertificateVersionSummary. + :type revocation_status: oci.certificates_management.models.RevocationStatus + + """ + self.swagger_types = { + 'certificate_id': 'str', + 'serial_number': 'str', + 'time_created': 'datetime', + 'version_number': 'int', + 'issuer_ca_version_number': 'int', + 'version_name': 'str', + 'subject_alternative_names': 'list[CertificateSubjectAlternativeName]', + 'time_of_deletion': 'datetime', + 'validity': 'Validity', + 'stages': 'list[VersionStage]', + 'revocation_status': 'RevocationStatus' + } + + self.attribute_map = { + 'certificate_id': 'certificateId', + 'serial_number': 'serialNumber', + 'time_created': 'timeCreated', + 'version_number': 'versionNumber', + 'issuer_ca_version_number': 'issuerCaVersionNumber', + 'version_name': 'versionName', + 'subject_alternative_names': 'subjectAlternativeNames', + 'time_of_deletion': 'timeOfDeletion', + 'validity': 'validity', + 'stages': 'stages', + 'revocation_status': 'revocationStatus' + } + + self._certificate_id = None + self._serial_number = None + self._time_created = None + self._version_number = None + self._issuer_ca_version_number = None + self._version_name = None + self._subject_alternative_names = None + self._time_of_deletion = None + self._validity = None + self._stages = None + self._revocation_status = None + + @property + def certificate_id(self): + """ + **[Required]** Gets the certificate_id of this CertificateVersionSummary. + The OCID of the certificate. + + + :return: The certificate_id of this CertificateVersionSummary. + :rtype: str + """ + return self._certificate_id + + @certificate_id.setter + def certificate_id(self, certificate_id): + """ + Sets the certificate_id of this CertificateVersionSummary. + The OCID of the certificate. + + + :param certificate_id: The certificate_id of this CertificateVersionSummary. + :type: str + """ + self._certificate_id = certificate_id + + @property + def serial_number(self): + """ + Gets the serial_number of this CertificateVersionSummary. + A unique certificate identifier used in certificate revocation tracking, formatted as octets. + Example: `03 AC FC FA CC B3 CB 02 B8 F8 DE F5 85 E7 7B FF` + + + :return: The serial_number of this CertificateVersionSummary. + :rtype: str + """ + return self._serial_number + + @serial_number.setter + def serial_number(self, serial_number): + """ + Sets the serial_number of this CertificateVersionSummary. + A unique certificate identifier used in certificate revocation tracking, formatted as octets. + Example: `03 AC FC FA CC B3 CB 02 B8 F8 DE F5 85 E7 7B FF` + + + :param serial_number: The serial_number of this CertificateVersionSummary. + :type: str + """ + self._serial_number = serial_number + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this CertificateVersionSummary. + A optional property indicating the time when the certificate version was created, expressed in `RFC 3339`__ timestamp format. + Example: `2019-04-03T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_created of this CertificateVersionSummary. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this CertificateVersionSummary. + A optional property indicating the time when the certificate version was created, expressed in `RFC 3339`__ timestamp format. + Example: `2019-04-03T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_created: The time_created of this CertificateVersionSummary. + :type: datetime + """ + self._time_created = time_created + + @property + def version_number(self): + """ + **[Required]** Gets the version_number of this CertificateVersionSummary. + The version number of the certificate. + + + :return: The version_number of this CertificateVersionSummary. + :rtype: int + """ + return self._version_number + + @version_number.setter + def version_number(self, version_number): + """ + Sets the version_number of this CertificateVersionSummary. + The version number of the certificate. + + + :param version_number: The version_number of this CertificateVersionSummary. + :type: int + """ + self._version_number = version_number + + @property + def issuer_ca_version_number(self): + """ + Gets the issuer_ca_version_number of this CertificateVersionSummary. + The version number of the issuing certificate authority (CA). + + + :return: The issuer_ca_version_number of this CertificateVersionSummary. + :rtype: int + """ + return self._issuer_ca_version_number + + @issuer_ca_version_number.setter + def issuer_ca_version_number(self, issuer_ca_version_number): + """ + Sets the issuer_ca_version_number of this CertificateVersionSummary. + The version number of the issuing certificate authority (CA). + + + :param issuer_ca_version_number: The issuer_ca_version_number of this CertificateVersionSummary. + :type: int + """ + self._issuer_ca_version_number = issuer_ca_version_number + + @property + def version_name(self): + """ + Gets the version_name of this CertificateVersionSummary. + The name of the certificate version. When the value is not null, a name is unique across versions of a given certificate. + + + :return: The version_name of this CertificateVersionSummary. + :rtype: str + """ + return self._version_name + + @version_name.setter + def version_name(self, version_name): + """ + Sets the version_name of this CertificateVersionSummary. + The name of the certificate version. When the value is not null, a name is unique across versions of a given certificate. + + + :param version_name: The version_name of this CertificateVersionSummary. + :type: str + """ + self._version_name = version_name + + @property + def subject_alternative_names(self): + """ + Gets the subject_alternative_names of this CertificateVersionSummary. + A list of subject alternative names. + + + :return: The subject_alternative_names of this CertificateVersionSummary. + :rtype: list[oci.certificates_management.models.CertificateSubjectAlternativeName] + """ + return self._subject_alternative_names + + @subject_alternative_names.setter + def subject_alternative_names(self, subject_alternative_names): + """ + Sets the subject_alternative_names of this CertificateVersionSummary. + A list of subject alternative names. + + + :param subject_alternative_names: The subject_alternative_names of this CertificateVersionSummary. + :type: list[oci.certificates_management.models.CertificateSubjectAlternativeName] + """ + self._subject_alternative_names = subject_alternative_names + + @property + def time_of_deletion(self): + """ + Gets the time_of_deletion of this CertificateVersionSummary. + An optional property indicating when to delete the certificate version, expressed in `RFC 3339`__ timestamp format. + Example: `2019-04-03T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_of_deletion of this CertificateVersionSummary. + :rtype: datetime + """ + return self._time_of_deletion + + @time_of_deletion.setter + def time_of_deletion(self, time_of_deletion): + """ + Sets the time_of_deletion of this CertificateVersionSummary. + An optional property indicating when to delete the certificate version, expressed in `RFC 3339`__ timestamp format. + Example: `2019-04-03T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_of_deletion: The time_of_deletion of this CertificateVersionSummary. + :type: datetime + """ + self._time_of_deletion = time_of_deletion + + @property + def validity(self): + """ + Gets the validity of this CertificateVersionSummary. + + :return: The validity of this CertificateVersionSummary. + :rtype: oci.certificates_management.models.Validity + """ + return self._validity + + @validity.setter + def validity(self, validity): + """ + Sets the validity of this CertificateVersionSummary. + + :param validity: The validity of this CertificateVersionSummary. + :type: oci.certificates_management.models.Validity + """ + self._validity = validity + + @property + def stages(self): + """ + **[Required]** Gets the stages of this CertificateVersionSummary. + A list of rotation states for this certificate version. + + + :return: The stages of this CertificateVersionSummary. + :rtype: list[oci.certificates_management.models.VersionStage] + """ + return self._stages + + @stages.setter + def stages(self, stages): + """ + Sets the stages of this CertificateVersionSummary. + A list of rotation states for this certificate version. + + + :param stages: The stages of this CertificateVersionSummary. + :type: list[oci.certificates_management.models.VersionStage] + """ + self._stages = stages + + @property + def revocation_status(self): + """ + Gets the revocation_status of this CertificateVersionSummary. + + :return: The revocation_status of this CertificateVersionSummary. + :rtype: oci.certificates_management.models.RevocationStatus + """ + return self._revocation_status + + @revocation_status.setter + def revocation_status(self, revocation_status): + """ + Sets the revocation_status of this CertificateVersionSummary. + + :param revocation_status: The revocation_status of this CertificateVersionSummary. + :type: oci.certificates_management.models.RevocationStatus + """ + self._revocation_status = revocation_status + + 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/certificates_management/models/change_ca_bundle_compartment_details.py b/src/oci/certificates_management/models/change_ca_bundle_compartment_details.py new file mode 100644 index 0000000000..f4efb6596b --- /dev/null +++ b/src/oci/certificates_management/models/change_ca_bundle_compartment_details.py @@ -0,0 +1,76 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 ChangeCaBundleCompartmentDetails(object): + """ + The details of the request to change compartments for the CA bundle. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ChangeCaBundleCompartmentDetails 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 ChangeCaBundleCompartmentDetails. + :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 ChangeCaBundleCompartmentDetails. + The `OCID`__ of the compartment + into which the CA bundle should move. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + + + :return: The compartment_id of this ChangeCaBundleCompartmentDetails. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this ChangeCaBundleCompartmentDetails. + The `OCID`__ of the compartment + into which the CA bundle should move. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + + + :param compartment_id: The compartment_id of this ChangeCaBundleCompartmentDetails. + :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/certificates_management/models/change_certificate_authority_compartment_details.py b/src/oci/certificates_management/models/change_certificate_authority_compartment_details.py new file mode 100644 index 0000000000..0470c57d9a --- /dev/null +++ b/src/oci/certificates_management/models/change_certificate_authority_compartment_details.py @@ -0,0 +1,76 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 ChangeCertificateAuthorityCompartmentDetails(object): + """ + The details of the request to change compartments for the certificate authority (CA). + """ + + def __init__(self, **kwargs): + """ + Initializes a new ChangeCertificateAuthorityCompartmentDetails 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 ChangeCertificateAuthorityCompartmentDetails. + :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 ChangeCertificateAuthorityCompartmentDetails. + The `OCID`__ of the compartment + into which the CA should move. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + + + :return: The compartment_id of this ChangeCertificateAuthorityCompartmentDetails. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this ChangeCertificateAuthorityCompartmentDetails. + The `OCID`__ of the compartment + into which the CA should move. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + + + :param compartment_id: The compartment_id of this ChangeCertificateAuthorityCompartmentDetails. + :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/certificates_management/models/change_certificate_compartment_details.py b/src/oci/certificates_management/models/change_certificate_compartment_details.py new file mode 100644 index 0000000000..638ce1e7d1 --- /dev/null +++ b/src/oci/certificates_management/models/change_certificate_compartment_details.py @@ -0,0 +1,76 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 ChangeCertificateCompartmentDetails(object): + """ + The details of the request to change compartments for the certificate. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ChangeCertificateCompartmentDetails 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 ChangeCertificateCompartmentDetails. + :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 ChangeCertificateCompartmentDetails. + The `OCID`__ of the compartment + into which the certificate should move. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + + + :return: The compartment_id of this ChangeCertificateCompartmentDetails. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this ChangeCertificateCompartmentDetails. + The `OCID`__ of the compartment + into which the certificate should move. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + + + :param compartment_id: The compartment_id of this ChangeCertificateCompartmentDetails. + :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/certificates_management/models/create_ca_bundle_details.py b/src/oci/certificates_management/models/create_ca_bundle_details.py new file mode 100644 index 0000000000..43ebce2944 --- /dev/null +++ b/src/oci/certificates_management/models/create_ca_bundle_details.py @@ -0,0 +1,241 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 CreateCaBundleDetails(object): + """ + The details of the CA bundle that you want to create. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CreateCaBundleDetails 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 CreateCaBundleDetails. + :type name: str + + :param description: + The value to assign to the description property of this CreateCaBundleDetails. + :type description: str + + :param compartment_id: + The value to assign to the compartment_id property of this CreateCaBundleDetails. + :type compartment_id: str + + :param ca_bundle_pem: + The value to assign to the ca_bundle_pem property of this CreateCaBundleDetails. + :type ca_bundle_pem: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this CreateCaBundleDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this CreateCaBundleDetails. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'name': 'str', + 'description': 'str', + 'compartment_id': 'str', + 'ca_bundle_pem': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'name': 'name', + 'description': 'description', + 'compartment_id': 'compartmentId', + 'ca_bundle_pem': 'caBundlePem', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._name = None + self._description = None + self._compartment_id = None + self._ca_bundle_pem = None + self._freeform_tags = None + self._defined_tags = None + + @property + def name(self): + """ + **[Required]** Gets the name of this CreateCaBundleDetails. + A user-friendly name for the CA bundle. Names are unique within a compartment. Avoid entering confidential information. Valid characters include uppercase or lowercase letters, numbers, hyphens, underscores, and periods. + + + :return: The name of this CreateCaBundleDetails. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """ + Sets the name of this CreateCaBundleDetails. + A user-friendly name for the CA bundle. Names are unique within a compartment. Avoid entering confidential information. Valid characters include uppercase or lowercase letters, numbers, hyphens, underscores, and periods. + + + :param name: The name of this CreateCaBundleDetails. + :type: str + """ + self._name = name + + @property + def description(self): + """ + Gets the description of this CreateCaBundleDetails. + A brief description of the CA bundle. + + + :return: The description of this CreateCaBundleDetails. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this CreateCaBundleDetails. + A brief description of the CA bundle. + + + :param description: The description of this CreateCaBundleDetails. + :type: str + """ + self._description = description + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this CreateCaBundleDetails. + The OCID of the compartment for the CA bundle. + + + :return: The compartment_id of this CreateCaBundleDetails. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this CreateCaBundleDetails. + The OCID of the compartment for the CA bundle. + + + :param compartment_id: The compartment_id of this CreateCaBundleDetails. + :type: str + """ + self._compartment_id = compartment_id + + @property + def ca_bundle_pem(self): + """ + **[Required]** Gets the ca_bundle_pem of this CreateCaBundleDetails. + Certificates (in PEM format) to include in the CA bundle. + + + :return: The ca_bundle_pem of this CreateCaBundleDetails. + :rtype: str + """ + return self._ca_bundle_pem + + @ca_bundle_pem.setter + def ca_bundle_pem(self, ca_bundle_pem): + """ + Sets the ca_bundle_pem of this CreateCaBundleDetails. + Certificates (in PEM format) to include in the CA bundle. + + + :param ca_bundle_pem: The ca_bundle_pem of this CreateCaBundleDetails. + :type: str + """ + self._ca_bundle_pem = ca_bundle_pem + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this CreateCaBundleDetails. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + For more information, see `Resource Tags`__. + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this CreateCaBundleDetails. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this CreateCaBundleDetails. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + For more information, see `Resource Tags`__. + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this CreateCaBundleDetails. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this CreateCaBundleDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. + For more information, see `Resource Tags`__. + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this CreateCaBundleDetails. + :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 CreateCaBundleDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. + For more information, see `Resource Tags`__. + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this CreateCaBundleDetails. + :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/certificates_management/models/create_certificate_authority_config_details.py b/src/oci/certificates_management/models/create_certificate_authority_config_details.py new file mode 100644 index 0000000000..3bb2db636b --- /dev/null +++ b/src/oci/certificates_management/models/create_certificate_authority_config_details.py @@ -0,0 +1,139 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 CreateCertificateAuthorityConfigDetails(object): + """ + The configuration details for creating a certificate authority (CA). + """ + + #: A constant which can be used with the config_type property of a CreateCertificateAuthorityConfigDetails. + #: This constant has a value of "ROOT_CA_GENERATED_INTERNALLY" + CONFIG_TYPE_ROOT_CA_GENERATED_INTERNALLY = "ROOT_CA_GENERATED_INTERNALLY" + + #: A constant which can be used with the config_type property of a CreateCertificateAuthorityConfigDetails. + #: This constant has a value of "SUBORDINATE_CA_ISSUED_BY_INTERNAL_CA" + CONFIG_TYPE_SUBORDINATE_CA_ISSUED_BY_INTERNAL_CA = "SUBORDINATE_CA_ISSUED_BY_INTERNAL_CA" + + def __init__(self, **kwargs): + """ + Initializes a new CreateCertificateAuthorityConfigDetails object with values from keyword arguments. This class has the following subclasses and if you are using this class as input + to a service operations then you should favor using a subclass over the base class: + + * :class:`~oci.certificates_management.models.CreateRootCaByGeneratingInternallyConfigDetails` + * :class:`~oci.certificates_management.models.CreateSubordinateCaIssuedByInternalCaConfigDetails` + + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param config_type: + The value to assign to the config_type property of this CreateCertificateAuthorityConfigDetails. + Allowed values for this property are: "ROOT_CA_GENERATED_INTERNALLY", "SUBORDINATE_CA_ISSUED_BY_INTERNAL_CA" + :type config_type: str + + :param version_name: + The value to assign to the version_name property of this CreateCertificateAuthorityConfigDetails. + :type version_name: str + + """ + self.swagger_types = { + 'config_type': 'str', + 'version_name': 'str' + } + + self.attribute_map = { + 'config_type': 'configType', + 'version_name': 'versionName' + } + + self._config_type = None + self._version_name = None + + @staticmethod + def get_subtype(object_dictionary): + """ + Given the hash representation of a subtype of this class, + use the info in the hash to return the class of the subtype. + """ + type = object_dictionary['configType'] + + if type == 'ROOT_CA_GENERATED_INTERNALLY': + return 'CreateRootCaByGeneratingInternallyConfigDetails' + + if type == 'SUBORDINATE_CA_ISSUED_BY_INTERNAL_CA': + return 'CreateSubordinateCaIssuedByInternalCaConfigDetails' + else: + return 'CreateCertificateAuthorityConfigDetails' + + @property + def config_type(self): + """ + **[Required]** Gets the config_type of this CreateCertificateAuthorityConfigDetails. + The origin of the CA. + + Allowed values for this property are: "ROOT_CA_GENERATED_INTERNALLY", "SUBORDINATE_CA_ISSUED_BY_INTERNAL_CA" + + + :return: The config_type of this CreateCertificateAuthorityConfigDetails. + :rtype: str + """ + return self._config_type + + @config_type.setter + def config_type(self, config_type): + """ + Sets the config_type of this CreateCertificateAuthorityConfigDetails. + The origin of the CA. + + + :param config_type: The config_type of this CreateCertificateAuthorityConfigDetails. + :type: str + """ + allowed_values = ["ROOT_CA_GENERATED_INTERNALLY", "SUBORDINATE_CA_ISSUED_BY_INTERNAL_CA"] + if not value_allowed_none_or_none_sentinel(config_type, allowed_values): + raise ValueError( + "Invalid value for `config_type`, must be None or one of {0}" + .format(allowed_values) + ) + self._config_type = config_type + + @property + def version_name(self): + """ + Gets the version_name of this CreateCertificateAuthorityConfigDetails. + The name of the CA version. When the value is not null, a name is unique across versions of a given CA. + + + :return: The version_name of this CreateCertificateAuthorityConfigDetails. + :rtype: str + """ + return self._version_name + + @version_name.setter + def version_name(self, version_name): + """ + Sets the version_name of this CreateCertificateAuthorityConfigDetails. + The name of the CA version. When the value is not null, a name is unique across versions of a given CA. + + + :param version_name: The version_name of this CreateCertificateAuthorityConfigDetails. + :type: str + """ + self._version_name = version_name + + 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/certificates_management/models/create_certificate_authority_details.py b/src/oci/certificates_management/models/create_certificate_authority_details.py new file mode 100644 index 0000000000..04e1124c6b --- /dev/null +++ b/src/oci/certificates_management/models/create_certificate_authority_details.py @@ -0,0 +1,314 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 CreateCertificateAuthorityDetails(object): + """ + The details for creating a certificate authority (CA). + """ + + def __init__(self, **kwargs): + """ + Initializes a new CreateCertificateAuthorityDetails 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 CreateCertificateAuthorityDetails. + :type name: str + + :param description: + The value to assign to the description property of this CreateCertificateAuthorityDetails. + :type description: str + + :param compartment_id: + The value to assign to the compartment_id property of this CreateCertificateAuthorityDetails. + :type compartment_id: str + + :param certificate_authority_rules: + The value to assign to the certificate_authority_rules property of this CreateCertificateAuthorityDetails. + :type certificate_authority_rules: list[oci.certificates_management.models.CertificateAuthorityRule] + + :param certificate_authority_config: + The value to assign to the certificate_authority_config property of this CreateCertificateAuthorityDetails. + :type certificate_authority_config: oci.certificates_management.models.CreateCertificateAuthorityConfigDetails + + :param certificate_revocation_list_details: + The value to assign to the certificate_revocation_list_details property of this CreateCertificateAuthorityDetails. + :type certificate_revocation_list_details: oci.certificates_management.models.CertificateRevocationListDetails + + :param kms_key_id: + The value to assign to the kms_key_id property of this CreateCertificateAuthorityDetails. + :type kms_key_id: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this CreateCertificateAuthorityDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this CreateCertificateAuthorityDetails. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'name': 'str', + 'description': 'str', + 'compartment_id': 'str', + 'certificate_authority_rules': 'list[CertificateAuthorityRule]', + 'certificate_authority_config': 'CreateCertificateAuthorityConfigDetails', + 'certificate_revocation_list_details': 'CertificateRevocationListDetails', + 'kms_key_id': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'name': 'name', + 'description': 'description', + 'compartment_id': 'compartmentId', + 'certificate_authority_rules': 'certificateAuthorityRules', + 'certificate_authority_config': 'certificateAuthorityConfig', + 'certificate_revocation_list_details': 'certificateRevocationListDetails', + 'kms_key_id': 'kmsKeyId', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._name = None + self._description = None + self._compartment_id = None + self._certificate_authority_rules = None + self._certificate_authority_config = None + self._certificate_revocation_list_details = None + self._kms_key_id = None + self._freeform_tags = None + self._defined_tags = None + + @property + def name(self): + """ + **[Required]** Gets the name of this CreateCertificateAuthorityDetails. + A user-friendly name for the CA. Names are unique within a compartment. Avoid entering confidential information. Valid characters include uppercase or lowercase letters, numbers, hyphens, underscores, and periods. + + + :return: The name of this CreateCertificateAuthorityDetails. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """ + Sets the name of this CreateCertificateAuthorityDetails. + A user-friendly name for the CA. Names are unique within a compartment. Avoid entering confidential information. Valid characters include uppercase or lowercase letters, numbers, hyphens, underscores, and periods. + + + :param name: The name of this CreateCertificateAuthorityDetails. + :type: str + """ + self._name = name + + @property + def description(self): + """ + Gets the description of this CreateCertificateAuthorityDetails. + A brief description of the CA. + + + :return: The description of this CreateCertificateAuthorityDetails. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this CreateCertificateAuthorityDetails. + A brief description of the CA. + + + :param description: The description of this CreateCertificateAuthorityDetails. + :type: str + """ + self._description = description + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this CreateCertificateAuthorityDetails. + The compartment in which you want to create the CA. + + + :return: The compartment_id of this CreateCertificateAuthorityDetails. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this CreateCertificateAuthorityDetails. + The compartment in which you want to create the CA. + + + :param compartment_id: The compartment_id of this CreateCertificateAuthorityDetails. + :type: str + """ + self._compartment_id = compartment_id + + @property + def certificate_authority_rules(self): + """ + Gets the certificate_authority_rules of this CreateCertificateAuthorityDetails. + A list of rules that control how the CA is used and managed. + + + :return: The certificate_authority_rules of this CreateCertificateAuthorityDetails. + :rtype: list[oci.certificates_management.models.CertificateAuthorityRule] + """ + return self._certificate_authority_rules + + @certificate_authority_rules.setter + def certificate_authority_rules(self, certificate_authority_rules): + """ + Sets the certificate_authority_rules of this CreateCertificateAuthorityDetails. + A list of rules that control how the CA is used and managed. + + + :param certificate_authority_rules: The certificate_authority_rules of this CreateCertificateAuthorityDetails. + :type: list[oci.certificates_management.models.CertificateAuthorityRule] + """ + self._certificate_authority_rules = certificate_authority_rules + + @property + def certificate_authority_config(self): + """ + **[Required]** Gets the certificate_authority_config of this CreateCertificateAuthorityDetails. + + :return: The certificate_authority_config of this CreateCertificateAuthorityDetails. + :rtype: oci.certificates_management.models.CreateCertificateAuthorityConfigDetails + """ + return self._certificate_authority_config + + @certificate_authority_config.setter + def certificate_authority_config(self, certificate_authority_config): + """ + Sets the certificate_authority_config of this CreateCertificateAuthorityDetails. + + :param certificate_authority_config: The certificate_authority_config of this CreateCertificateAuthorityDetails. + :type: oci.certificates_management.models.CreateCertificateAuthorityConfigDetails + """ + self._certificate_authority_config = certificate_authority_config + + @property + def certificate_revocation_list_details(self): + """ + Gets the certificate_revocation_list_details of this CreateCertificateAuthorityDetails. + + :return: The certificate_revocation_list_details of this CreateCertificateAuthorityDetails. + :rtype: oci.certificates_management.models.CertificateRevocationListDetails + """ + return self._certificate_revocation_list_details + + @certificate_revocation_list_details.setter + def certificate_revocation_list_details(self, certificate_revocation_list_details): + """ + Sets the certificate_revocation_list_details of this CreateCertificateAuthorityDetails. + + :param certificate_revocation_list_details: The certificate_revocation_list_details of this CreateCertificateAuthorityDetails. + :type: oci.certificates_management.models.CertificateRevocationListDetails + """ + self._certificate_revocation_list_details = certificate_revocation_list_details + + @property + def kms_key_id(self): + """ + **[Required]** Gets the kms_key_id of this CreateCertificateAuthorityDetails. + The OCID of the Oracle Cloud Infrastructure Vault key used to encrypt the CA. + + + :return: The kms_key_id of this CreateCertificateAuthorityDetails. + :rtype: str + """ + return self._kms_key_id + + @kms_key_id.setter + def kms_key_id(self, kms_key_id): + """ + Sets the kms_key_id of this CreateCertificateAuthorityDetails. + The OCID of the Oracle Cloud Infrastructure Vault key used to encrypt the CA. + + + :param kms_key_id: The kms_key_id of this CreateCertificateAuthorityDetails. + :type: str + """ + self._kms_key_id = kms_key_id + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this CreateCertificateAuthorityDetails. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + Example: `{\"bar-key\": \"value\"}` + + + :return: The freeform_tags of this CreateCertificateAuthorityDetails. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this CreateCertificateAuthorityDetails. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + Example: `{\"bar-key\": \"value\"}` + + + :param freeform_tags: The freeform_tags of this CreateCertificateAuthorityDetails. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this CreateCertificateAuthorityDetails. + Usage of predefined tag keys. These predefined keys are scoped to namespaces. + Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + + :return: The defined_tags of this CreateCertificateAuthorityDetails. + :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 CreateCertificateAuthorityDetails. + Usage of predefined tag keys. These predefined keys are scoped to namespaces. + Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + + :param defined_tags: The defined_tags of this CreateCertificateAuthorityDetails. + :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/certificates_management/models/create_certificate_by_importing_config_details.py b/src/oci/certificates_management/models/create_certificate_by_importing_config_details.py new file mode 100644 index 0000000000..6b2ecb8624 --- /dev/null +++ b/src/oci/certificates_management/models/create_certificate_by_importing_config_details.py @@ -0,0 +1,180 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .create_certificate_config_details import CreateCertificateConfigDetails +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 CreateCertificateByImportingConfigDetails(CreateCertificateConfigDetails): + """ + The details of the configuration for creating a certificate based on the keys from an imported certificate. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CreateCertificateByImportingConfigDetails object with values from keyword arguments. The default value of the :py:attr:`~oci.certificates_management.models.CreateCertificateByImportingConfigDetails.config_type` attribute + of this class is ``IMPORTED`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param config_type: + The value to assign to the config_type property of this CreateCertificateByImportingConfigDetails. + Allowed values for this property are: "ISSUED_BY_INTERNAL_CA", "MANAGED_EXTERNALLY_ISSUED_BY_INTERNAL_CA", "IMPORTED" + :type config_type: str + + :param version_name: + The value to assign to the version_name property of this CreateCertificateByImportingConfigDetails. + :type version_name: str + + :param cert_chain_pem: + The value to assign to the cert_chain_pem property of this CreateCertificateByImportingConfigDetails. + :type cert_chain_pem: str + + :param private_key_pem: + The value to assign to the private_key_pem property of this CreateCertificateByImportingConfigDetails. + :type private_key_pem: str + + :param certificate_pem: + The value to assign to the certificate_pem property of this CreateCertificateByImportingConfigDetails. + :type certificate_pem: str + + :param private_key_pem_passphrase: + The value to assign to the private_key_pem_passphrase property of this CreateCertificateByImportingConfigDetails. + :type private_key_pem_passphrase: str + + """ + self.swagger_types = { + 'config_type': 'str', + 'version_name': 'str', + 'cert_chain_pem': 'str', + 'private_key_pem': 'str', + 'certificate_pem': 'str', + 'private_key_pem_passphrase': 'str' + } + + self.attribute_map = { + 'config_type': 'configType', + 'version_name': 'versionName', + 'cert_chain_pem': 'certChainPem', + 'private_key_pem': 'privateKeyPem', + 'certificate_pem': 'certificatePem', + 'private_key_pem_passphrase': 'privateKeyPemPassphrase' + } + + self._config_type = None + self._version_name = None + self._cert_chain_pem = None + self._private_key_pem = None + self._certificate_pem = None + self._private_key_pem_passphrase = None + self._config_type = 'IMPORTED' + + @property + def cert_chain_pem(self): + """ + **[Required]** Gets the cert_chain_pem of this CreateCertificateByImportingConfigDetails. + The certificate chain (in PEM format) for the imported certificate. + + + :return: The cert_chain_pem of this CreateCertificateByImportingConfigDetails. + :rtype: str + """ + return self._cert_chain_pem + + @cert_chain_pem.setter + def cert_chain_pem(self, cert_chain_pem): + """ + Sets the cert_chain_pem of this CreateCertificateByImportingConfigDetails. + The certificate chain (in PEM format) for the imported certificate. + + + :param cert_chain_pem: The cert_chain_pem of this CreateCertificateByImportingConfigDetails. + :type: str + """ + self._cert_chain_pem = cert_chain_pem + + @property + def private_key_pem(self): + """ + **[Required]** Gets the private_key_pem of this CreateCertificateByImportingConfigDetails. + The private key (in PEM format) for the imported certificate. + + + :return: The private_key_pem of this CreateCertificateByImportingConfigDetails. + :rtype: str + """ + return self._private_key_pem + + @private_key_pem.setter + def private_key_pem(self, private_key_pem): + """ + Sets the private_key_pem of this CreateCertificateByImportingConfigDetails. + The private key (in PEM format) for the imported certificate. + + + :param private_key_pem: The private_key_pem of this CreateCertificateByImportingConfigDetails. + :type: str + """ + self._private_key_pem = private_key_pem + + @property + def certificate_pem(self): + """ + **[Required]** Gets the certificate_pem of this CreateCertificateByImportingConfigDetails. + The certificate (in PEM format) for the imported certificate. + + + :return: The certificate_pem of this CreateCertificateByImportingConfigDetails. + :rtype: str + """ + return self._certificate_pem + + @certificate_pem.setter + def certificate_pem(self, certificate_pem): + """ + Sets the certificate_pem of this CreateCertificateByImportingConfigDetails. + The certificate (in PEM format) for the imported certificate. + + + :param certificate_pem: The certificate_pem of this CreateCertificateByImportingConfigDetails. + :type: str + """ + self._certificate_pem = certificate_pem + + @property + def private_key_pem_passphrase(self): + """ + Gets the private_key_pem_passphrase of this CreateCertificateByImportingConfigDetails. + An optional passphrase for the private key. + + + :return: The private_key_pem_passphrase of this CreateCertificateByImportingConfigDetails. + :rtype: str + """ + return self._private_key_pem_passphrase + + @private_key_pem_passphrase.setter + def private_key_pem_passphrase(self, private_key_pem_passphrase): + """ + Sets the private_key_pem_passphrase of this CreateCertificateByImportingConfigDetails. + An optional passphrase for the private key. + + + :param private_key_pem_passphrase: The private_key_pem_passphrase of this CreateCertificateByImportingConfigDetails. + :type: str + """ + self._private_key_pem_passphrase = private_key_pem_passphrase + + 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/certificates_management/models/create_certificate_config_details.py b/src/oci/certificates_management/models/create_certificate_config_details.py new file mode 100644 index 0000000000..d0a8c6a8b6 --- /dev/null +++ b/src/oci/certificates_management/models/create_certificate_config_details.py @@ -0,0 +1,147 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 CreateCertificateConfigDetails(object): + """ + The details of the contents of the certificate and certificate metadata. + """ + + #: A constant which can be used with the config_type property of a CreateCertificateConfigDetails. + #: This constant has a value of "ISSUED_BY_INTERNAL_CA" + CONFIG_TYPE_ISSUED_BY_INTERNAL_CA = "ISSUED_BY_INTERNAL_CA" + + #: A constant which can be used with the config_type property of a CreateCertificateConfigDetails. + #: This constant has a value of "MANAGED_EXTERNALLY_ISSUED_BY_INTERNAL_CA" + CONFIG_TYPE_MANAGED_EXTERNALLY_ISSUED_BY_INTERNAL_CA = "MANAGED_EXTERNALLY_ISSUED_BY_INTERNAL_CA" + + #: A constant which can be used with the config_type property of a CreateCertificateConfigDetails. + #: This constant has a value of "IMPORTED" + CONFIG_TYPE_IMPORTED = "IMPORTED" + + def __init__(self, **kwargs): + """ + Initializes a new CreateCertificateConfigDetails object with values from keyword arguments. This class has the following subclasses and if you are using this class as input + to a service operations then you should favor using a subclass over the base class: + + * :class:`~oci.certificates_management.models.CreateCertificateManagedExternallyIssuedByInternalCaConfigDetails` + * :class:`~oci.certificates_management.models.CreateCertificateIssuedByInternalCaConfigDetails` + * :class:`~oci.certificates_management.models.CreateCertificateByImportingConfigDetails` + + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param config_type: + The value to assign to the config_type property of this CreateCertificateConfigDetails. + Allowed values for this property are: "ISSUED_BY_INTERNAL_CA", "MANAGED_EXTERNALLY_ISSUED_BY_INTERNAL_CA", "IMPORTED" + :type config_type: str + + :param version_name: + The value to assign to the version_name property of this CreateCertificateConfigDetails. + :type version_name: str + + """ + self.swagger_types = { + 'config_type': 'str', + 'version_name': 'str' + } + + self.attribute_map = { + 'config_type': 'configType', + 'version_name': 'versionName' + } + + self._config_type = None + self._version_name = None + + @staticmethod + def get_subtype(object_dictionary): + """ + Given the hash representation of a subtype of this class, + use the info in the hash to return the class of the subtype. + """ + type = object_dictionary['configType'] + + if type == 'MANAGED_EXTERNALLY_ISSUED_BY_INTERNAL_CA': + return 'CreateCertificateManagedExternallyIssuedByInternalCaConfigDetails' + + if type == 'ISSUED_BY_INTERNAL_CA': + return 'CreateCertificateIssuedByInternalCaConfigDetails' + + if type == 'IMPORTED': + return 'CreateCertificateByImportingConfigDetails' + else: + return 'CreateCertificateConfigDetails' + + @property + def config_type(self): + """ + **[Required]** Gets the config_type of this CreateCertificateConfigDetails. + The origin of the certificate. + + Allowed values for this property are: "ISSUED_BY_INTERNAL_CA", "MANAGED_EXTERNALLY_ISSUED_BY_INTERNAL_CA", "IMPORTED" + + + :return: The config_type of this CreateCertificateConfigDetails. + :rtype: str + """ + return self._config_type + + @config_type.setter + def config_type(self, config_type): + """ + Sets the config_type of this CreateCertificateConfigDetails. + The origin of the certificate. + + + :param config_type: The config_type of this CreateCertificateConfigDetails. + :type: str + """ + allowed_values = ["ISSUED_BY_INTERNAL_CA", "MANAGED_EXTERNALLY_ISSUED_BY_INTERNAL_CA", "IMPORTED"] + if not value_allowed_none_or_none_sentinel(config_type, allowed_values): + raise ValueError( + "Invalid value for `config_type`, must be None or one of {0}" + .format(allowed_values) + ) + self._config_type = config_type + + @property + def version_name(self): + """ + Gets the version_name of this CreateCertificateConfigDetails. + A name for the certificate. When the value is not null, a name is unique across versions of a given certificate. + + + :return: The version_name of this CreateCertificateConfigDetails. + :rtype: str + """ + return self._version_name + + @version_name.setter + def version_name(self, version_name): + """ + Sets the version_name of this CreateCertificateConfigDetails. + A name for the certificate. When the value is not null, a name is unique across versions of a given certificate. + + + :param version_name: The version_name of this CreateCertificateConfigDetails. + :type: str + """ + self._version_name = version_name + + 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/certificates_management/models/create_certificate_details.py b/src/oci/certificates_management/models/create_certificate_details.py new file mode 100644 index 0000000000..c28381a66d --- /dev/null +++ b/src/oci/certificates_management/models/create_certificate_details.py @@ -0,0 +1,268 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 CreateCertificateDetails(object): + """ + The details of the certificate to create. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CreateCertificateDetails 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 CreateCertificateDetails. + :type name: str + + :param description: + The value to assign to the description property of this CreateCertificateDetails. + :type description: str + + :param compartment_id: + The value to assign to the compartment_id property of this CreateCertificateDetails. + :type compartment_id: str + + :param certificate_rules: + The value to assign to the certificate_rules property of this CreateCertificateDetails. + :type certificate_rules: list[oci.certificates_management.models.CertificateRule] + + :param certificate_config: + The value to assign to the certificate_config property of this CreateCertificateDetails. + :type certificate_config: oci.certificates_management.models.CreateCertificateConfigDetails + + :param freeform_tags: + The value to assign to the freeform_tags property of this CreateCertificateDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this CreateCertificateDetails. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'name': 'str', + 'description': 'str', + 'compartment_id': 'str', + 'certificate_rules': 'list[CertificateRule]', + 'certificate_config': 'CreateCertificateConfigDetails', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'name': 'name', + 'description': 'description', + 'compartment_id': 'compartmentId', + 'certificate_rules': 'certificateRules', + 'certificate_config': 'certificateConfig', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._name = None + self._description = None + self._compartment_id = None + self._certificate_rules = None + self._certificate_config = None + self._freeform_tags = None + self._defined_tags = None + + @property + def name(self): + """ + **[Required]** Gets the name of this CreateCertificateDetails. + A user-friendly name for the certificate. Names are unique within a compartment. Avoid entering confidential information. Valid characters are uppercase or lowercase letters, numbers, hyphens, underscores, and periods. + + + :return: The name of this CreateCertificateDetails. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """ + Sets the name of this CreateCertificateDetails. + A user-friendly name for the certificate. Names are unique within a compartment. Avoid entering confidential information. Valid characters are uppercase or lowercase letters, numbers, hyphens, underscores, and periods. + + + :param name: The name of this CreateCertificateDetails. + :type: str + """ + self._name = name + + @property + def description(self): + """ + Gets the description of this CreateCertificateDetails. + A brief description of the certificate. Avoid entering confidential information. + + + :return: The description of this CreateCertificateDetails. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this CreateCertificateDetails. + A brief description of the certificate. Avoid entering confidential information. + + + :param description: The description of this CreateCertificateDetails. + :type: str + """ + self._description = description + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this CreateCertificateDetails. + The OCID of the compartment where you want to create the certificate. + + + :return: The compartment_id of this CreateCertificateDetails. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this CreateCertificateDetails. + The OCID of the compartment where you want to create the certificate. + + + :param compartment_id: The compartment_id of this CreateCertificateDetails. + :type: str + """ + self._compartment_id = compartment_id + + @property + def certificate_rules(self): + """ + Gets the certificate_rules of this CreateCertificateDetails. + An optional list of rules that control how the certificate is used and managed. + + + :return: The certificate_rules of this CreateCertificateDetails. + :rtype: list[oci.certificates_management.models.CertificateRule] + """ + return self._certificate_rules + + @certificate_rules.setter + def certificate_rules(self, certificate_rules): + """ + Sets the certificate_rules of this CreateCertificateDetails. + An optional list of rules that control how the certificate is used and managed. + + + :param certificate_rules: The certificate_rules of this CreateCertificateDetails. + :type: list[oci.certificates_management.models.CertificateRule] + """ + self._certificate_rules = certificate_rules + + @property + def certificate_config(self): + """ + **[Required]** Gets the certificate_config of this CreateCertificateDetails. + + :return: The certificate_config of this CreateCertificateDetails. + :rtype: oci.certificates_management.models.CreateCertificateConfigDetails + """ + return self._certificate_config + + @certificate_config.setter + def certificate_config(self, certificate_config): + """ + Sets the certificate_config of this CreateCertificateDetails. + + :param certificate_config: The certificate_config of this CreateCertificateDetails. + :type: oci.certificates_management.models.CreateCertificateConfigDetails + """ + self._certificate_config = certificate_config + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this CreateCertificateDetails. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + For more information, see `Resource Tags`__. + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this CreateCertificateDetails. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this CreateCertificateDetails. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + For more information, see `Resource Tags`__. + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this CreateCertificateDetails. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this CreateCertificateDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. + For more information, see `Resource Tags`__. + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this CreateCertificateDetails. + :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 CreateCertificateDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. + For more information, see `Resource Tags`__. + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this CreateCertificateDetails. + :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/certificates_management/models/create_certificate_issued_by_internal_ca_config_details.py b/src/oci/certificates_management/models/create_certificate_issued_by_internal_ca_config_details.py new file mode 100644 index 0000000000..113e023841 --- /dev/null +++ b/src/oci/certificates_management/models/create_certificate_issued_by_internal_ca_config_details.py @@ -0,0 +1,348 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .create_certificate_config_details import CreateCertificateConfigDetails +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 CreateCertificateIssuedByInternalCaConfigDetails(CreateCertificateConfigDetails): + """ + The details of the configuration for creating an internally managed certificate which is issued by a private certificate authority (CA). + """ + + #: A constant which can be used with the certificate_profile_type property of a CreateCertificateIssuedByInternalCaConfigDetails. + #: This constant has a value of "TLS_SERVER_OR_CLIENT" + CERTIFICATE_PROFILE_TYPE_TLS_SERVER_OR_CLIENT = "TLS_SERVER_OR_CLIENT" + + #: A constant which can be used with the certificate_profile_type property of a CreateCertificateIssuedByInternalCaConfigDetails. + #: This constant has a value of "TLS_SERVER" + CERTIFICATE_PROFILE_TYPE_TLS_SERVER = "TLS_SERVER" + + #: A constant which can be used with the certificate_profile_type property of a CreateCertificateIssuedByInternalCaConfigDetails. + #: This constant has a value of "TLS_CLIENT" + CERTIFICATE_PROFILE_TYPE_TLS_CLIENT = "TLS_CLIENT" + + #: A constant which can be used with the certificate_profile_type property of a CreateCertificateIssuedByInternalCaConfigDetails. + #: This constant has a value of "TLS_CODE_SIGN" + CERTIFICATE_PROFILE_TYPE_TLS_CODE_SIGN = "TLS_CODE_SIGN" + + #: A constant which can be used with the key_algorithm property of a CreateCertificateIssuedByInternalCaConfigDetails. + #: This constant has a value of "RSA2048" + KEY_ALGORITHM_RSA2048 = "RSA2048" + + #: A constant which can be used with the key_algorithm property of a CreateCertificateIssuedByInternalCaConfigDetails. + #: This constant has a value of "RSA4096" + KEY_ALGORITHM_RSA4096 = "RSA4096" + + #: A constant which can be used with the key_algorithm property of a CreateCertificateIssuedByInternalCaConfigDetails. + #: This constant has a value of "ECDSA_P256" + KEY_ALGORITHM_ECDSA_P256 = "ECDSA_P256" + + #: A constant which can be used with the key_algorithm property of a CreateCertificateIssuedByInternalCaConfigDetails. + #: This constant has a value of "ECDSA_P384" + KEY_ALGORITHM_ECDSA_P384 = "ECDSA_P384" + + #: A constant which can be used with the signature_algorithm property of a CreateCertificateIssuedByInternalCaConfigDetails. + #: This constant has a value of "SHA256_WITH_RSA" + SIGNATURE_ALGORITHM_SHA256_WITH_RSA = "SHA256_WITH_RSA" + + #: A constant which can be used with the signature_algorithm property of a CreateCertificateIssuedByInternalCaConfigDetails. + #: This constant has a value of "SHA384_WITH_RSA" + SIGNATURE_ALGORITHM_SHA384_WITH_RSA = "SHA384_WITH_RSA" + + #: A constant which can be used with the signature_algorithm property of a CreateCertificateIssuedByInternalCaConfigDetails. + #: This constant has a value of "SHA512_WITH_RSA" + SIGNATURE_ALGORITHM_SHA512_WITH_RSA = "SHA512_WITH_RSA" + + #: A constant which can be used with the signature_algorithm property of a CreateCertificateIssuedByInternalCaConfigDetails. + #: This constant has a value of "SHA256_WITH_ECDSA" + SIGNATURE_ALGORITHM_SHA256_WITH_ECDSA = "SHA256_WITH_ECDSA" + + #: A constant which can be used with the signature_algorithm property of a CreateCertificateIssuedByInternalCaConfigDetails. + #: This constant has a value of "SHA384_WITH_ECDSA" + SIGNATURE_ALGORITHM_SHA384_WITH_ECDSA = "SHA384_WITH_ECDSA" + + #: A constant which can be used with the signature_algorithm property of a CreateCertificateIssuedByInternalCaConfigDetails. + #: This constant has a value of "SHA512_WITH_ECDSA" + SIGNATURE_ALGORITHM_SHA512_WITH_ECDSA = "SHA512_WITH_ECDSA" + + def __init__(self, **kwargs): + """ + Initializes a new CreateCertificateIssuedByInternalCaConfigDetails object with values from keyword arguments. The default value of the :py:attr:`~oci.certificates_management.models.CreateCertificateIssuedByInternalCaConfigDetails.config_type` attribute + of this class is ``ISSUED_BY_INTERNAL_CA`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param config_type: + The value to assign to the config_type property of this CreateCertificateIssuedByInternalCaConfigDetails. + Allowed values for this property are: "ISSUED_BY_INTERNAL_CA", "MANAGED_EXTERNALLY_ISSUED_BY_INTERNAL_CA", "IMPORTED" + :type config_type: str + + :param version_name: + The value to assign to the version_name property of this CreateCertificateIssuedByInternalCaConfigDetails. + :type version_name: str + + :param certificate_profile_type: + The value to assign to the certificate_profile_type property of this CreateCertificateIssuedByInternalCaConfigDetails. + Allowed values for this property are: "TLS_SERVER_OR_CLIENT", "TLS_SERVER", "TLS_CLIENT", "TLS_CODE_SIGN" + :type certificate_profile_type: str + + :param issuer_certificate_authority_id: + The value to assign to the issuer_certificate_authority_id property of this CreateCertificateIssuedByInternalCaConfigDetails. + :type issuer_certificate_authority_id: str + + :param validity: + The value to assign to the validity property of this CreateCertificateIssuedByInternalCaConfigDetails. + :type validity: oci.certificates_management.models.Validity + + :param subject: + The value to assign to the subject property of this CreateCertificateIssuedByInternalCaConfigDetails. + :type subject: oci.certificates_management.models.CertificateSubject + + :param subject_alternative_names: + The value to assign to the subject_alternative_names property of this CreateCertificateIssuedByInternalCaConfigDetails. + :type subject_alternative_names: list[oci.certificates_management.models.CertificateSubjectAlternativeName] + + :param key_algorithm: + The value to assign to the key_algorithm property of this CreateCertificateIssuedByInternalCaConfigDetails. + Allowed values for this property are: "RSA2048", "RSA4096", "ECDSA_P256", "ECDSA_P384" + :type key_algorithm: str + + :param signature_algorithm: + The value to assign to the signature_algorithm property of this CreateCertificateIssuedByInternalCaConfigDetails. + Allowed values for this property are: "SHA256_WITH_RSA", "SHA384_WITH_RSA", "SHA512_WITH_RSA", "SHA256_WITH_ECDSA", "SHA384_WITH_ECDSA", "SHA512_WITH_ECDSA" + :type signature_algorithm: str + + """ + self.swagger_types = { + 'config_type': 'str', + 'version_name': 'str', + 'certificate_profile_type': 'str', + 'issuer_certificate_authority_id': 'str', + 'validity': 'Validity', + 'subject': 'CertificateSubject', + 'subject_alternative_names': 'list[CertificateSubjectAlternativeName]', + 'key_algorithm': 'str', + 'signature_algorithm': 'str' + } + + self.attribute_map = { + 'config_type': 'configType', + 'version_name': 'versionName', + 'certificate_profile_type': 'certificateProfileType', + 'issuer_certificate_authority_id': 'issuerCertificateAuthorityId', + 'validity': 'validity', + 'subject': 'subject', + 'subject_alternative_names': 'subjectAlternativeNames', + 'key_algorithm': 'keyAlgorithm', + 'signature_algorithm': 'signatureAlgorithm' + } + + self._config_type = None + self._version_name = None + self._certificate_profile_type = None + self._issuer_certificate_authority_id = None + self._validity = None + self._subject = None + self._subject_alternative_names = None + self._key_algorithm = None + self._signature_algorithm = None + self._config_type = 'ISSUED_BY_INTERNAL_CA' + + @property + def certificate_profile_type(self): + """ + **[Required]** Gets the certificate_profile_type of this CreateCertificateIssuedByInternalCaConfigDetails. + The name of the profile used to create the certificate, which depends on the type of certificate you need. + + Allowed values for this property are: "TLS_SERVER_OR_CLIENT", "TLS_SERVER", "TLS_CLIENT", "TLS_CODE_SIGN" + + + :return: The certificate_profile_type of this CreateCertificateIssuedByInternalCaConfigDetails. + :rtype: str + """ + return self._certificate_profile_type + + @certificate_profile_type.setter + def certificate_profile_type(self, certificate_profile_type): + """ + Sets the certificate_profile_type of this CreateCertificateIssuedByInternalCaConfigDetails. + The name of the profile used to create the certificate, which depends on the type of certificate you need. + + + :param certificate_profile_type: The certificate_profile_type of this CreateCertificateIssuedByInternalCaConfigDetails. + :type: str + """ + allowed_values = ["TLS_SERVER_OR_CLIENT", "TLS_SERVER", "TLS_CLIENT", "TLS_CODE_SIGN"] + if not value_allowed_none_or_none_sentinel(certificate_profile_type, allowed_values): + raise ValueError( + "Invalid value for `certificate_profile_type`, must be None or one of {0}" + .format(allowed_values) + ) + self._certificate_profile_type = certificate_profile_type + + @property + def issuer_certificate_authority_id(self): + """ + **[Required]** Gets the issuer_certificate_authority_id of this CreateCertificateIssuedByInternalCaConfigDetails. + The OCID of the private CA. + + + :return: The issuer_certificate_authority_id of this CreateCertificateIssuedByInternalCaConfigDetails. + :rtype: str + """ + return self._issuer_certificate_authority_id + + @issuer_certificate_authority_id.setter + def issuer_certificate_authority_id(self, issuer_certificate_authority_id): + """ + Sets the issuer_certificate_authority_id of this CreateCertificateIssuedByInternalCaConfigDetails. + The OCID of the private CA. + + + :param issuer_certificate_authority_id: The issuer_certificate_authority_id of this CreateCertificateIssuedByInternalCaConfigDetails. + :type: str + """ + self._issuer_certificate_authority_id = issuer_certificate_authority_id + + @property + def validity(self): + """ + Gets the validity of this CreateCertificateIssuedByInternalCaConfigDetails. + + :return: The validity of this CreateCertificateIssuedByInternalCaConfigDetails. + :rtype: oci.certificates_management.models.Validity + """ + return self._validity + + @validity.setter + def validity(self, validity): + """ + Sets the validity of this CreateCertificateIssuedByInternalCaConfigDetails. + + :param validity: The validity of this CreateCertificateIssuedByInternalCaConfigDetails. + :type: oci.certificates_management.models.Validity + """ + self._validity = validity + + @property + def subject(self): + """ + **[Required]** Gets the subject of this CreateCertificateIssuedByInternalCaConfigDetails. + + :return: The subject of this CreateCertificateIssuedByInternalCaConfigDetails. + :rtype: oci.certificates_management.models.CertificateSubject + """ + return self._subject + + @subject.setter + def subject(self, subject): + """ + Sets the subject of this CreateCertificateIssuedByInternalCaConfigDetails. + + :param subject: The subject of this CreateCertificateIssuedByInternalCaConfigDetails. + :type: oci.certificates_management.models.CertificateSubject + """ + self._subject = subject + + @property + def subject_alternative_names(self): + """ + Gets the subject_alternative_names of this CreateCertificateIssuedByInternalCaConfigDetails. + A list of subject alternative names. + + + :return: The subject_alternative_names of this CreateCertificateIssuedByInternalCaConfigDetails. + :rtype: list[oci.certificates_management.models.CertificateSubjectAlternativeName] + """ + return self._subject_alternative_names + + @subject_alternative_names.setter + def subject_alternative_names(self, subject_alternative_names): + """ + Sets the subject_alternative_names of this CreateCertificateIssuedByInternalCaConfigDetails. + A list of subject alternative names. + + + :param subject_alternative_names: The subject_alternative_names of this CreateCertificateIssuedByInternalCaConfigDetails. + :type: list[oci.certificates_management.models.CertificateSubjectAlternativeName] + """ + self._subject_alternative_names = subject_alternative_names + + @property + def key_algorithm(self): + """ + Gets the key_algorithm of this CreateCertificateIssuedByInternalCaConfigDetails. + The algorithm to use to create key pairs. + + Allowed values for this property are: "RSA2048", "RSA4096", "ECDSA_P256", "ECDSA_P384" + + + :return: The key_algorithm of this CreateCertificateIssuedByInternalCaConfigDetails. + :rtype: str + """ + return self._key_algorithm + + @key_algorithm.setter + def key_algorithm(self, key_algorithm): + """ + Sets the key_algorithm of this CreateCertificateIssuedByInternalCaConfigDetails. + The algorithm to use to create key pairs. + + + :param key_algorithm: The key_algorithm of this CreateCertificateIssuedByInternalCaConfigDetails. + :type: str + """ + allowed_values = ["RSA2048", "RSA4096", "ECDSA_P256", "ECDSA_P384"] + if not value_allowed_none_or_none_sentinel(key_algorithm, allowed_values): + raise ValueError( + "Invalid value for `key_algorithm`, must be None or one of {0}" + .format(allowed_values) + ) + self._key_algorithm = key_algorithm + + @property + def signature_algorithm(self): + """ + Gets the signature_algorithm of this CreateCertificateIssuedByInternalCaConfigDetails. + The algorithm to use to sign the public key certificate. + + Allowed values for this property are: "SHA256_WITH_RSA", "SHA384_WITH_RSA", "SHA512_WITH_RSA", "SHA256_WITH_ECDSA", "SHA384_WITH_ECDSA", "SHA512_WITH_ECDSA" + + + :return: The signature_algorithm of this CreateCertificateIssuedByInternalCaConfigDetails. + :rtype: str + """ + return self._signature_algorithm + + @signature_algorithm.setter + def signature_algorithm(self, signature_algorithm): + """ + Sets the signature_algorithm of this CreateCertificateIssuedByInternalCaConfigDetails. + The algorithm to use to sign the public key certificate. + + + :param signature_algorithm: The signature_algorithm of this CreateCertificateIssuedByInternalCaConfigDetails. + :type: str + """ + allowed_values = ["SHA256_WITH_RSA", "SHA384_WITH_RSA", "SHA512_WITH_RSA", "SHA256_WITH_ECDSA", "SHA384_WITH_ECDSA", "SHA512_WITH_ECDSA"] + if not value_allowed_none_or_none_sentinel(signature_algorithm, allowed_values): + raise ValueError( + "Invalid value for `signature_algorithm`, must be None or one of {0}" + .format(allowed_values) + ) + self._signature_algorithm = signature_algorithm + + 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/certificates_management/models/create_certificate_managed_externally_issued_by_internal_ca_config_details.py b/src/oci/certificates_management/models/create_certificate_managed_externally_issued_by_internal_ca_config_details.py new file mode 100644 index 0000000000..956eca8729 --- /dev/null +++ b/src/oci/certificates_management/models/create_certificate_managed_externally_issued_by_internal_ca_config_details.py @@ -0,0 +1,145 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .create_certificate_config_details import CreateCertificateConfigDetails +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 CreateCertificateManagedExternallyIssuedByInternalCaConfigDetails(CreateCertificateConfigDetails): + """ + The details of the configuration for creating an externally managed certificate which is issued by a private certificate authority (CA). + """ + + def __init__(self, **kwargs): + """ + Initializes a new CreateCertificateManagedExternallyIssuedByInternalCaConfigDetails object with values from keyword arguments. The default value of the :py:attr:`~oci.certificates_management.models.CreateCertificateManagedExternallyIssuedByInternalCaConfigDetails.config_type` attribute + of this class is ``MANAGED_EXTERNALLY_ISSUED_BY_INTERNAL_CA`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param config_type: + The value to assign to the config_type property of this CreateCertificateManagedExternallyIssuedByInternalCaConfigDetails. + Allowed values for this property are: "ISSUED_BY_INTERNAL_CA", "MANAGED_EXTERNALLY_ISSUED_BY_INTERNAL_CA", "IMPORTED" + :type config_type: str + + :param version_name: + The value to assign to the version_name property of this CreateCertificateManagedExternallyIssuedByInternalCaConfigDetails. + :type version_name: str + + :param issuer_certificate_authority_id: + The value to assign to the issuer_certificate_authority_id property of this CreateCertificateManagedExternallyIssuedByInternalCaConfigDetails. + :type issuer_certificate_authority_id: str + + :param validity: + The value to assign to the validity property of this CreateCertificateManagedExternallyIssuedByInternalCaConfigDetails. + :type validity: oci.certificates_management.models.Validity + + :param csr_pem: + The value to assign to the csr_pem property of this CreateCertificateManagedExternallyIssuedByInternalCaConfigDetails. + :type csr_pem: str + + """ + self.swagger_types = { + 'config_type': 'str', + 'version_name': 'str', + 'issuer_certificate_authority_id': 'str', + 'validity': 'Validity', + 'csr_pem': 'str' + } + + self.attribute_map = { + 'config_type': 'configType', + 'version_name': 'versionName', + 'issuer_certificate_authority_id': 'issuerCertificateAuthorityId', + 'validity': 'validity', + 'csr_pem': 'csrPem' + } + + self._config_type = None + self._version_name = None + self._issuer_certificate_authority_id = None + self._validity = None + self._csr_pem = None + self._config_type = 'MANAGED_EXTERNALLY_ISSUED_BY_INTERNAL_CA' + + @property + def issuer_certificate_authority_id(self): + """ + **[Required]** Gets the issuer_certificate_authority_id of this CreateCertificateManagedExternallyIssuedByInternalCaConfigDetails. + The OCID of the private CA. + + + :return: The issuer_certificate_authority_id of this CreateCertificateManagedExternallyIssuedByInternalCaConfigDetails. + :rtype: str + """ + return self._issuer_certificate_authority_id + + @issuer_certificate_authority_id.setter + def issuer_certificate_authority_id(self, issuer_certificate_authority_id): + """ + Sets the issuer_certificate_authority_id of this CreateCertificateManagedExternallyIssuedByInternalCaConfigDetails. + The OCID of the private CA. + + + :param issuer_certificate_authority_id: The issuer_certificate_authority_id of this CreateCertificateManagedExternallyIssuedByInternalCaConfigDetails. + :type: str + """ + self._issuer_certificate_authority_id = issuer_certificate_authority_id + + @property + def validity(self): + """ + Gets the validity of this CreateCertificateManagedExternallyIssuedByInternalCaConfigDetails. + + :return: The validity of this CreateCertificateManagedExternallyIssuedByInternalCaConfigDetails. + :rtype: oci.certificates_management.models.Validity + """ + return self._validity + + @validity.setter + def validity(self, validity): + """ + Sets the validity of this CreateCertificateManagedExternallyIssuedByInternalCaConfigDetails. + + :param validity: The validity of this CreateCertificateManagedExternallyIssuedByInternalCaConfigDetails. + :type: oci.certificates_management.models.Validity + """ + self._validity = validity + + @property + def csr_pem(self): + """ + **[Required]** Gets the csr_pem of this CreateCertificateManagedExternallyIssuedByInternalCaConfigDetails. + The certificate signing request (in PEM format). + + + :return: The csr_pem of this CreateCertificateManagedExternallyIssuedByInternalCaConfigDetails. + :rtype: str + """ + return self._csr_pem + + @csr_pem.setter + def csr_pem(self, csr_pem): + """ + Sets the csr_pem of this CreateCertificateManagedExternallyIssuedByInternalCaConfigDetails. + The certificate signing request (in PEM format). + + + :param csr_pem: The csr_pem of this CreateCertificateManagedExternallyIssuedByInternalCaConfigDetails. + :type: str + """ + self._csr_pem = csr_pem + + 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/certificates_management/models/create_root_ca_by_generating_internally_config_details.py b/src/oci/certificates_management/models/create_root_ca_by_generating_internally_config_details.py new file mode 100644 index 0000000000..31fc9eefea --- /dev/null +++ b/src/oci/certificates_management/models/create_root_ca_by_generating_internally_config_details.py @@ -0,0 +1,174 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .create_certificate_authority_config_details import CreateCertificateAuthorityConfigDetails +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 CreateRootCaByGeneratingInternallyConfigDetails(CreateCertificateAuthorityConfigDetails): + """ + The details for creating a private root certificate authority (CA). + """ + + #: A constant which can be used with the signing_algorithm property of a CreateRootCaByGeneratingInternallyConfigDetails. + #: This constant has a value of "SHA256_WITH_RSA" + SIGNING_ALGORITHM_SHA256_WITH_RSA = "SHA256_WITH_RSA" + + #: A constant which can be used with the signing_algorithm property of a CreateRootCaByGeneratingInternallyConfigDetails. + #: This constant has a value of "SHA384_WITH_RSA" + SIGNING_ALGORITHM_SHA384_WITH_RSA = "SHA384_WITH_RSA" + + #: A constant which can be used with the signing_algorithm property of a CreateRootCaByGeneratingInternallyConfigDetails. + #: This constant has a value of "SHA512_WITH_RSA" + SIGNING_ALGORITHM_SHA512_WITH_RSA = "SHA512_WITH_RSA" + + #: A constant which can be used with the signing_algorithm property of a CreateRootCaByGeneratingInternallyConfigDetails. + #: This constant has a value of "SHA256_WITH_ECDSA" + SIGNING_ALGORITHM_SHA256_WITH_ECDSA = "SHA256_WITH_ECDSA" + + #: A constant which can be used with the signing_algorithm property of a CreateRootCaByGeneratingInternallyConfigDetails. + #: This constant has a value of "SHA384_WITH_ECDSA" + SIGNING_ALGORITHM_SHA384_WITH_ECDSA = "SHA384_WITH_ECDSA" + + #: A constant which can be used with the signing_algorithm property of a CreateRootCaByGeneratingInternallyConfigDetails. + #: This constant has a value of "SHA512_WITH_ECDSA" + SIGNING_ALGORITHM_SHA512_WITH_ECDSA = "SHA512_WITH_ECDSA" + + def __init__(self, **kwargs): + """ + Initializes a new CreateRootCaByGeneratingInternallyConfigDetails object with values from keyword arguments. The default value of the :py:attr:`~oci.certificates_management.models.CreateRootCaByGeneratingInternallyConfigDetails.config_type` attribute + of this class is ``ROOT_CA_GENERATED_INTERNALLY`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param config_type: + The value to assign to the config_type property of this CreateRootCaByGeneratingInternallyConfigDetails. + Allowed values for this property are: "ROOT_CA_GENERATED_INTERNALLY", "SUBORDINATE_CA_ISSUED_BY_INTERNAL_CA" + :type config_type: str + + :param version_name: + The value to assign to the version_name property of this CreateRootCaByGeneratingInternallyConfigDetails. + :type version_name: str + + :param validity: + The value to assign to the validity property of this CreateRootCaByGeneratingInternallyConfigDetails. + :type validity: oci.certificates_management.models.Validity + + :param signing_algorithm: + The value to assign to the signing_algorithm property of this CreateRootCaByGeneratingInternallyConfigDetails. + Allowed values for this property are: "SHA256_WITH_RSA", "SHA384_WITH_RSA", "SHA512_WITH_RSA", "SHA256_WITH_ECDSA", "SHA384_WITH_ECDSA", "SHA512_WITH_ECDSA" + :type signing_algorithm: str + + :param subject: + The value to assign to the subject property of this CreateRootCaByGeneratingInternallyConfigDetails. + :type subject: oci.certificates_management.models.CertificateSubject + + """ + self.swagger_types = { + 'config_type': 'str', + 'version_name': 'str', + 'validity': 'Validity', + 'signing_algorithm': 'str', + 'subject': 'CertificateSubject' + } + + self.attribute_map = { + 'config_type': 'configType', + 'version_name': 'versionName', + 'validity': 'validity', + 'signing_algorithm': 'signingAlgorithm', + 'subject': 'subject' + } + + self._config_type = None + self._version_name = None + self._validity = None + self._signing_algorithm = None + self._subject = None + self._config_type = 'ROOT_CA_GENERATED_INTERNALLY' + + @property + def validity(self): + """ + Gets the validity of this CreateRootCaByGeneratingInternallyConfigDetails. + + :return: The validity of this CreateRootCaByGeneratingInternallyConfigDetails. + :rtype: oci.certificates_management.models.Validity + """ + return self._validity + + @validity.setter + def validity(self, validity): + """ + Sets the validity of this CreateRootCaByGeneratingInternallyConfigDetails. + + :param validity: The validity of this CreateRootCaByGeneratingInternallyConfigDetails. + :type: oci.certificates_management.models.Validity + """ + self._validity = validity + + @property + def signing_algorithm(self): + """ + Gets the signing_algorithm of this CreateRootCaByGeneratingInternallyConfigDetails. + The algorithm used to sign public key certificates that the CA issues. + + Allowed values for this property are: "SHA256_WITH_RSA", "SHA384_WITH_RSA", "SHA512_WITH_RSA", "SHA256_WITH_ECDSA", "SHA384_WITH_ECDSA", "SHA512_WITH_ECDSA" + + + :return: The signing_algorithm of this CreateRootCaByGeneratingInternallyConfigDetails. + :rtype: str + """ + return self._signing_algorithm + + @signing_algorithm.setter + def signing_algorithm(self, signing_algorithm): + """ + Sets the signing_algorithm of this CreateRootCaByGeneratingInternallyConfigDetails. + The algorithm used to sign public key certificates that the CA issues. + + + :param signing_algorithm: The signing_algorithm of this CreateRootCaByGeneratingInternallyConfigDetails. + :type: str + """ + allowed_values = ["SHA256_WITH_RSA", "SHA384_WITH_RSA", "SHA512_WITH_RSA", "SHA256_WITH_ECDSA", "SHA384_WITH_ECDSA", "SHA512_WITH_ECDSA"] + if not value_allowed_none_or_none_sentinel(signing_algorithm, allowed_values): + raise ValueError( + "Invalid value for `signing_algorithm`, must be None or one of {0}" + .format(allowed_values) + ) + self._signing_algorithm = signing_algorithm + + @property + def subject(self): + """ + **[Required]** Gets the subject of this CreateRootCaByGeneratingInternallyConfigDetails. + + :return: The subject of this CreateRootCaByGeneratingInternallyConfigDetails. + :rtype: oci.certificates_management.models.CertificateSubject + """ + return self._subject + + @subject.setter + def subject(self, subject): + """ + Sets the subject of this CreateRootCaByGeneratingInternallyConfigDetails. + + :param subject: The subject of this CreateRootCaByGeneratingInternallyConfigDetails. + :type: oci.certificates_management.models.CertificateSubject + """ + self._subject = subject + + 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/certificates_management/models/create_subordinate_ca_issued_by_internal_ca_config_details.py b/src/oci/certificates_management/models/create_subordinate_ca_issued_by_internal_ca_config_details.py new file mode 100644 index 0000000000..e4f2120f58 --- /dev/null +++ b/src/oci/certificates_management/models/create_subordinate_ca_issued_by_internal_ca_config_details.py @@ -0,0 +1,205 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .create_certificate_authority_config_details import CreateCertificateAuthorityConfigDetails +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 CreateSubordinateCaIssuedByInternalCaConfigDetails(CreateCertificateAuthorityConfigDetails): + """ + The details for creating a private subordinate certificate authority (CA) which is issued by a private CA. + """ + + #: A constant which can be used with the signing_algorithm property of a CreateSubordinateCaIssuedByInternalCaConfigDetails. + #: This constant has a value of "SHA256_WITH_RSA" + SIGNING_ALGORITHM_SHA256_WITH_RSA = "SHA256_WITH_RSA" + + #: A constant which can be used with the signing_algorithm property of a CreateSubordinateCaIssuedByInternalCaConfigDetails. + #: This constant has a value of "SHA384_WITH_RSA" + SIGNING_ALGORITHM_SHA384_WITH_RSA = "SHA384_WITH_RSA" + + #: A constant which can be used with the signing_algorithm property of a CreateSubordinateCaIssuedByInternalCaConfigDetails. + #: This constant has a value of "SHA512_WITH_RSA" + SIGNING_ALGORITHM_SHA512_WITH_RSA = "SHA512_WITH_RSA" + + #: A constant which can be used with the signing_algorithm property of a CreateSubordinateCaIssuedByInternalCaConfigDetails. + #: This constant has a value of "SHA256_WITH_ECDSA" + SIGNING_ALGORITHM_SHA256_WITH_ECDSA = "SHA256_WITH_ECDSA" + + #: A constant which can be used with the signing_algorithm property of a CreateSubordinateCaIssuedByInternalCaConfigDetails. + #: This constant has a value of "SHA384_WITH_ECDSA" + SIGNING_ALGORITHM_SHA384_WITH_ECDSA = "SHA384_WITH_ECDSA" + + #: A constant which can be used with the signing_algorithm property of a CreateSubordinateCaIssuedByInternalCaConfigDetails. + #: This constant has a value of "SHA512_WITH_ECDSA" + SIGNING_ALGORITHM_SHA512_WITH_ECDSA = "SHA512_WITH_ECDSA" + + def __init__(self, **kwargs): + """ + Initializes a new CreateSubordinateCaIssuedByInternalCaConfigDetails object with values from keyword arguments. The default value of the :py:attr:`~oci.certificates_management.models.CreateSubordinateCaIssuedByInternalCaConfigDetails.config_type` attribute + of this class is ``SUBORDINATE_CA_ISSUED_BY_INTERNAL_CA`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param config_type: + The value to assign to the config_type property of this CreateSubordinateCaIssuedByInternalCaConfigDetails. + Allowed values for this property are: "ROOT_CA_GENERATED_INTERNALLY", "SUBORDINATE_CA_ISSUED_BY_INTERNAL_CA" + :type config_type: str + + :param version_name: + The value to assign to the version_name property of this CreateSubordinateCaIssuedByInternalCaConfigDetails. + :type version_name: str + + :param issuer_certificate_authority_id: + The value to assign to the issuer_certificate_authority_id property of this CreateSubordinateCaIssuedByInternalCaConfigDetails. + :type issuer_certificate_authority_id: str + + :param validity: + The value to assign to the validity property of this CreateSubordinateCaIssuedByInternalCaConfigDetails. + :type validity: oci.certificates_management.models.Validity + + :param signing_algorithm: + The value to assign to the signing_algorithm property of this CreateSubordinateCaIssuedByInternalCaConfigDetails. + Allowed values for this property are: "SHA256_WITH_RSA", "SHA384_WITH_RSA", "SHA512_WITH_RSA", "SHA256_WITH_ECDSA", "SHA384_WITH_ECDSA", "SHA512_WITH_ECDSA" + :type signing_algorithm: str + + :param subject: + The value to assign to the subject property of this CreateSubordinateCaIssuedByInternalCaConfigDetails. + :type subject: oci.certificates_management.models.CertificateSubject + + """ + self.swagger_types = { + 'config_type': 'str', + 'version_name': 'str', + 'issuer_certificate_authority_id': 'str', + 'validity': 'Validity', + 'signing_algorithm': 'str', + 'subject': 'CertificateSubject' + } + + self.attribute_map = { + 'config_type': 'configType', + 'version_name': 'versionName', + 'issuer_certificate_authority_id': 'issuerCertificateAuthorityId', + 'validity': 'validity', + 'signing_algorithm': 'signingAlgorithm', + 'subject': 'subject' + } + + self._config_type = None + self._version_name = None + self._issuer_certificate_authority_id = None + self._validity = None + self._signing_algorithm = None + self._subject = None + self._config_type = 'SUBORDINATE_CA_ISSUED_BY_INTERNAL_CA' + + @property + def issuer_certificate_authority_id(self): + """ + **[Required]** Gets the issuer_certificate_authority_id of this CreateSubordinateCaIssuedByInternalCaConfigDetails. + The OCID of the private CA. + + + :return: The issuer_certificate_authority_id of this CreateSubordinateCaIssuedByInternalCaConfigDetails. + :rtype: str + """ + return self._issuer_certificate_authority_id + + @issuer_certificate_authority_id.setter + def issuer_certificate_authority_id(self, issuer_certificate_authority_id): + """ + Sets the issuer_certificate_authority_id of this CreateSubordinateCaIssuedByInternalCaConfigDetails. + The OCID of the private CA. + + + :param issuer_certificate_authority_id: The issuer_certificate_authority_id of this CreateSubordinateCaIssuedByInternalCaConfigDetails. + :type: str + """ + self._issuer_certificate_authority_id = issuer_certificate_authority_id + + @property + def validity(self): + """ + Gets the validity of this CreateSubordinateCaIssuedByInternalCaConfigDetails. + + :return: The validity of this CreateSubordinateCaIssuedByInternalCaConfigDetails. + :rtype: oci.certificates_management.models.Validity + """ + return self._validity + + @validity.setter + def validity(self, validity): + """ + Sets the validity of this CreateSubordinateCaIssuedByInternalCaConfigDetails. + + :param validity: The validity of this CreateSubordinateCaIssuedByInternalCaConfigDetails. + :type: oci.certificates_management.models.Validity + """ + self._validity = validity + + @property + def signing_algorithm(self): + """ + Gets the signing_algorithm of this CreateSubordinateCaIssuedByInternalCaConfigDetails. + The algorithm used to sign public key certificates that the CA issues. + + Allowed values for this property are: "SHA256_WITH_RSA", "SHA384_WITH_RSA", "SHA512_WITH_RSA", "SHA256_WITH_ECDSA", "SHA384_WITH_ECDSA", "SHA512_WITH_ECDSA" + + + :return: The signing_algorithm of this CreateSubordinateCaIssuedByInternalCaConfigDetails. + :rtype: str + """ + return self._signing_algorithm + + @signing_algorithm.setter + def signing_algorithm(self, signing_algorithm): + """ + Sets the signing_algorithm of this CreateSubordinateCaIssuedByInternalCaConfigDetails. + The algorithm used to sign public key certificates that the CA issues. + + + :param signing_algorithm: The signing_algorithm of this CreateSubordinateCaIssuedByInternalCaConfigDetails. + :type: str + """ + allowed_values = ["SHA256_WITH_RSA", "SHA384_WITH_RSA", "SHA512_WITH_RSA", "SHA256_WITH_ECDSA", "SHA384_WITH_ECDSA", "SHA512_WITH_ECDSA"] + if not value_allowed_none_or_none_sentinel(signing_algorithm, allowed_values): + raise ValueError( + "Invalid value for `signing_algorithm`, must be None or one of {0}" + .format(allowed_values) + ) + self._signing_algorithm = signing_algorithm + + @property + def subject(self): + """ + **[Required]** Gets the subject of this CreateSubordinateCaIssuedByInternalCaConfigDetails. + + :return: The subject of this CreateSubordinateCaIssuedByInternalCaConfigDetails. + :rtype: oci.certificates_management.models.CertificateSubject + """ + return self._subject + + @subject.setter + def subject(self, subject): + """ + Sets the subject of this CreateSubordinateCaIssuedByInternalCaConfigDetails. + + :param subject: The subject of this CreateSubordinateCaIssuedByInternalCaConfigDetails. + :type: oci.certificates_management.models.CertificateSubject + """ + self._subject = subject + + 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/certificates_management/models/object_storage_bucket_config_details.py b/src/oci/certificates_management/models/object_storage_bucket_config_details.py new file mode 100644 index 0000000000..45d9042fe7 --- /dev/null +++ b/src/oci/certificates_management/models/object_storage_bucket_config_details.py @@ -0,0 +1,132 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 ObjectStorageBucketConfigDetails(object): + """ + The details of the Object Storage bucket configured to store the certificate revocation list (CRL). + """ + + def __init__(self, **kwargs): + """ + Initializes a new ObjectStorageBucketConfigDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param object_storage_namespace: + The value to assign to the object_storage_namespace property of this ObjectStorageBucketConfigDetails. + :type object_storage_namespace: str + + :param object_storage_bucket_name: + The value to assign to the object_storage_bucket_name property of this ObjectStorageBucketConfigDetails. + :type object_storage_bucket_name: str + + :param object_storage_object_name_format: + The value to assign to the object_storage_object_name_format property of this ObjectStorageBucketConfigDetails. + :type object_storage_object_name_format: str + + """ + self.swagger_types = { + 'object_storage_namespace': 'str', + 'object_storage_bucket_name': 'str', + 'object_storage_object_name_format': 'str' + } + + self.attribute_map = { + 'object_storage_namespace': 'objectStorageNamespace', + 'object_storage_bucket_name': 'objectStorageBucketName', + 'object_storage_object_name_format': 'objectStorageObjectNameFormat' + } + + self._object_storage_namespace = None + self._object_storage_bucket_name = None + self._object_storage_object_name_format = None + + @property + def object_storage_namespace(self): + """ + Gets the object_storage_namespace of this ObjectStorageBucketConfigDetails. + The tenancy of the bucket where the CRL is stored. + + + :return: The object_storage_namespace of this ObjectStorageBucketConfigDetails. + :rtype: str + """ + return self._object_storage_namespace + + @object_storage_namespace.setter + def object_storage_namespace(self, object_storage_namespace): + """ + Sets the object_storage_namespace of this ObjectStorageBucketConfigDetails. + The tenancy of the bucket where the CRL is stored. + + + :param object_storage_namespace: The object_storage_namespace of this ObjectStorageBucketConfigDetails. + :type: str + """ + self._object_storage_namespace = object_storage_namespace + + @property + def object_storage_bucket_name(self): + """ + **[Required]** Gets the object_storage_bucket_name of this ObjectStorageBucketConfigDetails. + The name of the bucket where the CRL is stored. + + + :return: The object_storage_bucket_name of this ObjectStorageBucketConfigDetails. + :rtype: str + """ + return self._object_storage_bucket_name + + @object_storage_bucket_name.setter + def object_storage_bucket_name(self, object_storage_bucket_name): + """ + Sets the object_storage_bucket_name of this ObjectStorageBucketConfigDetails. + The name of the bucket where the CRL is stored. + + + :param object_storage_bucket_name: The object_storage_bucket_name of this ObjectStorageBucketConfigDetails. + :type: str + """ + self._object_storage_bucket_name = object_storage_bucket_name + + @property + def object_storage_object_name_format(self): + """ + **[Required]** Gets the object_storage_object_name_format of this ObjectStorageBucketConfigDetails. + The object name in the bucket where the CRL is stored, expressed using a format where the version number of the issuing CA is inserted as part of the Object Storage object name wherever you include a pair of curly braces. This versioning scheme helps avoid collisions when new CA versions are created. For example, myCrlFileIssuedFromCAVersion{}.crl becomes myCrlFileIssuedFromCAVersion2.crl for CA version 2. + + + :return: The object_storage_object_name_format of this ObjectStorageBucketConfigDetails. + :rtype: str + """ + return self._object_storage_object_name_format + + @object_storage_object_name_format.setter + def object_storage_object_name_format(self, object_storage_object_name_format): + """ + Sets the object_storage_object_name_format of this ObjectStorageBucketConfigDetails. + The object name in the bucket where the CRL is stored, expressed using a format where the version number of the issuing CA is inserted as part of the Object Storage object name wherever you include a pair of curly braces. This versioning scheme helps avoid collisions when new CA versions are created. For example, myCrlFileIssuedFromCAVersion{}.crl becomes myCrlFileIssuedFromCAVersion2.crl for CA version 2. + + + :param object_storage_object_name_format: The object_storage_object_name_format of this ObjectStorageBucketConfigDetails. + :type: str + """ + self._object_storage_object_name_format = object_storage_object_name_format + + 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/certificates_management/models/revocation_status.py b/src/oci/certificates_management/models/revocation_status.py new file mode 100644 index 0000000000..b3e5515646 --- /dev/null +++ b/src/oci/certificates_management/models/revocation_status.py @@ -0,0 +1,147 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 RevocationStatus(object): + """ + The current revocation status of the entity. + """ + + #: A constant which can be used with the revocation_reason property of a RevocationStatus. + #: This constant has a value of "UNSPECIFIED" + REVOCATION_REASON_UNSPECIFIED = "UNSPECIFIED" + + #: A constant which can be used with the revocation_reason property of a RevocationStatus. + #: This constant has a value of "KEY_COMPROMISE" + REVOCATION_REASON_KEY_COMPROMISE = "KEY_COMPROMISE" + + #: A constant which can be used with the revocation_reason property of a RevocationStatus. + #: This constant has a value of "CA_COMPROMISE" + REVOCATION_REASON_CA_COMPROMISE = "CA_COMPROMISE" + + #: A constant which can be used with the revocation_reason property of a RevocationStatus. + #: This constant has a value of "AFFILIATION_CHANGED" + REVOCATION_REASON_AFFILIATION_CHANGED = "AFFILIATION_CHANGED" + + #: A constant which can be used with the revocation_reason property of a RevocationStatus. + #: This constant has a value of "SUPERSEDED" + REVOCATION_REASON_SUPERSEDED = "SUPERSEDED" + + #: A constant which can be used with the revocation_reason property of a RevocationStatus. + #: This constant has a value of "CESSATION_OF_OPERATION" + REVOCATION_REASON_CESSATION_OF_OPERATION = "CESSATION_OF_OPERATION" + + #: A constant which can be used with the revocation_reason property of a RevocationStatus. + #: This constant has a value of "PRIVILEGE_WITHDRAWN" + REVOCATION_REASON_PRIVILEGE_WITHDRAWN = "PRIVILEGE_WITHDRAWN" + + #: A constant which can be used with the revocation_reason property of a RevocationStatus. + #: This constant has a value of "AA_COMPROMISE" + REVOCATION_REASON_AA_COMPROMISE = "AA_COMPROMISE" + + def __init__(self, **kwargs): + """ + Initializes a new RevocationStatus object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param time_of_revocation: + The value to assign to the time_of_revocation property of this RevocationStatus. + :type time_of_revocation: datetime + + :param revocation_reason: + The value to assign to the revocation_reason property of this RevocationStatus. + Allowed values for this property are: "UNSPECIFIED", "KEY_COMPROMISE", "CA_COMPROMISE", "AFFILIATION_CHANGED", "SUPERSEDED", "CESSATION_OF_OPERATION", "PRIVILEGE_WITHDRAWN", "AA_COMPROMISE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type revocation_reason: str + + """ + self.swagger_types = { + 'time_of_revocation': 'datetime', + 'revocation_reason': 'str' + } + + self.attribute_map = { + 'time_of_revocation': 'timeOfRevocation', + 'revocation_reason': 'revocationReason' + } + + self._time_of_revocation = None + self._revocation_reason = None + + @property + def time_of_revocation(self): + """ + **[Required]** Gets the time_of_revocation of this RevocationStatus. + The time when the entity was revoked, expressed in `RFC 3339`__ timestamp format. + Example: `2019-04-03T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_of_revocation of this RevocationStatus. + :rtype: datetime + """ + return self._time_of_revocation + + @time_of_revocation.setter + def time_of_revocation(self, time_of_revocation): + """ + Sets the time_of_revocation of this RevocationStatus. + The time when the entity was revoked, expressed in `RFC 3339`__ timestamp format. + Example: `2019-04-03T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_of_revocation: The time_of_revocation of this RevocationStatus. + :type: datetime + """ + self._time_of_revocation = time_of_revocation + + @property + def revocation_reason(self): + """ + **[Required]** Gets the revocation_reason of this RevocationStatus. + The reason the certificate or certificate authority (CA) was revoked. + + Allowed values for this property are: "UNSPECIFIED", "KEY_COMPROMISE", "CA_COMPROMISE", "AFFILIATION_CHANGED", "SUPERSEDED", "CESSATION_OF_OPERATION", "PRIVILEGE_WITHDRAWN", "AA_COMPROMISE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The revocation_reason of this RevocationStatus. + :rtype: str + """ + return self._revocation_reason + + @revocation_reason.setter + def revocation_reason(self, revocation_reason): + """ + Sets the revocation_reason of this RevocationStatus. + The reason the certificate or certificate authority (CA) was revoked. + + + :param revocation_reason: The revocation_reason of this RevocationStatus. + :type: str + """ + allowed_values = ["UNSPECIFIED", "KEY_COMPROMISE", "CA_COMPROMISE", "AFFILIATION_CHANGED", "SUPERSEDED", "CESSATION_OF_OPERATION", "PRIVILEGE_WITHDRAWN", "AA_COMPROMISE"] + if not value_allowed_none_or_none_sentinel(revocation_reason, allowed_values): + revocation_reason = 'UNKNOWN_ENUM_VALUE' + self._revocation_reason = revocation_reason + + 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/certificates_management/models/revoke_certificate_authority_version_details.py b/src/oci/certificates_management/models/revoke_certificate_authority_version_details.py new file mode 100644 index 0000000000..60b09a0c6b --- /dev/null +++ b/src/oci/certificates_management/models/revoke_certificate_authority_version_details.py @@ -0,0 +1,111 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 RevokeCertificateAuthorityVersionDetails(object): + """ + The details of the request to revoke a certificate authority (CA) version. + """ + + #: A constant which can be used with the revocation_reason property of a RevokeCertificateAuthorityVersionDetails. + #: This constant has a value of "UNSPECIFIED" + REVOCATION_REASON_UNSPECIFIED = "UNSPECIFIED" + + #: A constant which can be used with the revocation_reason property of a RevokeCertificateAuthorityVersionDetails. + #: This constant has a value of "KEY_COMPROMISE" + REVOCATION_REASON_KEY_COMPROMISE = "KEY_COMPROMISE" + + #: A constant which can be used with the revocation_reason property of a RevokeCertificateAuthorityVersionDetails. + #: This constant has a value of "CA_COMPROMISE" + REVOCATION_REASON_CA_COMPROMISE = "CA_COMPROMISE" + + #: A constant which can be used with the revocation_reason property of a RevokeCertificateAuthorityVersionDetails. + #: This constant has a value of "AFFILIATION_CHANGED" + REVOCATION_REASON_AFFILIATION_CHANGED = "AFFILIATION_CHANGED" + + #: A constant which can be used with the revocation_reason property of a RevokeCertificateAuthorityVersionDetails. + #: This constant has a value of "SUPERSEDED" + REVOCATION_REASON_SUPERSEDED = "SUPERSEDED" + + #: A constant which can be used with the revocation_reason property of a RevokeCertificateAuthorityVersionDetails. + #: This constant has a value of "CESSATION_OF_OPERATION" + REVOCATION_REASON_CESSATION_OF_OPERATION = "CESSATION_OF_OPERATION" + + #: A constant which can be used with the revocation_reason property of a RevokeCertificateAuthorityVersionDetails. + #: This constant has a value of "PRIVILEGE_WITHDRAWN" + REVOCATION_REASON_PRIVILEGE_WITHDRAWN = "PRIVILEGE_WITHDRAWN" + + #: A constant which can be used with the revocation_reason property of a RevokeCertificateAuthorityVersionDetails. + #: This constant has a value of "AA_COMPROMISE" + REVOCATION_REASON_AA_COMPROMISE = "AA_COMPROMISE" + + def __init__(self, **kwargs): + """ + Initializes a new RevokeCertificateAuthorityVersionDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param revocation_reason: + The value to assign to the revocation_reason property of this RevokeCertificateAuthorityVersionDetails. + Allowed values for this property are: "UNSPECIFIED", "KEY_COMPROMISE", "CA_COMPROMISE", "AFFILIATION_CHANGED", "SUPERSEDED", "CESSATION_OF_OPERATION", "PRIVILEGE_WITHDRAWN", "AA_COMPROMISE" + :type revocation_reason: str + + """ + self.swagger_types = { + 'revocation_reason': 'str' + } + + self.attribute_map = { + 'revocation_reason': 'revocationReason' + } + + self._revocation_reason = None + + @property + def revocation_reason(self): + """ + Gets the revocation_reason of this RevokeCertificateAuthorityVersionDetails. + The reason the certificate or certificate authority was revoked. + + Allowed values for this property are: "UNSPECIFIED", "KEY_COMPROMISE", "CA_COMPROMISE", "AFFILIATION_CHANGED", "SUPERSEDED", "CESSATION_OF_OPERATION", "PRIVILEGE_WITHDRAWN", "AA_COMPROMISE" + + + :return: The revocation_reason of this RevokeCertificateAuthorityVersionDetails. + :rtype: str + """ + return self._revocation_reason + + @revocation_reason.setter + def revocation_reason(self, revocation_reason): + """ + Sets the revocation_reason of this RevokeCertificateAuthorityVersionDetails. + The reason the certificate or certificate authority was revoked. + + + :param revocation_reason: The revocation_reason of this RevokeCertificateAuthorityVersionDetails. + :type: str + """ + allowed_values = ["UNSPECIFIED", "KEY_COMPROMISE", "CA_COMPROMISE", "AFFILIATION_CHANGED", "SUPERSEDED", "CESSATION_OF_OPERATION", "PRIVILEGE_WITHDRAWN", "AA_COMPROMISE"] + if not value_allowed_none_or_none_sentinel(revocation_reason, allowed_values): + raise ValueError( + "Invalid value for `revocation_reason`, must be None or one of {0}" + .format(allowed_values) + ) + self._revocation_reason = revocation_reason + + 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/certificates_management/models/revoke_certificate_version_details.py b/src/oci/certificates_management/models/revoke_certificate_version_details.py new file mode 100644 index 0000000000..5b13226b29 --- /dev/null +++ b/src/oci/certificates_management/models/revoke_certificate_version_details.py @@ -0,0 +1,111 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 RevokeCertificateVersionDetails(object): + """ + The details for revoking a certificate version. + """ + + #: A constant which can be used with the revocation_reason property of a RevokeCertificateVersionDetails. + #: This constant has a value of "UNSPECIFIED" + REVOCATION_REASON_UNSPECIFIED = "UNSPECIFIED" + + #: A constant which can be used with the revocation_reason property of a RevokeCertificateVersionDetails. + #: This constant has a value of "KEY_COMPROMISE" + REVOCATION_REASON_KEY_COMPROMISE = "KEY_COMPROMISE" + + #: A constant which can be used with the revocation_reason property of a RevokeCertificateVersionDetails. + #: This constant has a value of "CA_COMPROMISE" + REVOCATION_REASON_CA_COMPROMISE = "CA_COMPROMISE" + + #: A constant which can be used with the revocation_reason property of a RevokeCertificateVersionDetails. + #: This constant has a value of "AFFILIATION_CHANGED" + REVOCATION_REASON_AFFILIATION_CHANGED = "AFFILIATION_CHANGED" + + #: A constant which can be used with the revocation_reason property of a RevokeCertificateVersionDetails. + #: This constant has a value of "SUPERSEDED" + REVOCATION_REASON_SUPERSEDED = "SUPERSEDED" + + #: A constant which can be used with the revocation_reason property of a RevokeCertificateVersionDetails. + #: This constant has a value of "CESSATION_OF_OPERATION" + REVOCATION_REASON_CESSATION_OF_OPERATION = "CESSATION_OF_OPERATION" + + #: A constant which can be used with the revocation_reason property of a RevokeCertificateVersionDetails. + #: This constant has a value of "PRIVILEGE_WITHDRAWN" + REVOCATION_REASON_PRIVILEGE_WITHDRAWN = "PRIVILEGE_WITHDRAWN" + + #: A constant which can be used with the revocation_reason property of a RevokeCertificateVersionDetails. + #: This constant has a value of "AA_COMPROMISE" + REVOCATION_REASON_AA_COMPROMISE = "AA_COMPROMISE" + + def __init__(self, **kwargs): + """ + Initializes a new RevokeCertificateVersionDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param revocation_reason: + The value to assign to the revocation_reason property of this RevokeCertificateVersionDetails. + Allowed values for this property are: "UNSPECIFIED", "KEY_COMPROMISE", "CA_COMPROMISE", "AFFILIATION_CHANGED", "SUPERSEDED", "CESSATION_OF_OPERATION", "PRIVILEGE_WITHDRAWN", "AA_COMPROMISE" + :type revocation_reason: str + + """ + self.swagger_types = { + 'revocation_reason': 'str' + } + + self.attribute_map = { + 'revocation_reason': 'revocationReason' + } + + self._revocation_reason = None + + @property + def revocation_reason(self): + """ + Gets the revocation_reason of this RevokeCertificateVersionDetails. + The reason that the certificate or certificate authority was revoked. + + Allowed values for this property are: "UNSPECIFIED", "KEY_COMPROMISE", "CA_COMPROMISE", "AFFILIATION_CHANGED", "SUPERSEDED", "CESSATION_OF_OPERATION", "PRIVILEGE_WITHDRAWN", "AA_COMPROMISE" + + + :return: The revocation_reason of this RevokeCertificateVersionDetails. + :rtype: str + """ + return self._revocation_reason + + @revocation_reason.setter + def revocation_reason(self, revocation_reason): + """ + Sets the revocation_reason of this RevokeCertificateVersionDetails. + The reason that the certificate or certificate authority was revoked. + + + :param revocation_reason: The revocation_reason of this RevokeCertificateVersionDetails. + :type: str + """ + allowed_values = ["UNSPECIFIED", "KEY_COMPROMISE", "CA_COMPROMISE", "AFFILIATION_CHANGED", "SUPERSEDED", "CESSATION_OF_OPERATION", "PRIVILEGE_WITHDRAWN", "AA_COMPROMISE"] + if not value_allowed_none_or_none_sentinel(revocation_reason, allowed_values): + raise ValueError( + "Invalid value for `revocation_reason`, must be None or one of {0}" + .format(allowed_values) + ) + self._revocation_reason = revocation_reason + + 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/certificates_management/models/schedule_certificate_authority_deletion_details.py b/src/oci/certificates_management/models/schedule_certificate_authority_deletion_details.py new file mode 100644 index 0000000000..3a32bf969e --- /dev/null +++ b/src/oci/certificates_management/models/schedule_certificate_authority_deletion_details.py @@ -0,0 +1,76 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 ScheduleCertificateAuthorityDeletionDetails(object): + """ + The details of the request to schedule the deletion of the specified certificate authority (CA). + """ + + def __init__(self, **kwargs): + """ + Initializes a new ScheduleCertificateAuthorityDeletionDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param time_of_deletion: + The value to assign to the time_of_deletion property of this ScheduleCertificateAuthorityDeletionDetails. + :type time_of_deletion: datetime + + """ + self.swagger_types = { + 'time_of_deletion': 'datetime' + } + + self.attribute_map = { + 'time_of_deletion': 'timeOfDeletion' + } + + self._time_of_deletion = None + + @property + def time_of_deletion(self): + """ + Gets the time_of_deletion of this ScheduleCertificateAuthorityDeletionDetails. + An optional property indicating when to delete the CA, expressed in `RFC 3339`__ timestamp format. + Example: `2019-04-03T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_of_deletion of this ScheduleCertificateAuthorityDeletionDetails. + :rtype: datetime + """ + return self._time_of_deletion + + @time_of_deletion.setter + def time_of_deletion(self, time_of_deletion): + """ + Sets the time_of_deletion of this ScheduleCertificateAuthorityDeletionDetails. + An optional property indicating when to delete the CA, expressed in `RFC 3339`__ timestamp format. + Example: `2019-04-03T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_of_deletion: The time_of_deletion of this ScheduleCertificateAuthorityDeletionDetails. + :type: datetime + """ + self._time_of_deletion = time_of_deletion + + 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/certificates_management/models/schedule_certificate_authority_version_deletion_details.py b/src/oci/certificates_management/models/schedule_certificate_authority_version_deletion_details.py new file mode 100644 index 0000000000..8858068af4 --- /dev/null +++ b/src/oci/certificates_management/models/schedule_certificate_authority_version_deletion_details.py @@ -0,0 +1,76 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 ScheduleCertificateAuthorityVersionDeletionDetails(object): + """ + The details of the request to schedule the deletion of the specified certificate authority (CA) version. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ScheduleCertificateAuthorityVersionDeletionDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param time_of_deletion: + The value to assign to the time_of_deletion property of this ScheduleCertificateAuthorityVersionDeletionDetails. + :type time_of_deletion: datetime + + """ + self.swagger_types = { + 'time_of_deletion': 'datetime' + } + + self.attribute_map = { + 'time_of_deletion': 'timeOfDeletion' + } + + self._time_of_deletion = None + + @property + def time_of_deletion(self): + """ + Gets the time_of_deletion of this ScheduleCertificateAuthorityVersionDeletionDetails. + An optional property indicating when to delete the CA version, expressed in `RFC 3339`__ timestamp format. + Example: `2019-04-03T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_of_deletion of this ScheduleCertificateAuthorityVersionDeletionDetails. + :rtype: datetime + """ + return self._time_of_deletion + + @time_of_deletion.setter + def time_of_deletion(self, time_of_deletion): + """ + Sets the time_of_deletion of this ScheduleCertificateAuthorityVersionDeletionDetails. + An optional property indicating when to delete the CA version, expressed in `RFC 3339`__ timestamp format. + Example: `2019-04-03T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_of_deletion: The time_of_deletion of this ScheduleCertificateAuthorityVersionDeletionDetails. + :type: datetime + """ + self._time_of_deletion = time_of_deletion + + 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/certificates_management/models/schedule_certificate_deletion_details.py b/src/oci/certificates_management/models/schedule_certificate_deletion_details.py new file mode 100644 index 0000000000..6fd68c7593 --- /dev/null +++ b/src/oci/certificates_management/models/schedule_certificate_deletion_details.py @@ -0,0 +1,74 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 ScheduleCertificateDeletionDetails(object): + """ + The details for scheduling the deletion of the specified certificate. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ScheduleCertificateDeletionDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param time_of_deletion: + The value to assign to the time_of_deletion property of this ScheduleCertificateDeletionDetails. + :type time_of_deletion: datetime + + """ + self.swagger_types = { + 'time_of_deletion': 'datetime' + } + + self.attribute_map = { + 'time_of_deletion': 'timeOfDeletion' + } + + self._time_of_deletion = None + + @property + def time_of_deletion(self): + """ + Gets the time_of_deletion of this ScheduleCertificateDeletionDetails. + An optional property indicating when to delete the certificate version, expressed in `RFC 3339`__ timestamp format. + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_of_deletion of this ScheduleCertificateDeletionDetails. + :rtype: datetime + """ + return self._time_of_deletion + + @time_of_deletion.setter + def time_of_deletion(self, time_of_deletion): + """ + Sets the time_of_deletion of this ScheduleCertificateDeletionDetails. + An optional property indicating when to delete the certificate version, expressed in `RFC 3339`__ timestamp format. + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_of_deletion: The time_of_deletion of this ScheduleCertificateDeletionDetails. + :type: datetime + """ + self._time_of_deletion = time_of_deletion + + 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/certificates_management/models/schedule_certificate_version_deletion_details.py b/src/oci/certificates_management/models/schedule_certificate_version_deletion_details.py new file mode 100644 index 0000000000..3bf86d9f95 --- /dev/null +++ b/src/oci/certificates_management/models/schedule_certificate_version_deletion_details.py @@ -0,0 +1,74 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 ScheduleCertificateVersionDeletionDetails(object): + """ + The details for scheduling the deletion of the specified certificate version. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ScheduleCertificateVersionDeletionDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param time_of_deletion: + The value to assign to the time_of_deletion property of this ScheduleCertificateVersionDeletionDetails. + :type time_of_deletion: datetime + + """ + self.swagger_types = { + 'time_of_deletion': 'datetime' + } + + self.attribute_map = { + 'time_of_deletion': 'timeOfDeletion' + } + + self._time_of_deletion = None + + @property + def time_of_deletion(self): + """ + Gets the time_of_deletion of this ScheduleCertificateVersionDeletionDetails. + An optional property that indicates when to delete the certificate version, expressed in `RFC 3339`__ timestamp format. + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_of_deletion of this ScheduleCertificateVersionDeletionDetails. + :rtype: datetime + """ + return self._time_of_deletion + + @time_of_deletion.setter + def time_of_deletion(self, time_of_deletion): + """ + Sets the time_of_deletion of this ScheduleCertificateVersionDeletionDetails. + An optional property that indicates when to delete the certificate version, expressed in `RFC 3339`__ timestamp format. + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_of_deletion: The time_of_deletion of this ScheduleCertificateVersionDeletionDetails. + :type: datetime + """ + self._time_of_deletion = time_of_deletion + + 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/certificates_management/models/update_ca_bundle_details.py b/src/oci/certificates_management/models/update_ca_bundle_details.py new file mode 100644 index 0000000000..c3fdf1469c --- /dev/null +++ b/src/oci/certificates_management/models/update_ca_bundle_details.py @@ -0,0 +1,179 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 UpdateCaBundleDetails(object): + """ + The details of the CA bundle to update. + """ + + def __init__(self, **kwargs): + """ + Initializes a new UpdateCaBundleDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param description: + The value to assign to the description property of this UpdateCaBundleDetails. + :type description: str + + :param ca_bundle_pem: + The value to assign to the ca_bundle_pem property of this UpdateCaBundleDetails. + :type ca_bundle_pem: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this UpdateCaBundleDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this UpdateCaBundleDetails. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'description': 'str', + 'ca_bundle_pem': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'description': 'description', + 'ca_bundle_pem': 'caBundlePem', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._description = None + self._ca_bundle_pem = None + self._freeform_tags = None + self._defined_tags = None + + @property + def description(self): + """ + Gets the description of this UpdateCaBundleDetails. + A brief description of the CA bundle. + + + :return: The description of this UpdateCaBundleDetails. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this UpdateCaBundleDetails. + A brief description of the CA bundle. + + + :param description: The description of this UpdateCaBundleDetails. + :type: str + """ + self._description = description + + @property + def ca_bundle_pem(self): + """ + Gets the ca_bundle_pem of this UpdateCaBundleDetails. + Certificates (in PEM format) to include in the CA bundle. + + + :return: The ca_bundle_pem of this UpdateCaBundleDetails. + :rtype: str + """ + return self._ca_bundle_pem + + @ca_bundle_pem.setter + def ca_bundle_pem(self, ca_bundle_pem): + """ + Sets the ca_bundle_pem of this UpdateCaBundleDetails. + Certificates (in PEM format) to include in the CA bundle. + + + :param ca_bundle_pem: The ca_bundle_pem of this UpdateCaBundleDetails. + :type: str + """ + self._ca_bundle_pem = ca_bundle_pem + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this UpdateCaBundleDetails. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + For more information, see `Resource Tags`__. + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this UpdateCaBundleDetails. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this UpdateCaBundleDetails. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + For more information, see `Resource Tags`__. + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this UpdateCaBundleDetails. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this UpdateCaBundleDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. + For more information, see `Resource Tags`__. + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this UpdateCaBundleDetails. + :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 UpdateCaBundleDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. + For more information, see `Resource Tags`__. + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this UpdateCaBundleDetails. + :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/certificates_management/models/update_certificate_authority_config_details.py b/src/oci/certificates_management/models/update_certificate_authority_config_details.py new file mode 100644 index 0000000000..d4b5dc8038 --- /dev/null +++ b/src/oci/certificates_management/models/update_certificate_authority_config_details.py @@ -0,0 +1,191 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 UpdateCertificateAuthorityConfigDetails(object): + """ + The configuration details for updating a certificate authority (CA). + """ + + #: A constant which can be used with the config_type property of a UpdateCertificateAuthorityConfigDetails. + #: This constant has a value of "ROOT_CA_GENERATED_INTERNALLY" + CONFIG_TYPE_ROOT_CA_GENERATED_INTERNALLY = "ROOT_CA_GENERATED_INTERNALLY" + + #: A constant which can be used with the config_type property of a UpdateCertificateAuthorityConfigDetails. + #: This constant has a value of "SUBORDINATE_CA_ISSUED_BY_INTERNAL_CA" + CONFIG_TYPE_SUBORDINATE_CA_ISSUED_BY_INTERNAL_CA = "SUBORDINATE_CA_ISSUED_BY_INTERNAL_CA" + + #: A constant which can be used with the stage property of a UpdateCertificateAuthorityConfigDetails. + #: This constant has a value of "CURRENT" + STAGE_CURRENT = "CURRENT" + + #: A constant which can be used with the stage property of a UpdateCertificateAuthorityConfigDetails. + #: This constant has a value of "PENDING" + STAGE_PENDING = "PENDING" + + def __init__(self, **kwargs): + """ + Initializes a new UpdateCertificateAuthorityConfigDetails object with values from keyword arguments. This class has the following subclasses and if you are using this class as input + to a service operations then you should favor using a subclass over the base class: + + * :class:`~oci.certificates_management.models.UpdateSubordinateCaIssuedByInternalCaConfigDetails` + * :class:`~oci.certificates_management.models.UpdateRootCaByGeneratingInternallyConfigDetails` + + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param config_type: + The value to assign to the config_type property of this UpdateCertificateAuthorityConfigDetails. + Allowed values for this property are: "ROOT_CA_GENERATED_INTERNALLY", "SUBORDINATE_CA_ISSUED_BY_INTERNAL_CA" + :type config_type: str + + :param version_name: + The value to assign to the version_name property of this UpdateCertificateAuthorityConfigDetails. + :type version_name: str + + :param stage: + The value to assign to the stage property of this UpdateCertificateAuthorityConfigDetails. + Allowed values for this property are: "CURRENT", "PENDING" + :type stage: str + + """ + self.swagger_types = { + 'config_type': 'str', + 'version_name': 'str', + 'stage': 'str' + } + + self.attribute_map = { + 'config_type': 'configType', + 'version_name': 'versionName', + 'stage': 'stage' + } + + self._config_type = None + self._version_name = None + self._stage = None + + @staticmethod + def get_subtype(object_dictionary): + """ + Given the hash representation of a subtype of this class, + use the info in the hash to return the class of the subtype. + """ + type = object_dictionary['configType'] + + if type == 'SUBORDINATE_CA_ISSUED_BY_INTERNAL_CA': + return 'UpdateSubordinateCaIssuedByInternalCaConfigDetails' + + if type == 'ROOT_CA_GENERATED_INTERNALLY': + return 'UpdateRootCaByGeneratingInternallyConfigDetails' + else: + return 'UpdateCertificateAuthorityConfigDetails' + + @property + def config_type(self): + """ + **[Required]** Gets the config_type of this UpdateCertificateAuthorityConfigDetails. + The origin of the CA. + + Allowed values for this property are: "ROOT_CA_GENERATED_INTERNALLY", "SUBORDINATE_CA_ISSUED_BY_INTERNAL_CA" + + + :return: The config_type of this UpdateCertificateAuthorityConfigDetails. + :rtype: str + """ + return self._config_type + + @config_type.setter + def config_type(self, config_type): + """ + Sets the config_type of this UpdateCertificateAuthorityConfigDetails. + The origin of the CA. + + + :param config_type: The config_type of this UpdateCertificateAuthorityConfigDetails. + :type: str + """ + allowed_values = ["ROOT_CA_GENERATED_INTERNALLY", "SUBORDINATE_CA_ISSUED_BY_INTERNAL_CA"] + if not value_allowed_none_or_none_sentinel(config_type, allowed_values): + raise ValueError( + "Invalid value for `config_type`, must be None or one of {0}" + .format(allowed_values) + ) + self._config_type = config_type + + @property + def version_name(self): + """ + Gets the version_name of this UpdateCertificateAuthorityConfigDetails. + The name of the CA version. When the value is not null, a name is unique across versions of a given CA. + + + :return: The version_name of this UpdateCertificateAuthorityConfigDetails. + :rtype: str + """ + return self._version_name + + @version_name.setter + def version_name(self, version_name): + """ + Sets the version_name of this UpdateCertificateAuthorityConfigDetails. + The name of the CA version. When the value is not null, a name is unique across versions of a given CA. + + + :param version_name: The version_name of this UpdateCertificateAuthorityConfigDetails. + :type: str + """ + self._version_name = version_name + + @property + def stage(self): + """ + Gets the stage of this UpdateCertificateAuthorityConfigDetails. + The rotation state of the CA. The default is `PENDING`, meaning that the CA is staged and available for use. A CA version + that you mark as `CURRENT` is currently in use, but you don't yet want to rotate it into current, active use. For example, + you might create or update a CA and mark its rotation state as `PENDING` if you haven't yet updated the certificate on the target system. + + Allowed values for this property are: "CURRENT", "PENDING" + + + :return: The stage of this UpdateCertificateAuthorityConfigDetails. + :rtype: str + """ + return self._stage + + @stage.setter + def stage(self, stage): + """ + Sets the stage of this UpdateCertificateAuthorityConfigDetails. + The rotation state of the CA. The default is `PENDING`, meaning that the CA is staged and available for use. A CA version + that you mark as `CURRENT` is currently in use, but you don't yet want to rotate it into current, active use. For example, + you might create or update a CA and mark its rotation state as `PENDING` if you haven't yet updated the certificate on the target system. + + + :param stage: The stage of this UpdateCertificateAuthorityConfigDetails. + :type: str + """ + allowed_values = ["CURRENT", "PENDING"] + if not value_allowed_none_or_none_sentinel(stage, allowed_values): + raise ValueError( + "Invalid value for `stage`, must be None or one of {0}" + .format(allowed_values) + ) + self._stage = stage + + 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/certificates_management/models/update_certificate_authority_details.py b/src/oci/certificates_management/models/update_certificate_authority_details.py new file mode 100644 index 0000000000..7f21e8117e --- /dev/null +++ b/src/oci/certificates_management/models/update_certificate_authority_details.py @@ -0,0 +1,252 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 UpdateCertificateAuthorityDetails(object): + """ + The details for updating a certificate authority (CA). + """ + + def __init__(self, **kwargs): + """ + Initializes a new UpdateCertificateAuthorityDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param description: + The value to assign to the description property of this UpdateCertificateAuthorityDetails. + :type description: str + + :param current_version_number: + The value to assign to the current_version_number property of this UpdateCertificateAuthorityDetails. + :type current_version_number: int + + :param certificate_authority_config: + The value to assign to the certificate_authority_config property of this UpdateCertificateAuthorityDetails. + :type certificate_authority_config: oci.certificates_management.models.UpdateCertificateAuthorityConfigDetails + + :param certificate_revocation_list_details: + The value to assign to the certificate_revocation_list_details property of this UpdateCertificateAuthorityDetails. + :type certificate_revocation_list_details: oci.certificates_management.models.CertificateRevocationListDetails + + :param freeform_tags: + The value to assign to the freeform_tags property of this UpdateCertificateAuthorityDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this UpdateCertificateAuthorityDetails. + :type defined_tags: dict(str, dict(str, object)) + + :param certificate_authority_rules: + The value to assign to the certificate_authority_rules property of this UpdateCertificateAuthorityDetails. + :type certificate_authority_rules: list[oci.certificates_management.models.CertificateAuthorityRule] + + """ + self.swagger_types = { + 'description': 'str', + 'current_version_number': 'int', + 'certificate_authority_config': 'UpdateCertificateAuthorityConfigDetails', + 'certificate_revocation_list_details': 'CertificateRevocationListDetails', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'certificate_authority_rules': 'list[CertificateAuthorityRule]' + } + + self.attribute_map = { + 'description': 'description', + 'current_version_number': 'currentVersionNumber', + 'certificate_authority_config': 'certificateAuthorityConfig', + 'certificate_revocation_list_details': 'certificateRevocationListDetails', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'certificate_authority_rules': 'certificateAuthorityRules' + } + + self._description = None + self._current_version_number = None + self._certificate_authority_config = None + self._certificate_revocation_list_details = None + self._freeform_tags = None + self._defined_tags = None + self._certificate_authority_rules = None + + @property + def description(self): + """ + Gets the description of this UpdateCertificateAuthorityDetails. + A brief description of the CA. + + + :return: The description of this UpdateCertificateAuthorityDetails. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this UpdateCertificateAuthorityDetails. + A brief description of the CA. + + + :param description: The description of this UpdateCertificateAuthorityDetails. + :type: str + """ + self._description = description + + @property + def current_version_number(self): + """ + Gets the current_version_number of this UpdateCertificateAuthorityDetails. + Makes this version the current version. This property cannot be updated in combination with any other properties. + + + :return: The current_version_number of this UpdateCertificateAuthorityDetails. + :rtype: int + """ + return self._current_version_number + + @current_version_number.setter + def current_version_number(self, current_version_number): + """ + Sets the current_version_number of this UpdateCertificateAuthorityDetails. + Makes this version the current version. This property cannot be updated in combination with any other properties. + + + :param current_version_number: The current_version_number of this UpdateCertificateAuthorityDetails. + :type: int + """ + self._current_version_number = current_version_number + + @property + def certificate_authority_config(self): + """ + Gets the certificate_authority_config of this UpdateCertificateAuthorityDetails. + + :return: The certificate_authority_config of this UpdateCertificateAuthorityDetails. + :rtype: oci.certificates_management.models.UpdateCertificateAuthorityConfigDetails + """ + return self._certificate_authority_config + + @certificate_authority_config.setter + def certificate_authority_config(self, certificate_authority_config): + """ + Sets the certificate_authority_config of this UpdateCertificateAuthorityDetails. + + :param certificate_authority_config: The certificate_authority_config of this UpdateCertificateAuthorityDetails. + :type: oci.certificates_management.models.UpdateCertificateAuthorityConfigDetails + """ + self._certificate_authority_config = certificate_authority_config + + @property + def certificate_revocation_list_details(self): + """ + Gets the certificate_revocation_list_details of this UpdateCertificateAuthorityDetails. + + :return: The certificate_revocation_list_details of this UpdateCertificateAuthorityDetails. + :rtype: oci.certificates_management.models.CertificateRevocationListDetails + """ + return self._certificate_revocation_list_details + + @certificate_revocation_list_details.setter + def certificate_revocation_list_details(self, certificate_revocation_list_details): + """ + Sets the certificate_revocation_list_details of this UpdateCertificateAuthorityDetails. + + :param certificate_revocation_list_details: The certificate_revocation_list_details of this UpdateCertificateAuthorityDetails. + :type: oci.certificates_management.models.CertificateRevocationListDetails + """ + self._certificate_revocation_list_details = certificate_revocation_list_details + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this UpdateCertificateAuthorityDetails. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + Example: `{\"bar-key\": \"value\"}` + + + :return: The freeform_tags of this UpdateCertificateAuthorityDetails. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this UpdateCertificateAuthorityDetails. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + Example: `{\"bar-key\": \"value\"}` + + + :param freeform_tags: The freeform_tags of this UpdateCertificateAuthorityDetails. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this UpdateCertificateAuthorityDetails. + Usage of predefined tag keys. These predefined keys are scoped to namespaces. + Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + + :return: The defined_tags of this UpdateCertificateAuthorityDetails. + :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 UpdateCertificateAuthorityDetails. + Usage of predefined tag keys. These predefined keys are scoped to namespaces. + Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + + :param defined_tags: The defined_tags of this UpdateCertificateAuthorityDetails. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + @property + def certificate_authority_rules(self): + """ + Gets the certificate_authority_rules of this UpdateCertificateAuthorityDetails. + A list of rules that control how the CA is used and managed. + + + :return: The certificate_authority_rules of this UpdateCertificateAuthorityDetails. + :rtype: list[oci.certificates_management.models.CertificateAuthorityRule] + """ + return self._certificate_authority_rules + + @certificate_authority_rules.setter + def certificate_authority_rules(self, certificate_authority_rules): + """ + Sets the certificate_authority_rules of this UpdateCertificateAuthorityDetails. + A list of rules that control how the CA is used and managed. + + + :param certificate_authority_rules: The certificate_authority_rules of this UpdateCertificateAuthorityDetails. + :type: list[oci.certificates_management.models.CertificateAuthorityRule] + """ + self._certificate_authority_rules = certificate_authority_rules + + 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/certificates_management/models/update_certificate_by_importing_config_details.py b/src/oci/certificates_management/models/update_certificate_by_importing_config_details.py new file mode 100644 index 0000000000..bc63cef055 --- /dev/null +++ b/src/oci/certificates_management/models/update_certificate_by_importing_config_details.py @@ -0,0 +1,188 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .update_certificate_config_details import UpdateCertificateConfigDetails +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 UpdateCertificateByImportingConfigDetails(UpdateCertificateConfigDetails): + """ + The details of the configuration for updating a certificate based on the keys from an imported certificate. + """ + + def __init__(self, **kwargs): + """ + Initializes a new UpdateCertificateByImportingConfigDetails object with values from keyword arguments. The default value of the :py:attr:`~oci.certificates_management.models.UpdateCertificateByImportingConfigDetails.config_type` attribute + of this class is ``IMPORTED`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param config_type: + The value to assign to the config_type property of this UpdateCertificateByImportingConfigDetails. + Allowed values for this property are: "ISSUED_BY_INTERNAL_CA", "MANAGED_EXTERNALLY_ISSUED_BY_INTERNAL_CA", "IMPORTED" + :type config_type: str + + :param version_name: + The value to assign to the version_name property of this UpdateCertificateByImportingConfigDetails. + :type version_name: str + + :param stage: + The value to assign to the stage property of this UpdateCertificateByImportingConfigDetails. + Allowed values for this property are: "CURRENT", "PENDING" + :type stage: str + + :param cert_chain_pem: + The value to assign to the cert_chain_pem property of this UpdateCertificateByImportingConfigDetails. + :type cert_chain_pem: str + + :param private_key_pem: + The value to assign to the private_key_pem property of this UpdateCertificateByImportingConfigDetails. + :type private_key_pem: str + + :param certificate_pem: + The value to assign to the certificate_pem property of this UpdateCertificateByImportingConfigDetails. + :type certificate_pem: str + + :param private_key_pem_passphrase: + The value to assign to the private_key_pem_passphrase property of this UpdateCertificateByImportingConfigDetails. + :type private_key_pem_passphrase: str + + """ + self.swagger_types = { + 'config_type': 'str', + 'version_name': 'str', + 'stage': 'str', + 'cert_chain_pem': 'str', + 'private_key_pem': 'str', + 'certificate_pem': 'str', + 'private_key_pem_passphrase': 'str' + } + + self.attribute_map = { + 'config_type': 'configType', + 'version_name': 'versionName', + 'stage': 'stage', + 'cert_chain_pem': 'certChainPem', + 'private_key_pem': 'privateKeyPem', + 'certificate_pem': 'certificatePem', + 'private_key_pem_passphrase': 'privateKeyPemPassphrase' + } + + self._config_type = None + self._version_name = None + self._stage = None + self._cert_chain_pem = None + self._private_key_pem = None + self._certificate_pem = None + self._private_key_pem_passphrase = None + self._config_type = 'IMPORTED' + + @property + def cert_chain_pem(self): + """ + **[Required]** Gets the cert_chain_pem of this UpdateCertificateByImportingConfigDetails. + The certificate chain (in PEM format) for the imported certificate. + + + :return: The cert_chain_pem of this UpdateCertificateByImportingConfigDetails. + :rtype: str + """ + return self._cert_chain_pem + + @cert_chain_pem.setter + def cert_chain_pem(self, cert_chain_pem): + """ + Sets the cert_chain_pem of this UpdateCertificateByImportingConfigDetails. + The certificate chain (in PEM format) for the imported certificate. + + + :param cert_chain_pem: The cert_chain_pem of this UpdateCertificateByImportingConfigDetails. + :type: str + """ + self._cert_chain_pem = cert_chain_pem + + @property + def private_key_pem(self): + """ + **[Required]** Gets the private_key_pem of this UpdateCertificateByImportingConfigDetails. + The private key (in PEM format) for the imported certificate. + + + :return: The private_key_pem of this UpdateCertificateByImportingConfigDetails. + :rtype: str + """ + return self._private_key_pem + + @private_key_pem.setter + def private_key_pem(self, private_key_pem): + """ + Sets the private_key_pem of this UpdateCertificateByImportingConfigDetails. + The private key (in PEM format) for the imported certificate. + + + :param private_key_pem: The private_key_pem of this UpdateCertificateByImportingConfigDetails. + :type: str + """ + self._private_key_pem = private_key_pem + + @property + def certificate_pem(self): + """ + **[Required]** Gets the certificate_pem of this UpdateCertificateByImportingConfigDetails. + The certificate (in PEM format) for the imported certificate. + + + :return: The certificate_pem of this UpdateCertificateByImportingConfigDetails. + :rtype: str + """ + return self._certificate_pem + + @certificate_pem.setter + def certificate_pem(self, certificate_pem): + """ + Sets the certificate_pem of this UpdateCertificateByImportingConfigDetails. + The certificate (in PEM format) for the imported certificate. + + + :param certificate_pem: The certificate_pem of this UpdateCertificateByImportingConfigDetails. + :type: str + """ + self._certificate_pem = certificate_pem + + @property + def private_key_pem_passphrase(self): + """ + Gets the private_key_pem_passphrase of this UpdateCertificateByImportingConfigDetails. + An optional passphrase for the private key. + + + :return: The private_key_pem_passphrase of this UpdateCertificateByImportingConfigDetails. + :rtype: str + """ + return self._private_key_pem_passphrase + + @private_key_pem_passphrase.setter + def private_key_pem_passphrase(self, private_key_pem_passphrase): + """ + Sets the private_key_pem_passphrase of this UpdateCertificateByImportingConfigDetails. + An optional passphrase for the private key. + + + :param private_key_pem_passphrase: The private_key_pem_passphrase of this UpdateCertificateByImportingConfigDetails. + :type: str + """ + self._private_key_pem_passphrase = private_key_pem_passphrase + + 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/certificates_management/models/update_certificate_config_details.py b/src/oci/certificates_management/models/update_certificate_config_details.py new file mode 100644 index 0000000000..9f25c31722 --- /dev/null +++ b/src/oci/certificates_management/models/update_certificate_config_details.py @@ -0,0 +1,199 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 UpdateCertificateConfigDetails(object): + """ + The details of the contents of the certificate and certificate metadata. + """ + + #: A constant which can be used with the config_type property of a UpdateCertificateConfigDetails. + #: This constant has a value of "ISSUED_BY_INTERNAL_CA" + CONFIG_TYPE_ISSUED_BY_INTERNAL_CA = "ISSUED_BY_INTERNAL_CA" + + #: A constant which can be used with the config_type property of a UpdateCertificateConfigDetails. + #: This constant has a value of "MANAGED_EXTERNALLY_ISSUED_BY_INTERNAL_CA" + CONFIG_TYPE_MANAGED_EXTERNALLY_ISSUED_BY_INTERNAL_CA = "MANAGED_EXTERNALLY_ISSUED_BY_INTERNAL_CA" + + #: A constant which can be used with the config_type property of a UpdateCertificateConfigDetails. + #: This constant has a value of "IMPORTED" + CONFIG_TYPE_IMPORTED = "IMPORTED" + + #: A constant which can be used with the stage property of a UpdateCertificateConfigDetails. + #: This constant has a value of "CURRENT" + STAGE_CURRENT = "CURRENT" + + #: A constant which can be used with the stage property of a UpdateCertificateConfigDetails. + #: This constant has a value of "PENDING" + STAGE_PENDING = "PENDING" + + def __init__(self, **kwargs): + """ + Initializes a new UpdateCertificateConfigDetails object with values from keyword arguments. This class has the following subclasses and if you are using this class as input + to a service operations then you should favor using a subclass over the base class: + + * :class:`~oci.certificates_management.models.UpdateCertificateByImportingConfigDetails` + * :class:`~oci.certificates_management.models.UpdateCertificateIssuedByInternalCaConfigDetails` + * :class:`~oci.certificates_management.models.UpdateCertificateManagedExternallyIssuedByInternalCaConfigDetails` + + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param config_type: + The value to assign to the config_type property of this UpdateCertificateConfigDetails. + Allowed values for this property are: "ISSUED_BY_INTERNAL_CA", "MANAGED_EXTERNALLY_ISSUED_BY_INTERNAL_CA", "IMPORTED" + :type config_type: str + + :param version_name: + The value to assign to the version_name property of this UpdateCertificateConfigDetails. + :type version_name: str + + :param stage: + The value to assign to the stage property of this UpdateCertificateConfigDetails. + Allowed values for this property are: "CURRENT", "PENDING" + :type stage: str + + """ + self.swagger_types = { + 'config_type': 'str', + 'version_name': 'str', + 'stage': 'str' + } + + self.attribute_map = { + 'config_type': 'configType', + 'version_name': 'versionName', + 'stage': 'stage' + } + + self._config_type = None + self._version_name = None + self._stage = None + + @staticmethod + def get_subtype(object_dictionary): + """ + Given the hash representation of a subtype of this class, + use the info in the hash to return the class of the subtype. + """ + type = object_dictionary['configType'] + + if type == 'IMPORTED': + return 'UpdateCertificateByImportingConfigDetails' + + if type == 'ISSUED_BY_INTERNAL_CA': + return 'UpdateCertificateIssuedByInternalCaConfigDetails' + + if type == 'MANAGED_EXTERNALLY_ISSUED_BY_INTERNAL_CA': + return 'UpdateCertificateManagedExternallyIssuedByInternalCaConfigDetails' + else: + return 'UpdateCertificateConfigDetails' + + @property + def config_type(self): + """ + **[Required]** Gets the config_type of this UpdateCertificateConfigDetails. + The origin of the certificate. + + Allowed values for this property are: "ISSUED_BY_INTERNAL_CA", "MANAGED_EXTERNALLY_ISSUED_BY_INTERNAL_CA", "IMPORTED" + + + :return: The config_type of this UpdateCertificateConfigDetails. + :rtype: str + """ + return self._config_type + + @config_type.setter + def config_type(self, config_type): + """ + Sets the config_type of this UpdateCertificateConfigDetails. + The origin of the certificate. + + + :param config_type: The config_type of this UpdateCertificateConfigDetails. + :type: str + """ + allowed_values = ["ISSUED_BY_INTERNAL_CA", "MANAGED_EXTERNALLY_ISSUED_BY_INTERNAL_CA", "IMPORTED"] + if not value_allowed_none_or_none_sentinel(config_type, allowed_values): + raise ValueError( + "Invalid value for `config_type`, must be None or one of {0}" + .format(allowed_values) + ) + self._config_type = config_type + + @property + def version_name(self): + """ + Gets the version_name of this UpdateCertificateConfigDetails. + A name for the certificate version. When the value is not null, a name is unique across versions of a given certificate. + + + :return: The version_name of this UpdateCertificateConfigDetails. + :rtype: str + """ + return self._version_name + + @version_name.setter + def version_name(self, version_name): + """ + Sets the version_name of this UpdateCertificateConfigDetails. + A name for the certificate version. When the value is not null, a name is unique across versions of a given certificate. + + + :param version_name: The version_name of this UpdateCertificateConfigDetails. + :type: str + """ + self._version_name = version_name + + @property + def stage(self): + """ + Gets the stage of this UpdateCertificateConfigDetails. + The rotation state of the certificate. The default is `CURRENT`, meaning that the certificate is currently in use. A certificate version + that you mark as `PENDING` is staged and available for use, but you don't yet want to rotate it into current, active use. For example, + you might update a certificate and mark its rotation state as `PENDING` if you haven't yet updated the certificate on the target system. + + Allowed values for this property are: "CURRENT", "PENDING" + + + :return: The stage of this UpdateCertificateConfigDetails. + :rtype: str + """ + return self._stage + + @stage.setter + def stage(self, stage): + """ + Sets the stage of this UpdateCertificateConfigDetails. + The rotation state of the certificate. The default is `CURRENT`, meaning that the certificate is currently in use. A certificate version + that you mark as `PENDING` is staged and available for use, but you don't yet want to rotate it into current, active use. For example, + you might update a certificate and mark its rotation state as `PENDING` if you haven't yet updated the certificate on the target system. + + + :param stage: The stage of this UpdateCertificateConfigDetails. + :type: str + """ + allowed_values = ["CURRENT", "PENDING"] + if not value_allowed_none_or_none_sentinel(stage, allowed_values): + raise ValueError( + "Invalid value for `stage`, must be None or one of {0}" + .format(allowed_values) + ) + self._stage = stage + + 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/certificates_management/models/update_certificate_details.py b/src/oci/certificates_management/models/update_certificate_details.py new file mode 100644 index 0000000000..7b346161af --- /dev/null +++ b/src/oci/certificates_management/models/update_certificate_details.py @@ -0,0 +1,237 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 UpdateCertificateDetails(object): + """ + The details of the certificate to update. + """ + + def __init__(self, **kwargs): + """ + Initializes a new UpdateCertificateDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param description: + The value to assign to the description property of this UpdateCertificateDetails. + :type description: str + + :param current_version_number: + The value to assign to the current_version_number property of this UpdateCertificateDetails. + :type current_version_number: int + + :param certificate_config: + The value to assign to the certificate_config property of this UpdateCertificateDetails. + :type certificate_config: oci.certificates_management.models.UpdateCertificateConfigDetails + + :param freeform_tags: + The value to assign to the freeform_tags property of this UpdateCertificateDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this UpdateCertificateDetails. + :type defined_tags: dict(str, dict(str, object)) + + :param certificate_rules: + The value to assign to the certificate_rules property of this UpdateCertificateDetails. + :type certificate_rules: list[oci.certificates_management.models.CertificateRule] + + """ + self.swagger_types = { + 'description': 'str', + 'current_version_number': 'int', + 'certificate_config': 'UpdateCertificateConfigDetails', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'certificate_rules': 'list[CertificateRule]' + } + + self.attribute_map = { + 'description': 'description', + 'current_version_number': 'currentVersionNumber', + 'certificate_config': 'certificateConfig', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'certificate_rules': 'certificateRules' + } + + self._description = None + self._current_version_number = None + self._certificate_config = None + self._freeform_tags = None + self._defined_tags = None + self._certificate_rules = None + + @property + def description(self): + """ + Gets the description of this UpdateCertificateDetails. + A brief description of the certificate. Avoid entering confidential information. + + + :return: The description of this UpdateCertificateDetails. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this UpdateCertificateDetails. + A brief description of the certificate. Avoid entering confidential information. + + + :param description: The description of this UpdateCertificateDetails. + :type: str + """ + self._description = description + + @property + def current_version_number(self): + """ + Gets the current_version_number of this UpdateCertificateDetails. + Makes this version the current version. This property cannot be updated in combination with any other properties. + + + :return: The current_version_number of this UpdateCertificateDetails. + :rtype: int + """ + return self._current_version_number + + @current_version_number.setter + def current_version_number(self, current_version_number): + """ + Sets the current_version_number of this UpdateCertificateDetails. + Makes this version the current version. This property cannot be updated in combination with any other properties. + + + :param current_version_number: The current_version_number of this UpdateCertificateDetails. + :type: int + """ + self._current_version_number = current_version_number + + @property + def certificate_config(self): + """ + Gets the certificate_config of this UpdateCertificateDetails. + + :return: The certificate_config of this UpdateCertificateDetails. + :rtype: oci.certificates_management.models.UpdateCertificateConfigDetails + """ + return self._certificate_config + + @certificate_config.setter + def certificate_config(self, certificate_config): + """ + Sets the certificate_config of this UpdateCertificateDetails. + + :param certificate_config: The certificate_config of this UpdateCertificateDetails. + :type: oci.certificates_management.models.UpdateCertificateConfigDetails + """ + self._certificate_config = certificate_config + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this UpdateCertificateDetails. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + For more information, see `Resource Tags`__. + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this UpdateCertificateDetails. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this UpdateCertificateDetails. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + For more information, see `Resource Tags`__. + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this UpdateCertificateDetails. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this UpdateCertificateDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. + For more information, see `Resource Tags`__. + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this UpdateCertificateDetails. + :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 UpdateCertificateDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. + For more information, see `Resource Tags`__. + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this UpdateCertificateDetails. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + @property + def certificate_rules(self): + """ + Gets the certificate_rules of this UpdateCertificateDetails. + An optional list of rules that control how the certificate is used and managed. + + + :return: The certificate_rules of this UpdateCertificateDetails. + :rtype: list[oci.certificates_management.models.CertificateRule] + """ + return self._certificate_rules + + @certificate_rules.setter + def certificate_rules(self, certificate_rules): + """ + Sets the certificate_rules of this UpdateCertificateDetails. + An optional list of rules that control how the certificate is used and managed. + + + :param certificate_rules: The certificate_rules of this UpdateCertificateDetails. + :type: list[oci.certificates_management.models.CertificateRule] + """ + self._certificate_rules = certificate_rules + + 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/certificates_management/models/update_certificate_issued_by_internal_ca_config_details.py b/src/oci/certificates_management/models/update_certificate_issued_by_internal_ca_config_details.py new file mode 100644 index 0000000000..5ae1b487c3 --- /dev/null +++ b/src/oci/certificates_management/models/update_certificate_issued_by_internal_ca_config_details.py @@ -0,0 +1,91 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .update_certificate_config_details import UpdateCertificateConfigDetails +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 UpdateCertificateIssuedByInternalCaConfigDetails(UpdateCertificateConfigDetails): + """ + The details for updating an internally managed certificate which is issued by a private certificate authority (CA). + """ + + def __init__(self, **kwargs): + """ + Initializes a new UpdateCertificateIssuedByInternalCaConfigDetails object with values from keyword arguments. The default value of the :py:attr:`~oci.certificates_management.models.UpdateCertificateIssuedByInternalCaConfigDetails.config_type` attribute + of this class is ``ISSUED_BY_INTERNAL_CA`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param config_type: + The value to assign to the config_type property of this UpdateCertificateIssuedByInternalCaConfigDetails. + Allowed values for this property are: "ISSUED_BY_INTERNAL_CA", "MANAGED_EXTERNALLY_ISSUED_BY_INTERNAL_CA", "IMPORTED" + :type config_type: str + + :param version_name: + The value to assign to the version_name property of this UpdateCertificateIssuedByInternalCaConfigDetails. + :type version_name: str + + :param stage: + The value to assign to the stage property of this UpdateCertificateIssuedByInternalCaConfigDetails. + Allowed values for this property are: "CURRENT", "PENDING" + :type stage: str + + :param validity: + The value to assign to the validity property of this UpdateCertificateIssuedByInternalCaConfigDetails. + :type validity: oci.certificates_management.models.Validity + + """ + self.swagger_types = { + 'config_type': 'str', + 'version_name': 'str', + 'stage': 'str', + 'validity': 'Validity' + } + + self.attribute_map = { + 'config_type': 'configType', + 'version_name': 'versionName', + 'stage': 'stage', + 'validity': 'validity' + } + + self._config_type = None + self._version_name = None + self._stage = None + self._validity = None + self._config_type = 'ISSUED_BY_INTERNAL_CA' + + @property + def validity(self): + """ + Gets the validity of this UpdateCertificateIssuedByInternalCaConfigDetails. + + :return: The validity of this UpdateCertificateIssuedByInternalCaConfigDetails. + :rtype: oci.certificates_management.models.Validity + """ + return self._validity + + @validity.setter + def validity(self, validity): + """ + Sets the validity of this UpdateCertificateIssuedByInternalCaConfigDetails. + + :param validity: The validity of this UpdateCertificateIssuedByInternalCaConfigDetails. + :type: oci.certificates_management.models.Validity + """ + self._validity = validity + + 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/certificates_management/models/update_certificate_managed_externally_issued_by_internal_ca_config_details.py b/src/oci/certificates_management/models/update_certificate_managed_externally_issued_by_internal_ca_config_details.py new file mode 100644 index 0000000000..e5d1dcff02 --- /dev/null +++ b/src/oci/certificates_management/models/update_certificate_managed_externally_issued_by_internal_ca_config_details.py @@ -0,0 +1,122 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .update_certificate_config_details import UpdateCertificateConfigDetails +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 UpdateCertificateManagedExternallyIssuedByInternalCaConfigDetails(UpdateCertificateConfigDetails): + """ + The details for updating an externally managed certificate which is issued by a private certificate authority (CA). + """ + + def __init__(self, **kwargs): + """ + Initializes a new UpdateCertificateManagedExternallyIssuedByInternalCaConfigDetails object with values from keyword arguments. The default value of the :py:attr:`~oci.certificates_management.models.UpdateCertificateManagedExternallyIssuedByInternalCaConfigDetails.config_type` attribute + of this class is ``MANAGED_EXTERNALLY_ISSUED_BY_INTERNAL_CA`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param config_type: + The value to assign to the config_type property of this UpdateCertificateManagedExternallyIssuedByInternalCaConfigDetails. + Allowed values for this property are: "ISSUED_BY_INTERNAL_CA", "MANAGED_EXTERNALLY_ISSUED_BY_INTERNAL_CA", "IMPORTED" + :type config_type: str + + :param version_name: + The value to assign to the version_name property of this UpdateCertificateManagedExternallyIssuedByInternalCaConfigDetails. + :type version_name: str + + :param stage: + The value to assign to the stage property of this UpdateCertificateManagedExternallyIssuedByInternalCaConfigDetails. + Allowed values for this property are: "CURRENT", "PENDING" + :type stage: str + + :param csr_pem: + The value to assign to the csr_pem property of this UpdateCertificateManagedExternallyIssuedByInternalCaConfigDetails. + :type csr_pem: str + + :param validity: + The value to assign to the validity property of this UpdateCertificateManagedExternallyIssuedByInternalCaConfigDetails. + :type validity: oci.certificates_management.models.Validity + + """ + self.swagger_types = { + 'config_type': 'str', + 'version_name': 'str', + 'stage': 'str', + 'csr_pem': 'str', + 'validity': 'Validity' + } + + self.attribute_map = { + 'config_type': 'configType', + 'version_name': 'versionName', + 'stage': 'stage', + 'csr_pem': 'csrPem', + 'validity': 'validity' + } + + self._config_type = None + self._version_name = None + self._stage = None + self._csr_pem = None + self._validity = None + self._config_type = 'MANAGED_EXTERNALLY_ISSUED_BY_INTERNAL_CA' + + @property + def csr_pem(self): + """ + **[Required]** Gets the csr_pem of this UpdateCertificateManagedExternallyIssuedByInternalCaConfigDetails. + The certificate signing request (in PEM format). + + + :return: The csr_pem of this UpdateCertificateManagedExternallyIssuedByInternalCaConfigDetails. + :rtype: str + """ + return self._csr_pem + + @csr_pem.setter + def csr_pem(self, csr_pem): + """ + Sets the csr_pem of this UpdateCertificateManagedExternallyIssuedByInternalCaConfigDetails. + The certificate signing request (in PEM format). + + + :param csr_pem: The csr_pem of this UpdateCertificateManagedExternallyIssuedByInternalCaConfigDetails. + :type: str + """ + self._csr_pem = csr_pem + + @property + def validity(self): + """ + Gets the validity of this UpdateCertificateManagedExternallyIssuedByInternalCaConfigDetails. + + :return: The validity of this UpdateCertificateManagedExternallyIssuedByInternalCaConfigDetails. + :rtype: oci.certificates_management.models.Validity + """ + return self._validity + + @validity.setter + def validity(self, validity): + """ + Sets the validity of this UpdateCertificateManagedExternallyIssuedByInternalCaConfigDetails. + + :param validity: The validity of this UpdateCertificateManagedExternallyIssuedByInternalCaConfigDetails. + :type: oci.certificates_management.models.Validity + """ + self._validity = validity + + 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/certificates_management/models/update_root_ca_by_generating_internally_config_details.py b/src/oci/certificates_management/models/update_root_ca_by_generating_internally_config_details.py new file mode 100644 index 0000000000..faa8e39e9a --- /dev/null +++ b/src/oci/certificates_management/models/update_root_ca_by_generating_internally_config_details.py @@ -0,0 +1,92 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .update_certificate_authority_config_details import UpdateCertificateAuthorityConfigDetails +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 UpdateRootCaByGeneratingInternallyConfigDetails(UpdateCertificateAuthorityConfigDetails): + """ + The details for updating a private root certificate authority (CA). + Note: This operation automatically rotates the private key. + """ + + def __init__(self, **kwargs): + """ + Initializes a new UpdateRootCaByGeneratingInternallyConfigDetails object with values from keyword arguments. The default value of the :py:attr:`~oci.certificates_management.models.UpdateRootCaByGeneratingInternallyConfigDetails.config_type` attribute + of this class is ``ROOT_CA_GENERATED_INTERNALLY`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param config_type: + The value to assign to the config_type property of this UpdateRootCaByGeneratingInternallyConfigDetails. + Allowed values for this property are: "ROOT_CA_GENERATED_INTERNALLY", "SUBORDINATE_CA_ISSUED_BY_INTERNAL_CA" + :type config_type: str + + :param version_name: + The value to assign to the version_name property of this UpdateRootCaByGeneratingInternallyConfigDetails. + :type version_name: str + + :param stage: + The value to assign to the stage property of this UpdateRootCaByGeneratingInternallyConfigDetails. + Allowed values for this property are: "CURRENT", "PENDING" + :type stage: str + + :param validity: + The value to assign to the validity property of this UpdateRootCaByGeneratingInternallyConfigDetails. + :type validity: oci.certificates_management.models.Validity + + """ + self.swagger_types = { + 'config_type': 'str', + 'version_name': 'str', + 'stage': 'str', + 'validity': 'Validity' + } + + self.attribute_map = { + 'config_type': 'configType', + 'version_name': 'versionName', + 'stage': 'stage', + 'validity': 'validity' + } + + self._config_type = None + self._version_name = None + self._stage = None + self._validity = None + self._config_type = 'ROOT_CA_GENERATED_INTERNALLY' + + @property + def validity(self): + """ + Gets the validity of this UpdateRootCaByGeneratingInternallyConfigDetails. + + :return: The validity of this UpdateRootCaByGeneratingInternallyConfigDetails. + :rtype: oci.certificates_management.models.Validity + """ + return self._validity + + @validity.setter + def validity(self, validity): + """ + Sets the validity of this UpdateRootCaByGeneratingInternallyConfigDetails. + + :param validity: The validity of this UpdateRootCaByGeneratingInternallyConfigDetails. + :type: oci.certificates_management.models.Validity + """ + self._validity = validity + + 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/certificates_management/models/update_subordinate_ca_issued_by_internal_ca_config_details.py b/src/oci/certificates_management/models/update_subordinate_ca_issued_by_internal_ca_config_details.py new file mode 100644 index 0000000000..d31d2e3cd0 --- /dev/null +++ b/src/oci/certificates_management/models/update_subordinate_ca_issued_by_internal_ca_config_details.py @@ -0,0 +1,92 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .update_certificate_authority_config_details import UpdateCertificateAuthorityConfigDetails +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 UpdateSubordinateCaIssuedByInternalCaConfigDetails(UpdateCertificateAuthorityConfigDetails): + """ + The details for updating a private subordinate certificate authority (CA) which is issued by a private CA. + Note: This operation automatically rotates the private key. + """ + + def __init__(self, **kwargs): + """ + Initializes a new UpdateSubordinateCaIssuedByInternalCaConfigDetails object with values from keyword arguments. The default value of the :py:attr:`~oci.certificates_management.models.UpdateSubordinateCaIssuedByInternalCaConfigDetails.config_type` attribute + of this class is ``SUBORDINATE_CA_ISSUED_BY_INTERNAL_CA`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param config_type: + The value to assign to the config_type property of this UpdateSubordinateCaIssuedByInternalCaConfigDetails. + Allowed values for this property are: "ROOT_CA_GENERATED_INTERNALLY", "SUBORDINATE_CA_ISSUED_BY_INTERNAL_CA" + :type config_type: str + + :param version_name: + The value to assign to the version_name property of this UpdateSubordinateCaIssuedByInternalCaConfigDetails. + :type version_name: str + + :param stage: + The value to assign to the stage property of this UpdateSubordinateCaIssuedByInternalCaConfigDetails. + Allowed values for this property are: "CURRENT", "PENDING" + :type stage: str + + :param validity: + The value to assign to the validity property of this UpdateSubordinateCaIssuedByInternalCaConfigDetails. + :type validity: oci.certificates_management.models.Validity + + """ + self.swagger_types = { + 'config_type': 'str', + 'version_name': 'str', + 'stage': 'str', + 'validity': 'Validity' + } + + self.attribute_map = { + 'config_type': 'configType', + 'version_name': 'versionName', + 'stage': 'stage', + 'validity': 'validity' + } + + self._config_type = None + self._version_name = None + self._stage = None + self._validity = None + self._config_type = 'SUBORDINATE_CA_ISSUED_BY_INTERNAL_CA' + + @property + def validity(self): + """ + Gets the validity of this UpdateSubordinateCaIssuedByInternalCaConfigDetails. + + :return: The validity of this UpdateSubordinateCaIssuedByInternalCaConfigDetails. + :rtype: oci.certificates_management.models.Validity + """ + return self._validity + + @validity.setter + def validity(self, validity): + """ + Sets the validity of this UpdateSubordinateCaIssuedByInternalCaConfigDetails. + + :param validity: The validity of this UpdateSubordinateCaIssuedByInternalCaConfigDetails. + :type: oci.certificates_management.models.Validity + """ + self._validity = validity + + 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/certificates_management/models/validity.py b/src/oci/certificates_management/models/validity.py new file mode 100644 index 0000000000..42f5c14dfe --- /dev/null +++ b/src/oci/certificates_management/models/validity.py @@ -0,0 +1,113 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 Validity(object): + """ + An object that describes a period of time during which an entity is valid. If this is not provided when you create a certificate, the validity of the issuing CA is used. + """ + + def __init__(self, **kwargs): + """ + Initializes a new Validity object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param time_of_validity_not_before: + The value to assign to the time_of_validity_not_before property of this Validity. + :type time_of_validity_not_before: datetime + + :param time_of_validity_not_after: + The value to assign to the time_of_validity_not_after property of this Validity. + :type time_of_validity_not_after: datetime + + """ + self.swagger_types = { + 'time_of_validity_not_before': 'datetime', + 'time_of_validity_not_after': 'datetime' + } + + self.attribute_map = { + 'time_of_validity_not_before': 'timeOfValidityNotBefore', + 'time_of_validity_not_after': 'timeOfValidityNotAfter' + } + + self._time_of_validity_not_before = None + self._time_of_validity_not_after = None + + @property + def time_of_validity_not_before(self): + """ + Gets the time_of_validity_not_before of this Validity. + The date on which the certificate validity period begins, expressed in `RFC 3339`__ timestamp format. + Example: `2019-04-03T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_of_validity_not_before of this Validity. + :rtype: datetime + """ + return self._time_of_validity_not_before + + @time_of_validity_not_before.setter + def time_of_validity_not_before(self, time_of_validity_not_before): + """ + Sets the time_of_validity_not_before of this Validity. + The date on which the certificate validity period begins, expressed in `RFC 3339`__ timestamp format. + Example: `2019-04-03T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_of_validity_not_before: The time_of_validity_not_before of this Validity. + :type: datetime + """ + self._time_of_validity_not_before = time_of_validity_not_before + + @property + def time_of_validity_not_after(self): + """ + **[Required]** Gets the time_of_validity_not_after of this Validity. + The date on which the certificate validity period ends, expressed in `RFC 3339`__ timestamp format. + Example: `2019-04-03T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_of_validity_not_after of this Validity. + :rtype: datetime + """ + return self._time_of_validity_not_after + + @time_of_validity_not_after.setter + def time_of_validity_not_after(self, time_of_validity_not_after): + """ + Sets the time_of_validity_not_after of this Validity. + The date on which the certificate validity period ends, expressed in `RFC 3339`__ timestamp format. + Example: `2019-04-03T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_of_validity_not_after: The time_of_validity_not_after of this Validity. + :type: datetime + """ + self._time_of_validity_not_after = time_of_validity_not_after + + 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_integration/data_integration_client.py b/src/oci/data_integration/data_integration_client.py index 4ca8c6cc36..5bea1630a9 100644 --- a/src/oci/data_integration/data_integration_client.py +++ b/src/oci/data_integration/data_integration_client.py @@ -18,7 +18,7 @@ class DataIntegrationClient(object): """ - Use the Data Integration Service APIs to perform common extract, load, and transform (ETL) tasks. + Use the Data Integration API to organize your data integration projects, create data flows, pipelines and tasks, and then publish, schedule, and run tasks that extract, transform, and load data. For more information, see [Data Integration](https://docs.oracle.com/iaas/data-integration/home.htm). """ def __init__(self, config, **kwargs): @@ -1137,6 +1137,99 @@ def create_folder(self, workspace_id, create_folder_details, **kwargs): body=create_folder_details, response_type="Folder") + def create_function_library(self, workspace_id, create_function_library_details, **kwargs): + """ + Creates a function library in a project or in another function library, limited to two levels of function libraries. | + FunctionLibraries are used to organize your design-time resources, such as tasks or data flows. + + + :param str workspace_id: (required) + The workspace ID. + + :param oci.data_integration.models.CreateFunctionLibraryDetails create_function_library_details: (required) + The details needed to create a function Library. + + :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. + + :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. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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_integration.models.FunctionLibrary` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use create_function_library API. + """ + resource_path = "/workspaces/{workspaceId}/functionLibraries" + method = "POST" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "opc_retry_token", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "create_function_library got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "workspaceId": workspace_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-retry-token": kwargs.get("opc_retry_token", 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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + 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_function_library_details, + response_type="FunctionLibrary") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=create_function_library_details, + response_type="FunctionLibrary") + def create_patch(self, workspace_id, application_key, create_patch_details, **kwargs): """ Creates a patch in an application. @@ -1981,9 +2074,193 @@ def create_task_validation(self, workspace_id, create_task_validation_details, * body=create_task_validation_details, response_type="TaskValidation") + def create_user_defined_function(self, workspace_id, create_user_defined_function_details, **kwargs): + """ + Creates a new UserDefinedFunction in a function library ready for performing data integrations. + + + :param str workspace_id: (required) + The workspace ID. + + :param oci.data_integration.models.CreateUserDefinedFunctionDetails create_user_defined_function_details: (required) + The details needed to create a new UserDefinedFunction. + + :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. + + :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. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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_integration.models.UserDefinedFunction` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use create_user_defined_function API. + """ + resource_path = "/workspaces/{workspaceId}/userDefinedFunctions" + method = "POST" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "opc_retry_token", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "create_user_defined_function got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "workspaceId": workspace_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-retry-token": kwargs.get("opc_retry_token", 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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + 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_user_defined_function_details, + response_type="UserDefinedFunction") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=create_user_defined_function_details, + response_type="UserDefinedFunction") + + def create_user_defined_function_validation(self, workspace_id, create_user_defined_function_validation_details, **kwargs): + """ + Accepts the UserDefinedFunction definition in the request payload and creates a UserDefinedFunction validation. + + + :param str workspace_id: (required) + The workspace ID. + + :param oci.data_integration.models.CreateUserDefinedFunctionValidationDetails create_user_defined_function_validation_details: (required) + The information needed to create the UserDefinedFunction validation for the UserDefinedFunction object. + + :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. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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_integration.models.UserDefinedFunctionValidation` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use create_user_defined_function_validation API. + """ + resource_path = "/workspaces/{workspaceId}/userDefinedFunctionValidations" + 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_user_defined_function_validation got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "workspaceId": workspace_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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + 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_user_defined_function_validation_details, + response_type="UserDefinedFunctionValidation") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=create_user_defined_function_validation_details, + response_type="UserDefinedFunctionValidation") + def create_workspace(self, create_workspace_details, **kwargs): """ - Creates a new Data Integration workspace ready for performing data integration tasks. + Creates a new Data Integration workspace ready for performing data integration tasks. To retrieve the OCID for the new workspace, use the opc-work-request-id returned by this API and call the :func:`get_work_request` API. :param oci.data_integration.models.CreateWorkspaceDetails create_workspace_details: (required) @@ -2874,19 +3151,16 @@ def delete_folder(self, workspace_id, folder_key, **kwargs): path_params=path_params, header_params=header_params) - def delete_patch(self, workspace_id, application_key, patch_key, **kwargs): + def delete_function_library(self, workspace_id, function_library_key, **kwargs): """ - Removes a patch using the specified identifier. + Removes a Function Library from a project using the specified identifier. :param str workspace_id: (required) The workspace ID. - :param str application_key: (required) - The application key. - - :param str patch_key: (required) - The patch key. + :param str function_library_key: (required) + The functionLibrary key. :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. @@ -2910,9 +3184,9 @@ def delete_patch(self, workspace_id, application_key, patch_key, **kwargs): :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use delete_patch API. + Click `here `__ to see an example of how to use delete_function_library API. """ - resource_path = "/workspaces/{workspaceId}/applications/{applicationKey}/patches/{patchKey}" + resource_path = "/workspaces/{workspaceId}/functionLibraries/{functionLibraryKey}" method = "DELETE" # Don't accept unknown kwargs @@ -2924,12 +3198,11 @@ def delete_patch(self, workspace_id, application_key, patch_key, **kwargs): extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "delete_patch got unknown kwargs: {!r}".format(extra_kwargs)) + "delete_function_library got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "workspaceId": workspace_id, - "applicationKey": application_key, - "patchKey": patch_key + "functionLibraryKey": function_library_key } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -2968,9 +3241,103 @@ def delete_patch(self, workspace_id, application_key, patch_key, **kwargs): path_params=path_params, header_params=header_params) - def delete_pipeline(self, workspace_id, pipeline_key, **kwargs): + def delete_patch(self, workspace_id, application_key, patch_key, **kwargs): """ - Removes a pipeline from a project or folder using the specified identifier. + Removes a patch using the specified identifier. + + + :param str workspace_id: (required) + The workspace ID. + + :param str application_key: (required) + The application key. + + :param str patch_key: (required) + The patch key. + + :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. + When 'if-match' is provided and its value does not exactly match the 'etag' of the resource on the server, the request fails with the 412 response code. + + :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. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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` + + :example: + Click `here `__ to see an example of how to use delete_patch API. + """ + resource_path = "/workspaces/{workspaceId}/applications/{applicationKey}/patches/{patchKey}" + 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_patch got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "workspaceId": workspace_id, + "applicationKey": application_key, + "patchKey": patch_key + } + + 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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + 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_pipeline(self, workspace_id, pipeline_key, **kwargs): + """ + Removes a pipeline from a project or folder using the specified identifier. :param str workspace_id: (required) @@ -3700,19 +4067,16 @@ def delete_task_validation(self, workspace_id, task_validation_key, **kwargs): path_params=path_params, header_params=header_params) - def delete_workspace(self, workspace_id, **kwargs): + def delete_user_defined_function(self, workspace_id, user_defined_function_key, **kwargs): """ - Deletes a Data Integration workspace resource using the specified identifier. + Removes a UserDefinedFunction from a function library using the specified identifier. :param str workspace_id: (required) The workspace ID. - :param int quiesce_timeout: (optional) - Used to set the timeout for Data Integration to gracefully close down any running jobs before stopping the workspace. - - :param bool is_force_operation: (optional) - Used to force close down the workspace. + :param str user_defined_function_key: (required) + The user defined function key. :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. @@ -3736,26 +4100,25 @@ def delete_workspace(self, workspace_id, **kwargs): :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use delete_workspace API. + Click `here `__ to see an example of how to use delete_user_defined_function API. """ - resource_path = "/workspaces/{workspaceId}" + resource_path = "/workspaces/{workspaceId}/userDefinedFunctions/{userDefinedFunctionKey}" method = "DELETE" # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", - "quiesce_timeout", - "is_force_operation", "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_workspace got unknown kwargs: {!r}".format(extra_kwargs)) + "delete_user_defined_function got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { - "workspaceId": workspace_id + "workspaceId": workspace_id, + "userDefinedFunctionKey": user_defined_function_key } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -3764,12 +4127,6 @@ def delete_workspace(self, workspace_id, **kwargs): 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)) - query_params = { - "quiesceTimeout": kwargs.get("quiesce_timeout", missing), - "isForceOperation": kwargs.get("is_force_operation", 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", @@ -3792,26 +4149,29 @@ def delete_workspace(self, workspace_id, **kwargs): resource_path=resource_path, method=method, path_params=path_params, - query_params=query_params, header_params=header_params) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, - query_params=query_params, header_params=header_params) - def get_application(self, workspace_id, application_key, **kwargs): + def delete_user_defined_function_validation(self, workspace_id, user_defined_function_validation_key, **kwargs): """ - Retrieves an application using the specified identifier. + Removes a UserDefinedFunction validation using the specified identifier. :param str workspace_id: (required) The workspace ID. - :param str application_key: (required) - The application key. + :param str user_defined_function_validation_key: (required) + The key of the userDefinedFunction validation. + + :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. + When 'if-match' is provided and its value does not exactly match the 'etag' of the resource on the server, the request fails with the 412 response code. :param str opc_request_id: (optional) Unique Oracle-assigned identifier for the request. If @@ -3826,28 +4186,29 @@ def get_application(self, workspace_id, application_key, **kwargs): 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_integration.models.Application` + :return: A :class:`~oci.response.Response` object with data of type None :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use get_application API. + Click `here `__ to see an example of how to use delete_user_defined_function_validation API. """ - resource_path = "/workspaces/{workspaceId}/applications/{applicationKey}" - method = "GET" + resource_path = "/workspaces/{workspaceId}/userDefinedFunctionValidations/{userDefinedFunctionValidationKey}" + 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( - "get_application got unknown kwargs: {!r}".format(extra_kwargs)) + "delete_user_defined_function_validation got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "workspaceId": workspace_id, - "applicationKey": application_key + "userDefinedFunctionValidationKey": user_defined_function_validation_key } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -3859,6 +4220,7 @@ def get_application(self, workspace_id, application_key, **kwargs): 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} @@ -3877,26 +4239,32 @@ def get_application(self, workspace_id, application_key, **kwargs): resource_path=resource_path, method=method, path_params=path_params, - header_params=header_params, - response_type="Application") + 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, - response_type="Application") + header_params=header_params) - def get_connection(self, workspace_id, connection_key, **kwargs): + def delete_workspace(self, workspace_id, **kwargs): """ - Retrieves the connection details using the specified identifier. + Deletes a Data Integration workspace resource using the specified identifier. :param str workspace_id: (required) The workspace ID. - :param str connection_key: (required) - The connection key. + :param int quiesce_timeout: (optional) + Used to set the timeout for Data Integration to gracefully close down any running jobs before stopping the workspace. + + :param bool is_force_operation: (optional) + Used to force close down the workspace. + + :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. + When 'if-match' is provided and its value does not exactly match the 'etag' of the resource on the server, the request fails with the 412 response code. :param str opc_request_id: (optional) Unique Oracle-assigned identifier for the request. If @@ -3911,28 +4279,30 @@ def get_connection(self, workspace_id, connection_key, **kwargs): 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_integration.models.Connection` + :return: A :class:`~oci.response.Response` object with data of type None :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use get_connection API. + Click `here `__ to see an example of how to use delete_workspace API. """ - resource_path = "/workspaces/{workspaceId}/connections/{connectionKey}" - method = "GET" + resource_path = "/workspaces/{workspaceId}" + method = "DELETE" # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", + "quiesce_timeout", + "is_force_operation", + "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( - "get_connection got unknown kwargs: {!r}".format(extra_kwargs)) + "delete_workspace got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { - "workspaceId": workspace_id, - "connectionKey": connection_key + "workspaceId": workspace_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -3941,9 +4311,16 @@ def get_connection(self, workspace_id, connection_key, **kwargs): 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)) + query_params = { + "quiesceTimeout": kwargs.get("quiesce_timeout", missing), + "isForceOperation": kwargs.get("is_force_operation", 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", + "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} @@ -3962,26 +4339,26 @@ def get_connection(self, workspace_id, connection_key, **kwargs): resource_path=resource_path, method=method, path_params=path_params, - header_params=header_params, - response_type="Connection") + query_params=query_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, - response_type="Connection") + query_params=query_params, + header_params=header_params) - def get_connection_validation(self, workspace_id, connection_validation_key, **kwargs): + def get_application(self, workspace_id, application_key, **kwargs): """ - Retrieves a connection validation using the specified identifier. + Retrieves an application using the specified identifier. :param str workspace_id: (required) The workspace ID. - :param str connection_validation_key: (required) - The key of the connection validation. + :param str application_key: (required) + The application key. :param str opc_request_id: (optional) Unique Oracle-assigned identifier for the request. If @@ -3996,13 +4373,13 @@ def get_connection_validation(self, workspace_id, connection_validation_key, **k 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_integration.models.ConnectionValidation` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_integration.models.Application` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use get_connection_validation API. + Click `here `__ to see an example of how to use get_application API. """ - resource_path = "/workspaces/{workspaceId}/connectionValidations/{connectionValidationKey}" + resource_path = "/workspaces/{workspaceId}/applications/{applicationKey}" method = "GET" # Don't accept unknown kwargs @@ -4013,11 +4390,11 @@ def get_connection_validation(self, workspace_id, connection_validation_key, **k extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "get_connection_validation got unknown kwargs: {!r}".format(extra_kwargs)) + "get_application got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "workspaceId": workspace_id, - "connectionValidationKey": connection_validation_key + "applicationKey": application_key } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -4048,26 +4425,25 @@ def get_connection_validation(self, workspace_id, connection_validation_key, **k method=method, path_params=path_params, header_params=header_params, - response_type="ConnectionValidation") + response_type="Application") else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, - response_type="ConnectionValidation") + response_type="Application") - def get_count_statistic(self, workspace_id, count_statistic_key, **kwargs): + def get_connection(self, workspace_id, connection_key, **kwargs): """ - Retrieves statistics on a workspace. It returns an object with an array of property values, such as the number of projects, | - applications, data assets, and so on. + Retrieves the connection details using the specified identifier. :param str workspace_id: (required) The workspace ID. - :param str count_statistic_key: (required) - A unique key of the container object, such as workspace, project, and so on, to count statistics for. The statistics is fetched for the given key. + :param str connection_key: (required) + The connection key. :param str opc_request_id: (optional) Unique Oracle-assigned identifier for the request. If @@ -4082,13 +4458,13 @@ def get_count_statistic(self, workspace_id, count_statistic_key, **kwargs): 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_integration.models.CountStatistic` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_integration.models.Connection` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use get_count_statistic API. + Click `here `__ to see an example of how to use get_connection API. """ - resource_path = "/workspaces/{workspaceId}/countStatistics/{countStatisticKey}" + resource_path = "/workspaces/{workspaceId}/connections/{connectionKey}" method = "GET" # Don't accept unknown kwargs @@ -4099,11 +4475,11 @@ def get_count_statistic(self, workspace_id, count_statistic_key, **kwargs): extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "get_count_statistic got unknown kwargs: {!r}".format(extra_kwargs)) + "get_connection got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "workspaceId": workspace_id, - "countStatisticKey": count_statistic_key + "connectionKey": connection_key } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -4134,25 +4510,25 @@ def get_count_statistic(self, workspace_id, count_statistic_key, **kwargs): method=method, path_params=path_params, header_params=header_params, - response_type="CountStatistic") + response_type="Connection") else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, - response_type="CountStatistic") + response_type="Connection") - def get_data_asset(self, workspace_id, data_asset_key, **kwargs): + def get_connection_validation(self, workspace_id, connection_validation_key, **kwargs): """ - Retrieves details of a data asset using the specified identifier. + Retrieves a connection validation using the specified identifier. :param str workspace_id: (required) The workspace ID. - :param str data_asset_key: (required) - The data asset key. + :param str connection_validation_key: (required) + The key of the connection validation. :param str opc_request_id: (optional) Unique Oracle-assigned identifier for the request. If @@ -4167,13 +4543,13 @@ def get_data_asset(self, workspace_id, data_asset_key, **kwargs): 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_integration.models.DataAsset` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_integration.models.ConnectionValidation` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use get_data_asset API. + Click `here `__ to see an example of how to use get_connection_validation API. """ - resource_path = "/workspaces/{workspaceId}/dataAssets/{dataAssetKey}" + resource_path = "/workspaces/{workspaceId}/connectionValidations/{connectionValidationKey}" method = "GET" # Don't accept unknown kwargs @@ -4184,11 +4560,11 @@ def get_data_asset(self, workspace_id, data_asset_key, **kwargs): extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "get_data_asset got unknown kwargs: {!r}".format(extra_kwargs)) + "get_connection_validation got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "workspaceId": workspace_id, - "dataAssetKey": data_asset_key + "connectionValidationKey": connection_validation_key } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -4219,16 +4595,187 @@ def get_data_asset(self, workspace_id, data_asset_key, **kwargs): method=method, path_params=path_params, header_params=header_params, - response_type="DataAsset") + response_type="ConnectionValidation") else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, - response_type="DataAsset") + response_type="ConnectionValidation") - def get_data_entity(self, workspace_id, connection_key, schema_resource_name, data_entity_key, **kwargs): + def get_count_statistic(self, workspace_id, count_statistic_key, **kwargs): + """ + Retrieves statistics on a workspace. It returns an object with an array of property values, such as the number of projects, | + applications, data assets, and so on. + + + :param str workspace_id: (required) + The workspace ID. + + :param str count_statistic_key: (required) + A unique key of the container object, such as workspace, project, and so on, to count statistics for. The statistics is fetched for the given key. + + :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. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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_integration.models.CountStatistic` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_count_statistic API. + """ + resource_path = "/workspaces/{workspaceId}/countStatistics/{countStatisticKey}" + 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_count_statistic got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "workspaceId": workspace_id, + "countStatisticKey": count_statistic_key + } + + 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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + 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="CountStatistic") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="CountStatistic") + + def get_data_asset(self, workspace_id, data_asset_key, **kwargs): + """ + Retrieves details of a data asset using the specified identifier. + + + :param str workspace_id: (required) + The workspace ID. + + :param str data_asset_key: (required) + The data asset key. + + :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. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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_integration.models.DataAsset` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_data_asset API. + """ + resource_path = "/workspaces/{workspaceId}/dataAssets/{dataAssetKey}" + 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_data_asset got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "workspaceId": workspace_id, + "dataAssetKey": data_asset_key + } + + 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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + 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="DataAsset") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="DataAsset") + + def get_data_entity(self, workspace_id, connection_key, schema_resource_name, data_entity_key, **kwargs): """ Retrieves the data entity details with the given name from live schema. @@ -4875,25 +5422,27 @@ def get_folder(self, workspace_id, folder_key, **kwargs): header_params=header_params, response_type="Folder") - def get_patch(self, workspace_id, application_key, patch_key, **kwargs): + def get_function_library(self, workspace_id, function_library_key, **kwargs): """ - Retrieves a patch in an application using the specified identifier. + Retrieves a Function Library using the specified identifier. :param str workspace_id: (required) The workspace ID. - :param str application_key: (required) - The application key. - - :param str patch_key: (required) - The patch key. + :param str function_library_key: (required) + The functionLibrary key. :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 list[str] projection: (optional) + This parameter allows users to specify which view of the object to return. CHILD_COUNT_STATISTICS - This option is used to get statistics on immediate children of the object by their type. + + Allowed values are: "CHILD_COUNT_STATISTICS" + :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. @@ -4902,29 +5451,29 @@ def get_patch(self, workspace_id, application_key, patch_key, **kwargs): 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_integration.models.Patch` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_integration.models.FunctionLibrary` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use get_patch API. + Click `here `__ to see an example of how to use get_function_library API. """ - resource_path = "/workspaces/{workspaceId}/applications/{applicationKey}/patches/{patchKey}" + resource_path = "/workspaces/{workspaceId}/functionLibraries/{functionLibraryKey}" method = "GET" # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", - "opc_request_id" + "opc_request_id", + "projection" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "get_patch got unknown kwargs: {!r}".format(extra_kwargs)) + "get_function_library got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "workspaceId": workspace_id, - "applicationKey": application_key, - "patchKey": patch_key + "functionLibraryKey": function_library_key } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -4933,6 +5482,19 @@ def get_patch(self, workspace_id, application_key, patch_key, **kwargs): 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)) + if 'projection' in kwargs: + projection_allowed_values = ["CHILD_COUNT_STATISTICS"] + for projection_item in kwargs['projection']: + if projection_item not in projection_allowed_values: + raise ValueError( + "Invalid value for `projection`, must be one of {0}".format(projection_allowed_values) + ) + + query_params = { + "projection": self.base_client.generate_collection_format_param(kwargs.get("projection", missing), 'multi') + } + 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", @@ -4954,35 +5516,37 @@ def get_patch(self, workspace_id, application_key, patch_key, **kwargs): resource_path=resource_path, method=method, path_params=path_params, + query_params=query_params, header_params=header_params, - response_type="Patch") + response_type="FunctionLibrary") else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, + query_params=query_params, header_params=header_params, - response_type="Patch") + response_type="FunctionLibrary") - def get_pipeline(self, workspace_id, pipeline_key, **kwargs): + def get_patch(self, workspace_id, application_key, patch_key, **kwargs): """ - Retrieves a pipeline using the specified identifier. + Retrieves a patch in an application using the specified identifier. :param str workspace_id: (required) The workspace ID. - :param str pipeline_key: (required) - The pipeline key. + :param str application_key: (required) + The application key. + + :param str patch_key: (required) + The patch key. :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 expand_references: (optional) - Used to expand references of the object. If value is true, then all referenced objects are expanded. If value is false, then shallow objects are returned in place of references. Default is false.

Example:
  • ?expandReferences=true returns all objects of type data loader task
- :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. @@ -4991,29 +5555,29 @@ def get_pipeline(self, workspace_id, pipeline_key, **kwargs): 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_integration.models.Pipeline` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_integration.models.Patch` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use get_pipeline API. + Click `here `__ to see an example of how to use get_patch API. """ - resource_path = "/workspaces/{workspaceId}/pipelines/{pipelineKey}" + resource_path = "/workspaces/{workspaceId}/applications/{applicationKey}/patches/{patchKey}" method = "GET" # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", - "opc_request_id", - "expand_references" + "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "get_pipeline got unknown kwargs: {!r}".format(extra_kwargs)) + "get_patch got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "workspaceId": workspace_id, - "pipelineKey": pipeline_key + "applicationKey": application_key, + "patchKey": patch_key } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -5022,11 +5586,6 @@ def get_pipeline(self, workspace_id, pipeline_key, **kwargs): 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)) - query_params = { - "expandReferences": kwargs.get("expand_references", 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", @@ -5048,29 +5607,123 @@ def get_pipeline(self, workspace_id, pipeline_key, **kwargs): resource_path=resource_path, method=method, path_params=path_params, - query_params=query_params, header_params=header_params, - response_type="Pipeline") + response_type="Patch") else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, - query_params=query_params, header_params=header_params, - response_type="Pipeline") + response_type="Patch") - def get_pipeline_validation(self, workspace_id, pipeline_validation_key, **kwargs): + def get_pipeline(self, workspace_id, pipeline_key, **kwargs): """ - Retrieves a pipeline validation using the specified identifier. + Retrieves a pipeline using the specified identifier. :param str workspace_id: (required) The workspace ID. - :param str pipeline_validation_key: (required) - The key of the pipeline validation. - + :param str pipeline_key: (required) + The pipeline key. + + :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 expand_references: (optional) + Used to expand references of the object. If value is true, then all referenced objects are expanded. If value is false, then shallow objects are returned in place of references. Default is false.

Example:
  • ?expandReferences=true returns all objects of type data loader task
+ + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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_integration.models.Pipeline` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_pipeline API. + """ + resource_path = "/workspaces/{workspaceId}/pipelines/{pipelineKey}" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "opc_request_id", + "expand_references" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "get_pipeline got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "workspaceId": workspace_id, + "pipelineKey": pipeline_key + } + + 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)) + + query_params = { + "expandReferences": kwargs.get("expand_references", 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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="Pipeline") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="Pipeline") + + def get_pipeline_validation(self, workspace_id, pipeline_validation_key, **kwargs): + """ + Retrieves a pipeline validation using the specified identifier. + + + :param str workspace_id: (required) + The workspace ID. + + :param str pipeline_validation_key: (required) + The key of the pipeline validation. + :param str opc_request_id: (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, @@ -5977,6 +6630,176 @@ def get_task_validation(self, workspace_id, task_validation_key, **kwargs): header_params=header_params, response_type="TaskValidation") + def get_user_defined_function(self, workspace_id, user_defined_function_key, **kwargs): + """ + Retrieves a UserDefinedFunction using the specified identifier. + + + :param str workspace_id: (required) + The workspace ID. + + :param str user_defined_function_key: (required) + The user defined function key. + + :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. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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_integration.models.UserDefinedFunction` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_user_defined_function API. + """ + resource_path = "/workspaces/{workspaceId}/userDefinedFunctions/{userDefinedFunctionKey}" + 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_user_defined_function got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "workspaceId": workspace_id, + "userDefinedFunctionKey": user_defined_function_key + } + + 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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + 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="UserDefinedFunction") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="UserDefinedFunction") + + def get_user_defined_function_validation(self, workspace_id, user_defined_function_validation_key, **kwargs): + """ + Retrieves a UserDefinedFunction validation using the specified identifier. + + + :param str workspace_id: (required) + The workspace ID. + + :param str user_defined_function_validation_key: (required) + The key of the userDefinedFunction validation. + + :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. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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_integration.models.UserDefinedFunctionValidation` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_user_defined_function_validation API. + """ + resource_path = "/workspaces/{workspaceId}/userDefinedFunctionValidations/{userDefinedFunctionValidationKey}" + 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_user_defined_function_validation got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "workspaceId": workspace_id, + "userDefinedFunctionValidationKey": user_defined_function_validation_key + } + + 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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + 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="UserDefinedFunctionValidation") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="UserDefinedFunctionValidation") + def get_work_request(self, work_request_id, **kwargs): """ Retrieves the status of the work request with the given ID. @@ -6150,6 +6973,9 @@ def list_applications(self, workspace_id, **kwargs): :param str name: (optional) Used to filter by the name of the object. + :param str name_contains: (optional) + This parameter can be used to filter objects by the names that match partially or fully with the given value. + :param list[str] identifier: (optional) Used to filter by the identifier of the published object. @@ -6202,6 +7028,7 @@ def list_applications(self, workspace_id, **kwargs): expected_kwargs = [ "retry_strategy", "name", + "name_contains", "identifier", "fields", "limit", @@ -6241,6 +7068,7 @@ def list_applications(self, workspace_id, **kwargs): query_params = { "name": kwargs.get("name", missing), + "nameContains": kwargs.get("name_contains", missing), "identifier": self.base_client.generate_collection_format_param(kwargs.get("identifier", missing), 'multi'), "fields": self.base_client.generate_collection_format_param(kwargs.get("fields", missing), 'multi'), "limit": kwargs.get("limit", missing), @@ -7201,6 +8029,9 @@ def list_dependent_objects(self, workspace_id, application_key, **kwargs): :param str name: (optional) Used to filter by the name of the object. + :param str name_contains: (optional) + This parameter can be used to filter objects by the names that match partially or fully with the given value. + :param list[str] identifier: (optional) Used to filter by the identifier of the published object. @@ -7261,6 +8092,7 @@ def list_dependent_objects(self, workspace_id, application_key, **kwargs): "retry_strategy", "fields", "name", + "name_contains", "identifier", "type", "type_in_subtree", @@ -7303,6 +8135,7 @@ def list_dependent_objects(self, workspace_id, application_key, **kwargs): query_params = { "fields": self.base_client.generate_collection_format_param(kwargs.get("fields", missing), 'multi'), "name": kwargs.get("name", missing), + "nameContains": kwargs.get("name_contains", missing), "identifier": self.base_client.generate_collection_format_param(kwargs.get("identifier", missing), 'multi'), "type": self.base_client.generate_collection_format_param(kwargs.get("type", missing), 'multi'), "typeInSubtree": kwargs.get("type_in_subtree", missing), @@ -7659,6 +8492,9 @@ def list_folders(self, workspace_id, **kwargs): :param str name: (optional) Used to filter by the name of the object. + :param str name_contains: (optional) + This parameter can be used to filter objects by the names that match partially or fully with the given value. + :param list[str] identifier: (optional) Used to filter by the identifier of the object. @@ -7706,6 +8542,7 @@ def list_folders(self, workspace_id, **kwargs): "aggregator_key", "fields", "name", + "name_contains", "identifier", "page", "limit", @@ -7745,6 +8582,7 @@ def list_folders(self, workspace_id, **kwargs): "aggregatorKey": kwargs.get("aggregator_key", missing), "fields": self.base_client.generate_collection_format_param(kwargs.get("fields", missing), 'multi'), "name": kwargs.get("name", missing), + "nameContains": kwargs.get("name_contains", missing), "identifier": self.base_client.generate_collection_format_param(kwargs.get("identifier", missing), 'multi'), "page": kwargs.get("page", missing), "limit": kwargs.get("limit", missing), @@ -7786,18 +8624,167 @@ def list_folders(self, workspace_id, **kwargs): header_params=header_params, response_type="FolderSummaryCollection") - def list_patch_changes(self, workspace_id, application_key, **kwargs): + def list_function_libraries(self, workspace_id, **kwargs): """ - Retrieves a list of patches in an application and provides options to filter the list. + Retrieves a list of function libraries in a project and provides options to filter the list. :param str workspace_id: (required) The workspace ID. - :param str application_key: (required) - The application key. - - :param str name: (optional) + :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 aggregator_key: (optional) + Used to filter by the project or the folder object. + + :param list[str] fields: (optional) + Specifies the fields to get for an object. + + :param str name: (optional) + Used to filter by the name of the object. + + :param list[str] identifier: (optional) + Used to filter by the identifier of the object. + + :param str page: (optional) + For list pagination. The value for this parameter is the `opc-next-page` or the `opc-prev-page` response header from the previous `List` call. See `List Pagination`__. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine + + :param int limit: (optional) + Sets the maximum number of results per page, or items to return in a paginated `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. Sorting related parameters are ignored when parameter `query` is present (search operation and sorting order is by relevance score in descending order). + + Allowed values are: "TIME_CREATED", "DISPLAY_NAME" + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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_integration.models.FunctionLibrarySummaryCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_function_libraries API. + """ + resource_path = "/workspaces/{workspaceId}/functionLibraries" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "opc_request_id", + "aggregator_key", + "fields", + "name", + "identifier", + "page", + "limit", + "sort_order", + "sort_by" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_function_libraries got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "workspaceId": workspace_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)) + + 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 = ["TIME_CREATED", "DISPLAY_NAME"] + 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 = { + "aggregatorKey": kwargs.get("aggregator_key", missing), + "fields": self.base_client.generate_collection_format_param(kwargs.get("fields", missing), 'multi'), + "name": kwargs.get("name", missing), + "identifier": self.base_client.generate_collection_format_param(kwargs.get("identifier", missing), 'multi'), + "page": kwargs.get("page", missing), + "limit": kwargs.get("limit", 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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="FunctionLibrarySummaryCollection") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="FunctionLibrarySummaryCollection") + + def list_patch_changes(self, workspace_id, application_key, **kwargs): + """ + Retrieves a list of patches in an application and provides options to filter the list. + + + :param str workspace_id: (required) + The workspace ID. + + :param str application_key: (required) + The application key. + + :param str name: (optional) Used to filter by the name of the object. :param str since_patch: (optional) @@ -8399,6 +9386,9 @@ def list_projects(self, workspace_id, **kwargs): :param str name: (optional) Used to filter by the name of the object. + :param str name_contains: (optional) + This parameter can be used to filter objects by the names that match partially or fully with the given value. + :param list[str] identifier: (optional) Used to filter by the identifier of the object. @@ -8445,6 +9435,7 @@ def list_projects(self, workspace_id, **kwargs): "opc_request_id", "fields", "name", + "name_contains", "identifier", "page", "limit", @@ -8483,6 +9474,7 @@ def list_projects(self, workspace_id, **kwargs): query_params = { "fields": self.base_client.generate_collection_format_param(kwargs.get("fields", missing), 'multi'), "name": kwargs.get("name", missing), + "nameContains": kwargs.get("name_contains", missing), "identifier": self.base_client.generate_collection_format_param(kwargs.get("identifier", missing), 'multi'), "page": kwargs.get("page", missing), "limit": kwargs.get("limit", missing), @@ -8541,6 +9533,12 @@ def list_published_objects(self, workspace_id, application_key, **kwargs): :param str name: (optional) Used to filter by the name of the object. + :param str name_starts_with: (optional) + This parameter can be used to filter objects by the names starting with the given value. + + :param str name_contains: (optional) + This parameter can be used to filter objects by the names that match partially or fully with the given value. + :param list[str] identifier: (optional) Used to filter by the identifier of the published object. @@ -8601,6 +9599,8 @@ def list_published_objects(self, workspace_id, application_key, **kwargs): "retry_strategy", "fields", "name", + "name_starts_with", + "name_contains", "identifier", "type", "type_in_subtree", @@ -8643,6 +9643,8 @@ def list_published_objects(self, workspace_id, application_key, **kwargs): query_params = { "fields": self.base_client.generate_collection_format_param(kwargs.get("fields", missing), 'multi'), "name": kwargs.get("name", missing), + "nameStartsWith": kwargs.get("name_starts_with", missing), + "nameContains": kwargs.get("name_contains", missing), "identifier": self.base_client.generate_collection_format_param(kwargs.get("identifier", missing), 'multi'), "type": self.base_client.generate_collection_format_param(kwargs.get("type", missing), 'multi'), "typeInSubtree": kwargs.get("type_in_subtree", missing), @@ -9320,6 +10322,9 @@ def list_task_runs(self, workspace_id, application_key, **kwargs): :param list[str] filter: (optional) This filter parameter can be used to filter by model specific queryable fields of the object

Examples:-
  • ?filter=status eq Failed returns all objects that have a status field with value Failed
+ :param str name_starts_with: (optional) + This parameter can be used to filter objects by the names starting with the given 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. @@ -9350,7 +10355,8 @@ def list_task_runs(self, workspace_id, application_key, **kwargs): "limit", "sort_order", "sort_by", - "filter" + "filter", + "name_starts_with" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: @@ -9392,7 +10398,8 @@ def list_task_runs(self, workspace_id, application_key, **kwargs): "limit": kwargs.get("limit", missing), "sortOrder": kwargs.get("sort_order", missing), "sortBy": kwargs.get("sort_by", missing), - "filter": self.base_client.generate_collection_format_param(kwargs.get("filter", missing), 'multi') + "filter": self.base_client.generate_collection_format_param(kwargs.get("filter", missing), 'multi'), + "nameStartsWith": kwargs.get("name_starts_with", missing) } query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} @@ -9465,20 +10472,327 @@ def list_task_schedules(self, workspace_id, application_key, **kwargs): :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. Sorting related parameters are ignored when parameter `query` is present (search operation and sorting order is by relevance score in descending order). - Allowed values are: "TIME_CREATED", "DISPLAY_NAME" + Allowed values are: "TIME_CREATED", "DISPLAY_NAME" + + :param str sort_order: (optional) + Specifies sort order to use, either `ASC` (ascending) or `DESC` (descending). + + Allowed values are: "ASC", "DESC" + + :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 bool is_enabled: (optional) + This filter parameter can be used to filter task schedule by its state. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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_integration.models.TaskScheduleSummaryCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_task_schedules API. + """ + resource_path = "/workspaces/{workspaceId}/applications/{applicationKey}/taskSchedules" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "key", + "name", + "identifier", + "type", + "page", + "limit", + "sort_by", + "sort_order", + "opc_request_id", + "is_enabled" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_task_schedules got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "workspaceId": workspace_id, + "applicationKey": application_key + } + + 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)) + + if 'sort_by' in kwargs: + sort_by_allowed_values = ["TIME_CREATED", "DISPLAY_NAME"] + 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) + ) + + 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) + ) + + query_params = { + "key": self.base_client.generate_collection_format_param(kwargs.get("key", missing), 'multi'), + "name": kwargs.get("name", missing), + "identifier": self.base_client.generate_collection_format_param(kwargs.get("identifier", missing), 'multi'), + "type": self.base_client.generate_collection_format_param(kwargs.get("type", missing), 'multi'), + "page": kwargs.get("page", missing), + "limit": kwargs.get("limit", missing), + "sortBy": kwargs.get("sort_by", missing), + "sortOrder": kwargs.get("sort_order", missing), + "isEnabled": kwargs.get("is_enabled", 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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="TaskScheduleSummaryCollection") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="TaskScheduleSummaryCollection") + + def list_task_validations(self, workspace_id, **kwargs): + """ + Retrieves a list of task validations within the specified workspace. + + + :param str workspace_id: (required) + The workspace ID. + + :param str key: (optional) + Used to filter by the key of the object. + + :param str name: (optional) + Used to filter by the name of the object. + + :param str identifier: (optional) + Used to filter by the identifier of the object. + + :param list[str] fields: (optional) + Specifies the fields to get for an object. + + :param str page: (optional) + For list pagination. The value for this parameter is the `opc-next-page` or the `opc-prev-page` response header from the previous `List` call. See `List Pagination`__. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine + + :param int limit: (optional) + Sets the maximum number of results per page, or items to return in a paginated `List` call. See `List Pagination`__. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine + + :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. Sorting related parameters are ignored when parameter `query` is present (search operation and sorting order is by relevance score in descending order). + + Allowed values are: "TIME_CREATED", "DISPLAY_NAME" + + :param str sort_order: (optional) + Specifies sort order to use, either `ASC` (ascending) or `DESC` (descending). + + Allowed values are: "ASC", "DESC" + + :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. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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_integration.models.TaskValidationSummaryCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_task_validations API. + """ + resource_path = "/workspaces/{workspaceId}/taskValidations" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "key", + "name", + "identifier", + "fields", + "page", + "limit", + "sort_by", + "sort_order", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_task_validations got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "workspaceId": workspace_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)) + + if 'sort_by' in kwargs: + sort_by_allowed_values = ["TIME_CREATED", "DISPLAY_NAME"] + 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) + ) + + 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) + ) + + query_params = { + "key": kwargs.get("key", missing), + "name": kwargs.get("name", missing), + "identifier": kwargs.get("identifier", missing), + "fields": self.base_client.generate_collection_format_param(kwargs.get("fields", missing), 'multi'), + "page": kwargs.get("page", missing), + "limit": kwargs.get("limit", missing), + "sortBy": kwargs.get("sort_by", missing), + "sortOrder": kwargs.get("sort_order", 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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="TaskValidationSummaryCollection") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="TaskValidationSummaryCollection") + + def list_tasks(self, workspace_id, **kwargs): + """ + Retrieves a list of all tasks in a specified project or folder. + + + :param str workspace_id: (required) + The workspace ID. + + :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 folder_id: (optional) + Unique key of the folder. + + :param list[str] fields: (optional) + Specifies the fields to get for an object. + + :param str name: (optional) + Used to filter by the name of the object. + + :param list[str] key: (optional) + Used to filter by the key of the object. + + :param list[str] identifier: (optional) + Used to filter by the identifier of the object. + + :param list[str] type: (optional) + Used to filter by the object type of the object. It can be suffixed with an optional filter operator InSubtree. If this operator is not specified, then exact match is considered.

Examples:
  • ?type=DATA_LOADER_TASK&typeInSubtree=false returns all objects of type data loader task
  • ?type=DATA_LOADER_TASK returns all objects of type data loader task
  • ?type=DATA_LOADER_TASK&typeInSubtree=true returns all objects of type data loader task
+ + :param int limit: (optional) + Sets the maximum number of results per page, or items to return in a paginated `List` call. See `List Pagination`__. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine + + :param str page: (optional) + For list pagination. The value for this parameter is the `opc-next-page` or the `opc-prev-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 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 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. Sorting related parameters are ignored when parameter `query` is present (search operation and sorting order is by relevance score in descending order). - :param bool is_enabled: (optional) - This filter parameter can be used to filter task schedule by its state. + Allowed values are: "TIME_CREATED", "DISPLAY_NAME" :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. @@ -9488,37 +10802,37 @@ def list_task_schedules(self, workspace_id, application_key, **kwargs): 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_integration.models.TaskScheduleSummaryCollection` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_integration.models.TaskSummaryCollection` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use list_task_schedules API. + Click `here `__ to see an example of how to use list_tasks API. """ - resource_path = "/workspaces/{workspaceId}/applications/{applicationKey}/taskSchedules" + resource_path = "/workspaces/{workspaceId}/tasks" method = "GET" # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", - "key", + "opc_request_id", + "folder_id", + "fields", "name", + "key", "identifier", "type", - "page", "limit", - "sort_by", + "page", "sort_order", - "opc_request_id", - "is_enabled" + "sort_by" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "list_task_schedules got unknown kwargs: {!r}".format(extra_kwargs)) + "list_tasks got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { - "workspaceId": workspace_id, - "applicationKey": application_key + "workspaceId": workspace_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -9527,13 +10841,6 @@ def list_task_schedules(self, workspace_id, application_key, **kwargs): 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)) - if 'sort_by' in kwargs: - sort_by_allowed_values = ["TIME_CREATED", "DISPLAY_NAME"] - 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) - ) - if 'sort_order' in kwargs: sort_order_allowed_values = ["ASC", "DESC"] if kwargs['sort_order'] not in sort_order_allowed_values: @@ -9541,16 +10848,24 @@ def list_task_schedules(self, workspace_id, application_key, **kwargs): "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) ) + if 'sort_by' in kwargs: + sort_by_allowed_values = ["TIME_CREATED", "DISPLAY_NAME"] + 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 = { - "key": self.base_client.generate_collection_format_param(kwargs.get("key", missing), 'multi'), + "folderId": kwargs.get("folder_id", missing), + "fields": self.base_client.generate_collection_format_param(kwargs.get("fields", missing), 'multi'), "name": kwargs.get("name", missing), + "key": self.base_client.generate_collection_format_param(kwargs.get("key", missing), 'multi'), "identifier": self.base_client.generate_collection_format_param(kwargs.get("identifier", missing), 'multi'), "type": self.base_client.generate_collection_format_param(kwargs.get("type", missing), 'multi'), - "page": kwargs.get("page", missing), "limit": kwargs.get("limit", missing), - "sortBy": kwargs.get("sort_by", missing), + "page": kwargs.get("page", missing), "sortOrder": kwargs.get("sort_order", missing), - "isEnabled": kwargs.get("is_enabled", 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} @@ -9577,7 +10892,7 @@ def list_task_schedules(self, workspace_id, application_key, **kwargs): path_params=path_params, query_params=query_params, header_params=header_params, - response_type="TaskScheduleSummaryCollection") + response_type="TaskSummaryCollection") else: return self.base_client.call_api( resource_path=resource_path, @@ -9585,11 +10900,11 @@ def list_task_schedules(self, workspace_id, application_key, **kwargs): path_params=path_params, query_params=query_params, header_params=header_params, - response_type="TaskScheduleSummaryCollection") + response_type="TaskSummaryCollection") - def list_task_validations(self, workspace_id, **kwargs): + def list_user_defined_function_validations(self, workspace_id, **kwargs): """ - Retrieves a list of task validations within the specified workspace. + Retrieves a list of UserDefinedFunctionvalidations within the specified workspace. :param str workspace_id: (required) @@ -9640,13 +10955,13 @@ def list_task_validations(self, workspace_id, **kwargs): 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_integration.models.TaskValidationSummaryCollection` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_integration.models.UserDefinedFunctionValidationSummaryCollection` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use list_task_validations API. + Click `here `__ to see an example of how to use list_user_defined_function_validations API. """ - resource_path = "/workspaces/{workspaceId}/taskValidations" + resource_path = "/workspaces/{workspaceId}/userDefinedFunctionValidations" method = "GET" # Don't accept unknown kwargs @@ -9665,7 +10980,7 @@ def list_task_validations(self, workspace_id, **kwargs): extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "list_task_validations got unknown kwargs: {!r}".format(extra_kwargs)) + "list_user_defined_function_validations got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "workspaceId": workspace_id @@ -9726,7 +11041,7 @@ def list_task_validations(self, workspace_id, **kwargs): path_params=path_params, query_params=query_params, header_params=header_params, - response_type="TaskValidationSummaryCollection") + response_type="UserDefinedFunctionValidationSummaryCollection") else: return self.base_client.call_api( resource_path=resource_path, @@ -9734,11 +11049,11 @@ def list_task_validations(self, workspace_id, **kwargs): path_params=path_params, query_params=query_params, header_params=header_params, - response_type="TaskValidationSummaryCollection") + response_type="UserDefinedFunctionValidationSummaryCollection") - def list_tasks(self, workspace_id, **kwargs): + def list_user_defined_functions(self, workspace_id, **kwargs): """ - Retrieves a list of all tasks in a specified project or folder. + Retrieves a list of UserDefinedFunctions in a function library. :param str workspace_id: (required) @@ -9749,8 +11064,8 @@ def list_tasks(self, workspace_id, **kwargs): you need to contact Oracle about a particular request, please provide the request ID. - :param str folder_id: (optional) - Unique key of the folder. + :param str function_library_key: (optional) + Unique key of the FunctionLibrary. :param list[str] fields: (optional) Specifies the fields to get for an object. @@ -9758,15 +11073,9 @@ def list_tasks(self, workspace_id, **kwargs): :param str name: (optional) Used to filter by the name of the object. - :param list[str] key: (optional) - Used to filter by the key of the object. - :param list[str] identifier: (optional) Used to filter by the identifier of the object. - :param list[str] type: (optional) - Used to filter by the object type of the object. It can be suffixed with an optional filter operator InSubtree. If this operator is not specified, then exact match is considered.

Examples:
  • ?type=DATA_LOADER_TASK&typeInSubtree=false returns all objects of type data loader task
  • ?type=DATA_LOADER_TASK returns all objects of type data loader task
  • ?type=DATA_LOADER_TASK&typeInSubtree=true returns all objects of type data loader task
- :param int limit: (optional) Sets the maximum number of results per page, or items to return in a paginated `List` call. See `List Pagination`__. @@ -9795,25 +11104,23 @@ def list_tasks(self, workspace_id, **kwargs): 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_integration.models.TaskSummaryCollection` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_integration.models.UserDefinedFunctionSummaryCollection` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use list_tasks API. + Click `here `__ to see an example of how to use list_user_defined_functions API. """ - resource_path = "/workspaces/{workspaceId}/tasks" + resource_path = "/workspaces/{workspaceId}/userDefinedFunctions" method = "GET" # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", "opc_request_id", - "folder_id", + "function_library_key", "fields", "name", - "key", "identifier", - "type", "limit", "page", "sort_order", @@ -9822,7 +11129,7 @@ def list_tasks(self, workspace_id, **kwargs): extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "list_tasks got unknown kwargs: {!r}".format(extra_kwargs)) + "list_user_defined_functions got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "workspaceId": workspace_id @@ -9849,12 +11156,10 @@ def list_tasks(self, workspace_id, **kwargs): ) query_params = { - "folderId": kwargs.get("folder_id", missing), + "functionLibraryKey": kwargs.get("function_library_key", missing), "fields": self.base_client.generate_collection_format_param(kwargs.get("fields", missing), 'multi'), "name": kwargs.get("name", missing), - "key": self.base_client.generate_collection_format_param(kwargs.get("key", missing), 'multi'), "identifier": self.base_client.generate_collection_format_param(kwargs.get("identifier", missing), 'multi'), - "type": self.base_client.generate_collection_format_param(kwargs.get("type", missing), 'multi'), "limit": kwargs.get("limit", missing), "page": kwargs.get("page", missing), "sortOrder": kwargs.get("sort_order", missing), @@ -9885,7 +11190,7 @@ def list_tasks(self, workspace_id, **kwargs): path_params=path_params, query_params=query_params, header_params=header_params, - response_type="TaskSummaryCollection") + response_type="UserDefinedFunctionSummaryCollection") else: return self.base_client.call_api( resource_path=resource_path, @@ -9893,7 +11198,7 @@ def list_tasks(self, workspace_id, **kwargs): path_params=path_params, query_params=query_params, header_params=header_params, - response_type="TaskSummaryCollection") + response_type="UserDefinedFunctionSummaryCollection") def list_work_request_errors(self, work_request_id, **kwargs): """ @@ -11213,6 +12518,103 @@ def update_folder(self, workspace_id, folder_key, update_folder_details, **kwarg body=update_folder_details, response_type="Folder") + def update_function_library(self, workspace_id, function_library_key, update_function_library_details, **kwargs): + """ + Updates a specific Function Library. + + + :param str workspace_id: (required) + The workspace ID. + + :param str function_library_key: (required) + The functionLibrary key. + + :param oci.data_integration.models.UpdateFunctionLibraryDetails update_function_library_details: (required) + The details needed to update a FunctionL ibrary. + + :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. + When 'if-match' is provided and its value does not exactly match the 'etag' of the resource on the server, the request fails with the 412 response code. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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_integration.models.FunctionLibrary` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use update_function_library API. + """ + resource_path = "/workspaces/{workspaceId}/functionLibraries/{functionLibraryKey}" + 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_function_library got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "workspaceId": workspace_id, + "functionLibraryKey": function_library_key + } + + 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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + 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_function_library_details, + response_type="FunctionLibrary") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=update_function_library_details, + response_type="FunctionLibrary") + def update_pipeline(self, workspace_id, pipeline_key, update_pipeline_details, **kwargs): """ Updates a specific pipeline. @@ -11914,6 +13316,103 @@ def update_task_schedule(self, workspace_id, application_key, task_schedule_key, body=update_task_schedule_details, response_type="TaskSchedule") + def update_user_defined_function(self, workspace_id, user_defined_function_key, update_user_defined_function_details, **kwargs): + """ + Updates a specific UserDefinedFunction. + + + :param str workspace_id: (required) + The workspace ID. + + :param str user_defined_function_key: (required) + The user defined function key. + + :param oci.data_integration.models.UpdateUserDefinedFunctionDetails update_user_defined_function_details: (required) + The details needed to updated a UserDefinedFunction. + + :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. + When 'if-match' is provided and its value does not exactly match the 'etag' of the resource on the server, the request fails with the 412 response code. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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_integration.models.UserDefinedFunction` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use update_user_defined_function API. + """ + resource_path = "/workspaces/{workspaceId}/userDefinedFunctions/{userDefinedFunctionKey}" + 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_user_defined_function got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "workspaceId": workspace_id, + "userDefinedFunctionKey": user_defined_function_key + } + + 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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + 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_user_defined_function_details, + response_type="UserDefinedFunction") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=update_user_defined_function_details, + response_type="UserDefinedFunction") + def update_workspace(self, workspace_id, update_workspace_details, **kwargs): """ Updates the specified Data Integration workspace. diff --git a/src/oci/data_integration/models/__init__.py b/src/oci/data_integration/models/__init__.py index 01b307df2d..119ed1bac3 100644 --- a/src/oci/data_integration/models/__init__.py +++ b/src/oci/data_integration/models/__init__.py @@ -20,6 +20,7 @@ from .avro_format_attribute import AvroFormatAttribute from .base_type import BaseType from .bicc_read_attributes import BiccReadAttributes +from .cancel_rest_call_config import CancelRestCallConfig from .change_compartment_details import ChangeCompartmentDetails from .child_reference import ChildReference from .child_reference_detail import ChildReferenceDetail @@ -94,9 +95,11 @@ from .create_data_flow_validation_details import CreateDataFlowValidationDetails from .create_entity_shape_details import CreateEntityShapeDetails from .create_entity_shape_from_file import CreateEntityShapeFromFile +from .create_entity_shape_from_sql import CreateEntityShapeFromSQL from .create_external_publication_details import CreateExternalPublicationDetails from .create_external_publication_validation_details import CreateExternalPublicationValidationDetails from .create_folder_details import CreateFolderDetails +from .create_function_library_details import CreateFunctionLibraryDetails from .create_patch_details import CreatePatchDetails from .create_pipeline_details import CreatePipelineDetails from .create_pipeline_validation_details import CreatePipelineValidationDetails @@ -116,8 +119,11 @@ from .create_task_validation_from_data_loader_task import CreateTaskValidationFromDataLoaderTask from .create_task_validation_from_integration_task import CreateTaskValidationFromIntegrationTask from .create_task_validation_from_pipeline_task import CreateTaskValidationFromPipelineTask +from .create_user_defined_function_details import CreateUserDefinedFunctionDetails +from .create_user_defined_function_validation_details import CreateUserDefinedFunctionValidationDetails from .create_workspace_details import CreateWorkspaceDetails from .csv_format_attribute import CsvFormatAttribute +from .custom_frequency_details import CustomFrequencyDetails from .daily_frequency_details import DailyFrequencyDetails from .data_asset import DataAsset from .data_asset_from_adwc_details import DataAssetFromAdwcDetails @@ -144,6 +150,8 @@ from .data_entity_from_data_store_entity_details import DataEntityFromDataStoreEntityDetails from .data_entity_from_file import DataEntityFromFile from .data_entity_from_file_entity_details import DataEntityFromFileEntityDetails +from .data_entity_from_sql import DataEntityFromSql +from .data_entity_from_sql_entity_details import DataEntityFromSqlEntityDetails from .data_entity_from_table import DataEntityFromTable from .data_entity_from_table_entity_details import DataEntityFromTableEntityDetails from .data_entity_from_view import DataEntityFromView @@ -152,6 +160,7 @@ from .data_entity_summary_collection import DataEntitySummaryCollection from .data_entity_summary_from_data_store import DataEntitySummaryFromDataStore from .data_entity_summary_from_file import DataEntitySummaryFromFile +from .data_entity_summary_from_sql import DataEntitySummaryFromSql from .data_entity_summary_from_table import DataEntitySummaryFromTable from .data_entity_summary_from_view import DataEntitySummaryFromView from .data_flow import DataFlow @@ -180,7 +189,9 @@ from .enriched_entity import EnrichedEntity from .entity_shape import EntityShape from .entity_shape_from_file import EntityShapeFromFile +from .entity_shape_from_sql import EntityShapeFromSQL from .error_details import ErrorDetails +from .execute_rest_call_config import ExecuteRestCallConfig from .expression import Expression from .expression_operator import ExpressionOperator from .external_publication import ExternalPublication @@ -201,6 +212,11 @@ from .folder_summary import FolderSummary from .folder_summary_collection import FolderSummaryCollection from .foreign_key import ForeignKey +from .function_library import FunctionLibrary +from .function_library_details import FunctionLibraryDetails +from .function_library_summary import FunctionLibrarySummary +from .function_library_summary_collection import FunctionLibrarySummaryCollection +from .function_signature import FunctionSignature from .hourly_frequency_details import HourlyFrequencyDetails from .input_field import InputField from .input_link import InputLink @@ -221,6 +237,7 @@ from .message import Message from .minus import Minus from .monthly_frequency_details import MonthlyFrequencyDetails +from .monthly_rule_frequency_details import MonthlyRuleFrequencyDetails from .name_list_rule import NameListRule from .name_pattern_rule import NamePatternRule from .native_shape_field import NativeShapeField @@ -284,6 +301,7 @@ from .registry_metadata import RegistryMetadata from .rename_rule import RenameRule from .resource_configuration import ResourceConfiguration +from .rest_call_config import RestCallConfig from .root_object import RootObject from .rule_based_field_map import RuleBasedFieldMap from .rule_type_config import RuleTypeConfig @@ -345,6 +363,7 @@ from .typed_object import TypedObject from .ui_properties import UIProperties from .union import Union +from .unique_data_key import UniqueDataKey from .unique_key import UniqueKey from .update_application_details import UpdateApplicationDetails from .update_connection_details import UpdateConnectionDetails @@ -368,6 +387,7 @@ from .update_data_flow_details import UpdateDataFlowDetails from .update_external_publication_details import UpdateExternalPublicationDetails from .update_folder_details import UpdateFolderDetails +from .update_function_library_details import UpdateFunctionLibraryDetails from .update_pipeline_details import UpdatePipelineDetails from .update_project_details import UpdateProjectDetails from .update_reference_details import UpdateReferenceDetails @@ -381,9 +401,18 @@ from .update_task_from_sql_task import UpdateTaskFromSQLTask from .update_task_run_details import UpdateTaskRunDetails from .update_task_schedule_details import UpdateTaskScheduleDetails +from .update_user_defined_function_details import UpdateUserDefinedFunctionDetails from .update_workspace_details import UpdateWorkspaceDetails +from .user_defined_function import UserDefinedFunction +from .user_defined_function_details import UserDefinedFunctionDetails +from .user_defined_function_summary import UserDefinedFunctionSummary +from .user_defined_function_summary_collection import UserDefinedFunctionSummaryCollection +from .user_defined_function_validation import UserDefinedFunctionValidation +from .user_defined_function_validation_summary import UserDefinedFunctionValidationSummary +from .user_defined_function_validation_summary_collection import UserDefinedFunctionValidationSummaryCollection from .validation_message import ValidationMessage from .variable import Variable +from .weekly_frequency_details import WeeklyFrequencyDetails from .work_request import WorkRequest from .work_request_error import WorkRequestError from .work_request_log_entry import WorkRequestLogEntry @@ -411,6 +440,7 @@ "AvroFormatAttribute": AvroFormatAttribute, "BaseType": BaseType, "BiccReadAttributes": BiccReadAttributes, + "CancelRestCallConfig": CancelRestCallConfig, "ChangeCompartmentDetails": ChangeCompartmentDetails, "ChildReference": ChildReference, "ChildReferenceDetail": ChildReferenceDetail, @@ -485,9 +515,11 @@ "CreateDataFlowValidationDetails": CreateDataFlowValidationDetails, "CreateEntityShapeDetails": CreateEntityShapeDetails, "CreateEntityShapeFromFile": CreateEntityShapeFromFile, + "CreateEntityShapeFromSQL": CreateEntityShapeFromSQL, "CreateExternalPublicationDetails": CreateExternalPublicationDetails, "CreateExternalPublicationValidationDetails": CreateExternalPublicationValidationDetails, "CreateFolderDetails": CreateFolderDetails, + "CreateFunctionLibraryDetails": CreateFunctionLibraryDetails, "CreatePatchDetails": CreatePatchDetails, "CreatePipelineDetails": CreatePipelineDetails, "CreatePipelineValidationDetails": CreatePipelineValidationDetails, @@ -507,8 +539,11 @@ "CreateTaskValidationFromDataLoaderTask": CreateTaskValidationFromDataLoaderTask, "CreateTaskValidationFromIntegrationTask": CreateTaskValidationFromIntegrationTask, "CreateTaskValidationFromPipelineTask": CreateTaskValidationFromPipelineTask, + "CreateUserDefinedFunctionDetails": CreateUserDefinedFunctionDetails, + "CreateUserDefinedFunctionValidationDetails": CreateUserDefinedFunctionValidationDetails, "CreateWorkspaceDetails": CreateWorkspaceDetails, "CsvFormatAttribute": CsvFormatAttribute, + "CustomFrequencyDetails": CustomFrequencyDetails, "DailyFrequencyDetails": DailyFrequencyDetails, "DataAsset": DataAsset, "DataAssetFromAdwcDetails": DataAssetFromAdwcDetails, @@ -535,6 +570,8 @@ "DataEntityFromDataStoreEntityDetails": DataEntityFromDataStoreEntityDetails, "DataEntityFromFile": DataEntityFromFile, "DataEntityFromFileEntityDetails": DataEntityFromFileEntityDetails, + "DataEntityFromSql": DataEntityFromSql, + "DataEntityFromSqlEntityDetails": DataEntityFromSqlEntityDetails, "DataEntityFromTable": DataEntityFromTable, "DataEntityFromTableEntityDetails": DataEntityFromTableEntityDetails, "DataEntityFromView": DataEntityFromView, @@ -543,6 +580,7 @@ "DataEntitySummaryCollection": DataEntitySummaryCollection, "DataEntitySummaryFromDataStore": DataEntitySummaryFromDataStore, "DataEntitySummaryFromFile": DataEntitySummaryFromFile, + "DataEntitySummaryFromSql": DataEntitySummaryFromSql, "DataEntitySummaryFromTable": DataEntitySummaryFromTable, "DataEntitySummaryFromView": DataEntitySummaryFromView, "DataFlow": DataFlow, @@ -571,7 +609,9 @@ "EnrichedEntity": EnrichedEntity, "EntityShape": EntityShape, "EntityShapeFromFile": EntityShapeFromFile, + "EntityShapeFromSQL": EntityShapeFromSQL, "ErrorDetails": ErrorDetails, + "ExecuteRestCallConfig": ExecuteRestCallConfig, "Expression": Expression, "ExpressionOperator": ExpressionOperator, "ExternalPublication": ExternalPublication, @@ -592,6 +632,11 @@ "FolderSummary": FolderSummary, "FolderSummaryCollection": FolderSummaryCollection, "ForeignKey": ForeignKey, + "FunctionLibrary": FunctionLibrary, + "FunctionLibraryDetails": FunctionLibraryDetails, + "FunctionLibrarySummary": FunctionLibrarySummary, + "FunctionLibrarySummaryCollection": FunctionLibrarySummaryCollection, + "FunctionSignature": FunctionSignature, "HourlyFrequencyDetails": HourlyFrequencyDetails, "InputField": InputField, "InputLink": InputLink, @@ -612,6 +657,7 @@ "Message": Message, "Minus": Minus, "MonthlyFrequencyDetails": MonthlyFrequencyDetails, + "MonthlyRuleFrequencyDetails": MonthlyRuleFrequencyDetails, "NameListRule": NameListRule, "NamePatternRule": NamePatternRule, "NativeShapeField": NativeShapeField, @@ -675,6 +721,7 @@ "RegistryMetadata": RegistryMetadata, "RenameRule": RenameRule, "ResourceConfiguration": ResourceConfiguration, + "RestCallConfig": RestCallConfig, "RootObject": RootObject, "RuleBasedFieldMap": RuleBasedFieldMap, "RuleTypeConfig": RuleTypeConfig, @@ -736,6 +783,7 @@ "TypedObject": TypedObject, "UIProperties": UIProperties, "Union": Union, + "UniqueDataKey": UniqueDataKey, "UniqueKey": UniqueKey, "UpdateApplicationDetails": UpdateApplicationDetails, "UpdateConnectionDetails": UpdateConnectionDetails, @@ -759,6 +807,7 @@ "UpdateDataFlowDetails": UpdateDataFlowDetails, "UpdateExternalPublicationDetails": UpdateExternalPublicationDetails, "UpdateFolderDetails": UpdateFolderDetails, + "UpdateFunctionLibraryDetails": UpdateFunctionLibraryDetails, "UpdatePipelineDetails": UpdatePipelineDetails, "UpdateProjectDetails": UpdateProjectDetails, "UpdateReferenceDetails": UpdateReferenceDetails, @@ -772,9 +821,18 @@ "UpdateTaskFromSQLTask": UpdateTaskFromSQLTask, "UpdateTaskRunDetails": UpdateTaskRunDetails, "UpdateTaskScheduleDetails": UpdateTaskScheduleDetails, + "UpdateUserDefinedFunctionDetails": UpdateUserDefinedFunctionDetails, "UpdateWorkspaceDetails": UpdateWorkspaceDetails, + "UserDefinedFunction": UserDefinedFunction, + "UserDefinedFunctionDetails": UserDefinedFunctionDetails, + "UserDefinedFunctionSummary": UserDefinedFunctionSummary, + "UserDefinedFunctionSummaryCollection": UserDefinedFunctionSummaryCollection, + "UserDefinedFunctionValidation": UserDefinedFunctionValidation, + "UserDefinedFunctionValidationSummary": UserDefinedFunctionValidationSummary, + "UserDefinedFunctionValidationSummaryCollection": UserDefinedFunctionValidationSummaryCollection, "ValidationMessage": ValidationMessage, "Variable": Variable, + "WeeklyFrequencyDetails": WeeklyFrequencyDetails, "WorkRequest": WorkRequest, "WorkRequestError": WorkRequestError, "WorkRequestLogEntry": WorkRequestLogEntry, diff --git a/src/oci/data_integration/models/abstract_frequency_details.py b/src/oci/data_integration/models/abstract_frequency_details.py index 306794f5c6..2813d0ea47 100644 --- a/src/oci/data_integration/models/abstract_frequency_details.py +++ b/src/oci/data_integration/models/abstract_frequency_details.py @@ -25,6 +25,18 @@ class AbstractFrequencyDetails(object): #: This constant has a value of "MONTHLY" MODEL_TYPE_MONTHLY = "MONTHLY" + #: A constant which can be used with the model_type property of a AbstractFrequencyDetails. + #: This constant has a value of "WEEKLY" + MODEL_TYPE_WEEKLY = "WEEKLY" + + #: A constant which can be used with the model_type property of a AbstractFrequencyDetails. + #: This constant has a value of "MONTHLY_RULE" + MODEL_TYPE_MONTHLY_RULE = "MONTHLY_RULE" + + #: A constant which can be used with the model_type property of a AbstractFrequencyDetails. + #: This constant has a value of "CUSTOM" + MODEL_TYPE_CUSTOM = "CUSTOM" + #: A constant which can be used with the frequency property of a AbstractFrequencyDetails. #: This constant has a value of "HOURLY" FREQUENCY_HOURLY = "HOURLY" @@ -37,26 +49,37 @@ class AbstractFrequencyDetails(object): #: This constant has a value of "MONTHLY" FREQUENCY_MONTHLY = "MONTHLY" + #: A constant which can be used with the frequency property of a AbstractFrequencyDetails. + #: This constant has a value of "WEEKLY" + FREQUENCY_WEEKLY = "WEEKLY" + + #: A constant which can be used with the frequency property of a AbstractFrequencyDetails. + #: This constant has a value of "CUSTOM" + FREQUENCY_CUSTOM = "CUSTOM" + def __init__(self, **kwargs): """ Initializes a new AbstractFrequencyDetails object with values from keyword arguments. This class has the following subclasses and if you are using this class as input to a service operations then you should favor using a subclass over the base class: * :class:`~oci.data_integration.models.MonthlyFrequencyDetails` + * :class:`~oci.data_integration.models.CustomFrequencyDetails` * :class:`~oci.data_integration.models.DailyFrequencyDetails` + * :class:`~oci.data_integration.models.WeeklyFrequencyDetails` + * :class:`~oci.data_integration.models.MonthlyRuleFrequencyDetails` * :class:`~oci.data_integration.models.HourlyFrequencyDetails` The following keyword arguments are supported (corresponding to the getters/setters of this class): :param model_type: The value to assign to the model_type property of this AbstractFrequencyDetails. - Allowed values for this property are: "HOURLY", "DAILY", "MONTHLY", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "HOURLY", "DAILY", "MONTHLY", "WEEKLY", "MONTHLY_RULE", "CUSTOM", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type model_type: str :param frequency: The value to assign to the frequency property of this AbstractFrequencyDetails. - Allowed values for this property are: "HOURLY", "DAILY", "MONTHLY", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "HOURLY", "DAILY", "MONTHLY", "WEEKLY", "CUSTOM", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type frequency: str @@ -85,9 +108,18 @@ def get_subtype(object_dictionary): if type == 'MONTHLY': return 'MonthlyFrequencyDetails' + if type == 'CUSTOM': + return 'CustomFrequencyDetails' + if type == 'DAILY': return 'DailyFrequencyDetails' + if type == 'WEEKLY': + return 'WeeklyFrequencyDetails' + + if type == 'MONTHLY_RULE': + return 'MonthlyRuleFrequencyDetails' + if type == 'HOURLY': return 'HourlyFrequencyDetails' else: @@ -99,7 +131,7 @@ def model_type(self): **[Required]** Gets the model_type of this AbstractFrequencyDetails. The type of the model - Allowed values for this property are: "HOURLY", "DAILY", "MONTHLY", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "HOURLY", "DAILY", "MONTHLY", "WEEKLY", "MONTHLY_RULE", "CUSTOM", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. @@ -118,7 +150,7 @@ def model_type(self, model_type): :param model_type: The model_type of this AbstractFrequencyDetails. :type: str """ - allowed_values = ["HOURLY", "DAILY", "MONTHLY"] + allowed_values = ["HOURLY", "DAILY", "MONTHLY", "WEEKLY", "MONTHLY_RULE", "CUSTOM"] if not value_allowed_none_or_none_sentinel(model_type, allowed_values): model_type = 'UNKNOWN_ENUM_VALUE' self._model_type = model_type @@ -129,7 +161,7 @@ def frequency(self): Gets the frequency of this AbstractFrequencyDetails. the frequency of the schedule. - Allowed values for this property are: "HOURLY", "DAILY", "MONTHLY", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "HOURLY", "DAILY", "MONTHLY", "WEEKLY", "CUSTOM", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. @@ -148,7 +180,7 @@ def frequency(self, frequency): :param frequency: The frequency of this AbstractFrequencyDetails. :type: str """ - allowed_values = ["HOURLY", "DAILY", "MONTHLY"] + allowed_values = ["HOURLY", "DAILY", "MONTHLY", "WEEKLY", "CUSTOM"] if not value_allowed_none_or_none_sentinel(frequency, allowed_values): frequency = 'UNKNOWN_ENUM_VALUE' self._frequency = frequency diff --git a/src/oci/data_integration/models/bicc_read_attributes.py b/src/oci/data_integration/models/bicc_read_attributes.py index 9097865273..1922741b9c 100644 --- a/src/oci/data_integration/models/bicc_read_attributes.py +++ b/src/oci/data_integration/models/bicc_read_attributes.py @@ -10,7 +10,7 @@ @init_model_state_from_kwargs class BiccReadAttributes(AbstractReadAttribute): """ - Properties to configure reading from an Oracle Database. + Properties to configure reading from BICC. """ #: A constant which can be used with the extract_strategy property of a BiccReadAttributes. diff --git a/src/oci/data_integration/models/cancel_rest_call_config.py b/src/oci/data_integration/models/cancel_rest_call_config.py new file mode 100644 index 0000000000..663c451b42 --- /dev/null +++ b/src/oci/data_integration/models/cancel_rest_call_config.py @@ -0,0 +1,157 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 CancelRestCallConfig(object): + """ + The REST API configuration for cancelling the task. + """ + + #: A constant which can be used with the method_type property of a CancelRestCallConfig. + #: This constant has a value of "GET" + METHOD_TYPE_GET = "GET" + + #: A constant which can be used with the method_type property of a CancelRestCallConfig. + #: This constant has a value of "POST" + METHOD_TYPE_POST = "POST" + + #: A constant which can be used with the method_type property of a CancelRestCallConfig. + #: This constant has a value of "PATCH" + METHOD_TYPE_PATCH = "PATCH" + + #: A constant which can be used with the method_type property of a CancelRestCallConfig. + #: This constant has a value of "DELETE" + METHOD_TYPE_DELETE = "DELETE" + + #: A constant which can be used with the method_type property of a CancelRestCallConfig. + #: This constant has a value of "PUT" + METHOD_TYPE_PUT = "PUT" + + def __init__(self, **kwargs): + """ + Initializes a new CancelRestCallConfig object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param method_type: + The value to assign to the method_type property of this CancelRestCallConfig. + Allowed values for this property are: "GET", "POST", "PATCH", "DELETE", "PUT" + :type method_type: str + + :param request_headers: + The value to assign to the request_headers property of this CancelRestCallConfig. + :type request_headers: dict(str, str) + + :param config_values: + The value to assign to the config_values property of this CancelRestCallConfig. + :type config_values: oci.data_integration.models.ConfigValues + + """ + self.swagger_types = { + 'method_type': 'str', + 'request_headers': 'dict(str, str)', + 'config_values': 'ConfigValues' + } + + self.attribute_map = { + 'method_type': 'methodType', + 'request_headers': 'requestHeaders', + 'config_values': 'configValues' + } + + self._method_type = None + self._request_headers = None + self._config_values = None + + @property + def method_type(self): + """ + Gets the method_type of this CancelRestCallConfig. + The REST method to use. + + Allowed values for this property are: "GET", "POST", "PATCH", "DELETE", "PUT" + + + :return: The method_type of this CancelRestCallConfig. + :rtype: str + """ + return self._method_type + + @method_type.setter + def method_type(self, method_type): + """ + Sets the method_type of this CancelRestCallConfig. + The REST method to use. + + + :param method_type: The method_type of this CancelRestCallConfig. + :type: str + """ + allowed_values = ["GET", "POST", "PATCH", "DELETE", "PUT"] + if not value_allowed_none_or_none_sentinel(method_type, allowed_values): + raise ValueError( + "Invalid value for `method_type`, must be None or one of {0}" + .format(allowed_values) + ) + self._method_type = method_type + + @property + def request_headers(self): + """ + Gets the request_headers of this CancelRestCallConfig. + The headers for the REST call. + + + :return: The request_headers of this CancelRestCallConfig. + :rtype: dict(str, str) + """ + return self._request_headers + + @request_headers.setter + def request_headers(self, request_headers): + """ + Sets the request_headers of this CancelRestCallConfig. + The headers for the REST call. + + + :param request_headers: The request_headers of this CancelRestCallConfig. + :type: dict(str, str) + """ + self._request_headers = request_headers + + @property + def config_values(self): + """ + Gets the config_values of this CancelRestCallConfig. + + :return: The config_values of this CancelRestCallConfig. + :rtype: oci.data_integration.models.ConfigValues + """ + return self._config_values + + @config_values.setter + def config_values(self, config_values): + """ + Sets the config_values of this CancelRestCallConfig. + + :param config_values: The config_values of this CancelRestCallConfig. + :type: oci.data_integration.models.ConfigValues + """ + self._config_values = config_values + + 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_integration/models/configured_type.py b/src/oci/data_integration/models/configured_type.py index 011e223446..f648d07c0d 100644 --- a/src/oci/data_integration/models/configured_type.py +++ b/src/oci/data_integration/models/configured_type.py @@ -21,7 +21,8 @@ def __init__(self, **kwargs): :param model_type: The value to assign to the model_type property of this ConfiguredType. - Allowed values for this property are: "DYNAMIC_TYPE", "STRUCTURED_TYPE", "DATA_TYPE", "JAVA_TYPE", "CONFIGURED_TYPE", "COMPOSITE_TYPE", "DERIVED_TYPE" + Allowed values for this property are: "DYNAMIC_TYPE", "STRUCTURED_TYPE", "DATA_TYPE", "JAVA_TYPE", "CONFIGURED_TYPE", "COMPOSITE_TYPE", "DERIVED_TYPE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type model_type: str :param key: diff --git a/src/oci/data_integration/models/connection_from_adwc.py b/src/oci/data_integration/models/connection_from_adwc.py index b091cc3fac..8e56c66779 100644 --- a/src/oci/data_integration/models/connection_from_adwc.py +++ b/src/oci/data_integration/models/connection_from_adwc.py @@ -76,6 +76,14 @@ def __init__(self, **kwargs): The value to assign to the key_map property of this ConnectionFromAdwc. :type key_map: dict(str, str) + :param tns_alias: + The value to assign to the tns_alias property of this ConnectionFromAdwc. + :type tns_alias: str + + :param tns_names: + The value to assign to the tns_names property of this ConnectionFromAdwc. + :type tns_names: list[str] + :param username: The value to assign to the username property of this ConnectionFromAdwc. :type username: str @@ -104,6 +112,8 @@ def __init__(self, **kwargs): 'is_default': 'bool', 'metadata': 'ObjectMetadata', 'key_map': 'dict(str, str)', + 'tns_alias': 'str', + 'tns_names': 'list[str]', 'username': 'str', 'password': 'str', 'password_secret': 'SensitiveAttribute' @@ -124,6 +134,8 @@ def __init__(self, **kwargs): 'is_default': 'isDefault', 'metadata': 'metadata', 'key_map': 'keyMap', + 'tns_alias': 'tnsAlias', + 'tns_names': 'tnsNames', 'username': 'username', 'password': 'password', 'password_secret': 'passwordSecret' @@ -143,11 +155,61 @@ def __init__(self, **kwargs): self._is_default = None self._metadata = None self._key_map = None + self._tns_alias = None + self._tns_names = None self._username = None self._password = None self._password_secret = None self._model_type = 'ORACLE_ADWC_CONNECTION' + @property + def tns_alias(self): + """ + Gets the tns_alias of this ConnectionFromAdwc. + The Autonomous Data Warehouse instance service name. + + + :return: The tns_alias of this ConnectionFromAdwc. + :rtype: str + """ + return self._tns_alias + + @tns_alias.setter + def tns_alias(self, tns_alias): + """ + Sets the tns_alias of this ConnectionFromAdwc. + The Autonomous Data Warehouse instance service name. + + + :param tns_alias: The tns_alias of this ConnectionFromAdwc. + :type: str + """ + self._tns_alias = tns_alias + + @property + def tns_names(self): + """ + Gets the tns_names of this ConnectionFromAdwc. + Array of service names that are available for selection in the tnsAlias property. + + + :return: The tns_names of this ConnectionFromAdwc. + :rtype: list[str] + """ + return self._tns_names + + @tns_names.setter + def tns_names(self, tns_names): + """ + Sets the tns_names of this ConnectionFromAdwc. + Array of service names that are available for selection in the tnsAlias property. + + + :param tns_names: The tns_names of this ConnectionFromAdwc. + :type: list[str] + """ + self._tns_names = tns_names + @property def username(self): """ diff --git a/src/oci/data_integration/models/connection_from_adwc_details.py b/src/oci/data_integration/models/connection_from_adwc_details.py index 878aa5e9fe..dbeb183f78 100644 --- a/src/oci/data_integration/models/connection_from_adwc_details.py +++ b/src/oci/data_integration/models/connection_from_adwc_details.py @@ -72,6 +72,14 @@ def __init__(self, **kwargs): The value to assign to the metadata property of this ConnectionFromAdwcDetails. :type metadata: oci.data_integration.models.ObjectMetadata + :param tns_alias: + The value to assign to the tns_alias property of this ConnectionFromAdwcDetails. + :type tns_alias: str + + :param tns_names: + The value to assign to the tns_names property of this ConnectionFromAdwcDetails. + :type tns_names: list[str] + :param username: The value to assign to the username property of this ConnectionFromAdwcDetails. :type username: str @@ -99,6 +107,8 @@ def __init__(self, **kwargs): 'connection_properties': 'list[ConnectionProperty]', 'is_default': 'bool', 'metadata': 'ObjectMetadata', + 'tns_alias': 'str', + 'tns_names': 'list[str]', 'username': 'str', 'password': 'str', 'password_secret': 'SensitiveAttribute' @@ -118,6 +128,8 @@ def __init__(self, **kwargs): 'connection_properties': 'connectionProperties', 'is_default': 'isDefault', 'metadata': 'metadata', + 'tns_alias': 'tnsAlias', + 'tns_names': 'tnsNames', 'username': 'username', 'password': 'password', 'password_secret': 'passwordSecret' @@ -136,11 +148,61 @@ def __init__(self, **kwargs): self._connection_properties = None self._is_default = None self._metadata = None + self._tns_alias = None + self._tns_names = None self._username = None self._password = None self._password_secret = None self._model_type = 'ORACLE_ADWC_CONNECTION' + @property + def tns_alias(self): + """ + Gets the tns_alias of this ConnectionFromAdwcDetails. + The Autonomous Data Warehouse instance service name. + + + :return: The tns_alias of this ConnectionFromAdwcDetails. + :rtype: str + """ + return self._tns_alias + + @tns_alias.setter + def tns_alias(self, tns_alias): + """ + Sets the tns_alias of this ConnectionFromAdwcDetails. + The Autonomous Data Warehouse instance service name. + + + :param tns_alias: The tns_alias of this ConnectionFromAdwcDetails. + :type: str + """ + self._tns_alias = tns_alias + + @property + def tns_names(self): + """ + Gets the tns_names of this ConnectionFromAdwcDetails. + Array of service names that are available for selection in the tnsAlias property. + + + :return: The tns_names of this ConnectionFromAdwcDetails. + :rtype: list[str] + """ + return self._tns_names + + @tns_names.setter + def tns_names(self, tns_names): + """ + Sets the tns_names of this ConnectionFromAdwcDetails. + Array of service names that are available for selection in the tnsAlias property. + + + :param tns_names: The tns_names of this ConnectionFromAdwcDetails. + :type: list[str] + """ + self._tns_names = tns_names + @property def username(self): """ diff --git a/src/oci/data_integration/models/connection_from_atp.py b/src/oci/data_integration/models/connection_from_atp.py index ad16d5f5ac..df8ce765db 100644 --- a/src/oci/data_integration/models/connection_from_atp.py +++ b/src/oci/data_integration/models/connection_from_atp.py @@ -76,6 +76,14 @@ def __init__(self, **kwargs): The value to assign to the key_map property of this ConnectionFromAtp. :type key_map: dict(str, str) + :param tns_alias: + The value to assign to the tns_alias property of this ConnectionFromAtp. + :type tns_alias: str + + :param tns_names: + The value to assign to the tns_names property of this ConnectionFromAtp. + :type tns_names: list[str] + :param username: The value to assign to the username property of this ConnectionFromAtp. :type username: str @@ -104,6 +112,8 @@ def __init__(self, **kwargs): 'is_default': 'bool', 'metadata': 'ObjectMetadata', 'key_map': 'dict(str, str)', + 'tns_alias': 'str', + 'tns_names': 'list[str]', 'username': 'str', 'password': 'str', 'password_secret': 'SensitiveAttribute' @@ -124,6 +134,8 @@ def __init__(self, **kwargs): 'is_default': 'isDefault', 'metadata': 'metadata', 'key_map': 'keyMap', + 'tns_alias': 'tnsAlias', + 'tns_names': 'tnsNames', 'username': 'username', 'password': 'password', 'password_secret': 'passwordSecret' @@ -143,11 +155,61 @@ def __init__(self, **kwargs): self._is_default = None self._metadata = None self._key_map = None + self._tns_alias = None + self._tns_names = None self._username = None self._password = None self._password_secret = None self._model_type = 'ORACLE_ATP_CONNECTION' + @property + def tns_alias(self): + """ + Gets the tns_alias of this ConnectionFromAtp. + The Autonomous Transaction Processing instance service name. + + + :return: The tns_alias of this ConnectionFromAtp. + :rtype: str + """ + return self._tns_alias + + @tns_alias.setter + def tns_alias(self, tns_alias): + """ + Sets the tns_alias of this ConnectionFromAtp. + The Autonomous Transaction Processing instance service name. + + + :param tns_alias: The tns_alias of this ConnectionFromAtp. + :type: str + """ + self._tns_alias = tns_alias + + @property + def tns_names(self): + """ + Gets the tns_names of this ConnectionFromAtp. + Array of service names that are available for selection in the tnsAlias property. + + + :return: The tns_names of this ConnectionFromAtp. + :rtype: list[str] + """ + return self._tns_names + + @tns_names.setter + def tns_names(self, tns_names): + """ + Sets the tns_names of this ConnectionFromAtp. + Array of service names that are available for selection in the tnsAlias property. + + + :param tns_names: The tns_names of this ConnectionFromAtp. + :type: list[str] + """ + self._tns_names = tns_names + @property def username(self): """ diff --git a/src/oci/data_integration/models/connection_from_atp_details.py b/src/oci/data_integration/models/connection_from_atp_details.py index 8b3ec51fd2..168094c62d 100644 --- a/src/oci/data_integration/models/connection_from_atp_details.py +++ b/src/oci/data_integration/models/connection_from_atp_details.py @@ -72,6 +72,14 @@ def __init__(self, **kwargs): The value to assign to the metadata property of this ConnectionFromAtpDetails. :type metadata: oci.data_integration.models.ObjectMetadata + :param tns_alias: + The value to assign to the tns_alias property of this ConnectionFromAtpDetails. + :type tns_alias: str + + :param tns_names: + The value to assign to the tns_names property of this ConnectionFromAtpDetails. + :type tns_names: list[str] + :param username: The value to assign to the username property of this ConnectionFromAtpDetails. :type username: str @@ -99,6 +107,8 @@ def __init__(self, **kwargs): 'connection_properties': 'list[ConnectionProperty]', 'is_default': 'bool', 'metadata': 'ObjectMetadata', + 'tns_alias': 'str', + 'tns_names': 'list[str]', 'username': 'str', 'password': 'str', 'password_secret': 'SensitiveAttribute' @@ -118,6 +128,8 @@ def __init__(self, **kwargs): 'connection_properties': 'connectionProperties', 'is_default': 'isDefault', 'metadata': 'metadata', + 'tns_alias': 'tnsAlias', + 'tns_names': 'tnsNames', 'username': 'username', 'password': 'password', 'password_secret': 'passwordSecret' @@ -136,11 +148,61 @@ def __init__(self, **kwargs): self._connection_properties = None self._is_default = None self._metadata = None + self._tns_alias = None + self._tns_names = None self._username = None self._password = None self._password_secret = None self._model_type = 'ORACLE_ATP_CONNECTION' + @property + def tns_alias(self): + """ + Gets the tns_alias of this ConnectionFromAtpDetails. + The Autonomous Transaction Processing instance service name. + + + :return: The tns_alias of this ConnectionFromAtpDetails. + :rtype: str + """ + return self._tns_alias + + @tns_alias.setter + def tns_alias(self, tns_alias): + """ + Sets the tns_alias of this ConnectionFromAtpDetails. + The Autonomous Transaction Processing instance service name. + + + :param tns_alias: The tns_alias of this ConnectionFromAtpDetails. + :type: str + """ + self._tns_alias = tns_alias + + @property + def tns_names(self): + """ + Gets the tns_names of this ConnectionFromAtpDetails. + Array of service names that are available for selection in the tnsAlias property. + + + :return: The tns_names of this ConnectionFromAtpDetails. + :rtype: list[str] + """ + return self._tns_names + + @tns_names.setter + def tns_names(self, tns_names): + """ + Sets the tns_names of this ConnectionFromAtpDetails. + Array of service names that are available for selection in the tnsAlias property. + + + :param tns_names: The tns_names of this ConnectionFromAtpDetails. + :type: list[str] + """ + self._tns_names = tns_names + @property def username(self): """ diff --git a/src/oci/data_integration/models/connection_from_bicc.py b/src/oci/data_integration/models/connection_from_bicc.py index 18321eaa6d..e911d564cf 100644 --- a/src/oci/data_integration/models/connection_from_bicc.py +++ b/src/oci/data_integration/models/connection_from_bicc.py @@ -10,7 +10,7 @@ @init_model_state_from_kwargs class ConnectionFromBICC(Connection): """ - The connection details for an Oracle Database data asset. + The connection details for a FUSION_APP BICC Connection. """ def __init__(self, **kwargs): diff --git a/src/oci/data_integration/models/connection_from_bicc_details.py b/src/oci/data_integration/models/connection_from_bicc_details.py index 52de5fa10f..0b0cc778ae 100644 --- a/src/oci/data_integration/models/connection_from_bicc_details.py +++ b/src/oci/data_integration/models/connection_from_bicc_details.py @@ -10,7 +10,7 @@ @init_model_state_from_kwargs class ConnectionFromBICCDetails(ConnectionDetails): """ - The connection details for an Oracle Database data asset. + The connection details for a FUSION_APP BICC connection. """ def __init__(self, **kwargs): diff --git a/src/oci/data_integration/models/connection_summary_from_adwc.py b/src/oci/data_integration/models/connection_summary_from_adwc.py index 1b45189fa5..1056fd88f6 100644 --- a/src/oci/data_integration/models/connection_summary_from_adwc.py +++ b/src/oci/data_integration/models/connection_summary_from_adwc.py @@ -76,6 +76,14 @@ def __init__(self, **kwargs): The value to assign to the key_map property of this ConnectionSummaryFromAdwc. :type key_map: dict(str, str) + :param tns_alias: + The value to assign to the tns_alias property of this ConnectionSummaryFromAdwc. + :type tns_alias: str + + :param tns_names: + The value to assign to the tns_names property of this ConnectionSummaryFromAdwc. + :type tns_names: list[str] + :param username: The value to assign to the username property of this ConnectionSummaryFromAdwc. :type username: str @@ -104,6 +112,8 @@ def __init__(self, **kwargs): 'is_default': 'bool', 'metadata': 'ObjectMetadata', 'key_map': 'dict(str, str)', + 'tns_alias': 'str', + 'tns_names': 'list[str]', 'username': 'str', 'password': 'str', 'password_secret': 'SensitiveAttribute' @@ -124,6 +134,8 @@ def __init__(self, **kwargs): 'is_default': 'isDefault', 'metadata': 'metadata', 'key_map': 'keyMap', + 'tns_alias': 'tnsAlias', + 'tns_names': 'tnsNames', 'username': 'username', 'password': 'password', 'password_secret': 'passwordSecret' @@ -143,11 +155,61 @@ def __init__(self, **kwargs): self._is_default = None self._metadata = None self._key_map = None + self._tns_alias = None + self._tns_names = None self._username = None self._password = None self._password_secret = None self._model_type = 'ORACLE_ADWC_CONNECTION' + @property + def tns_alias(self): + """ + Gets the tns_alias of this ConnectionSummaryFromAdwc. + The Autonomous Data Warehouse instance service name. + + + :return: The tns_alias of this ConnectionSummaryFromAdwc. + :rtype: str + """ + return self._tns_alias + + @tns_alias.setter + def tns_alias(self, tns_alias): + """ + Sets the tns_alias of this ConnectionSummaryFromAdwc. + The Autonomous Data Warehouse instance service name. + + + :param tns_alias: The tns_alias of this ConnectionSummaryFromAdwc. + :type: str + """ + self._tns_alias = tns_alias + + @property + def tns_names(self): + """ + Gets the tns_names of this ConnectionSummaryFromAdwc. + Array of service names that are available for selection in the tnsAlias property. + + + :return: The tns_names of this ConnectionSummaryFromAdwc. + :rtype: list[str] + """ + return self._tns_names + + @tns_names.setter + def tns_names(self, tns_names): + """ + Sets the tns_names of this ConnectionSummaryFromAdwc. + Array of service names that are available for selection in the tnsAlias property. + + + :param tns_names: The tns_names of this ConnectionSummaryFromAdwc. + :type: list[str] + """ + self._tns_names = tns_names + @property def username(self): """ diff --git a/src/oci/data_integration/models/connection_summary_from_atp.py b/src/oci/data_integration/models/connection_summary_from_atp.py index 56a8562f4d..737c88f90e 100644 --- a/src/oci/data_integration/models/connection_summary_from_atp.py +++ b/src/oci/data_integration/models/connection_summary_from_atp.py @@ -76,6 +76,14 @@ def __init__(self, **kwargs): The value to assign to the key_map property of this ConnectionSummaryFromAtp. :type key_map: dict(str, str) + :param tns_alias: + The value to assign to the tns_alias property of this ConnectionSummaryFromAtp. + :type tns_alias: str + + :param tns_names: + The value to assign to the tns_names property of this ConnectionSummaryFromAtp. + :type tns_names: list[str] + :param username: The value to assign to the username property of this ConnectionSummaryFromAtp. :type username: str @@ -104,6 +112,8 @@ def __init__(self, **kwargs): 'is_default': 'bool', 'metadata': 'ObjectMetadata', 'key_map': 'dict(str, str)', + 'tns_alias': 'str', + 'tns_names': 'list[str]', 'username': 'str', 'password': 'str', 'password_secret': 'SensitiveAttribute' @@ -124,6 +134,8 @@ def __init__(self, **kwargs): 'is_default': 'isDefault', 'metadata': 'metadata', 'key_map': 'keyMap', + 'tns_alias': 'tnsAlias', + 'tns_names': 'tnsNames', 'username': 'username', 'password': 'password', 'password_secret': 'passwordSecret' @@ -143,11 +155,61 @@ def __init__(self, **kwargs): self._is_default = None self._metadata = None self._key_map = None + self._tns_alias = None + self._tns_names = None self._username = None self._password = None self._password_secret = None self._model_type = 'ORACLE_ATP_CONNECTION' + @property + def tns_alias(self): + """ + Gets the tns_alias of this ConnectionSummaryFromAtp. + The Autonomous Transaction Processing instance service name. + + + :return: The tns_alias of this ConnectionSummaryFromAtp. + :rtype: str + """ + return self._tns_alias + + @tns_alias.setter + def tns_alias(self, tns_alias): + """ + Sets the tns_alias of this ConnectionSummaryFromAtp. + The Autonomous Transaction Processing instance service name. + + + :param tns_alias: The tns_alias of this ConnectionSummaryFromAtp. + :type: str + """ + self._tns_alias = tns_alias + + @property + def tns_names(self): + """ + Gets the tns_names of this ConnectionSummaryFromAtp. + Array of service names that are available for selection in the tnsAlias property. + + + :return: The tns_names of this ConnectionSummaryFromAtp. + :rtype: list[str] + """ + return self._tns_names + + @tns_names.setter + def tns_names(self, tns_names): + """ + Sets the tns_names of this ConnectionSummaryFromAtp. + Array of service names that are available for selection in the tnsAlias property. + + + :param tns_names: The tns_names of this ConnectionSummaryFromAtp. + :type: list[str] + """ + self._tns_names = tns_names + @property def username(self): """ diff --git a/src/oci/data_integration/models/connection_summary_from_bicc.py b/src/oci/data_integration/models/connection_summary_from_bicc.py index 6449423728..8383c37300 100644 --- a/src/oci/data_integration/models/connection_summary_from_bicc.py +++ b/src/oci/data_integration/models/connection_summary_from_bicc.py @@ -10,7 +10,7 @@ @init_model_state_from_kwargs class ConnectionSummaryFromBICC(ConnectionSummary): """ - The connection summary details for an Oracle Database data asset. + The connection summary details for a FUSION_APP BICC connection. """ def __init__(self, **kwargs): diff --git a/src/oci/data_integration/models/count_statistic_summary.py b/src/oci/data_integration/models/count_statistic_summary.py index 18fc86c0bc..8c36b7c8e1 100644 --- a/src/oci/data_integration/models/count_statistic_summary.py +++ b/src/oci/data_integration/models/count_statistic_summary.py @@ -41,6 +41,14 @@ class CountStatisticSummary(object): #: This constant has a value of "APPLICATION" OBJECT_TYPE_APPLICATION = "APPLICATION" + #: A constant which can be used with the object_type property of a CountStatisticSummary. + #: This constant has a value of "FUNCTION_LIBRARY" + OBJECT_TYPE_FUNCTION_LIBRARY = "FUNCTION_LIBRARY" + + #: A constant which can be used with the object_type property of a CountStatisticSummary. + #: This constant has a value of "USER_DEFINED_FUNCTION" + OBJECT_TYPE_USER_DEFINED_FUNCTION = "USER_DEFINED_FUNCTION" + def __init__(self, **kwargs): """ Initializes a new CountStatisticSummary object with values from keyword arguments. @@ -48,7 +56,7 @@ def __init__(self, **kwargs): :param object_type: The value to assign to the object_type property of this CountStatisticSummary. - Allowed values for this property are: "PROJECT", "FOLDER", "DATA_FLOW", "DATA_ASSET", "CONNECTION", "TASK", "APPLICATION", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "PROJECT", "FOLDER", "DATA_FLOW", "DATA_ASSET", "CONNECTION", "TASK", "APPLICATION", "FUNCTION_LIBRARY", "USER_DEFINED_FUNCTION", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type object_type: str @@ -76,7 +84,7 @@ def object_type(self): Gets the object_type of this CountStatisticSummary. The type of object for the count statistic object. - Allowed values for this property are: "PROJECT", "FOLDER", "DATA_FLOW", "DATA_ASSET", "CONNECTION", "TASK", "APPLICATION", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "PROJECT", "FOLDER", "DATA_FLOW", "DATA_ASSET", "CONNECTION", "TASK", "APPLICATION", "FUNCTION_LIBRARY", "USER_DEFINED_FUNCTION", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. @@ -95,7 +103,7 @@ def object_type(self, object_type): :param object_type: The object_type of this CountStatisticSummary. :type: str """ - allowed_values = ["PROJECT", "FOLDER", "DATA_FLOW", "DATA_ASSET", "CONNECTION", "TASK", "APPLICATION"] + allowed_values = ["PROJECT", "FOLDER", "DATA_FLOW", "DATA_ASSET", "CONNECTION", "TASK", "APPLICATION", "FUNCTION_LIBRARY", "USER_DEFINED_FUNCTION"] if not value_allowed_none_or_none_sentinel(object_type, allowed_values): object_type = 'UNKNOWN_ENUM_VALUE' self._object_type = object_type diff --git a/src/oci/data_integration/models/create_connection_from_adwc.py b/src/oci/data_integration/models/create_connection_from_adwc.py index ebd53e1d13..33a6c24184 100644 --- a/src/oci/data_integration/models/create_connection_from_adwc.py +++ b/src/oci/data_integration/models/create_connection_from_adwc.py @@ -60,6 +60,14 @@ def __init__(self, **kwargs): The value to assign to the registry_metadata property of this CreateConnectionFromAdwc. :type registry_metadata: oci.data_integration.models.RegistryMetadata + :param tns_alias: + The value to assign to the tns_alias property of this CreateConnectionFromAdwc. + :type tns_alias: str + + :param tns_names: + The value to assign to the tns_names property of this CreateConnectionFromAdwc. + :type tns_names: list[str] + :param username: The value to assign to the username property of this CreateConnectionFromAdwc. :type username: str @@ -84,6 +92,8 @@ def __init__(self, **kwargs): 'identifier': 'str', 'connection_properties': 'list[ConnectionProperty]', 'registry_metadata': 'RegistryMetadata', + 'tns_alias': 'str', + 'tns_names': 'list[str]', 'username': 'str', 'password': 'str', 'password_secret': 'SensitiveAttribute' @@ -100,6 +110,8 @@ def __init__(self, **kwargs): 'identifier': 'identifier', 'connection_properties': 'connectionProperties', 'registry_metadata': 'registryMetadata', + 'tns_alias': 'tnsAlias', + 'tns_names': 'tnsNames', 'username': 'username', 'password': 'password', 'password_secret': 'passwordSecret' @@ -115,11 +127,61 @@ def __init__(self, **kwargs): self._identifier = None self._connection_properties = None self._registry_metadata = None + self._tns_alias = None + self._tns_names = None self._username = None self._password = None self._password_secret = None self._model_type = 'ORACLE_ADWC_CONNECTION' + @property + def tns_alias(self): + """ + Gets the tns_alias of this CreateConnectionFromAdwc. + The Autonomous Data Warehouse instance service name. + + + :return: The tns_alias of this CreateConnectionFromAdwc. + :rtype: str + """ + return self._tns_alias + + @tns_alias.setter + def tns_alias(self, tns_alias): + """ + Sets the tns_alias of this CreateConnectionFromAdwc. + The Autonomous Data Warehouse instance service name. + + + :param tns_alias: The tns_alias of this CreateConnectionFromAdwc. + :type: str + """ + self._tns_alias = tns_alias + + @property + def tns_names(self): + """ + Gets the tns_names of this CreateConnectionFromAdwc. + Array of service names that are available for selection in the tnsAlias property. + + + :return: The tns_names of this CreateConnectionFromAdwc. + :rtype: list[str] + """ + return self._tns_names + + @tns_names.setter + def tns_names(self, tns_names): + """ + Sets the tns_names of this CreateConnectionFromAdwc. + Array of service names that are available for selection in the tnsAlias property. + + + :param tns_names: The tns_names of this CreateConnectionFromAdwc. + :type: list[str] + """ + self._tns_names = tns_names + @property def username(self): """ diff --git a/src/oci/data_integration/models/create_connection_from_atp.py b/src/oci/data_integration/models/create_connection_from_atp.py index f838f23769..df37d18d18 100644 --- a/src/oci/data_integration/models/create_connection_from_atp.py +++ b/src/oci/data_integration/models/create_connection_from_atp.py @@ -60,6 +60,14 @@ def __init__(self, **kwargs): The value to assign to the registry_metadata property of this CreateConnectionFromAtp. :type registry_metadata: oci.data_integration.models.RegistryMetadata + :param tns_alias: + The value to assign to the tns_alias property of this CreateConnectionFromAtp. + :type tns_alias: str + + :param tns_names: + The value to assign to the tns_names property of this CreateConnectionFromAtp. + :type tns_names: list[str] + :param username: The value to assign to the username property of this CreateConnectionFromAtp. :type username: str @@ -84,6 +92,8 @@ def __init__(self, **kwargs): 'identifier': 'str', 'connection_properties': 'list[ConnectionProperty]', 'registry_metadata': 'RegistryMetadata', + 'tns_alias': 'str', + 'tns_names': 'list[str]', 'username': 'str', 'password': 'str', 'password_secret': 'SensitiveAttribute' @@ -100,6 +110,8 @@ def __init__(self, **kwargs): 'identifier': 'identifier', 'connection_properties': 'connectionProperties', 'registry_metadata': 'registryMetadata', + 'tns_alias': 'tnsAlias', + 'tns_names': 'tnsNames', 'username': 'username', 'password': 'password', 'password_secret': 'passwordSecret' @@ -115,11 +127,61 @@ def __init__(self, **kwargs): self._identifier = None self._connection_properties = None self._registry_metadata = None + self._tns_alias = None + self._tns_names = None self._username = None self._password = None self._password_secret = None self._model_type = 'ORACLE_ATP_CONNECTION' + @property + def tns_alias(self): + """ + Gets the tns_alias of this CreateConnectionFromAtp. + The Autonomous Transaction Processing instance service name. + + + :return: The tns_alias of this CreateConnectionFromAtp. + :rtype: str + """ + return self._tns_alias + + @tns_alias.setter + def tns_alias(self, tns_alias): + """ + Sets the tns_alias of this CreateConnectionFromAtp. + The Autonomous Transaction Processing instance service name. + + + :param tns_alias: The tns_alias of this CreateConnectionFromAtp. + :type: str + """ + self._tns_alias = tns_alias + + @property + def tns_names(self): + """ + Gets the tns_names of this CreateConnectionFromAtp. + Array of service names that are available for selection in the tnsAlias property. + + + :return: The tns_names of this CreateConnectionFromAtp. + :rtype: list[str] + """ + return self._tns_names + + @tns_names.setter + def tns_names(self, tns_names): + """ + Sets the tns_names of this CreateConnectionFromAtp. + Array of service names that are available for selection in the tnsAlias property. + + + :param tns_names: The tns_names of this CreateConnectionFromAtp. + :type: list[str] + """ + self._tns_names = tns_names + @property def username(self): """ diff --git a/src/oci/data_integration/models/create_connection_from_bicc.py b/src/oci/data_integration/models/create_connection_from_bicc.py index 388aaa69a3..0961c5668e 100644 --- a/src/oci/data_integration/models/create_connection_from_bicc.py +++ b/src/oci/data_integration/models/create_connection_from_bicc.py @@ -10,7 +10,7 @@ @init_model_state_from_kwargs class CreateConnectionFromBICC(CreateConnectionDetails): """ - The details to create an Oracle Database data asset connection. + The connection summary details for a FUSION_APP BICC connection. """ def __init__(self, **kwargs): diff --git a/src/oci/data_integration/models/create_data_asset_from_fusion_app.py b/src/oci/data_integration/models/create_data_asset_from_fusion_app.py index af4a01d997..bbd994ef2d 100644 --- a/src/oci/data_integration/models/create_data_asset_from_fusion_app.py +++ b/src/oci/data_integration/models/create_data_asset_from_fusion_app.py @@ -10,7 +10,7 @@ @init_model_state_from_kwargs class CreateDataAssetFromFusionApp(CreateDataAssetDetails): """ - Details for the MYSQL data asset type. + Details for the FUSION_APP data asset type. """ def __init__(self, **kwargs): @@ -117,7 +117,7 @@ def __init__(self, **kwargs): def service_url(self): """ Gets the service_url of this CreateDataAssetFromFusionApp. - The service url of the Bi Server. + The generic JDBC host name. :return: The service_url of this CreateDataAssetFromFusionApp. @@ -129,7 +129,7 @@ def service_url(self): def service_url(self, service_url): """ Sets the service_url of this CreateDataAssetFromFusionApp. - The service url of the Bi Server. + The generic JDBC host name. :param service_url: The service_url of this CreateDataAssetFromFusionApp. diff --git a/src/oci/data_integration/models/create_data_asset_from_object_storage.py b/src/oci/data_integration/models/create_data_asset_from_object_storage.py index e17a236bb0..c371f88159 100644 --- a/src/oci/data_integration/models/create_data_asset_from_object_storage.py +++ b/src/oci/data_integration/models/create_data_asset_from_object_storage.py @@ -60,6 +60,10 @@ def __init__(self, **kwargs): The value to assign to the registry_metadata property of this CreateDataAssetFromObjectStorage. :type registry_metadata: oci.data_integration.models.RegistryMetadata + :param oci_region: + The value to assign to the oci_region property of this CreateDataAssetFromObjectStorage. + :type oci_region: str + :param url: The value to assign to the url property of this CreateDataAssetFromObjectStorage. :type url: str @@ -88,6 +92,7 @@ def __init__(self, **kwargs): 'external_key': 'str', 'asset_properties': 'dict(str, str)', 'registry_metadata': 'RegistryMetadata', + 'oci_region': 'str', 'url': 'str', 'tenancy_id': 'str', 'namespace': 'str', @@ -105,6 +110,7 @@ def __init__(self, **kwargs): 'external_key': 'externalKey', 'asset_properties': 'assetProperties', 'registry_metadata': 'registryMetadata', + 'oci_region': 'ociRegion', 'url': 'url', 'tenancy_id': 'tenancyId', 'namespace': 'namespace', @@ -121,12 +127,37 @@ def __init__(self, **kwargs): self._external_key = None self._asset_properties = None self._registry_metadata = None + self._oci_region = None self._url = None self._tenancy_id = None self._namespace = None self._default_connection = None self._model_type = 'ORACLE_OBJECT_STORAGE_DATA_ASSET' + @property + def oci_region(self): + """ + Gets the oci_region of this CreateDataAssetFromObjectStorage. + The Oracle Object storage Region ie. us-ashburn-1 + + + :return: The oci_region of this CreateDataAssetFromObjectStorage. + :rtype: str + """ + return self._oci_region + + @oci_region.setter + def oci_region(self, oci_region): + """ + Sets the oci_region of this CreateDataAssetFromObjectStorage. + The Oracle Object storage Region ie. us-ashburn-1 + + + :param oci_region: The oci_region of this CreateDataAssetFromObjectStorage. + :type: str + """ + self._oci_region = oci_region + @property def url(self): """ diff --git a/src/oci/data_integration/models/create_entity_shape_details.py b/src/oci/data_integration/models/create_entity_shape_details.py index 318f19226a..5281c3ba78 100644 --- a/src/oci/data_integration/models/create_entity_shape_details.py +++ b/src/oci/data_integration/models/create_entity_shape_details.py @@ -17,18 +17,23 @@ class CreateEntityShapeDetails(object): #: This constant has a value of "FILE_ENTITY" MODEL_TYPE_FILE_ENTITY = "FILE_ENTITY" + #: A constant which can be used with the model_type property of a CreateEntityShapeDetails. + #: This constant has a value of "SQL_ENTITY" + MODEL_TYPE_SQL_ENTITY = "SQL_ENTITY" + def __init__(self, **kwargs): """ Initializes a new CreateEntityShapeDetails object with values from keyword arguments. This class has the following subclasses and if you are using this class as input to a service operations then you should favor using a subclass over the base class: + * :class:`~oci.data_integration.models.CreateEntityShapeFromSQL` * :class:`~oci.data_integration.models.CreateEntityShapeFromFile` The following keyword arguments are supported (corresponding to the getters/setters of this class): :param model_type: The value to assign to the model_type property of this CreateEntityShapeDetails. - Allowed values for this property are: "FILE_ENTITY" + Allowed values for this property are: "FILE_ENTITY", "SQL_ENTITY" :type model_type: str """ @@ -50,6 +55,9 @@ def get_subtype(object_dictionary): """ type = object_dictionary['modelType'] + if type == 'SQL_ENTITY': + return 'CreateEntityShapeFromSQL' + if type == 'FILE_ENTITY': return 'CreateEntityShapeFromFile' else: @@ -61,7 +69,7 @@ def model_type(self): **[Required]** Gets the model_type of this CreateEntityShapeDetails. The data entity type. - Allowed values for this property are: "FILE_ENTITY" + Allowed values for this property are: "FILE_ENTITY", "SQL_ENTITY" :return: The model_type of this CreateEntityShapeDetails. @@ -79,7 +87,7 @@ def model_type(self, model_type): :param model_type: The model_type of this CreateEntityShapeDetails. :type: str """ - allowed_values = ["FILE_ENTITY"] + allowed_values = ["FILE_ENTITY", "SQL_ENTITY"] if not value_allowed_none_or_none_sentinel(model_type, allowed_values): raise ValueError( "Invalid value for `model_type`, must be None or one of {0}" diff --git a/src/oci/data_integration/models/create_entity_shape_from_file.py b/src/oci/data_integration/models/create_entity_shape_from_file.py index e8e2ad26c3..dca1c54afa 100644 --- a/src/oci/data_integration/models/create_entity_shape_from_file.py +++ b/src/oci/data_integration/models/create_entity_shape_from_file.py @@ -45,7 +45,7 @@ def __init__(self, **kwargs): :param model_type: The value to assign to the model_type property of this CreateEntityShapeFromFile. - Allowed values for this property are: "FILE_ENTITY" + Allowed values for this property are: "FILE_ENTITY", "SQL_ENTITY" :type model_type: str :param key: diff --git a/src/oci/data_integration/models/create_entity_shape_from_sql.py b/src/oci/data_integration/models/create_entity_shape_from_sql.py new file mode 100644 index 0000000000..d4ecc942a9 --- /dev/null +++ b/src/oci/data_integration/models/create_entity_shape_from_sql.py @@ -0,0 +1,620 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .create_entity_shape_details import CreateEntityShapeDetails +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 CreateEntityShapeFromSQL(CreateEntityShapeDetails): + """ + The SQL entity details. + """ + + #: A constant which can be used with the entity_type property of a CreateEntityShapeFromSQL. + #: This constant has a value of "TABLE" + ENTITY_TYPE_TABLE = "TABLE" + + #: A constant which can be used with the entity_type property of a CreateEntityShapeFromSQL. + #: This constant has a value of "VIEW" + ENTITY_TYPE_VIEW = "VIEW" + + #: A constant which can be used with the entity_type property of a CreateEntityShapeFromSQL. + #: This constant has a value of "FILE" + ENTITY_TYPE_FILE = "FILE" + + #: A constant which can be used with the entity_type property of a CreateEntityShapeFromSQL. + #: This constant has a value of "SQL" + ENTITY_TYPE_SQL = "SQL" + + def __init__(self, **kwargs): + """ + Initializes a new CreateEntityShapeFromSQL object with values from keyword arguments. The default value of the :py:attr:`~oci.data_integration.models.CreateEntityShapeFromSQL.model_type` attribute + of this class is ``SQL_ENTITY`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param model_type: + The value to assign to the model_type property of this CreateEntityShapeFromSQL. + Allowed values for this property are: "FILE_ENTITY", "SQL_ENTITY" + :type model_type: str + + :param key: + The value to assign to the key property of this CreateEntityShapeFromSQL. + :type key: str + + :param model_version: + The value to assign to the model_version property of this CreateEntityShapeFromSQL. + :type model_version: str + + :param parent_ref: + The value to assign to the parent_ref property of this CreateEntityShapeFromSQL. + :type parent_ref: oci.data_integration.models.ParentReference + + :param name: + The value to assign to the name property of this CreateEntityShapeFromSQL. + :type name: str + + :param description: + The value to assign to the description property of this CreateEntityShapeFromSQL. + :type description: str + + :param object_version: + The value to assign to the object_version property of this CreateEntityShapeFromSQL. + :type object_version: int + + :param external_key: + The value to assign to the external_key property of this CreateEntityShapeFromSQL. + :type external_key: str + + :param shape: + The value to assign to the shape property of this CreateEntityShapeFromSQL. + :type shape: oci.data_integration.models.Shape + + :param shape_id: + The value to assign to the shape_id property of this CreateEntityShapeFromSQL. + :type shape_id: str + + :param entity_type: + The value to assign to the entity_type property of this CreateEntityShapeFromSQL. + Allowed values for this property are: "TABLE", "VIEW", "FILE", "SQL" + :type entity_type: str + + :param other_type_label: + The value to assign to the other_type_label property of this CreateEntityShapeFromSQL. + :type other_type_label: str + + :param unique_keys: + The value to assign to the unique_keys property of this CreateEntityShapeFromSQL. + :type unique_keys: list[oci.data_integration.models.UniqueKey] + + :param foreign_keys: + The value to assign to the foreign_keys property of this CreateEntityShapeFromSQL. + :type foreign_keys: list[oci.data_integration.models.ForeignKey] + + :param resource_name: + The value to assign to the resource_name property of this CreateEntityShapeFromSQL. + :type resource_name: str + + :param data_format: + The value to assign to the data_format property of this CreateEntityShapeFromSQL. + :type data_format: oci.data_integration.models.DataFormat + + :param object_status: + The value to assign to the object_status property of this CreateEntityShapeFromSQL. + :type object_status: int + + :param identifier: + The value to assign to the identifier property of this CreateEntityShapeFromSQL. + :type identifier: str + + :param sql_query: + The value to assign to the sql_query property of this CreateEntityShapeFromSQL. + :type sql_query: str + + """ + self.swagger_types = { + 'model_type': 'str', + 'key': 'str', + 'model_version': 'str', + 'parent_ref': 'ParentReference', + 'name': 'str', + 'description': 'str', + 'object_version': 'int', + 'external_key': 'str', + 'shape': 'Shape', + 'shape_id': 'str', + 'entity_type': 'str', + 'other_type_label': 'str', + 'unique_keys': 'list[UniqueKey]', + 'foreign_keys': 'list[ForeignKey]', + 'resource_name': 'str', + 'data_format': 'DataFormat', + 'object_status': 'int', + 'identifier': 'str', + 'sql_query': 'str' + } + + self.attribute_map = { + 'model_type': 'modelType', + 'key': 'key', + 'model_version': 'modelVersion', + 'parent_ref': 'parentRef', + 'name': 'name', + 'description': 'description', + 'object_version': 'objectVersion', + 'external_key': 'externalKey', + 'shape': 'shape', + 'shape_id': 'shapeId', + 'entity_type': 'entityType', + 'other_type_label': 'otherTypeLabel', + 'unique_keys': 'uniqueKeys', + 'foreign_keys': 'foreignKeys', + 'resource_name': 'resourceName', + 'data_format': 'dataFormat', + 'object_status': 'objectStatus', + 'identifier': 'identifier', + 'sql_query': 'sqlQuery' + } + + self._model_type = None + self._key = None + self._model_version = None + self._parent_ref = None + self._name = None + self._description = None + self._object_version = None + self._external_key = None + self._shape = None + self._shape_id = None + self._entity_type = None + self._other_type_label = None + self._unique_keys = None + self._foreign_keys = None + self._resource_name = None + self._data_format = None + self._object_status = None + self._identifier = None + self._sql_query = None + self._model_type = 'SQL_ENTITY' + + @property + def key(self): + """ + Gets the key of this CreateEntityShapeFromSQL. + The object key. + + + :return: The key of this CreateEntityShapeFromSQL. + :rtype: str + """ + return self._key + + @key.setter + def key(self, key): + """ + Sets the key of this CreateEntityShapeFromSQL. + The object key. + + + :param key: The key of this CreateEntityShapeFromSQL. + :type: str + """ + self._key = key + + @property + def model_version(self): + """ + Gets the model_version of this CreateEntityShapeFromSQL. + The object's model version. + + + :return: The model_version of this CreateEntityShapeFromSQL. + :rtype: str + """ + return self._model_version + + @model_version.setter + def model_version(self, model_version): + """ + Sets the model_version of this CreateEntityShapeFromSQL. + The object's model version. + + + :param model_version: The model_version of this CreateEntityShapeFromSQL. + :type: str + """ + self._model_version = model_version + + @property + def parent_ref(self): + """ + Gets the parent_ref of this CreateEntityShapeFromSQL. + + :return: The parent_ref of this CreateEntityShapeFromSQL. + :rtype: oci.data_integration.models.ParentReference + """ + return self._parent_ref + + @parent_ref.setter + def parent_ref(self, parent_ref): + """ + Sets the parent_ref of this CreateEntityShapeFromSQL. + + :param parent_ref: The parent_ref of this CreateEntityShapeFromSQL. + :type: oci.data_integration.models.ParentReference + """ + self._parent_ref = parent_ref + + @property + def name(self): + """ + Gets the name of this CreateEntityShapeFromSQL. + Free form text without any restriction on permitted characters. Name can have letters, numbers, and special characters. The value is editable and is restricted to 1000 characters. + + + :return: The name of this CreateEntityShapeFromSQL. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """ + Sets the name of this CreateEntityShapeFromSQL. + Free form text without any restriction on permitted characters. Name can have letters, numbers, and special characters. The value is editable and is restricted to 1000 characters. + + + :param name: The name of this CreateEntityShapeFromSQL. + :type: str + """ + self._name = name + + @property + def description(self): + """ + Gets the description of this CreateEntityShapeFromSQL. + Detailed description for the object. + + + :return: The description of this CreateEntityShapeFromSQL. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this CreateEntityShapeFromSQL. + Detailed description for the object. + + + :param description: The description of this CreateEntityShapeFromSQL. + :type: str + """ + self._description = description + + @property + def object_version(self): + """ + Gets the object_version of this CreateEntityShapeFromSQL. + The version of the object that is used to track changes in the object instance. + + + :return: The object_version of this CreateEntityShapeFromSQL. + :rtype: int + """ + return self._object_version + + @object_version.setter + def object_version(self, object_version): + """ + Sets the object_version of this CreateEntityShapeFromSQL. + The version of the object that is used to track changes in the object instance. + + + :param object_version: The object_version of this CreateEntityShapeFromSQL. + :type: int + """ + self._object_version = object_version + + @property + def external_key(self): + """ + Gets the external_key of this CreateEntityShapeFromSQL. + The external key for the object. + + + :return: The external_key of this CreateEntityShapeFromSQL. + :rtype: str + """ + return self._external_key + + @external_key.setter + def external_key(self, external_key): + """ + Sets the external_key of this CreateEntityShapeFromSQL. + The external key for the object. + + + :param external_key: The external_key of this CreateEntityShapeFromSQL. + :type: str + """ + self._external_key = external_key + + @property + def shape(self): + """ + Gets the shape of this CreateEntityShapeFromSQL. + + :return: The shape of this CreateEntityShapeFromSQL. + :rtype: oci.data_integration.models.Shape + """ + return self._shape + + @shape.setter + def shape(self, shape): + """ + Sets the shape of this CreateEntityShapeFromSQL. + + :param shape: The shape of this CreateEntityShapeFromSQL. + :type: oci.data_integration.models.Shape + """ + self._shape = shape + + @property + def shape_id(self): + """ + Gets the shape_id of this CreateEntityShapeFromSQL. + The shape ID. + + + :return: The shape_id of this CreateEntityShapeFromSQL. + :rtype: str + """ + return self._shape_id + + @shape_id.setter + def shape_id(self, shape_id): + """ + Sets the shape_id of this CreateEntityShapeFromSQL. + The shape ID. + + + :param shape_id: The shape_id of this CreateEntityShapeFromSQL. + :type: str + """ + self._shape_id = shape_id + + @property + def entity_type(self): + """ + Gets the entity_type of this CreateEntityShapeFromSQL. + The entity type. + + Allowed values for this property are: "TABLE", "VIEW", "FILE", "SQL" + + + :return: The entity_type of this CreateEntityShapeFromSQL. + :rtype: str + """ + return self._entity_type + + @entity_type.setter + def entity_type(self, entity_type): + """ + Sets the entity_type of this CreateEntityShapeFromSQL. + The entity type. + + + :param entity_type: The entity_type of this CreateEntityShapeFromSQL. + :type: str + """ + allowed_values = ["TABLE", "VIEW", "FILE", "SQL"] + if not value_allowed_none_or_none_sentinel(entity_type, allowed_values): + raise ValueError( + "Invalid value for `entity_type`, must be None or one of {0}" + .format(allowed_values) + ) + self._entity_type = entity_type + + @property + def other_type_label(self): + """ + Gets the other_type_label of this CreateEntityShapeFromSQL. + Specifies other type label. + + + :return: The other_type_label of this CreateEntityShapeFromSQL. + :rtype: str + """ + return self._other_type_label + + @other_type_label.setter + def other_type_label(self, other_type_label): + """ + Sets the other_type_label of this CreateEntityShapeFromSQL. + Specifies other type label. + + + :param other_type_label: The other_type_label of this CreateEntityShapeFromSQL. + :type: str + """ + self._other_type_label = other_type_label + + @property + def unique_keys(self): + """ + Gets the unique_keys of this CreateEntityShapeFromSQL. + An array of unique keys. + + + :return: The unique_keys of this CreateEntityShapeFromSQL. + :rtype: list[oci.data_integration.models.UniqueKey] + """ + return self._unique_keys + + @unique_keys.setter + def unique_keys(self, unique_keys): + """ + Sets the unique_keys of this CreateEntityShapeFromSQL. + An array of unique keys. + + + :param unique_keys: The unique_keys of this CreateEntityShapeFromSQL. + :type: list[oci.data_integration.models.UniqueKey] + """ + self._unique_keys = unique_keys + + @property + def foreign_keys(self): + """ + Gets the foreign_keys of this CreateEntityShapeFromSQL. + An array of foreign keys. + + + :return: The foreign_keys of this CreateEntityShapeFromSQL. + :rtype: list[oci.data_integration.models.ForeignKey] + """ + return self._foreign_keys + + @foreign_keys.setter + def foreign_keys(self, foreign_keys): + """ + Sets the foreign_keys of this CreateEntityShapeFromSQL. + An array of foreign keys. + + + :param foreign_keys: The foreign_keys of this CreateEntityShapeFromSQL. + :type: list[oci.data_integration.models.ForeignKey] + """ + self._foreign_keys = foreign_keys + + @property + def resource_name(self): + """ + Gets the resource_name of this CreateEntityShapeFromSQL. + The resource name. + + + :return: The resource_name of this CreateEntityShapeFromSQL. + :rtype: str + """ + return self._resource_name + + @resource_name.setter + def resource_name(self, resource_name): + """ + Sets the resource_name of this CreateEntityShapeFromSQL. + The resource name. + + + :param resource_name: The resource_name of this CreateEntityShapeFromSQL. + :type: str + """ + self._resource_name = resource_name + + @property + def data_format(self): + """ + Gets the data_format of this CreateEntityShapeFromSQL. + + :return: The data_format of this CreateEntityShapeFromSQL. + :rtype: oci.data_integration.models.DataFormat + """ + return self._data_format + + @data_format.setter + def data_format(self, data_format): + """ + Sets the data_format of this CreateEntityShapeFromSQL. + + :param data_format: The data_format of this CreateEntityShapeFromSQL. + :type: oci.data_integration.models.DataFormat + """ + self._data_format = data_format + + @property + def object_status(self): + """ + Gets the object_status of this CreateEntityShapeFromSQL. + The status of an object that can be set to value 1 for shallow references across objects, other values reserved. + + + :return: The object_status of this CreateEntityShapeFromSQL. + :rtype: int + """ + return self._object_status + + @object_status.setter + def object_status(self, object_status): + """ + Sets the object_status of this CreateEntityShapeFromSQL. + The status of an object that can be set to value 1 for shallow references across objects, other values reserved. + + + :param object_status: The object_status of this CreateEntityShapeFromSQL. + :type: int + """ + self._object_status = object_status + + @property + def identifier(self): + """ + Gets the identifier of this CreateEntityShapeFromSQL. + Value can only contain upper case letters, underscore, and numbers. It should begin with upper case letter or underscore. The value can be modified. + + + :return: The identifier of this CreateEntityShapeFromSQL. + :rtype: str + """ + return self._identifier + + @identifier.setter + def identifier(self, identifier): + """ + Sets the identifier of this CreateEntityShapeFromSQL. + Value can only contain upper case letters, underscore, and numbers. It should begin with upper case letter or underscore. The value can be modified. + + + :param identifier: The identifier of this CreateEntityShapeFromSQL. + :type: str + """ + self._identifier = identifier + + @property + def sql_query(self): + """ + Gets the sql_query of this CreateEntityShapeFromSQL. + sqlQuery + + + :return: The sql_query of this CreateEntityShapeFromSQL. + :rtype: str + """ + return self._sql_query + + @sql_query.setter + def sql_query(self, sql_query): + """ + Sets the sql_query of this CreateEntityShapeFromSQL. + sqlQuery + + + :param sql_query: The sql_query of this CreateEntityShapeFromSQL. + :type: str + """ + self._sql_query = sql_query + + 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_integration/models/create_function_library_details.py b/src/oci/data_integration/models/create_function_library_details.py new file mode 100644 index 0000000000..7b4ec5cb2f --- /dev/null +++ b/src/oci/data_integration/models/create_function_library_details.py @@ -0,0 +1,283 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 CreateFunctionLibraryDetails(object): + """ + The properties used in FunctionLibrary create operations. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CreateFunctionLibraryDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param key: + The value to assign to the key property of this CreateFunctionLibraryDetails. + :type key: str + + :param model_version: + The value to assign to the model_version property of this CreateFunctionLibraryDetails. + :type model_version: str + + :param name: + The value to assign to the name property of this CreateFunctionLibraryDetails. + :type name: str + + :param description: + The value to assign to the description property of this CreateFunctionLibraryDetails. + :type description: str + + :param category_name: + The value to assign to the category_name property of this CreateFunctionLibraryDetails. + :type category_name: str + + :param object_status: + The value to assign to the object_status property of this CreateFunctionLibraryDetails. + :type object_status: int + + :param identifier: + The value to assign to the identifier property of this CreateFunctionLibraryDetails. + :type identifier: str + + :param registry_metadata: + The value to assign to the registry_metadata property of this CreateFunctionLibraryDetails. + :type registry_metadata: oci.data_integration.models.RegistryMetadata + + """ + self.swagger_types = { + 'key': 'str', + 'model_version': 'str', + 'name': 'str', + 'description': 'str', + 'category_name': 'str', + 'object_status': 'int', + 'identifier': 'str', + 'registry_metadata': 'RegistryMetadata' + } + + self.attribute_map = { + 'key': 'key', + 'model_version': 'modelVersion', + 'name': 'name', + 'description': 'description', + 'category_name': 'categoryName', + 'object_status': 'objectStatus', + 'identifier': 'identifier', + 'registry_metadata': 'registryMetadata' + } + + self._key = None + self._model_version = None + self._name = None + self._description = None + self._category_name = None + self._object_status = None + self._identifier = None + self._registry_metadata = None + + @property + def key(self): + """ + Gets the key of this CreateFunctionLibraryDetails. + Currently not used on FunctionLibrary creation. Reserved for future. + + + :return: The key of this CreateFunctionLibraryDetails. + :rtype: str + """ + return self._key + + @key.setter + def key(self, key): + """ + Sets the key of this CreateFunctionLibraryDetails. + Currently not used on FunctionLibrary creation. Reserved for future. + + + :param key: The key of this CreateFunctionLibraryDetails. + :type: str + """ + self._key = key + + @property + def model_version(self): + """ + Gets the model_version of this CreateFunctionLibraryDetails. + The model version of an object. + + + :return: The model_version of this CreateFunctionLibraryDetails. + :rtype: str + """ + return self._model_version + + @model_version.setter + def model_version(self, model_version): + """ + Sets the model_version of this CreateFunctionLibraryDetails. + The model version of an object. + + + :param model_version: The model_version of this CreateFunctionLibraryDetails. + :type: str + """ + self._model_version = model_version + + @property + def name(self): + """ + **[Required]** Gets the name of this CreateFunctionLibraryDetails. + Free form text without any restriction on permitted characters. Name can have letters, numbers, and special characters. The value is editable and is restricted to 1000 characters. + + + :return: The name of this CreateFunctionLibraryDetails. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """ + Sets the name of this CreateFunctionLibraryDetails. + Free form text without any restriction on permitted characters. Name can have letters, numbers, and special characters. The value is editable and is restricted to 1000 characters. + + + :param name: The name of this CreateFunctionLibraryDetails. + :type: str + """ + self._name = name + + @property + def description(self): + """ + Gets the description of this CreateFunctionLibraryDetails. + A user defined description for the FunctionLibrary. + + + :return: The description of this CreateFunctionLibraryDetails. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this CreateFunctionLibraryDetails. + A user defined description for the FunctionLibrary. + + + :param description: The description of this CreateFunctionLibraryDetails. + :type: str + """ + self._description = description + + @property + def category_name(self): + """ + Gets the category_name of this CreateFunctionLibraryDetails. + The category name. + + + :return: The category_name of this CreateFunctionLibraryDetails. + :rtype: str + """ + return self._category_name + + @category_name.setter + def category_name(self, category_name): + """ + Sets the category_name of this CreateFunctionLibraryDetails. + The category name. + + + :param category_name: The category_name of this CreateFunctionLibraryDetails. + :type: str + """ + self._category_name = category_name + + @property + def object_status(self): + """ + Gets the object_status of this CreateFunctionLibraryDetails. + The status of an object that can be set to value 1 for shallow references across objects, other values reserved. + + + :return: The object_status of this CreateFunctionLibraryDetails. + :rtype: int + """ + return self._object_status + + @object_status.setter + def object_status(self, object_status): + """ + Sets the object_status of this CreateFunctionLibraryDetails. + The status of an object that can be set to value 1 for shallow references across objects, other values reserved. + + + :param object_status: The object_status of this CreateFunctionLibraryDetails. + :type: int + """ + self._object_status = object_status + + @property + def identifier(self): + """ + **[Required]** Gets the identifier of this CreateFunctionLibraryDetails. + Value can only contain upper case letters, underscore, and numbers. It should begin with upper case letter or underscore. The value can be modified. + + + :return: The identifier of this CreateFunctionLibraryDetails. + :rtype: str + """ + return self._identifier + + @identifier.setter + def identifier(self, identifier): + """ + Sets the identifier of this CreateFunctionLibraryDetails. + Value can only contain upper case letters, underscore, and numbers. It should begin with upper case letter or underscore. The value can be modified. + + + :param identifier: The identifier of this CreateFunctionLibraryDetails. + :type: str + """ + self._identifier = identifier + + @property + def registry_metadata(self): + """ + **[Required]** Gets the registry_metadata of this CreateFunctionLibraryDetails. + + :return: The registry_metadata of this CreateFunctionLibraryDetails. + :rtype: oci.data_integration.models.RegistryMetadata + """ + return self._registry_metadata + + @registry_metadata.setter + def registry_metadata(self, registry_metadata): + """ + Sets the registry_metadata of this CreateFunctionLibraryDetails. + + :param registry_metadata: The registry_metadata of this CreateFunctionLibraryDetails. + :type: oci.data_integration.models.RegistryMetadata + """ + self._registry_metadata = registry_metadata + + 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_integration/models/create_task_from_rest_task.py b/src/oci/data_integration/models/create_task_from_rest_task.py index 58259f69a8..e8f16acfb1 100644 --- a/src/oci/data_integration/models/create_task_from_rest_task.py +++ b/src/oci/data_integration/models/create_task_from_rest_task.py @@ -10,7 +10,7 @@ @init_model_state_from_kwargs class CreateTaskFromRestTask(CreateTaskDetails): """ - The information about the Generic REST task. + The information about the Generic REST task. The endpoint and cancelEndpoint properties are deprecated, use the properties executeRestCallConfig, cancelRestCallConfig and pollRestCallConfig for execute, cancel and polling of the calls. """ #: A constant which can be used with the method_type property of a CreateTaskFromRestTask. @@ -41,6 +41,10 @@ class CreateTaskFromRestTask(CreateTaskDetails): #: This constant has a value of "ASYNC_OCI_WORKREQUEST" API_CALL_MODE_ASYNC_OCI_WORKREQUEST = "ASYNC_OCI_WORKREQUEST" + #: A constant which can be used with the api_call_mode property of a CreateTaskFromRestTask. + #: This constant has a value of "ASYNC_GENERIC" + API_CALL_MODE_ASYNC_GENERIC = "ASYNC_GENERIC" + #: A constant which can be used with the cancel_method_type property of a CreateTaskFromRestTask. #: This constant has a value of "GET" CANCEL_METHOD_TYPE_GET = "GET" @@ -147,7 +151,7 @@ def __init__(self, **kwargs): :param api_call_mode: The value to assign to the api_call_mode property of this CreateTaskFromRestTask. - Allowed values for this property are: "SYNCHRONOUS", "ASYNC_OCI_WORKREQUEST" + Allowed values for this property are: "SYNCHRONOUS", "ASYNC_OCI_WORKREQUEST", "ASYNC_GENERIC" :type api_call_mode: str :param cancel_endpoint: @@ -159,6 +163,14 @@ def __init__(self, **kwargs): Allowed values for this property are: "GET", "POST", "PATCH", "DELETE", "PUT" :type cancel_method_type: str + :param execute_rest_call_config: + The value to assign to the execute_rest_call_config property of this CreateTaskFromRestTask. + :type execute_rest_call_config: oci.data_integration.models.ExecuteRestCallConfig + + :param cancel_rest_call_config: + The value to assign to the cancel_rest_call_config property of this CreateTaskFromRestTask. + :type cancel_rest_call_config: oci.data_integration.models.CancelRestCallConfig + """ self.swagger_types = { 'model_type': 'str', @@ -182,7 +194,9 @@ def __init__(self, **kwargs): 'json_data': 'str', 'api_call_mode': 'str', 'cancel_endpoint': 'Expression', - 'cancel_method_type': 'str' + 'cancel_method_type': 'str', + 'execute_rest_call_config': 'ExecuteRestCallConfig', + 'cancel_rest_call_config': 'CancelRestCallConfig' } self.attribute_map = { @@ -207,7 +221,9 @@ def __init__(self, **kwargs): 'json_data': 'jsonData', 'api_call_mode': 'apiCallMode', 'cancel_endpoint': 'cancelEndpoint', - 'cancel_method_type': 'cancelMethodType' + 'cancel_method_type': 'cancelMethodType', + 'execute_rest_call_config': 'executeRestCallConfig', + 'cancel_rest_call_config': 'cancelRestCallConfig' } self._model_type = None @@ -232,6 +248,8 @@ def __init__(self, **kwargs): self._api_call_mode = None self._cancel_endpoint = None self._cancel_method_type = None + self._execute_rest_call_config = None + self._cancel_rest_call_config = None self._model_type = 'REST_TASK' @property @@ -278,7 +296,7 @@ def endpoint(self, endpoint): def method_type(self): """ Gets the method_type of this CreateTaskFromRestTask. - The REST method to use. + The REST method to use. This property is deprecated, use ExecuteRestCallConfig's methodType property instead. Allowed values for this property are: "GET", "POST", "PATCH", "DELETE", "PUT" @@ -292,7 +310,7 @@ def method_type(self): def method_type(self, method_type): """ Sets the method_type of this CreateTaskFromRestTask. - The REST method to use. + The REST method to use. This property is deprecated, use ExecuteRestCallConfig's methodType property instead. :param method_type: The method_type of this CreateTaskFromRestTask. @@ -310,8 +328,6 @@ def method_type(self, method_type): def headers(self): """ Gets the headers of this CreateTaskFromRestTask. - The headers for the REST call. - :return: The headers of this CreateTaskFromRestTask. :rtype: object @@ -322,8 +338,6 @@ def headers(self): def headers(self, headers): """ Sets the headers of this CreateTaskFromRestTask. - The headers for the REST call. - :param headers: The headers of this CreateTaskFromRestTask. :type: object @@ -334,7 +348,7 @@ def headers(self, headers): def json_data(self): """ Gets the json_data of this CreateTaskFromRestTask. - JSON data for payload body. + JSON data for payload body. This property is deprecated, use ExecuteRestCallConfig's payload config param instead. :return: The json_data of this CreateTaskFromRestTask. @@ -346,7 +360,7 @@ def json_data(self): def json_data(self, json_data): """ Sets the json_data of this CreateTaskFromRestTask. - JSON data for payload body. + JSON data for payload body. This property is deprecated, use ExecuteRestCallConfig's payload config param instead. :param json_data: The json_data of this CreateTaskFromRestTask. @@ -358,9 +372,9 @@ def json_data(self, json_data): def api_call_mode(self): """ Gets the api_call_mode of this CreateTaskFromRestTask. - The invocation type to be used for Generic REST invocation. + The REST invocation pattern to use. ASYNC_OCI_WORKREQUEST is being deprecated as well as cancelEndpoint/MethodType. - Allowed values for this property are: "SYNCHRONOUS", "ASYNC_OCI_WORKREQUEST" + Allowed values for this property are: "SYNCHRONOUS", "ASYNC_OCI_WORKREQUEST", "ASYNC_GENERIC" :return: The api_call_mode of this CreateTaskFromRestTask. @@ -372,13 +386,13 @@ def api_call_mode(self): def api_call_mode(self, api_call_mode): """ Sets the api_call_mode of this CreateTaskFromRestTask. - The invocation type to be used for Generic REST invocation. + The REST invocation pattern to use. ASYNC_OCI_WORKREQUEST is being deprecated as well as cancelEndpoint/MethodType. :param api_call_mode: The api_call_mode of this CreateTaskFromRestTask. :type: str """ - allowed_values = ["SYNCHRONOUS", "ASYNC_OCI_WORKREQUEST"] + allowed_values = ["SYNCHRONOUS", "ASYNC_OCI_WORKREQUEST", "ASYNC_GENERIC"] if not value_allowed_none_or_none_sentinel(api_call_mode, allowed_values): raise ValueError( "Invalid value for `api_call_mode`, must be None or one of {0}" @@ -438,6 +452,46 @@ def cancel_method_type(self, cancel_method_type): ) self._cancel_method_type = cancel_method_type + @property + def execute_rest_call_config(self): + """ + Gets the execute_rest_call_config of this CreateTaskFromRestTask. + + :return: The execute_rest_call_config of this CreateTaskFromRestTask. + :rtype: oci.data_integration.models.ExecuteRestCallConfig + """ + return self._execute_rest_call_config + + @execute_rest_call_config.setter + def execute_rest_call_config(self, execute_rest_call_config): + """ + Sets the execute_rest_call_config of this CreateTaskFromRestTask. + + :param execute_rest_call_config: The execute_rest_call_config of this CreateTaskFromRestTask. + :type: oci.data_integration.models.ExecuteRestCallConfig + """ + self._execute_rest_call_config = execute_rest_call_config + + @property + def cancel_rest_call_config(self): + """ + Gets the cancel_rest_call_config of this CreateTaskFromRestTask. + + :return: The cancel_rest_call_config of this CreateTaskFromRestTask. + :rtype: oci.data_integration.models.CancelRestCallConfig + """ + return self._cancel_rest_call_config + + @cancel_rest_call_config.setter + def cancel_rest_call_config(self, cancel_rest_call_config): + """ + Sets the cancel_rest_call_config of this CreateTaskFromRestTask. + + :param cancel_rest_call_config: The cancel_rest_call_config of this CreateTaskFromRestTask. + :type: oci.data_integration.models.CancelRestCallConfig + """ + self._cancel_rest_call_config = cancel_rest_call_config + def __repr__(self): return formatted_flat_dict(self) diff --git a/src/oci/data_integration/models/create_task_run_details.py b/src/oci/data_integration/models/create_task_run_details.py index 65a7c675a3..ad2de4ec41 100644 --- a/src/oci/data_integration/models/create_task_run_details.py +++ b/src/oci/data_integration/models/create_task_run_details.py @@ -13,6 +13,18 @@ class CreateTaskRunDetails(object): The properties used in task run create operations. """ + #: A constant which can be used with the re_run_type property of a CreateTaskRunDetails. + #: This constant has a value of "BEGINNING" + RE_RUN_TYPE_BEGINNING = "BEGINNING" + + #: A constant which can be used with the re_run_type property of a CreateTaskRunDetails. + #: This constant has a value of "FAILED" + RE_RUN_TYPE_FAILED = "FAILED" + + #: A constant which can be used with the re_run_type property of a CreateTaskRunDetails. + #: This constant has a value of "STEP" + RE_RUN_TYPE_STEP = "STEP" + def __init__(self, **kwargs): """ Initializes a new CreateTaskRunDetails object with values from keyword arguments. @@ -50,6 +62,19 @@ def __init__(self, **kwargs): The value to assign to the task_schedule_key property of this CreateTaskRunDetails. :type task_schedule_key: str + :param ref_task_run_id: + The value to assign to the ref_task_run_id property of this CreateTaskRunDetails. + :type ref_task_run_id: str + + :param re_run_type: + The value to assign to the re_run_type property of this CreateTaskRunDetails. + Allowed values for this property are: "BEGINNING", "FAILED", "STEP" + :type re_run_type: str + + :param step_id: + The value to assign to the step_id property of this CreateTaskRunDetails. + :type step_id: str + :param registry_metadata: The value to assign to the registry_metadata property of this CreateTaskRunDetails. :type registry_metadata: oci.data_integration.models.RegistryMetadata @@ -64,6 +89,9 @@ def __init__(self, **kwargs): 'config_provider': 'CreateConfigProvider', 'identifier': 'str', 'task_schedule_key': 'str', + 'ref_task_run_id': 'str', + 're_run_type': 'str', + 'step_id': 'str', 'registry_metadata': 'RegistryMetadata' } @@ -76,6 +104,9 @@ def __init__(self, **kwargs): 'config_provider': 'configProvider', 'identifier': 'identifier', 'task_schedule_key': 'taskScheduleKey', + 'ref_task_run_id': 'refTaskRunId', + 're_run_type': 'reRunType', + 'step_id': 'stepId', 'registry_metadata': 'registryMetadata' } @@ -87,6 +118,9 @@ def __init__(self, **kwargs): self._config_provider = None self._identifier = None self._task_schedule_key = None + self._ref_task_run_id = None + self._re_run_type = None + self._step_id = None self._registry_metadata = None @property @@ -277,6 +311,86 @@ def task_schedule_key(self, task_schedule_key): """ self._task_schedule_key = task_schedule_key + @property + def ref_task_run_id(self): + """ + Gets the ref_task_run_id of this CreateTaskRunDetails. + Reference Task Run Id to be used for re-run + + + :return: The ref_task_run_id of this CreateTaskRunDetails. + :rtype: str + """ + return self._ref_task_run_id + + @ref_task_run_id.setter + def ref_task_run_id(self, ref_task_run_id): + """ + Sets the ref_task_run_id of this CreateTaskRunDetails. + Reference Task Run Id to be used for re-run + + + :param ref_task_run_id: The ref_task_run_id of this CreateTaskRunDetails. + :type: str + """ + self._ref_task_run_id = ref_task_run_id + + @property + def re_run_type(self): + """ + Gets the re_run_type of this CreateTaskRunDetails. + Supported re-run types + + Allowed values for this property are: "BEGINNING", "FAILED", "STEP" + + + :return: The re_run_type of this CreateTaskRunDetails. + :rtype: str + """ + return self._re_run_type + + @re_run_type.setter + def re_run_type(self, re_run_type): + """ + Sets the re_run_type of this CreateTaskRunDetails. + Supported re-run types + + + :param re_run_type: The re_run_type of this CreateTaskRunDetails. + :type: str + """ + allowed_values = ["BEGINNING", "FAILED", "STEP"] + if not value_allowed_none_or_none_sentinel(re_run_type, allowed_values): + raise ValueError( + "Invalid value for `re_run_type`, must be None or one of {0}" + .format(allowed_values) + ) + self._re_run_type = re_run_type + + @property + def step_id(self): + """ + Gets the step_id of this CreateTaskRunDetails. + Step Id for running from a certain step. + + + :return: The step_id of this CreateTaskRunDetails. + :rtype: str + """ + return self._step_id + + @step_id.setter + def step_id(self, step_id): + """ + Sets the step_id of this CreateTaskRunDetails. + Step Id for running from a certain step. + + + :param step_id: The step_id of this CreateTaskRunDetails. + :type: str + """ + self._step_id = step_id + @property def registry_metadata(self): """ diff --git a/src/oci/data_integration/models/create_user_defined_function_details.py b/src/oci/data_integration/models/create_user_defined_function_details.py new file mode 100644 index 0000000000..e9341f5ae3 --- /dev/null +++ b/src/oci/data_integration/models/create_user_defined_function_details.py @@ -0,0 +1,337 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 CreateUserDefinedFunctionDetails(object): + """ + Properties used in user defined function create operations. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CreateUserDefinedFunctionDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param key: + The value to assign to the key property of this CreateUserDefinedFunctionDetails. + :type key: str + + :param model_version: + The value to assign to the model_version property of this CreateUserDefinedFunctionDetails. + :type model_version: str + + :param parent_ref: + The value to assign to the parent_ref property of this CreateUserDefinedFunctionDetails. + :type parent_ref: oci.data_integration.models.ParentReference + + :param name: + The value to assign to the name property of this CreateUserDefinedFunctionDetails. + :type name: str + + :param identifier: + The value to assign to the identifier property of this CreateUserDefinedFunctionDetails. + :type identifier: str + + :param signatures: + The value to assign to the signatures property of this CreateUserDefinedFunctionDetails. + :type signatures: list[oci.data_integration.models.FunctionSignature] + + :param expr: + The value to assign to the expr property of this CreateUserDefinedFunctionDetails. + :type expr: oci.data_integration.models.Expression + + :param description: + The value to assign to the description property of this CreateUserDefinedFunctionDetails. + :type description: str + + :param object_status: + The value to assign to the object_status property of this CreateUserDefinedFunctionDetails. + :type object_status: int + + :param registry_metadata: + The value to assign to the registry_metadata property of this CreateUserDefinedFunctionDetails. + :type registry_metadata: oci.data_integration.models.RegistryMetadata + + """ + self.swagger_types = { + 'key': 'str', + 'model_version': 'str', + 'parent_ref': 'ParentReference', + 'name': 'str', + 'identifier': 'str', + 'signatures': 'list[FunctionSignature]', + 'expr': 'Expression', + 'description': 'str', + 'object_status': 'int', + 'registry_metadata': 'RegistryMetadata' + } + + self.attribute_map = { + 'key': 'key', + 'model_version': 'modelVersion', + 'parent_ref': 'parentRef', + 'name': 'name', + 'identifier': 'identifier', + 'signatures': 'signatures', + 'expr': 'expr', + 'description': 'description', + 'object_status': 'objectStatus', + 'registry_metadata': 'registryMetadata' + } + + self._key = None + self._model_version = None + self._parent_ref = None + self._name = None + self._identifier = None + self._signatures = None + self._expr = None + self._description = None + self._object_status = None + self._registry_metadata = None + + @property + def key(self): + """ + Gets the key of this CreateUserDefinedFunctionDetails. + Generated key that can be used in API calls to identify user defined function. On scenarios where reference to the user defined function is needed, a value can be passed in create. + + + :return: The key of this CreateUserDefinedFunctionDetails. + :rtype: str + """ + return self._key + + @key.setter + def key(self, key): + """ + Sets the key of this CreateUserDefinedFunctionDetails. + Generated key that can be used in API calls to identify user defined function. On scenarios where reference to the user defined function is needed, a value can be passed in create. + + + :param key: The key of this CreateUserDefinedFunctionDetails. + :type: str + """ + self._key = key + + @property + def model_version(self): + """ + Gets the model_version of this CreateUserDefinedFunctionDetails. + The model version of an object. + + + :return: The model_version of this CreateUserDefinedFunctionDetails. + :rtype: str + """ + return self._model_version + + @model_version.setter + def model_version(self, model_version): + """ + Sets the model_version of this CreateUserDefinedFunctionDetails. + The model version of an object. + + + :param model_version: The model_version of this CreateUserDefinedFunctionDetails. + :type: str + """ + self._model_version = model_version + + @property + def parent_ref(self): + """ + Gets the parent_ref of this CreateUserDefinedFunctionDetails. + + :return: The parent_ref of this CreateUserDefinedFunctionDetails. + :rtype: oci.data_integration.models.ParentReference + """ + return self._parent_ref + + @parent_ref.setter + def parent_ref(self, parent_ref): + """ + Sets the parent_ref of this CreateUserDefinedFunctionDetails. + + :param parent_ref: The parent_ref of this CreateUserDefinedFunctionDetails. + :type: oci.data_integration.models.ParentReference + """ + self._parent_ref = parent_ref + + @property + def name(self): + """ + **[Required]** Gets the name of this CreateUserDefinedFunctionDetails. + Free form text without any restriction on permitted characters. Name can have letters, numbers, and special characters. The value is editable and is restricted to 1000 characters. + + + :return: The name of this CreateUserDefinedFunctionDetails. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """ + Sets the name of this CreateUserDefinedFunctionDetails. + Free form text without any restriction on permitted characters. Name can have letters, numbers, and special characters. The value is editable and is restricted to 1000 characters. + + + :param name: The name of this CreateUserDefinedFunctionDetails. + :type: str + """ + self._name = name + + @property + def identifier(self): + """ + **[Required]** Gets the identifier of this CreateUserDefinedFunctionDetails. + Value can only contain upper case letters, underscore, and numbers. It should begin with upper case letter or underscore. The value can be modified. + + + :return: The identifier of this CreateUserDefinedFunctionDetails. + :rtype: str + """ + return self._identifier + + @identifier.setter + def identifier(self, identifier): + """ + Sets the identifier of this CreateUserDefinedFunctionDetails. + Value can only contain upper case letters, underscore, and numbers. It should begin with upper case letter or underscore. The value can be modified. + + + :param identifier: The identifier of this CreateUserDefinedFunctionDetails. + :type: str + """ + self._identifier = identifier + + @property + def signatures(self): + """ + Gets the signatures of this CreateUserDefinedFunctionDetails. + An array of function signature. + + + :return: The signatures of this CreateUserDefinedFunctionDetails. + :rtype: list[oci.data_integration.models.FunctionSignature] + """ + return self._signatures + + @signatures.setter + def signatures(self, signatures): + """ + Sets the signatures of this CreateUserDefinedFunctionDetails. + An array of function signature. + + + :param signatures: The signatures of this CreateUserDefinedFunctionDetails. + :type: list[oci.data_integration.models.FunctionSignature] + """ + self._signatures = signatures + + @property + def expr(self): + """ + Gets the expr of this CreateUserDefinedFunctionDetails. + + :return: The expr of this CreateUserDefinedFunctionDetails. + :rtype: oci.data_integration.models.Expression + """ + return self._expr + + @expr.setter + def expr(self, expr): + """ + Sets the expr of this CreateUserDefinedFunctionDetails. + + :param expr: The expr of this CreateUserDefinedFunctionDetails. + :type: oci.data_integration.models.Expression + """ + self._expr = expr + + @property + def description(self): + """ + Gets the description of this CreateUserDefinedFunctionDetails. + Detailed description for the object. + + + :return: The description of this CreateUserDefinedFunctionDetails. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this CreateUserDefinedFunctionDetails. + Detailed description for the object. + + + :param description: The description of this CreateUserDefinedFunctionDetails. + :type: str + """ + self._description = description + + @property + def object_status(self): + """ + Gets the object_status of this CreateUserDefinedFunctionDetails. + The status of an object that can be set to value 1 for shallow references across objects, other values reserved. + + + :return: The object_status of this CreateUserDefinedFunctionDetails. + :rtype: int + """ + return self._object_status + + @object_status.setter + def object_status(self, object_status): + """ + Sets the object_status of this CreateUserDefinedFunctionDetails. + The status of an object that can be set to value 1 for shallow references across objects, other values reserved. + + + :param object_status: The object_status of this CreateUserDefinedFunctionDetails. + :type: int + """ + self._object_status = object_status + + @property + def registry_metadata(self): + """ + **[Required]** Gets the registry_metadata of this CreateUserDefinedFunctionDetails. + + :return: The registry_metadata of this CreateUserDefinedFunctionDetails. + :rtype: oci.data_integration.models.RegistryMetadata + """ + return self._registry_metadata + + @registry_metadata.setter + def registry_metadata(self, registry_metadata): + """ + Sets the registry_metadata of this CreateUserDefinedFunctionDetails. + + :param registry_metadata: The registry_metadata of this CreateUserDefinedFunctionDetails. + :type: oci.data_integration.models.RegistryMetadata + """ + self._registry_metadata = registry_metadata + + 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_integration/models/create_user_defined_function_validation_details.py b/src/oci/data_integration/models/create_user_defined_function_validation_details.py new file mode 100644 index 0000000000..68f4211b39 --- /dev/null +++ b/src/oci/data_integration/models/create_user_defined_function_validation_details.py @@ -0,0 +1,443 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 CreateUserDefinedFunctionValidationDetails(object): + """ + The properties used in create UserDefinedFunction validation operations. + """ + + #: A constant which can be used with the model_type property of a CreateUserDefinedFunctionValidationDetails. + #: This constant has a value of "DIS_USER_DEFINED_FUNCTION" + MODEL_TYPE_DIS_USER_DEFINED_FUNCTION = "DIS_USER_DEFINED_FUNCTION" + + def __init__(self, **kwargs): + """ + Initializes a new CreateUserDefinedFunctionValidationDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param key: + The value to assign to the key property of this CreateUserDefinedFunctionValidationDetails. + :type key: str + + :param model_type: + The value to assign to the model_type property of this CreateUserDefinedFunctionValidationDetails. + Allowed values for this property are: "DIS_USER_DEFINED_FUNCTION" + :type model_type: str + + :param model_version: + The value to assign to the model_version property of this CreateUserDefinedFunctionValidationDetails. + :type model_version: str + + :param parent_ref: + The value to assign to the parent_ref property of this CreateUserDefinedFunctionValidationDetails. + :type parent_ref: oci.data_integration.models.ParentReference + + :param name: + The value to assign to the name property of this CreateUserDefinedFunctionValidationDetails. + :type name: str + + :param identifier: + The value to assign to the identifier property of this CreateUserDefinedFunctionValidationDetails. + :type identifier: str + + :param object_version: + The value to assign to the object_version property of this CreateUserDefinedFunctionValidationDetails. + :type object_version: int + + :param signatures: + The value to assign to the signatures property of this CreateUserDefinedFunctionValidationDetails. + :type signatures: list[oci.data_integration.models.FunctionSignature] + + :param expr: + The value to assign to the expr property of this CreateUserDefinedFunctionValidationDetails. + :type expr: oci.data_integration.models.Expression + + :param description: + The value to assign to the description property of this CreateUserDefinedFunctionValidationDetails. + :type description: str + + :param object_status: + The value to assign to the object_status property of this CreateUserDefinedFunctionValidationDetails. + :type object_status: int + + :param metadata: + The value to assign to the metadata property of this CreateUserDefinedFunctionValidationDetails. + :type metadata: oci.data_integration.models.ObjectMetadata + + :param key_map: + The value to assign to the key_map property of this CreateUserDefinedFunctionValidationDetails. + :type key_map: dict(str, str) + + """ + self.swagger_types = { + 'key': 'str', + 'model_type': 'str', + 'model_version': 'str', + 'parent_ref': 'ParentReference', + 'name': 'str', + 'identifier': 'str', + 'object_version': 'int', + 'signatures': 'list[FunctionSignature]', + 'expr': 'Expression', + 'description': 'str', + 'object_status': 'int', + 'metadata': 'ObjectMetadata', + 'key_map': 'dict(str, str)' + } + + self.attribute_map = { + 'key': 'key', + 'model_type': 'modelType', + 'model_version': 'modelVersion', + 'parent_ref': 'parentRef', + 'name': 'name', + 'identifier': 'identifier', + 'object_version': 'objectVersion', + 'signatures': 'signatures', + 'expr': 'expr', + 'description': 'description', + 'object_status': 'objectStatus', + 'metadata': 'metadata', + 'key_map': 'keyMap' + } + + self._key = None + self._model_type = None + self._model_version = None + self._parent_ref = None + self._name = None + self._identifier = None + self._object_version = None + self._signatures = None + self._expr = None + self._description = None + self._object_status = None + self._metadata = None + self._key_map = None + + @property + def key(self): + """ + Gets the key of this CreateUserDefinedFunctionValidationDetails. + Generated key that can be used in API calls to identify user defined function. On scenarios where reference to the user defined function is needed, a value can be passed in create. + + + :return: The key of this CreateUserDefinedFunctionValidationDetails. + :rtype: str + """ + return self._key + + @key.setter + def key(self, key): + """ + Sets the key of this CreateUserDefinedFunctionValidationDetails. + Generated key that can be used in API calls to identify user defined function. On scenarios where reference to the user defined function is needed, a value can be passed in create. + + + :param key: The key of this CreateUserDefinedFunctionValidationDetails. + :type: str + """ + self._key = key + + @property + def model_type(self): + """ + Gets the model_type of this CreateUserDefinedFunctionValidationDetails. + The type of the object. + + Allowed values for this property are: "DIS_USER_DEFINED_FUNCTION" + + + :return: The model_type of this CreateUserDefinedFunctionValidationDetails. + :rtype: str + """ + return self._model_type + + @model_type.setter + def model_type(self, model_type): + """ + Sets the model_type of this CreateUserDefinedFunctionValidationDetails. + The type of the object. + + + :param model_type: The model_type of this CreateUserDefinedFunctionValidationDetails. + :type: str + """ + allowed_values = ["DIS_USER_DEFINED_FUNCTION"] + if not value_allowed_none_or_none_sentinel(model_type, allowed_values): + raise ValueError( + "Invalid value for `model_type`, must be None or one of {0}" + .format(allowed_values) + ) + self._model_type = model_type + + @property + def model_version(self): + """ + Gets the model_version of this CreateUserDefinedFunctionValidationDetails. + The model version of an object. + + + :return: The model_version of this CreateUserDefinedFunctionValidationDetails. + :rtype: str + """ + return self._model_version + + @model_version.setter + def model_version(self, model_version): + """ + Sets the model_version of this CreateUserDefinedFunctionValidationDetails. + The model version of an object. + + + :param model_version: The model_version of this CreateUserDefinedFunctionValidationDetails. + :type: str + """ + self._model_version = model_version + + @property + def parent_ref(self): + """ + Gets the parent_ref of this CreateUserDefinedFunctionValidationDetails. + + :return: The parent_ref of this CreateUserDefinedFunctionValidationDetails. + :rtype: oci.data_integration.models.ParentReference + """ + return self._parent_ref + + @parent_ref.setter + def parent_ref(self, parent_ref): + """ + Sets the parent_ref of this CreateUserDefinedFunctionValidationDetails. + + :param parent_ref: The parent_ref of this CreateUserDefinedFunctionValidationDetails. + :type: oci.data_integration.models.ParentReference + """ + self._parent_ref = parent_ref + + @property + def name(self): + """ + Gets the name of this CreateUserDefinedFunctionValidationDetails. + Free form text without any restriction on permitted characters. Name can have letters, numbers, and special characters. The value is editable and is restricted to 1000 characters. + + + :return: The name of this CreateUserDefinedFunctionValidationDetails. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """ + Sets the name of this CreateUserDefinedFunctionValidationDetails. + Free form text without any restriction on permitted characters. Name can have letters, numbers, and special characters. The value is editable and is restricted to 1000 characters. + + + :param name: The name of this CreateUserDefinedFunctionValidationDetails. + :type: str + """ + self._name = name + + @property + def identifier(self): + """ + Gets the identifier of this CreateUserDefinedFunctionValidationDetails. + Value can only contain upper case letters, underscore, and numbers. It should begin with upper case letter or underscore. The value can be modified. + + + :return: The identifier of this CreateUserDefinedFunctionValidationDetails. + :rtype: str + """ + return self._identifier + + @identifier.setter + def identifier(self, identifier): + """ + Sets the identifier of this CreateUserDefinedFunctionValidationDetails. + Value can only contain upper case letters, underscore, and numbers. It should begin with upper case letter or underscore. The value can be modified. + + + :param identifier: The identifier of this CreateUserDefinedFunctionValidationDetails. + :type: str + """ + self._identifier = identifier + + @property + def object_version(self): + """ + Gets the object_version of this CreateUserDefinedFunctionValidationDetails. + The version of the object that is used to track changes in the object instance. + + + :return: The object_version of this CreateUserDefinedFunctionValidationDetails. + :rtype: int + """ + return self._object_version + + @object_version.setter + def object_version(self, object_version): + """ + Sets the object_version of this CreateUserDefinedFunctionValidationDetails. + The version of the object that is used to track changes in the object instance. + + + :param object_version: The object_version of this CreateUserDefinedFunctionValidationDetails. + :type: int + """ + self._object_version = object_version + + @property + def signatures(self): + """ + Gets the signatures of this CreateUserDefinedFunctionValidationDetails. + An array of function signature. + + + :return: The signatures of this CreateUserDefinedFunctionValidationDetails. + :rtype: list[oci.data_integration.models.FunctionSignature] + """ + return self._signatures + + @signatures.setter + def signatures(self, signatures): + """ + Sets the signatures of this CreateUserDefinedFunctionValidationDetails. + An array of function signature. + + + :param signatures: The signatures of this CreateUserDefinedFunctionValidationDetails. + :type: list[oci.data_integration.models.FunctionSignature] + """ + self._signatures = signatures + + @property + def expr(self): + """ + Gets the expr of this CreateUserDefinedFunctionValidationDetails. + + :return: The expr of this CreateUserDefinedFunctionValidationDetails. + :rtype: oci.data_integration.models.Expression + """ + return self._expr + + @expr.setter + def expr(self, expr): + """ + Sets the expr of this CreateUserDefinedFunctionValidationDetails. + + :param expr: The expr of this CreateUserDefinedFunctionValidationDetails. + :type: oci.data_integration.models.Expression + """ + self._expr = expr + + @property + def description(self): + """ + Gets the description of this CreateUserDefinedFunctionValidationDetails. + Detailed description for the object. + + + :return: The description of this CreateUserDefinedFunctionValidationDetails. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this CreateUserDefinedFunctionValidationDetails. + Detailed description for the object. + + + :param description: The description of this CreateUserDefinedFunctionValidationDetails. + :type: str + """ + self._description = description + + @property + def object_status(self): + """ + Gets the object_status of this CreateUserDefinedFunctionValidationDetails. + The status of an object that can be set to value 1 for shallow references across objects, other values reserved. + + + :return: The object_status of this CreateUserDefinedFunctionValidationDetails. + :rtype: int + """ + return self._object_status + + @object_status.setter + def object_status(self, object_status): + """ + Sets the object_status of this CreateUserDefinedFunctionValidationDetails. + The status of an object that can be set to value 1 for shallow references across objects, other values reserved. + + + :param object_status: The object_status of this CreateUserDefinedFunctionValidationDetails. + :type: int + """ + self._object_status = object_status + + @property + def metadata(self): + """ + Gets the metadata of this CreateUserDefinedFunctionValidationDetails. + + :return: The metadata of this CreateUserDefinedFunctionValidationDetails. + :rtype: oci.data_integration.models.ObjectMetadata + """ + return self._metadata + + @metadata.setter + def metadata(self, metadata): + """ + Sets the metadata of this CreateUserDefinedFunctionValidationDetails. + + :param metadata: The metadata of this CreateUserDefinedFunctionValidationDetails. + :type: oci.data_integration.models.ObjectMetadata + """ + self._metadata = metadata + + @property + def key_map(self): + """ + Gets the key_map of this CreateUserDefinedFunctionValidationDetails. + A key map. If provided, key is replaced with generated key. This structure provides mapping between user provided key and generated key. + + + :return: The key_map of this CreateUserDefinedFunctionValidationDetails. + :rtype: dict(str, str) + """ + return self._key_map + + @key_map.setter + def key_map(self, key_map): + """ + Sets the key_map of this CreateUserDefinedFunctionValidationDetails. + A key map. If provided, key is replaced with generated key. This structure provides mapping between user provided key and generated key. + + + :param key_map: The key_map of this CreateUserDefinedFunctionValidationDetails. + :type: dict(str, str) + """ + self._key_map = key_map + + 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_integration/models/custom_frequency_details.py b/src/oci/data_integration/models/custom_frequency_details.py new file mode 100644 index 0000000000..8da87f1642 --- /dev/null +++ b/src/oci/data_integration/models/custom_frequency_details.py @@ -0,0 +1,88 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .abstract_frequency_details import AbstractFrequencyDetails +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 CustomFrequencyDetails(AbstractFrequencyDetails): + """ + Frequency details model to set cron-based frequency + """ + + def __init__(self, **kwargs): + """ + Initializes a new CustomFrequencyDetails object with values from keyword arguments. The default value of the :py:attr:`~oci.data_integration.models.CustomFrequencyDetails.model_type` attribute + of this class is ``CUSTOM`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param model_type: + The value to assign to the model_type property of this CustomFrequencyDetails. + Allowed values for this property are: "HOURLY", "DAILY", "MONTHLY", "WEEKLY", "MONTHLY_RULE", "CUSTOM" + :type model_type: str + + :param frequency: + The value to assign to the frequency property of this CustomFrequencyDetails. + Allowed values for this property are: "HOURLY", "DAILY", "MONTHLY", "WEEKLY", "CUSTOM" + :type frequency: str + + :param custom_expression: + The value to assign to the custom_expression property of this CustomFrequencyDetails. + :type custom_expression: str + + """ + self.swagger_types = { + 'model_type': 'str', + 'frequency': 'str', + 'custom_expression': 'str' + } + + self.attribute_map = { + 'model_type': 'modelType', + 'frequency': 'frequency', + 'custom_expression': 'customExpression' + } + + self._model_type = None + self._frequency = None + self._custom_expression = None + self._model_type = 'CUSTOM' + + @property + def custom_expression(self): + """ + Gets the custom_expression of this CustomFrequencyDetails. + This holds the complete cron expression for this schedule, for example, 10 0/5 * * * ? that fires every 5 minutes, at 10 seconds after the minute (i.e. 10:00:10 am, 10:05:10 am, etc.) + + + :return: The custom_expression of this CustomFrequencyDetails. + :rtype: str + """ + return self._custom_expression + + @custom_expression.setter + def custom_expression(self, custom_expression): + """ + Sets the custom_expression of this CustomFrequencyDetails. + This holds the complete cron expression for this schedule, for example, 10 0/5 * * * ? that fires every 5 minutes, at 10 seconds after the minute (i.e. 10:00:10 am, 10:05:10 am, etc.) + + + :param custom_expression: The custom_expression of this CustomFrequencyDetails. + :type: str + """ + self._custom_expression = custom_expression + + 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_integration/models/daily_frequency_details.py b/src/oci/data_integration/models/daily_frequency_details.py index a7628b78a8..2e5fcaa206 100644 --- a/src/oci/data_integration/models/daily_frequency_details.py +++ b/src/oci/data_integration/models/daily_frequency_details.py @@ -21,12 +21,12 @@ def __init__(self, **kwargs): :param model_type: The value to assign to the model_type property of this DailyFrequencyDetails. - Allowed values for this property are: "HOURLY", "DAILY", "MONTHLY" + Allowed values for this property are: "HOURLY", "DAILY", "MONTHLY", "WEEKLY", "MONTHLY_RULE", "CUSTOM" :type model_type: str :param frequency: The value to assign to the frequency property of this DailyFrequencyDetails. - Allowed values for this property are: "HOURLY", "DAILY", "MONTHLY" + Allowed values for this property are: "HOURLY", "DAILY", "MONTHLY", "WEEKLY", "CUSTOM" :type frequency: str :param interval: diff --git a/src/oci/data_integration/models/data_asset_from_fusion_app.py b/src/oci/data_integration/models/data_asset_from_fusion_app.py index 0b8b70a237..5f3f26bbbc 100644 --- a/src/oci/data_integration/models/data_asset_from_fusion_app.py +++ b/src/oci/data_integration/models/data_asset_from_fusion_app.py @@ -10,7 +10,7 @@ @init_model_state_from_kwargs class DataAssetFromFusionApp(DataAsset): """ - Details for the MYSQL data asset type. + Details for the FUSION_APP data asset type. """ def __init__(self, **kwargs): @@ -145,7 +145,7 @@ def __init__(self, **kwargs): def service_url(self): """ Gets the service_url of this DataAssetFromFusionApp. - The service url of the Bi Server. + The service url of the BI Server. :return: The service_url of this DataAssetFromFusionApp. @@ -157,7 +157,7 @@ def service_url(self): def service_url(self, service_url): """ Sets the service_url of this DataAssetFromFusionApp. - The service url of the Bi Server. + The service url of the BI Server. :param service_url: The service_url of this DataAssetFromFusionApp. diff --git a/src/oci/data_integration/models/data_asset_from_object_storage_details.py b/src/oci/data_integration/models/data_asset_from_object_storage_details.py index a04b3bc2e5..90405a88f3 100644 --- a/src/oci/data_integration/models/data_asset_from_object_storage_details.py +++ b/src/oci/data_integration/models/data_asset_from_object_storage_details.py @@ -76,6 +76,10 @@ def __init__(self, **kwargs): The value to assign to the key_map property of this DataAssetFromObjectStorageDetails. :type key_map: dict(str, str) + :param oci_region: + The value to assign to the oci_region property of this DataAssetFromObjectStorageDetails. + :type oci_region: str + :param url: The value to assign to the url property of this DataAssetFromObjectStorageDetails. :type url: str @@ -108,6 +112,7 @@ def __init__(self, **kwargs): 'parent_ref': 'ParentReference', 'metadata': 'ObjectMetadata', 'key_map': 'dict(str, str)', + 'oci_region': 'str', 'url': 'str', 'tenancy_id': 'str', 'namespace': 'str', @@ -129,6 +134,7 @@ def __init__(self, **kwargs): 'parent_ref': 'parentRef', 'metadata': 'metadata', 'key_map': 'keyMap', + 'oci_region': 'ociRegion', 'url': 'url', 'tenancy_id': 'tenancyId', 'namespace': 'namespace', @@ -149,12 +155,37 @@ def __init__(self, **kwargs): self._parent_ref = None self._metadata = None self._key_map = None + self._oci_region = None self._url = None self._tenancy_id = None self._namespace = None self._default_connection = None self._model_type = 'ORACLE_OBJECT_STORAGE_DATA_ASSET' + @property + def oci_region(self): + """ + Gets the oci_region of this DataAssetFromObjectStorageDetails. + The Oracle Object storage Region ie. us-ashburn-1 + + + :return: The oci_region of this DataAssetFromObjectStorageDetails. + :rtype: str + """ + return self._oci_region + + @oci_region.setter + def oci_region(self, oci_region): + """ + Sets the oci_region of this DataAssetFromObjectStorageDetails. + The Oracle Object storage Region ie. us-ashburn-1 + + + :param oci_region: The oci_region of this DataAssetFromObjectStorageDetails. + :type: str + """ + self._oci_region = oci_region + @property def url(self): """ diff --git a/src/oci/data_integration/models/data_asset_summary_from_object_storage.py b/src/oci/data_integration/models/data_asset_summary_from_object_storage.py index d31038c979..167797f95f 100644 --- a/src/oci/data_integration/models/data_asset_summary_from_object_storage.py +++ b/src/oci/data_integration/models/data_asset_summary_from_object_storage.py @@ -72,6 +72,10 @@ def __init__(self, **kwargs): The value to assign to the metadata property of this DataAssetSummaryFromObjectStorage. :type metadata: oci.data_integration.models.ObjectMetadata + :param oci_region: + The value to assign to the oci_region property of this DataAssetSummaryFromObjectStorage. + :type oci_region: str + :param url: The value to assign to the url property of this DataAssetSummaryFromObjectStorage. :type url: str @@ -103,6 +107,7 @@ def __init__(self, **kwargs): 'object_version': 'int', 'parent_ref': 'ParentReference', 'metadata': 'ObjectMetadata', + 'oci_region': 'str', 'url': 'str', 'tenancy_id': 'str', 'namespace': 'str', @@ -123,6 +128,7 @@ def __init__(self, **kwargs): 'object_version': 'objectVersion', 'parent_ref': 'parentRef', 'metadata': 'metadata', + 'oci_region': 'ociRegion', 'url': 'url', 'tenancy_id': 'tenancyId', 'namespace': 'namespace', @@ -142,12 +148,37 @@ def __init__(self, **kwargs): self._object_version = None self._parent_ref = None self._metadata = None + self._oci_region = None self._url = None self._tenancy_id = None self._namespace = None self._default_connection = None self._model_type = 'ORACLE_OBJECT_STORAGE_DATA_ASSET' + @property + def oci_region(self): + """ + Gets the oci_region of this DataAssetSummaryFromObjectStorage. + The Oracle Object storage Region ie. us-ashburn-1 + + + :return: The oci_region of this DataAssetSummaryFromObjectStorage. + :rtype: str + """ + return self._oci_region + + @oci_region.setter + def oci_region(self, oci_region): + """ + Sets the oci_region of this DataAssetSummaryFromObjectStorage. + The Oracle Object storage Region ie. us-ashburn-1 + + + :param oci_region: The oci_region of this DataAssetSummaryFromObjectStorage. + :type: str + """ + self._oci_region = oci_region + @property def url(self): """ diff --git a/src/oci/data_integration/models/data_entity.py b/src/oci/data_integration/models/data_entity.py index 7abe5cffc3..03f2fc94cb 100644 --- a/src/oci/data_integration/models/data_entity.py +++ b/src/oci/data_integration/models/data_entity.py @@ -25,6 +25,10 @@ class DataEntity(object): #: This constant has a value of "FILE_ENTITY" MODEL_TYPE_FILE_ENTITY = "FILE_ENTITY" + #: A constant which can be used with the model_type property of a DataEntity. + #: This constant has a value of "SQL_ENTITY" + MODEL_TYPE_SQL_ENTITY = "SQL_ENTITY" + #: A constant which can be used with the model_type property of a DataEntity. #: This constant has a value of "DATA_STORE_ENTITY" MODEL_TYPE_DATA_STORE_ENTITY = "DATA_STORE_ENTITY" @@ -37,13 +41,14 @@ def __init__(self, **kwargs): * :class:`~oci.data_integration.models.DataEntityFromTable` * :class:`~oci.data_integration.models.DataEntityFromDataStore` * :class:`~oci.data_integration.models.DataEntityFromView` + * :class:`~oci.data_integration.models.DataEntityFromSql` * :class:`~oci.data_integration.models.DataEntityFromFile` The following keyword arguments are supported (corresponding to the getters/setters of this class): :param model_type: The value to assign to the model_type property of this DataEntity. - Allowed values for this property are: "VIEW_ENTITY", "TABLE_ENTITY", "FILE_ENTITY", "DATA_STORE_ENTITY", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "VIEW_ENTITY", "TABLE_ENTITY", "FILE_ENTITY", "SQL_ENTITY", "DATA_STORE_ENTITY", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type model_type: str @@ -82,6 +87,9 @@ def get_subtype(object_dictionary): if type == 'VIEW_ENTITY': return 'DataEntityFromView' + if type == 'SQL_ENTITY': + return 'DataEntityFromSql' + if type == 'FILE_ENTITY': return 'DataEntityFromFile' else: @@ -93,7 +101,7 @@ def model_type(self): **[Required]** Gets the model_type of this DataEntity. The data entity type. - Allowed values for this property are: "VIEW_ENTITY", "TABLE_ENTITY", "FILE_ENTITY", "DATA_STORE_ENTITY", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "VIEW_ENTITY", "TABLE_ENTITY", "FILE_ENTITY", "SQL_ENTITY", "DATA_STORE_ENTITY", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. @@ -112,7 +120,7 @@ def model_type(self, model_type): :param model_type: The model_type of this DataEntity. :type: str """ - allowed_values = ["VIEW_ENTITY", "TABLE_ENTITY", "FILE_ENTITY", "DATA_STORE_ENTITY"] + allowed_values = ["VIEW_ENTITY", "TABLE_ENTITY", "FILE_ENTITY", "SQL_ENTITY", "DATA_STORE_ENTITY"] if not value_allowed_none_or_none_sentinel(model_type, allowed_values): model_type = 'UNKNOWN_ENUM_VALUE' self._model_type = model_type diff --git a/src/oci/data_integration/models/data_entity_details.py b/src/oci/data_integration/models/data_entity_details.py index e08577f393..0b5cb33bfb 100644 --- a/src/oci/data_integration/models/data_entity_details.py +++ b/src/oci/data_integration/models/data_entity_details.py @@ -25,6 +25,10 @@ class DataEntityDetails(object): #: This constant has a value of "FILE_ENTITY" MODEL_TYPE_FILE_ENTITY = "FILE_ENTITY" + #: A constant which can be used with the model_type property of a DataEntityDetails. + #: This constant has a value of "SQL_ENTITY" + MODEL_TYPE_SQL_ENTITY = "SQL_ENTITY" + #: A constant which can be used with the model_type property of a DataEntityDetails. #: This constant has a value of "DATA_STORE_ENTITY" MODEL_TYPE_DATA_STORE_ENTITY = "DATA_STORE_ENTITY" @@ -36,6 +40,7 @@ def __init__(self, **kwargs): * :class:`~oci.data_integration.models.DataEntityFromFileEntityDetails` * :class:`~oci.data_integration.models.DataEntityFromViewEntityDetails` + * :class:`~oci.data_integration.models.DataEntityFromSqlEntityDetails` * :class:`~oci.data_integration.models.DataEntityFromDataStoreEntityDetails` * :class:`~oci.data_integration.models.DataEntityFromTableEntityDetails` @@ -43,7 +48,7 @@ def __init__(self, **kwargs): :param model_type: The value to assign to the model_type property of this DataEntityDetails. - Allowed values for this property are: "VIEW_ENTITY", "TABLE_ENTITY", "FILE_ENTITY", "DATA_STORE_ENTITY" + Allowed values for this property are: "VIEW_ENTITY", "TABLE_ENTITY", "FILE_ENTITY", "SQL_ENTITY", "DATA_STORE_ENTITY" :type model_type: str """ @@ -71,6 +76,9 @@ def get_subtype(object_dictionary): if type == 'VIEW_ENTITY': return 'DataEntityFromViewEntityDetails' + if type == 'SQL_ENTITY': + return 'DataEntityFromSqlEntityDetails' + if type == 'DATA_STORE_ENTITY': return 'DataEntityFromDataStoreEntityDetails' @@ -85,7 +93,7 @@ def model_type(self): **[Required]** Gets the model_type of this DataEntityDetails. The data entity type. - Allowed values for this property are: "VIEW_ENTITY", "TABLE_ENTITY", "FILE_ENTITY", "DATA_STORE_ENTITY" + Allowed values for this property are: "VIEW_ENTITY", "TABLE_ENTITY", "FILE_ENTITY", "SQL_ENTITY", "DATA_STORE_ENTITY" :return: The model_type of this DataEntityDetails. @@ -103,7 +111,7 @@ def model_type(self, model_type): :param model_type: The model_type of this DataEntityDetails. :type: str """ - allowed_values = ["VIEW_ENTITY", "TABLE_ENTITY", "FILE_ENTITY", "DATA_STORE_ENTITY"] + allowed_values = ["VIEW_ENTITY", "TABLE_ENTITY", "FILE_ENTITY", "SQL_ENTITY", "DATA_STORE_ENTITY"] if not value_allowed_none_or_none_sentinel(model_type, allowed_values): raise ValueError( "Invalid value for `model_type`, must be None or one of {0}" diff --git a/src/oci/data_integration/models/data_entity_from_data_store.py b/src/oci/data_integration/models/data_entity_from_data_store.py index 5256c99524..24b884ba6e 100644 --- a/src/oci/data_integration/models/data_entity_from_data_store.py +++ b/src/oci/data_integration/models/data_entity_from_data_store.py @@ -49,7 +49,7 @@ def __init__(self, **kwargs): :param model_type: The value to assign to the model_type property of this DataEntityFromDataStore. - Allowed values for this property are: "VIEW_ENTITY", "TABLE_ENTITY", "FILE_ENTITY", "DATA_STORE_ENTITY", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "VIEW_ENTITY", "TABLE_ENTITY", "FILE_ENTITY", "SQL_ENTITY", "DATA_STORE_ENTITY", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type model_type: str diff --git a/src/oci/data_integration/models/data_entity_from_data_store_entity_details.py b/src/oci/data_integration/models/data_entity_from_data_store_entity_details.py index 2c3222013b..86f0fdc7d0 100644 --- a/src/oci/data_integration/models/data_entity_from_data_store_entity_details.py +++ b/src/oci/data_integration/models/data_entity_from_data_store_entity_details.py @@ -49,7 +49,7 @@ def __init__(self, **kwargs): :param model_type: The value to assign to the model_type property of this DataEntityFromDataStoreEntityDetails. - Allowed values for this property are: "VIEW_ENTITY", "TABLE_ENTITY", "FILE_ENTITY", "DATA_STORE_ENTITY" + Allowed values for this property are: "VIEW_ENTITY", "TABLE_ENTITY", "FILE_ENTITY", "SQL_ENTITY", "DATA_STORE_ENTITY" :type model_type: str :param key: diff --git a/src/oci/data_integration/models/data_entity_from_file.py b/src/oci/data_integration/models/data_entity_from_file.py index a4abc1fd34..7371cdde1c 100644 --- a/src/oci/data_integration/models/data_entity_from_file.py +++ b/src/oci/data_integration/models/data_entity_from_file.py @@ -45,7 +45,7 @@ def __init__(self, **kwargs): :param model_type: The value to assign to the model_type property of this DataEntityFromFile. - Allowed values for this property are: "VIEW_ENTITY", "TABLE_ENTITY", "FILE_ENTITY", "DATA_STORE_ENTITY", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "VIEW_ENTITY", "TABLE_ENTITY", "FILE_ENTITY", "SQL_ENTITY", "DATA_STORE_ENTITY", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type model_type: str diff --git a/src/oci/data_integration/models/data_entity_from_file_entity_details.py b/src/oci/data_integration/models/data_entity_from_file_entity_details.py index 5be436b059..d376047123 100644 --- a/src/oci/data_integration/models/data_entity_from_file_entity_details.py +++ b/src/oci/data_integration/models/data_entity_from_file_entity_details.py @@ -45,7 +45,7 @@ def __init__(self, **kwargs): :param model_type: The value to assign to the model_type property of this DataEntityFromFileEntityDetails. - Allowed values for this property are: "VIEW_ENTITY", "TABLE_ENTITY", "FILE_ENTITY", "DATA_STORE_ENTITY" + Allowed values for this property are: "VIEW_ENTITY", "TABLE_ENTITY", "FILE_ENTITY", "SQL_ENTITY", "DATA_STORE_ENTITY" :type model_type: str :param key: diff --git a/src/oci/data_integration/models/data_entity_from_sql.py b/src/oci/data_integration/models/data_entity_from_sql.py new file mode 100644 index 0000000000..ea0b117a1d --- /dev/null +++ b/src/oci/data_integration/models/data_entity_from_sql.py @@ -0,0 +1,600 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .data_entity import DataEntity +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 DataEntityFromSql(DataEntity): + """ + The sql entity data entity details. + """ + + #: A constant which can be used with the entity_type property of a DataEntityFromSql. + #: This constant has a value of "TABLE" + ENTITY_TYPE_TABLE = "TABLE" + + #: A constant which can be used with the entity_type property of a DataEntityFromSql. + #: This constant has a value of "VIEW" + ENTITY_TYPE_VIEW = "VIEW" + + #: A constant which can be used with the entity_type property of a DataEntityFromSql. + #: This constant has a value of "FILE" + ENTITY_TYPE_FILE = "FILE" + + #: A constant which can be used with the entity_type property of a DataEntityFromSql. + #: This constant has a value of "SQL" + ENTITY_TYPE_SQL = "SQL" + + def __init__(self, **kwargs): + """ + Initializes a new DataEntityFromSql object with values from keyword arguments. The default value of the :py:attr:`~oci.data_integration.models.DataEntityFromSql.model_type` attribute + of this class is ``SQL_ENTITY`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param model_type: + The value to assign to the model_type property of this DataEntityFromSql. + Allowed values for this property are: "VIEW_ENTITY", "TABLE_ENTITY", "FILE_ENTITY", "SQL_ENTITY", "DATA_STORE_ENTITY", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type model_type: str + + :param metadata: + The value to assign to the metadata property of this DataEntityFromSql. + :type metadata: oci.data_integration.models.ObjectMetadata + + :param key: + The value to assign to the key property of this DataEntityFromSql. + :type key: str + + :param model_version: + The value to assign to the model_version property of this DataEntityFromSql. + :type model_version: str + + :param parent_ref: + The value to assign to the parent_ref property of this DataEntityFromSql. + :type parent_ref: oci.data_integration.models.ParentReference + + :param name: + The value to assign to the name property of this DataEntityFromSql. + :type name: str + + :param description: + The value to assign to the description property of this DataEntityFromSql. + :type description: str + + :param object_version: + The value to assign to the object_version property of this DataEntityFromSql. + :type object_version: int + + :param external_key: + The value to assign to the external_key property of this DataEntityFromSql. + :type external_key: str + + :param shape: + The value to assign to the shape property of this DataEntityFromSql. + :type shape: oci.data_integration.models.Shape + + :param shape_id: + The value to assign to the shape_id property of this DataEntityFromSql. + :type shape_id: str + + :param entity_type: + The value to assign to the entity_type property of this DataEntityFromSql. + Allowed values for this property are: "TABLE", "VIEW", "FILE", "SQL", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type entity_type: str + + :param other_type_label: + The value to assign to the other_type_label property of this DataEntityFromSql. + :type other_type_label: str + + :param unique_keys: + The value to assign to the unique_keys property of this DataEntityFromSql. + :type unique_keys: list[oci.data_integration.models.UniqueKey] + + :param foreign_keys: + The value to assign to the foreign_keys property of this DataEntityFromSql. + :type foreign_keys: list[oci.data_integration.models.ForeignKey] + + :param resource_name: + The value to assign to the resource_name property of this DataEntityFromSql. + :type resource_name: str + + :param object_status: + The value to assign to the object_status property of this DataEntityFromSql. + :type object_status: int + + :param identifier: + The value to assign to the identifier property of this DataEntityFromSql. + :type identifier: str + + :param sql_query: + The value to assign to the sql_query property of this DataEntityFromSql. + :type sql_query: str + + """ + self.swagger_types = { + 'model_type': 'str', + 'metadata': 'ObjectMetadata', + 'key': 'str', + 'model_version': 'str', + 'parent_ref': 'ParentReference', + 'name': 'str', + 'description': 'str', + 'object_version': 'int', + 'external_key': 'str', + 'shape': 'Shape', + 'shape_id': 'str', + 'entity_type': 'str', + 'other_type_label': 'str', + 'unique_keys': 'list[UniqueKey]', + 'foreign_keys': 'list[ForeignKey]', + 'resource_name': 'str', + 'object_status': 'int', + 'identifier': 'str', + 'sql_query': 'str' + } + + self.attribute_map = { + 'model_type': 'modelType', + 'metadata': 'metadata', + 'key': 'key', + 'model_version': 'modelVersion', + 'parent_ref': 'parentRef', + 'name': 'name', + 'description': 'description', + 'object_version': 'objectVersion', + 'external_key': 'externalKey', + 'shape': 'shape', + 'shape_id': 'shapeId', + 'entity_type': 'entityType', + 'other_type_label': 'otherTypeLabel', + 'unique_keys': 'uniqueKeys', + 'foreign_keys': 'foreignKeys', + 'resource_name': 'resourceName', + 'object_status': 'objectStatus', + 'identifier': 'identifier', + 'sql_query': 'sqlQuery' + } + + self._model_type = None + self._metadata = None + self._key = None + self._model_version = None + self._parent_ref = None + self._name = None + self._description = None + self._object_version = None + self._external_key = None + self._shape = None + self._shape_id = None + self._entity_type = None + self._other_type_label = None + self._unique_keys = None + self._foreign_keys = None + self._resource_name = None + self._object_status = None + self._identifier = None + self._sql_query = None + self._model_type = 'SQL_ENTITY' + + @property + def key(self): + """ + Gets the key of this DataEntityFromSql. + The object key. + + + :return: The key of this DataEntityFromSql. + :rtype: str + """ + return self._key + + @key.setter + def key(self, key): + """ + Sets the key of this DataEntityFromSql. + The object key. + + + :param key: The key of this DataEntityFromSql. + :type: str + """ + self._key = key + + @property + def model_version(self): + """ + Gets the model_version of this DataEntityFromSql. + The object's model version. + + + :return: The model_version of this DataEntityFromSql. + :rtype: str + """ + return self._model_version + + @model_version.setter + def model_version(self, model_version): + """ + Sets the model_version of this DataEntityFromSql. + The object's model version. + + + :param model_version: The model_version of this DataEntityFromSql. + :type: str + """ + self._model_version = model_version + + @property + def parent_ref(self): + """ + Gets the parent_ref of this DataEntityFromSql. + + :return: The parent_ref of this DataEntityFromSql. + :rtype: oci.data_integration.models.ParentReference + """ + return self._parent_ref + + @parent_ref.setter + def parent_ref(self, parent_ref): + """ + Sets the parent_ref of this DataEntityFromSql. + + :param parent_ref: The parent_ref of this DataEntityFromSql. + :type: oci.data_integration.models.ParentReference + """ + self._parent_ref = parent_ref + + @property + def name(self): + """ + Gets the name of this DataEntityFromSql. + Free form text without any restriction on permitted characters. Name can have letters, numbers, and special characters. The value is editable and is restricted to 1000 characters. + + + :return: The name of this DataEntityFromSql. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """ + Sets the name of this DataEntityFromSql. + Free form text without any restriction on permitted characters. Name can have letters, numbers, and special characters. The value is editable and is restricted to 1000 characters. + + + :param name: The name of this DataEntityFromSql. + :type: str + """ + self._name = name + + @property + def description(self): + """ + Gets the description of this DataEntityFromSql. + Detailed description for the object. + + + :return: The description of this DataEntityFromSql. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this DataEntityFromSql. + Detailed description for the object. + + + :param description: The description of this DataEntityFromSql. + :type: str + """ + self._description = description + + @property + def object_version(self): + """ + Gets the object_version of this DataEntityFromSql. + The version of the object that is used to track changes in the object instance. + + + :return: The object_version of this DataEntityFromSql. + :rtype: int + """ + return self._object_version + + @object_version.setter + def object_version(self, object_version): + """ + Sets the object_version of this DataEntityFromSql. + The version of the object that is used to track changes in the object instance. + + + :param object_version: The object_version of this DataEntityFromSql. + :type: int + """ + self._object_version = object_version + + @property + def external_key(self): + """ + Gets the external_key of this DataEntityFromSql. + The external key for the object + + + :return: The external_key of this DataEntityFromSql. + :rtype: str + """ + return self._external_key + + @external_key.setter + def external_key(self, external_key): + """ + Sets the external_key of this DataEntityFromSql. + The external key for the object + + + :param external_key: The external_key of this DataEntityFromSql. + :type: str + """ + self._external_key = external_key + + @property + def shape(self): + """ + Gets the shape of this DataEntityFromSql. + + :return: The shape of this DataEntityFromSql. + :rtype: oci.data_integration.models.Shape + """ + return self._shape + + @shape.setter + def shape(self, shape): + """ + Sets the shape of this DataEntityFromSql. + + :param shape: The shape of this DataEntityFromSql. + :type: oci.data_integration.models.Shape + """ + self._shape = shape + + @property + def shape_id(self): + """ + Gets the shape_id of this DataEntityFromSql. + The shape ID. + + + :return: The shape_id of this DataEntityFromSql. + :rtype: str + """ + return self._shape_id + + @shape_id.setter + def shape_id(self, shape_id): + """ + Sets the shape_id of this DataEntityFromSql. + The shape ID. + + + :param shape_id: The shape_id of this DataEntityFromSql. + :type: str + """ + self._shape_id = shape_id + + @property + def entity_type(self): + """ + Gets the entity_type of this DataEntityFromSql. + The entity type. + + Allowed values for this property are: "TABLE", "VIEW", "FILE", "SQL", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The entity_type of this DataEntityFromSql. + :rtype: str + """ + return self._entity_type + + @entity_type.setter + def entity_type(self, entity_type): + """ + Sets the entity_type of this DataEntityFromSql. + The entity type. + + + :param entity_type: The entity_type of this DataEntityFromSql. + :type: str + """ + allowed_values = ["TABLE", "VIEW", "FILE", "SQL"] + if not value_allowed_none_or_none_sentinel(entity_type, allowed_values): + entity_type = 'UNKNOWN_ENUM_VALUE' + self._entity_type = entity_type + + @property + def other_type_label(self): + """ + Gets the other_type_label of this DataEntityFromSql. + Specifies other type label. + + + :return: The other_type_label of this DataEntityFromSql. + :rtype: str + """ + return self._other_type_label + + @other_type_label.setter + def other_type_label(self, other_type_label): + """ + Sets the other_type_label of this DataEntityFromSql. + Specifies other type label. + + + :param other_type_label: The other_type_label of this DataEntityFromSql. + :type: str + """ + self._other_type_label = other_type_label + + @property + def unique_keys(self): + """ + Gets the unique_keys of this DataEntityFromSql. + An array of unique keys. + + + :return: The unique_keys of this DataEntityFromSql. + :rtype: list[oci.data_integration.models.UniqueKey] + """ + return self._unique_keys + + @unique_keys.setter + def unique_keys(self, unique_keys): + """ + Sets the unique_keys of this DataEntityFromSql. + An array of unique keys. + + + :param unique_keys: The unique_keys of this DataEntityFromSql. + :type: list[oci.data_integration.models.UniqueKey] + """ + self._unique_keys = unique_keys + + @property + def foreign_keys(self): + """ + Gets the foreign_keys of this DataEntityFromSql. + An array of foreign keys. + + + :return: The foreign_keys of this DataEntityFromSql. + :rtype: list[oci.data_integration.models.ForeignKey] + """ + return self._foreign_keys + + @foreign_keys.setter + def foreign_keys(self, foreign_keys): + """ + Sets the foreign_keys of this DataEntityFromSql. + An array of foreign keys. + + + :param foreign_keys: The foreign_keys of this DataEntityFromSql. + :type: list[oci.data_integration.models.ForeignKey] + """ + self._foreign_keys = foreign_keys + + @property + def resource_name(self): + """ + Gets the resource_name of this DataEntityFromSql. + The resource name. + + + :return: The resource_name of this DataEntityFromSql. + :rtype: str + """ + return self._resource_name + + @resource_name.setter + def resource_name(self, resource_name): + """ + Sets the resource_name of this DataEntityFromSql. + The resource name. + + + :param resource_name: The resource_name of this DataEntityFromSql. + :type: str + """ + self._resource_name = resource_name + + @property + def object_status(self): + """ + Gets the object_status of this DataEntityFromSql. + The status of an object that can be set to value 1 for shallow references across objects, other values reserved. + + + :return: The object_status of this DataEntityFromSql. + :rtype: int + """ + return self._object_status + + @object_status.setter + def object_status(self, object_status): + """ + Sets the object_status of this DataEntityFromSql. + The status of an object that can be set to value 1 for shallow references across objects, other values reserved. + + + :param object_status: The object_status of this DataEntityFromSql. + :type: int + """ + self._object_status = object_status + + @property + def identifier(self): + """ + Gets the identifier of this DataEntityFromSql. + Value can only contain upper case letters, underscore and numbers. It should begin with upper case letter or underscore. The value can be modified. + + + :return: The identifier of this DataEntityFromSql. + :rtype: str + """ + return self._identifier + + @identifier.setter + def identifier(self, identifier): + """ + Sets the identifier of this DataEntityFromSql. + Value can only contain upper case letters, underscore and numbers. It should begin with upper case letter or underscore. The value can be modified. + + + :param identifier: The identifier of this DataEntityFromSql. + :type: str + """ + self._identifier = identifier + + @property + def sql_query(self): + """ + Gets the sql_query of this DataEntityFromSql. + sqlQuery + + + :return: The sql_query of this DataEntityFromSql. + :rtype: str + """ + return self._sql_query + + @sql_query.setter + def sql_query(self, sql_query): + """ + Sets the sql_query of this DataEntityFromSql. + sqlQuery + + + :param sql_query: The sql_query of this DataEntityFromSql. + :type: str + """ + self._sql_query = sql_query + + 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_integration/models/data_entity_from_sql_entity_details.py b/src/oci/data_integration/models/data_entity_from_sql_entity_details.py new file mode 100644 index 0000000000..88c6a48592 --- /dev/null +++ b/src/oci/data_integration/models/data_entity_from_sql_entity_details.py @@ -0,0 +1,593 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .data_entity_details import DataEntityDetails +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 DataEntityFromSqlEntityDetails(DataEntityDetails): + """ + The sql entity data entity details. + """ + + #: A constant which can be used with the entity_type property of a DataEntityFromSqlEntityDetails. + #: This constant has a value of "TABLE" + ENTITY_TYPE_TABLE = "TABLE" + + #: A constant which can be used with the entity_type property of a DataEntityFromSqlEntityDetails. + #: This constant has a value of "VIEW" + ENTITY_TYPE_VIEW = "VIEW" + + #: A constant which can be used with the entity_type property of a DataEntityFromSqlEntityDetails. + #: This constant has a value of "FILE" + ENTITY_TYPE_FILE = "FILE" + + #: A constant which can be used with the entity_type property of a DataEntityFromSqlEntityDetails. + #: This constant has a value of "SQL" + ENTITY_TYPE_SQL = "SQL" + + def __init__(self, **kwargs): + """ + Initializes a new DataEntityFromSqlEntityDetails object with values from keyword arguments. The default value of the :py:attr:`~oci.data_integration.models.DataEntityFromSqlEntityDetails.model_type` attribute + of this class is ``SQL_ENTITY`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param model_type: + The value to assign to the model_type property of this DataEntityFromSqlEntityDetails. + Allowed values for this property are: "VIEW_ENTITY", "TABLE_ENTITY", "FILE_ENTITY", "SQL_ENTITY", "DATA_STORE_ENTITY" + :type model_type: str + + :param key: + The value to assign to the key property of this DataEntityFromSqlEntityDetails. + :type key: str + + :param model_version: + The value to assign to the model_version property of this DataEntityFromSqlEntityDetails. + :type model_version: str + + :param parent_ref: + The value to assign to the parent_ref property of this DataEntityFromSqlEntityDetails. + :type parent_ref: oci.data_integration.models.ParentReference + + :param name: + The value to assign to the name property of this DataEntityFromSqlEntityDetails. + :type name: str + + :param description: + The value to assign to the description property of this DataEntityFromSqlEntityDetails. + :type description: str + + :param object_version: + The value to assign to the object_version property of this DataEntityFromSqlEntityDetails. + :type object_version: int + + :param external_key: + The value to assign to the external_key property of this DataEntityFromSqlEntityDetails. + :type external_key: str + + :param shape: + The value to assign to the shape property of this DataEntityFromSqlEntityDetails. + :type shape: oci.data_integration.models.Shape + + :param shape_id: + The value to assign to the shape_id property of this DataEntityFromSqlEntityDetails. + :type shape_id: str + + :param entity_type: + The value to assign to the entity_type property of this DataEntityFromSqlEntityDetails. + Allowed values for this property are: "TABLE", "VIEW", "FILE", "SQL" + :type entity_type: str + + :param other_type_label: + The value to assign to the other_type_label property of this DataEntityFromSqlEntityDetails. + :type other_type_label: str + + :param unique_keys: + The value to assign to the unique_keys property of this DataEntityFromSqlEntityDetails. + :type unique_keys: list[oci.data_integration.models.UniqueKey] + + :param foreign_keys: + The value to assign to the foreign_keys property of this DataEntityFromSqlEntityDetails. + :type foreign_keys: list[oci.data_integration.models.ForeignKey] + + :param resource_name: + The value to assign to the resource_name property of this DataEntityFromSqlEntityDetails. + :type resource_name: str + + :param object_status: + The value to assign to the object_status property of this DataEntityFromSqlEntityDetails. + :type object_status: int + + :param identifier: + The value to assign to the identifier property of this DataEntityFromSqlEntityDetails. + :type identifier: str + + :param sql_query: + The value to assign to the sql_query property of this DataEntityFromSqlEntityDetails. + :type sql_query: str + + """ + self.swagger_types = { + 'model_type': 'str', + 'key': 'str', + 'model_version': 'str', + 'parent_ref': 'ParentReference', + 'name': 'str', + 'description': 'str', + 'object_version': 'int', + 'external_key': 'str', + 'shape': 'Shape', + 'shape_id': 'str', + 'entity_type': 'str', + 'other_type_label': 'str', + 'unique_keys': 'list[UniqueKey]', + 'foreign_keys': 'list[ForeignKey]', + 'resource_name': 'str', + 'object_status': 'int', + 'identifier': 'str', + 'sql_query': 'str' + } + + self.attribute_map = { + 'model_type': 'modelType', + 'key': 'key', + 'model_version': 'modelVersion', + 'parent_ref': 'parentRef', + 'name': 'name', + 'description': 'description', + 'object_version': 'objectVersion', + 'external_key': 'externalKey', + 'shape': 'shape', + 'shape_id': 'shapeId', + 'entity_type': 'entityType', + 'other_type_label': 'otherTypeLabel', + 'unique_keys': 'uniqueKeys', + 'foreign_keys': 'foreignKeys', + 'resource_name': 'resourceName', + 'object_status': 'objectStatus', + 'identifier': 'identifier', + 'sql_query': 'sqlQuery' + } + + self._model_type = None + self._key = None + self._model_version = None + self._parent_ref = None + self._name = None + self._description = None + self._object_version = None + self._external_key = None + self._shape = None + self._shape_id = None + self._entity_type = None + self._other_type_label = None + self._unique_keys = None + self._foreign_keys = None + self._resource_name = None + self._object_status = None + self._identifier = None + self._sql_query = None + self._model_type = 'SQL_ENTITY' + + @property + def key(self): + """ + Gets the key of this DataEntityFromSqlEntityDetails. + The object key. + + + :return: The key of this DataEntityFromSqlEntityDetails. + :rtype: str + """ + return self._key + + @key.setter + def key(self, key): + """ + Sets the key of this DataEntityFromSqlEntityDetails. + The object key. + + + :param key: The key of this DataEntityFromSqlEntityDetails. + :type: str + """ + self._key = key + + @property + def model_version(self): + """ + Gets the model_version of this DataEntityFromSqlEntityDetails. + The object's model version. + + + :return: The model_version of this DataEntityFromSqlEntityDetails. + :rtype: str + """ + return self._model_version + + @model_version.setter + def model_version(self, model_version): + """ + Sets the model_version of this DataEntityFromSqlEntityDetails. + The object's model version. + + + :param model_version: The model_version of this DataEntityFromSqlEntityDetails. + :type: str + """ + self._model_version = model_version + + @property + def parent_ref(self): + """ + Gets the parent_ref of this DataEntityFromSqlEntityDetails. + + :return: The parent_ref of this DataEntityFromSqlEntityDetails. + :rtype: oci.data_integration.models.ParentReference + """ + return self._parent_ref + + @parent_ref.setter + def parent_ref(self, parent_ref): + """ + Sets the parent_ref of this DataEntityFromSqlEntityDetails. + + :param parent_ref: The parent_ref of this DataEntityFromSqlEntityDetails. + :type: oci.data_integration.models.ParentReference + """ + self._parent_ref = parent_ref + + @property + def name(self): + """ + Gets the name of this DataEntityFromSqlEntityDetails. + Free form text without any restriction on permitted characters. Name can have letters, numbers, and special characters. The value is editable and is restricted to 1000 characters. + + + :return: The name of this DataEntityFromSqlEntityDetails. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """ + Sets the name of this DataEntityFromSqlEntityDetails. + Free form text without any restriction on permitted characters. Name can have letters, numbers, and special characters. The value is editable and is restricted to 1000 characters. + + + :param name: The name of this DataEntityFromSqlEntityDetails. + :type: str + """ + self._name = name + + @property + def description(self): + """ + Gets the description of this DataEntityFromSqlEntityDetails. + Detailed description for the object. + + + :return: The description of this DataEntityFromSqlEntityDetails. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this DataEntityFromSqlEntityDetails. + Detailed description for the object. + + + :param description: The description of this DataEntityFromSqlEntityDetails. + :type: str + """ + self._description = description + + @property + def object_version(self): + """ + Gets the object_version of this DataEntityFromSqlEntityDetails. + The version of the object that is used to track changes in the object instance. + + + :return: The object_version of this DataEntityFromSqlEntityDetails. + :rtype: int + """ + return self._object_version + + @object_version.setter + def object_version(self, object_version): + """ + Sets the object_version of this DataEntityFromSqlEntityDetails. + The version of the object that is used to track changes in the object instance. + + + :param object_version: The object_version of this DataEntityFromSqlEntityDetails. + :type: int + """ + self._object_version = object_version + + @property + def external_key(self): + """ + Gets the external_key of this DataEntityFromSqlEntityDetails. + The external key for the object + + + :return: The external_key of this DataEntityFromSqlEntityDetails. + :rtype: str + """ + return self._external_key + + @external_key.setter + def external_key(self, external_key): + """ + Sets the external_key of this DataEntityFromSqlEntityDetails. + The external key for the object + + + :param external_key: The external_key of this DataEntityFromSqlEntityDetails. + :type: str + """ + self._external_key = external_key + + @property + def shape(self): + """ + Gets the shape of this DataEntityFromSqlEntityDetails. + + :return: The shape of this DataEntityFromSqlEntityDetails. + :rtype: oci.data_integration.models.Shape + """ + return self._shape + + @shape.setter + def shape(self, shape): + """ + Sets the shape of this DataEntityFromSqlEntityDetails. + + :param shape: The shape of this DataEntityFromSqlEntityDetails. + :type: oci.data_integration.models.Shape + """ + self._shape = shape + + @property + def shape_id(self): + """ + Gets the shape_id of this DataEntityFromSqlEntityDetails. + The shape ID. + + + :return: The shape_id of this DataEntityFromSqlEntityDetails. + :rtype: str + """ + return self._shape_id + + @shape_id.setter + def shape_id(self, shape_id): + """ + Sets the shape_id of this DataEntityFromSqlEntityDetails. + The shape ID. + + + :param shape_id: The shape_id of this DataEntityFromSqlEntityDetails. + :type: str + """ + self._shape_id = shape_id + + @property + def entity_type(self): + """ + Gets the entity_type of this DataEntityFromSqlEntityDetails. + The entity type. + + Allowed values for this property are: "TABLE", "VIEW", "FILE", "SQL" + + + :return: The entity_type of this DataEntityFromSqlEntityDetails. + :rtype: str + """ + return self._entity_type + + @entity_type.setter + def entity_type(self, entity_type): + """ + Sets the entity_type of this DataEntityFromSqlEntityDetails. + The entity type. + + + :param entity_type: The entity_type of this DataEntityFromSqlEntityDetails. + :type: str + """ + allowed_values = ["TABLE", "VIEW", "FILE", "SQL"] + if not value_allowed_none_or_none_sentinel(entity_type, allowed_values): + raise ValueError( + "Invalid value for `entity_type`, must be None or one of {0}" + .format(allowed_values) + ) + self._entity_type = entity_type + + @property + def other_type_label(self): + """ + Gets the other_type_label of this DataEntityFromSqlEntityDetails. + Specifies other type labels. + + + :return: The other_type_label of this DataEntityFromSqlEntityDetails. + :rtype: str + """ + return self._other_type_label + + @other_type_label.setter + def other_type_label(self, other_type_label): + """ + Sets the other_type_label of this DataEntityFromSqlEntityDetails. + Specifies other type labels. + + + :param other_type_label: The other_type_label of this DataEntityFromSqlEntityDetails. + :type: str + """ + self._other_type_label = other_type_label + + @property + def unique_keys(self): + """ + Gets the unique_keys of this DataEntityFromSqlEntityDetails. + An array of unique keys. + + + :return: The unique_keys of this DataEntityFromSqlEntityDetails. + :rtype: list[oci.data_integration.models.UniqueKey] + """ + return self._unique_keys + + @unique_keys.setter + def unique_keys(self, unique_keys): + """ + Sets the unique_keys of this DataEntityFromSqlEntityDetails. + An array of unique keys. + + + :param unique_keys: The unique_keys of this DataEntityFromSqlEntityDetails. + :type: list[oci.data_integration.models.UniqueKey] + """ + self._unique_keys = unique_keys + + @property + def foreign_keys(self): + """ + Gets the foreign_keys of this DataEntityFromSqlEntityDetails. + An array of foreign keys. + + + :return: The foreign_keys of this DataEntityFromSqlEntityDetails. + :rtype: list[oci.data_integration.models.ForeignKey] + """ + return self._foreign_keys + + @foreign_keys.setter + def foreign_keys(self, foreign_keys): + """ + Sets the foreign_keys of this DataEntityFromSqlEntityDetails. + An array of foreign keys. + + + :param foreign_keys: The foreign_keys of this DataEntityFromSqlEntityDetails. + :type: list[oci.data_integration.models.ForeignKey] + """ + self._foreign_keys = foreign_keys + + @property + def resource_name(self): + """ + Gets the resource_name of this DataEntityFromSqlEntityDetails. + The resource name. + + + :return: The resource_name of this DataEntityFromSqlEntityDetails. + :rtype: str + """ + return self._resource_name + + @resource_name.setter + def resource_name(self, resource_name): + """ + Sets the resource_name of this DataEntityFromSqlEntityDetails. + The resource name. + + + :param resource_name: The resource_name of this DataEntityFromSqlEntityDetails. + :type: str + """ + self._resource_name = resource_name + + @property + def object_status(self): + """ + Gets the object_status of this DataEntityFromSqlEntityDetails. + The status of an object that can be set to value 1 for shallow references across objects, other values reserved. + + + :return: The object_status of this DataEntityFromSqlEntityDetails. + :rtype: int + """ + return self._object_status + + @object_status.setter + def object_status(self, object_status): + """ + Sets the object_status of this DataEntityFromSqlEntityDetails. + The status of an object that can be set to value 1 for shallow references across objects, other values reserved. + + + :param object_status: The object_status of this DataEntityFromSqlEntityDetails. + :type: int + """ + self._object_status = object_status + + @property + def identifier(self): + """ + Gets the identifier of this DataEntityFromSqlEntityDetails. + Value can only contain upper case letters, underscore and numbers. It should begin with upper case letter or underscore. The value can be modified. + + + :return: The identifier of this DataEntityFromSqlEntityDetails. + :rtype: str + """ + return self._identifier + + @identifier.setter + def identifier(self, identifier): + """ + Sets the identifier of this DataEntityFromSqlEntityDetails. + Value can only contain upper case letters, underscore and numbers. It should begin with upper case letter or underscore. The value can be modified. + + + :param identifier: The identifier of this DataEntityFromSqlEntityDetails. + :type: str + """ + self._identifier = identifier + + @property + def sql_query(self): + """ + Gets the sql_query of this DataEntityFromSqlEntityDetails. + sqlQuery + + + :return: The sql_query of this DataEntityFromSqlEntityDetails. + :rtype: str + """ + return self._sql_query + + @sql_query.setter + def sql_query(self, sql_query): + """ + Sets the sql_query of this DataEntityFromSqlEntityDetails. + sqlQuery + + + :param sql_query: The sql_query of this DataEntityFromSqlEntityDetails. + :type: str + """ + self._sql_query = sql_query + + 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_integration/models/data_entity_from_table.py b/src/oci/data_integration/models/data_entity_from_table.py index 1098ff9229..056fc5fdaf 100644 --- a/src/oci/data_integration/models/data_entity_from_table.py +++ b/src/oci/data_integration/models/data_entity_from_table.py @@ -45,7 +45,7 @@ def __init__(self, **kwargs): :param model_type: The value to assign to the model_type property of this DataEntityFromTable. - Allowed values for this property are: "VIEW_ENTITY", "TABLE_ENTITY", "FILE_ENTITY", "DATA_STORE_ENTITY", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "VIEW_ENTITY", "TABLE_ENTITY", "FILE_ENTITY", "SQL_ENTITY", "DATA_STORE_ENTITY", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type model_type: str diff --git a/src/oci/data_integration/models/data_entity_from_table_entity_details.py b/src/oci/data_integration/models/data_entity_from_table_entity_details.py index 0915cd3d9f..8cddb423ab 100644 --- a/src/oci/data_integration/models/data_entity_from_table_entity_details.py +++ b/src/oci/data_integration/models/data_entity_from_table_entity_details.py @@ -45,7 +45,7 @@ def __init__(self, **kwargs): :param model_type: The value to assign to the model_type property of this DataEntityFromTableEntityDetails. - Allowed values for this property are: "VIEW_ENTITY", "TABLE_ENTITY", "FILE_ENTITY", "DATA_STORE_ENTITY" + Allowed values for this property are: "VIEW_ENTITY", "TABLE_ENTITY", "FILE_ENTITY", "SQL_ENTITY", "DATA_STORE_ENTITY" :type model_type: str :param key: diff --git a/src/oci/data_integration/models/data_entity_from_view.py b/src/oci/data_integration/models/data_entity_from_view.py index 04ec657cd9..40a8e9d77b 100644 --- a/src/oci/data_integration/models/data_entity_from_view.py +++ b/src/oci/data_integration/models/data_entity_from_view.py @@ -45,7 +45,7 @@ def __init__(self, **kwargs): :param model_type: The value to assign to the model_type property of this DataEntityFromView. - Allowed values for this property are: "VIEW_ENTITY", "TABLE_ENTITY", "FILE_ENTITY", "DATA_STORE_ENTITY", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "VIEW_ENTITY", "TABLE_ENTITY", "FILE_ENTITY", "SQL_ENTITY", "DATA_STORE_ENTITY", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type model_type: str diff --git a/src/oci/data_integration/models/data_entity_from_view_entity_details.py b/src/oci/data_integration/models/data_entity_from_view_entity_details.py index e451d560c6..1b8193409a 100644 --- a/src/oci/data_integration/models/data_entity_from_view_entity_details.py +++ b/src/oci/data_integration/models/data_entity_from_view_entity_details.py @@ -45,7 +45,7 @@ def __init__(self, **kwargs): :param model_type: The value to assign to the model_type property of this DataEntityFromViewEntityDetails. - Allowed values for this property are: "VIEW_ENTITY", "TABLE_ENTITY", "FILE_ENTITY", "DATA_STORE_ENTITY" + Allowed values for this property are: "VIEW_ENTITY", "TABLE_ENTITY", "FILE_ENTITY", "SQL_ENTITY", "DATA_STORE_ENTITY" :type model_type: str :param key: diff --git a/src/oci/data_integration/models/data_entity_summary.py b/src/oci/data_integration/models/data_entity_summary.py index ddfe0156b7..dc2af111eb 100644 --- a/src/oci/data_integration/models/data_entity_summary.py +++ b/src/oci/data_integration/models/data_entity_summary.py @@ -25,6 +25,10 @@ class DataEntitySummary(object): #: This constant has a value of "FILE_ENTITY" MODEL_TYPE_FILE_ENTITY = "FILE_ENTITY" + #: A constant which can be used with the model_type property of a DataEntitySummary. + #: This constant has a value of "SQL_ENTITY" + MODEL_TYPE_SQL_ENTITY = "SQL_ENTITY" + #: A constant which can be used with the model_type property of a DataEntitySummary. #: This constant has a value of "DATA_STORE_ENTITY" MODEL_TYPE_DATA_STORE_ENTITY = "DATA_STORE_ENTITY" @@ -37,13 +41,14 @@ def __init__(self, **kwargs): * :class:`~oci.data_integration.models.DataEntitySummaryFromFile` * :class:`~oci.data_integration.models.DataEntitySummaryFromTable` * :class:`~oci.data_integration.models.DataEntitySummaryFromDataStore` + * :class:`~oci.data_integration.models.DataEntitySummaryFromSql` * :class:`~oci.data_integration.models.DataEntitySummaryFromView` The following keyword arguments are supported (corresponding to the getters/setters of this class): :param model_type: The value to assign to the model_type property of this DataEntitySummary. - Allowed values for this property are: "VIEW_ENTITY", "TABLE_ENTITY", "FILE_ENTITY", "DATA_STORE_ENTITY", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "VIEW_ENTITY", "TABLE_ENTITY", "FILE_ENTITY", "SQL_ENTITY", "DATA_STORE_ENTITY", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type model_type: str @@ -82,6 +87,9 @@ def get_subtype(object_dictionary): if type == 'DATA_STORE_ENTITY': return 'DataEntitySummaryFromDataStore' + if type == 'SQL_ENTITY': + return 'DataEntitySummaryFromSql' + if type == 'VIEW_ENTITY': return 'DataEntitySummaryFromView' else: @@ -93,7 +101,7 @@ def model_type(self): **[Required]** Gets the model_type of this DataEntitySummary. The data entity type. - Allowed values for this property are: "VIEW_ENTITY", "TABLE_ENTITY", "FILE_ENTITY", "DATA_STORE_ENTITY", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "VIEW_ENTITY", "TABLE_ENTITY", "FILE_ENTITY", "SQL_ENTITY", "DATA_STORE_ENTITY", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. @@ -112,7 +120,7 @@ def model_type(self, model_type): :param model_type: The model_type of this DataEntitySummary. :type: str """ - allowed_values = ["VIEW_ENTITY", "TABLE_ENTITY", "FILE_ENTITY", "DATA_STORE_ENTITY"] + allowed_values = ["VIEW_ENTITY", "TABLE_ENTITY", "FILE_ENTITY", "SQL_ENTITY", "DATA_STORE_ENTITY"] if not value_allowed_none_or_none_sentinel(model_type, allowed_values): model_type = 'UNKNOWN_ENUM_VALUE' self._model_type = model_type diff --git a/src/oci/data_integration/models/data_entity_summary_from_data_store.py b/src/oci/data_integration/models/data_entity_summary_from_data_store.py index 0c62c747b9..71e5bb1ede 100644 --- a/src/oci/data_integration/models/data_entity_summary_from_data_store.py +++ b/src/oci/data_integration/models/data_entity_summary_from_data_store.py @@ -49,7 +49,7 @@ def __init__(self, **kwargs): :param model_type: The value to assign to the model_type property of this DataEntitySummaryFromDataStore. - Allowed values for this property are: "VIEW_ENTITY", "TABLE_ENTITY", "FILE_ENTITY", "DATA_STORE_ENTITY", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "VIEW_ENTITY", "TABLE_ENTITY", "FILE_ENTITY", "SQL_ENTITY", "DATA_STORE_ENTITY", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type model_type: str diff --git a/src/oci/data_integration/models/data_entity_summary_from_file.py b/src/oci/data_integration/models/data_entity_summary_from_file.py index 2470182ac2..d4c7aadbf0 100644 --- a/src/oci/data_integration/models/data_entity_summary_from_file.py +++ b/src/oci/data_integration/models/data_entity_summary_from_file.py @@ -45,7 +45,7 @@ def __init__(self, **kwargs): :param model_type: The value to assign to the model_type property of this DataEntitySummaryFromFile. - Allowed values for this property are: "VIEW_ENTITY", "TABLE_ENTITY", "FILE_ENTITY", "DATA_STORE_ENTITY", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "VIEW_ENTITY", "TABLE_ENTITY", "FILE_ENTITY", "SQL_ENTITY", "DATA_STORE_ENTITY", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type model_type: str diff --git a/src/oci/data_integration/models/data_entity_summary_from_sql.py b/src/oci/data_integration/models/data_entity_summary_from_sql.py new file mode 100644 index 0000000000..83f4f9b416 --- /dev/null +++ b/src/oci/data_integration/models/data_entity_summary_from_sql.py @@ -0,0 +1,600 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .data_entity_summary import DataEntitySummary +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 DataEntitySummaryFromSql(DataEntitySummary): + """ + The sql entity data entity details. + """ + + #: A constant which can be used with the entity_type property of a DataEntitySummaryFromSql. + #: This constant has a value of "TABLE" + ENTITY_TYPE_TABLE = "TABLE" + + #: A constant which can be used with the entity_type property of a DataEntitySummaryFromSql. + #: This constant has a value of "VIEW" + ENTITY_TYPE_VIEW = "VIEW" + + #: A constant which can be used with the entity_type property of a DataEntitySummaryFromSql. + #: This constant has a value of "FILE" + ENTITY_TYPE_FILE = "FILE" + + #: A constant which can be used with the entity_type property of a DataEntitySummaryFromSql. + #: This constant has a value of "SQL" + ENTITY_TYPE_SQL = "SQL" + + def __init__(self, **kwargs): + """ + Initializes a new DataEntitySummaryFromSql object with values from keyword arguments. The default value of the :py:attr:`~oci.data_integration.models.DataEntitySummaryFromSql.model_type` attribute + of this class is ``SQL_ENTITY`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param model_type: + The value to assign to the model_type property of this DataEntitySummaryFromSql. + Allowed values for this property are: "VIEW_ENTITY", "TABLE_ENTITY", "FILE_ENTITY", "SQL_ENTITY", "DATA_STORE_ENTITY", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type model_type: str + + :param metadata: + The value to assign to the metadata property of this DataEntitySummaryFromSql. + :type metadata: oci.data_integration.models.ObjectMetadata + + :param key: + The value to assign to the key property of this DataEntitySummaryFromSql. + :type key: str + + :param model_version: + The value to assign to the model_version property of this DataEntitySummaryFromSql. + :type model_version: str + + :param parent_ref: + The value to assign to the parent_ref property of this DataEntitySummaryFromSql. + :type parent_ref: oci.data_integration.models.ParentReference + + :param name: + The value to assign to the name property of this DataEntitySummaryFromSql. + :type name: str + + :param description: + The value to assign to the description property of this DataEntitySummaryFromSql. + :type description: str + + :param object_version: + The value to assign to the object_version property of this DataEntitySummaryFromSql. + :type object_version: int + + :param external_key: + The value to assign to the external_key property of this DataEntitySummaryFromSql. + :type external_key: str + + :param shape: + The value to assign to the shape property of this DataEntitySummaryFromSql. + :type shape: oci.data_integration.models.Shape + + :param shape_id: + The value to assign to the shape_id property of this DataEntitySummaryFromSql. + :type shape_id: str + + :param entity_type: + The value to assign to the entity_type property of this DataEntitySummaryFromSql. + Allowed values for this property are: "TABLE", "VIEW", "FILE", "SQL", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type entity_type: str + + :param other_type_label: + The value to assign to the other_type_label property of this DataEntitySummaryFromSql. + :type other_type_label: str + + :param unique_keys: + The value to assign to the unique_keys property of this DataEntitySummaryFromSql. + :type unique_keys: list[oci.data_integration.models.UniqueKey] + + :param foreign_keys: + The value to assign to the foreign_keys property of this DataEntitySummaryFromSql. + :type foreign_keys: list[oci.data_integration.models.ForeignKey] + + :param resource_name: + The value to assign to the resource_name property of this DataEntitySummaryFromSql. + :type resource_name: str + + :param object_status: + The value to assign to the object_status property of this DataEntitySummaryFromSql. + :type object_status: int + + :param identifier: + The value to assign to the identifier property of this DataEntitySummaryFromSql. + :type identifier: str + + :param sql_query: + The value to assign to the sql_query property of this DataEntitySummaryFromSql. + :type sql_query: str + + """ + self.swagger_types = { + 'model_type': 'str', + 'metadata': 'ObjectMetadata', + 'key': 'str', + 'model_version': 'str', + 'parent_ref': 'ParentReference', + 'name': 'str', + 'description': 'str', + 'object_version': 'int', + 'external_key': 'str', + 'shape': 'Shape', + 'shape_id': 'str', + 'entity_type': 'str', + 'other_type_label': 'str', + 'unique_keys': 'list[UniqueKey]', + 'foreign_keys': 'list[ForeignKey]', + 'resource_name': 'str', + 'object_status': 'int', + 'identifier': 'str', + 'sql_query': 'str' + } + + self.attribute_map = { + 'model_type': 'modelType', + 'metadata': 'metadata', + 'key': 'key', + 'model_version': 'modelVersion', + 'parent_ref': 'parentRef', + 'name': 'name', + 'description': 'description', + 'object_version': 'objectVersion', + 'external_key': 'externalKey', + 'shape': 'shape', + 'shape_id': 'shapeId', + 'entity_type': 'entityType', + 'other_type_label': 'otherTypeLabel', + 'unique_keys': 'uniqueKeys', + 'foreign_keys': 'foreignKeys', + 'resource_name': 'resourceName', + 'object_status': 'objectStatus', + 'identifier': 'identifier', + 'sql_query': 'sqlQuery' + } + + self._model_type = None + self._metadata = None + self._key = None + self._model_version = None + self._parent_ref = None + self._name = None + self._description = None + self._object_version = None + self._external_key = None + self._shape = None + self._shape_id = None + self._entity_type = None + self._other_type_label = None + self._unique_keys = None + self._foreign_keys = None + self._resource_name = None + self._object_status = None + self._identifier = None + self._sql_query = None + self._model_type = 'SQL_ENTITY' + + @property + def key(self): + """ + Gets the key of this DataEntitySummaryFromSql. + The object key. + + + :return: The key of this DataEntitySummaryFromSql. + :rtype: str + """ + return self._key + + @key.setter + def key(self, key): + """ + Sets the key of this DataEntitySummaryFromSql. + The object key. + + + :param key: The key of this DataEntitySummaryFromSql. + :type: str + """ + self._key = key + + @property + def model_version(self): + """ + Gets the model_version of this DataEntitySummaryFromSql. + The object's model version. + + + :return: The model_version of this DataEntitySummaryFromSql. + :rtype: str + """ + return self._model_version + + @model_version.setter + def model_version(self, model_version): + """ + Sets the model_version of this DataEntitySummaryFromSql. + The object's model version. + + + :param model_version: The model_version of this DataEntitySummaryFromSql. + :type: str + """ + self._model_version = model_version + + @property + def parent_ref(self): + """ + Gets the parent_ref of this DataEntitySummaryFromSql. + + :return: The parent_ref of this DataEntitySummaryFromSql. + :rtype: oci.data_integration.models.ParentReference + """ + return self._parent_ref + + @parent_ref.setter + def parent_ref(self, parent_ref): + """ + Sets the parent_ref of this DataEntitySummaryFromSql. + + :param parent_ref: The parent_ref of this DataEntitySummaryFromSql. + :type: oci.data_integration.models.ParentReference + """ + self._parent_ref = parent_ref + + @property + def name(self): + """ + Gets the name of this DataEntitySummaryFromSql. + Free form text without any restriction on permitted characters. Name can have letters, numbers, and special characters. The value is editable and is restricted to 1000 characters. + + + :return: The name of this DataEntitySummaryFromSql. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """ + Sets the name of this DataEntitySummaryFromSql. + Free form text without any restriction on permitted characters. Name can have letters, numbers, and special characters. The value is editable and is restricted to 1000 characters. + + + :param name: The name of this DataEntitySummaryFromSql. + :type: str + """ + self._name = name + + @property + def description(self): + """ + Gets the description of this DataEntitySummaryFromSql. + Detailed description for the object. + + + :return: The description of this DataEntitySummaryFromSql. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this DataEntitySummaryFromSql. + Detailed description for the object. + + + :param description: The description of this DataEntitySummaryFromSql. + :type: str + """ + self._description = description + + @property + def object_version(self): + """ + Gets the object_version of this DataEntitySummaryFromSql. + The version of the object that is used to track changes in the object instance. + + + :return: The object_version of this DataEntitySummaryFromSql. + :rtype: int + """ + return self._object_version + + @object_version.setter + def object_version(self, object_version): + """ + Sets the object_version of this DataEntitySummaryFromSql. + The version of the object that is used to track changes in the object instance. + + + :param object_version: The object_version of this DataEntitySummaryFromSql. + :type: int + """ + self._object_version = object_version + + @property + def external_key(self): + """ + Gets the external_key of this DataEntitySummaryFromSql. + The external key for the object + + + :return: The external_key of this DataEntitySummaryFromSql. + :rtype: str + """ + return self._external_key + + @external_key.setter + def external_key(self, external_key): + """ + Sets the external_key of this DataEntitySummaryFromSql. + The external key for the object + + + :param external_key: The external_key of this DataEntitySummaryFromSql. + :type: str + """ + self._external_key = external_key + + @property + def shape(self): + """ + Gets the shape of this DataEntitySummaryFromSql. + + :return: The shape of this DataEntitySummaryFromSql. + :rtype: oci.data_integration.models.Shape + """ + return self._shape + + @shape.setter + def shape(self, shape): + """ + Sets the shape of this DataEntitySummaryFromSql. + + :param shape: The shape of this DataEntitySummaryFromSql. + :type: oci.data_integration.models.Shape + """ + self._shape = shape + + @property + def shape_id(self): + """ + Gets the shape_id of this DataEntitySummaryFromSql. + The shape ID. + + + :return: The shape_id of this DataEntitySummaryFromSql. + :rtype: str + """ + return self._shape_id + + @shape_id.setter + def shape_id(self, shape_id): + """ + Sets the shape_id of this DataEntitySummaryFromSql. + The shape ID. + + + :param shape_id: The shape_id of this DataEntitySummaryFromSql. + :type: str + """ + self._shape_id = shape_id + + @property + def entity_type(self): + """ + Gets the entity_type of this DataEntitySummaryFromSql. + The entity type. + + Allowed values for this property are: "TABLE", "VIEW", "FILE", "SQL", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The entity_type of this DataEntitySummaryFromSql. + :rtype: str + """ + return self._entity_type + + @entity_type.setter + def entity_type(self, entity_type): + """ + Sets the entity_type of this DataEntitySummaryFromSql. + The entity type. + + + :param entity_type: The entity_type of this DataEntitySummaryFromSql. + :type: str + """ + allowed_values = ["TABLE", "VIEW", "FILE", "SQL"] + if not value_allowed_none_or_none_sentinel(entity_type, allowed_values): + entity_type = 'UNKNOWN_ENUM_VALUE' + self._entity_type = entity_type + + @property + def other_type_label(self): + """ + Gets the other_type_label of this DataEntitySummaryFromSql. + Specifies other type label. + + + :return: The other_type_label of this DataEntitySummaryFromSql. + :rtype: str + """ + return self._other_type_label + + @other_type_label.setter + def other_type_label(self, other_type_label): + """ + Sets the other_type_label of this DataEntitySummaryFromSql. + Specifies other type label. + + + :param other_type_label: The other_type_label of this DataEntitySummaryFromSql. + :type: str + """ + self._other_type_label = other_type_label + + @property + def unique_keys(self): + """ + Gets the unique_keys of this DataEntitySummaryFromSql. + An array of unique keys. + + + :return: The unique_keys of this DataEntitySummaryFromSql. + :rtype: list[oci.data_integration.models.UniqueKey] + """ + return self._unique_keys + + @unique_keys.setter + def unique_keys(self, unique_keys): + """ + Sets the unique_keys of this DataEntitySummaryFromSql. + An array of unique keys. + + + :param unique_keys: The unique_keys of this DataEntitySummaryFromSql. + :type: list[oci.data_integration.models.UniqueKey] + """ + self._unique_keys = unique_keys + + @property + def foreign_keys(self): + """ + Gets the foreign_keys of this DataEntitySummaryFromSql. + An array of foreign keys. + + + :return: The foreign_keys of this DataEntitySummaryFromSql. + :rtype: list[oci.data_integration.models.ForeignKey] + """ + return self._foreign_keys + + @foreign_keys.setter + def foreign_keys(self, foreign_keys): + """ + Sets the foreign_keys of this DataEntitySummaryFromSql. + An array of foreign keys. + + + :param foreign_keys: The foreign_keys of this DataEntitySummaryFromSql. + :type: list[oci.data_integration.models.ForeignKey] + """ + self._foreign_keys = foreign_keys + + @property + def resource_name(self): + """ + Gets the resource_name of this DataEntitySummaryFromSql. + The resource name. + + + :return: The resource_name of this DataEntitySummaryFromSql. + :rtype: str + """ + return self._resource_name + + @resource_name.setter + def resource_name(self, resource_name): + """ + Sets the resource_name of this DataEntitySummaryFromSql. + The resource name. + + + :param resource_name: The resource_name of this DataEntitySummaryFromSql. + :type: str + """ + self._resource_name = resource_name + + @property + def object_status(self): + """ + Gets the object_status of this DataEntitySummaryFromSql. + The status of an object that can be set to value 1 for shallow references across objects, other values reserved. + + + :return: The object_status of this DataEntitySummaryFromSql. + :rtype: int + """ + return self._object_status + + @object_status.setter + def object_status(self, object_status): + """ + Sets the object_status of this DataEntitySummaryFromSql. + The status of an object that can be set to value 1 for shallow references across objects, other values reserved. + + + :param object_status: The object_status of this DataEntitySummaryFromSql. + :type: int + """ + self._object_status = object_status + + @property + def identifier(self): + """ + Gets the identifier of this DataEntitySummaryFromSql. + Value can only contain upper case letters, underscore and numbers. It should begin with upper case letter or underscore. The value can be modified. + + + :return: The identifier of this DataEntitySummaryFromSql. + :rtype: str + """ + return self._identifier + + @identifier.setter + def identifier(self, identifier): + """ + Sets the identifier of this DataEntitySummaryFromSql. + Value can only contain upper case letters, underscore and numbers. It should begin with upper case letter or underscore. The value can be modified. + + + :param identifier: The identifier of this DataEntitySummaryFromSql. + :type: str + """ + self._identifier = identifier + + @property + def sql_query(self): + """ + Gets the sql_query of this DataEntitySummaryFromSql. + sqlQuery + + + :return: The sql_query of this DataEntitySummaryFromSql. + :rtype: str + """ + return self._sql_query + + @sql_query.setter + def sql_query(self, sql_query): + """ + Sets the sql_query of this DataEntitySummaryFromSql. + sqlQuery + + + :param sql_query: The sql_query of this DataEntitySummaryFromSql. + :type: str + """ + self._sql_query = sql_query + + 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_integration/models/data_entity_summary_from_table.py b/src/oci/data_integration/models/data_entity_summary_from_table.py index 52712e85a7..ed312de316 100644 --- a/src/oci/data_integration/models/data_entity_summary_from_table.py +++ b/src/oci/data_integration/models/data_entity_summary_from_table.py @@ -45,7 +45,7 @@ def __init__(self, **kwargs): :param model_type: The value to assign to the model_type property of this DataEntitySummaryFromTable. - Allowed values for this property are: "VIEW_ENTITY", "TABLE_ENTITY", "FILE_ENTITY", "DATA_STORE_ENTITY", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "VIEW_ENTITY", "TABLE_ENTITY", "FILE_ENTITY", "SQL_ENTITY", "DATA_STORE_ENTITY", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type model_type: str diff --git a/src/oci/data_integration/models/data_entity_summary_from_view.py b/src/oci/data_integration/models/data_entity_summary_from_view.py index d6d321ded2..ffe25113b4 100644 --- a/src/oci/data_integration/models/data_entity_summary_from_view.py +++ b/src/oci/data_integration/models/data_entity_summary_from_view.py @@ -45,7 +45,7 @@ def __init__(self, **kwargs): :param model_type: The value to assign to the model_type property of this DataEntitySummaryFromView. - Allowed values for this property are: "VIEW_ENTITY", "TABLE_ENTITY", "FILE_ENTITY", "DATA_STORE_ENTITY", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "VIEW_ENTITY", "TABLE_ENTITY", "FILE_ENTITY", "SQL_ENTITY", "DATA_STORE_ENTITY", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type model_type: str diff --git a/src/oci/data_integration/models/derived_field.py b/src/oci/data_integration/models/derived_field.py index 748bf77da8..f5af96458d 100644 --- a/src/oci/data_integration/models/derived_field.py +++ b/src/oci/data_integration/models/derived_field.py @@ -60,6 +60,10 @@ def __init__(self, **kwargs): The value to assign to the type property of this DerivedField. :type type: str + :param is_use_inferred_type: + The value to assign to the is_use_inferred_type property of this DerivedField. + :type is_use_inferred_type: bool + :param labels: The value to assign to the labels property of this DerivedField. :type labels: list[str] @@ -76,6 +80,7 @@ def __init__(self, **kwargs): 'description': 'str', 'expr': 'Expression', 'type': 'str', + 'is_use_inferred_type': 'bool', 'labels': 'list[str]' } @@ -90,6 +95,7 @@ def __init__(self, **kwargs): 'description': 'description', 'expr': 'expr', 'type': 'type', + 'is_use_inferred_type': 'isUseInferredType', 'labels': 'labels' } @@ -103,6 +109,7 @@ def __init__(self, **kwargs): self._description = None self._expr = None self._type = None + self._is_use_inferred_type = None self._labels = None self._model_type = 'DERIVED_FIELD' @@ -150,6 +157,30 @@ def type(self, type): """ self._type = type + @property + def is_use_inferred_type(self): + """ + Gets the is_use_inferred_type of this DerivedField. + Specifies whether to use inferred expression output type as output type of the derived field. Default value of this flag is false. + + + :return: The is_use_inferred_type of this DerivedField. + :rtype: bool + """ + return self._is_use_inferred_type + + @is_use_inferred_type.setter + def is_use_inferred_type(self, is_use_inferred_type): + """ + Sets the is_use_inferred_type of this DerivedField. + Specifies whether to use inferred expression output type as output type of the derived field. Default value of this flag is false. + + + :param is_use_inferred_type: The is_use_inferred_type of this DerivedField. + :type: bool + """ + self._is_use_inferred_type = is_use_inferred_type + @property def labels(self): """ diff --git a/src/oci/data_integration/models/entity_shape.py b/src/oci/data_integration/models/entity_shape.py index 337e4f2d57..f6f67e0c79 100644 --- a/src/oci/data_integration/models/entity_shape.py +++ b/src/oci/data_integration/models/entity_shape.py @@ -17,18 +17,23 @@ class EntityShape(object): #: This constant has a value of "FILE_ENTITY" MODEL_TYPE_FILE_ENTITY = "FILE_ENTITY" + #: A constant which can be used with the model_type property of a EntityShape. + #: This constant has a value of "SQL_ENTITY" + MODEL_TYPE_SQL_ENTITY = "SQL_ENTITY" + def __init__(self, **kwargs): """ Initializes a new EntityShape object with values from keyword arguments. This class has the following subclasses and if you are using this class as input to a service operations then you should favor using a subclass over the base class: + * :class:`~oci.data_integration.models.EntityShapeFromSQL` * :class:`~oci.data_integration.models.EntityShapeFromFile` The following keyword arguments are supported (corresponding to the getters/setters of this class): :param model_type: The value to assign to the model_type property of this EntityShape. - Allowed values for this property are: "FILE_ENTITY", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "FILE_ENTITY", "SQL_ENTITY", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type model_type: str @@ -58,6 +63,9 @@ def get_subtype(object_dictionary): """ type = object_dictionary['modelType'] + if type == 'SQL_ENTITY': + return 'EntityShapeFromSQL' + if type == 'FILE_ENTITY': return 'EntityShapeFromFile' else: @@ -69,7 +77,7 @@ def model_type(self): **[Required]** Gets the model_type of this EntityShape. The data entity type. - Allowed values for this property are: "FILE_ENTITY", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "FILE_ENTITY", "SQL_ENTITY", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. @@ -88,7 +96,7 @@ def model_type(self, model_type): :param model_type: The model_type of this EntityShape. :type: str """ - allowed_values = ["FILE_ENTITY"] + allowed_values = ["FILE_ENTITY", "SQL_ENTITY"] if not value_allowed_none_or_none_sentinel(model_type, allowed_values): model_type = 'UNKNOWN_ENUM_VALUE' self._model_type = model_type diff --git a/src/oci/data_integration/models/entity_shape_from_file.py b/src/oci/data_integration/models/entity_shape_from_file.py index b768e178a3..62ff9fbb5e 100644 --- a/src/oci/data_integration/models/entity_shape_from_file.py +++ b/src/oci/data_integration/models/entity_shape_from_file.py @@ -45,7 +45,7 @@ def __init__(self, **kwargs): :param model_type: The value to assign to the model_type property of this EntityShapeFromFile. - Allowed values for this property are: "FILE_ENTITY", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "FILE_ENTITY", "SQL_ENTITY", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type model_type: str diff --git a/src/oci/data_integration/models/entity_shape_from_sql.py b/src/oci/data_integration/models/entity_shape_from_sql.py new file mode 100644 index 0000000000..4fa6d4b207 --- /dev/null +++ b/src/oci/data_integration/models/entity_shape_from_sql.py @@ -0,0 +1,627 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .entity_shape import EntityShape +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 EntityShapeFromSQL(EntityShape): + """ + The SQL entity details. + """ + + #: A constant which can be used with the entity_type property of a EntityShapeFromSQL. + #: This constant has a value of "TABLE" + ENTITY_TYPE_TABLE = "TABLE" + + #: A constant which can be used with the entity_type property of a EntityShapeFromSQL. + #: This constant has a value of "VIEW" + ENTITY_TYPE_VIEW = "VIEW" + + #: A constant which can be used with the entity_type property of a EntityShapeFromSQL. + #: This constant has a value of "FILE" + ENTITY_TYPE_FILE = "FILE" + + #: A constant which can be used with the entity_type property of a EntityShapeFromSQL. + #: This constant has a value of "SQL" + ENTITY_TYPE_SQL = "SQL" + + def __init__(self, **kwargs): + """ + Initializes a new EntityShapeFromSQL object with values from keyword arguments. The default value of the :py:attr:`~oci.data_integration.models.EntityShapeFromSQL.model_type` attribute + of this class is ``SQL_ENTITY`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param model_type: + The value to assign to the model_type property of this EntityShapeFromSQL. + Allowed values for this property are: "FILE_ENTITY", "SQL_ENTITY", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type model_type: str + + :param metadata: + The value to assign to the metadata property of this EntityShapeFromSQL. + :type metadata: oci.data_integration.models.ObjectMetadata + + :param key: + The value to assign to the key property of this EntityShapeFromSQL. + :type key: str + + :param model_version: + The value to assign to the model_version property of this EntityShapeFromSQL. + :type model_version: str + + :param parent_ref: + The value to assign to the parent_ref property of this EntityShapeFromSQL. + :type parent_ref: oci.data_integration.models.ParentReference + + :param name: + The value to assign to the name property of this EntityShapeFromSQL. + :type name: str + + :param description: + The value to assign to the description property of this EntityShapeFromSQL. + :type description: str + + :param object_version: + The value to assign to the object_version property of this EntityShapeFromSQL. + :type object_version: int + + :param external_key: + The value to assign to the external_key property of this EntityShapeFromSQL. + :type external_key: str + + :param shape: + The value to assign to the shape property of this EntityShapeFromSQL. + :type shape: oci.data_integration.models.Shape + + :param shape_id: + The value to assign to the shape_id property of this EntityShapeFromSQL. + :type shape_id: str + + :param entity_type: + The value to assign to the entity_type property of this EntityShapeFromSQL. + Allowed values for this property are: "TABLE", "VIEW", "FILE", "SQL", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type entity_type: str + + :param other_type_label: + The value to assign to the other_type_label property of this EntityShapeFromSQL. + :type other_type_label: str + + :param unique_keys: + The value to assign to the unique_keys property of this EntityShapeFromSQL. + :type unique_keys: list[oci.data_integration.models.UniqueKey] + + :param foreign_keys: + The value to assign to the foreign_keys property of this EntityShapeFromSQL. + :type foreign_keys: list[oci.data_integration.models.ForeignKey] + + :param resource_name: + The value to assign to the resource_name property of this EntityShapeFromSQL. + :type resource_name: str + + :param data_format: + The value to assign to the data_format property of this EntityShapeFromSQL. + :type data_format: oci.data_integration.models.DataFormat + + :param object_status: + The value to assign to the object_status property of this EntityShapeFromSQL. + :type object_status: int + + :param identifier: + The value to assign to the identifier property of this EntityShapeFromSQL. + :type identifier: str + + :param sql_query: + The value to assign to the sql_query property of this EntityShapeFromSQL. + :type sql_query: str + + """ + self.swagger_types = { + 'model_type': 'str', + 'metadata': 'ObjectMetadata', + 'key': 'str', + 'model_version': 'str', + 'parent_ref': 'ParentReference', + 'name': 'str', + 'description': 'str', + 'object_version': 'int', + 'external_key': 'str', + 'shape': 'Shape', + 'shape_id': 'str', + 'entity_type': 'str', + 'other_type_label': 'str', + 'unique_keys': 'list[UniqueKey]', + 'foreign_keys': 'list[ForeignKey]', + 'resource_name': 'str', + 'data_format': 'DataFormat', + 'object_status': 'int', + 'identifier': 'str', + 'sql_query': 'str' + } + + self.attribute_map = { + 'model_type': 'modelType', + 'metadata': 'metadata', + 'key': 'key', + 'model_version': 'modelVersion', + 'parent_ref': 'parentRef', + 'name': 'name', + 'description': 'description', + 'object_version': 'objectVersion', + 'external_key': 'externalKey', + 'shape': 'shape', + 'shape_id': 'shapeId', + 'entity_type': 'entityType', + 'other_type_label': 'otherTypeLabel', + 'unique_keys': 'uniqueKeys', + 'foreign_keys': 'foreignKeys', + 'resource_name': 'resourceName', + 'data_format': 'dataFormat', + 'object_status': 'objectStatus', + 'identifier': 'identifier', + 'sql_query': 'sqlQuery' + } + + self._model_type = None + self._metadata = None + self._key = None + self._model_version = None + self._parent_ref = None + self._name = None + self._description = None + self._object_version = None + self._external_key = None + self._shape = None + self._shape_id = None + self._entity_type = None + self._other_type_label = None + self._unique_keys = None + self._foreign_keys = None + self._resource_name = None + self._data_format = None + self._object_status = None + self._identifier = None + self._sql_query = None + self._model_type = 'SQL_ENTITY' + + @property + def key(self): + """ + Gets the key of this EntityShapeFromSQL. + The object key. + + + :return: The key of this EntityShapeFromSQL. + :rtype: str + """ + return self._key + + @key.setter + def key(self, key): + """ + Sets the key of this EntityShapeFromSQL. + The object key. + + + :param key: The key of this EntityShapeFromSQL. + :type: str + """ + self._key = key + + @property + def model_version(self): + """ + Gets the model_version of this EntityShapeFromSQL. + The object's model version. + + + :return: The model_version of this EntityShapeFromSQL. + :rtype: str + """ + return self._model_version + + @model_version.setter + def model_version(self, model_version): + """ + Sets the model_version of this EntityShapeFromSQL. + The object's model version. + + + :param model_version: The model_version of this EntityShapeFromSQL. + :type: str + """ + self._model_version = model_version + + @property + def parent_ref(self): + """ + Gets the parent_ref of this EntityShapeFromSQL. + + :return: The parent_ref of this EntityShapeFromSQL. + :rtype: oci.data_integration.models.ParentReference + """ + return self._parent_ref + + @parent_ref.setter + def parent_ref(self, parent_ref): + """ + Sets the parent_ref of this EntityShapeFromSQL. + + :param parent_ref: The parent_ref of this EntityShapeFromSQL. + :type: oci.data_integration.models.ParentReference + """ + self._parent_ref = parent_ref + + @property + def name(self): + """ + Gets the name of this EntityShapeFromSQL. + Free form text without any restriction on permitted characters. Name can have letters, numbers, and special characters. The value is editable and is restricted to 1000 characters. + + + :return: The name of this EntityShapeFromSQL. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """ + Sets the name of this EntityShapeFromSQL. + Free form text without any restriction on permitted characters. Name can have letters, numbers, and special characters. The value is editable and is restricted to 1000 characters. + + + :param name: The name of this EntityShapeFromSQL. + :type: str + """ + self._name = name + + @property + def description(self): + """ + Gets the description of this EntityShapeFromSQL. + Detailed description for the object. + + + :return: The description of this EntityShapeFromSQL. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this EntityShapeFromSQL. + Detailed description for the object. + + + :param description: The description of this EntityShapeFromSQL. + :type: str + """ + self._description = description + + @property + def object_version(self): + """ + Gets the object_version of this EntityShapeFromSQL. + The version of the object that is used to track changes in the object instance. + + + :return: The object_version of this EntityShapeFromSQL. + :rtype: int + """ + return self._object_version + + @object_version.setter + def object_version(self, object_version): + """ + Sets the object_version of this EntityShapeFromSQL. + The version of the object that is used to track changes in the object instance. + + + :param object_version: The object_version of this EntityShapeFromSQL. + :type: int + """ + self._object_version = object_version + + @property + def external_key(self): + """ + Gets the external_key of this EntityShapeFromSQL. + The external key for the object. + + + :return: The external_key of this EntityShapeFromSQL. + :rtype: str + """ + return self._external_key + + @external_key.setter + def external_key(self, external_key): + """ + Sets the external_key of this EntityShapeFromSQL. + The external key for the object. + + + :param external_key: The external_key of this EntityShapeFromSQL. + :type: str + """ + self._external_key = external_key + + @property + def shape(self): + """ + Gets the shape of this EntityShapeFromSQL. + + :return: The shape of this EntityShapeFromSQL. + :rtype: oci.data_integration.models.Shape + """ + return self._shape + + @shape.setter + def shape(self, shape): + """ + Sets the shape of this EntityShapeFromSQL. + + :param shape: The shape of this EntityShapeFromSQL. + :type: oci.data_integration.models.Shape + """ + self._shape = shape + + @property + def shape_id(self): + """ + Gets the shape_id of this EntityShapeFromSQL. + The shape ID. + + + :return: The shape_id of this EntityShapeFromSQL. + :rtype: str + """ + return self._shape_id + + @shape_id.setter + def shape_id(self, shape_id): + """ + Sets the shape_id of this EntityShapeFromSQL. + The shape ID. + + + :param shape_id: The shape_id of this EntityShapeFromSQL. + :type: str + """ + self._shape_id = shape_id + + @property + def entity_type(self): + """ + Gets the entity_type of this EntityShapeFromSQL. + The entity type. + + Allowed values for this property are: "TABLE", "VIEW", "FILE", "SQL", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The entity_type of this EntityShapeFromSQL. + :rtype: str + """ + return self._entity_type + + @entity_type.setter + def entity_type(self, entity_type): + """ + Sets the entity_type of this EntityShapeFromSQL. + The entity type. + + + :param entity_type: The entity_type of this EntityShapeFromSQL. + :type: str + """ + allowed_values = ["TABLE", "VIEW", "FILE", "SQL"] + if not value_allowed_none_or_none_sentinel(entity_type, allowed_values): + entity_type = 'UNKNOWN_ENUM_VALUE' + self._entity_type = entity_type + + @property + def other_type_label(self): + """ + Gets the other_type_label of this EntityShapeFromSQL. + Specifies other type label. + + + :return: The other_type_label of this EntityShapeFromSQL. + :rtype: str + """ + return self._other_type_label + + @other_type_label.setter + def other_type_label(self, other_type_label): + """ + Sets the other_type_label of this EntityShapeFromSQL. + Specifies other type label. + + + :param other_type_label: The other_type_label of this EntityShapeFromSQL. + :type: str + """ + self._other_type_label = other_type_label + + @property + def unique_keys(self): + """ + Gets the unique_keys of this EntityShapeFromSQL. + An array of unique keys. + + + :return: The unique_keys of this EntityShapeFromSQL. + :rtype: list[oci.data_integration.models.UniqueKey] + """ + return self._unique_keys + + @unique_keys.setter + def unique_keys(self, unique_keys): + """ + Sets the unique_keys of this EntityShapeFromSQL. + An array of unique keys. + + + :param unique_keys: The unique_keys of this EntityShapeFromSQL. + :type: list[oci.data_integration.models.UniqueKey] + """ + self._unique_keys = unique_keys + + @property + def foreign_keys(self): + """ + Gets the foreign_keys of this EntityShapeFromSQL. + An array of foreign keys. + + + :return: The foreign_keys of this EntityShapeFromSQL. + :rtype: list[oci.data_integration.models.ForeignKey] + """ + return self._foreign_keys + + @foreign_keys.setter + def foreign_keys(self, foreign_keys): + """ + Sets the foreign_keys of this EntityShapeFromSQL. + An array of foreign keys. + + + :param foreign_keys: The foreign_keys of this EntityShapeFromSQL. + :type: list[oci.data_integration.models.ForeignKey] + """ + self._foreign_keys = foreign_keys + + @property + def resource_name(self): + """ + Gets the resource_name of this EntityShapeFromSQL. + The resource name. + + + :return: The resource_name of this EntityShapeFromSQL. + :rtype: str + """ + return self._resource_name + + @resource_name.setter + def resource_name(self, resource_name): + """ + Sets the resource_name of this EntityShapeFromSQL. + The resource name. + + + :param resource_name: The resource_name of this EntityShapeFromSQL. + :type: str + """ + self._resource_name = resource_name + + @property + def data_format(self): + """ + Gets the data_format of this EntityShapeFromSQL. + + :return: The data_format of this EntityShapeFromSQL. + :rtype: oci.data_integration.models.DataFormat + """ + return self._data_format + + @data_format.setter + def data_format(self, data_format): + """ + Sets the data_format of this EntityShapeFromSQL. + + :param data_format: The data_format of this EntityShapeFromSQL. + :type: oci.data_integration.models.DataFormat + """ + self._data_format = data_format + + @property + def object_status(self): + """ + Gets the object_status of this EntityShapeFromSQL. + The status of an object that can be set to value 1 for shallow references across objects, other values reserved. + + + :return: The object_status of this EntityShapeFromSQL. + :rtype: int + """ + return self._object_status + + @object_status.setter + def object_status(self, object_status): + """ + Sets the object_status of this EntityShapeFromSQL. + The status of an object that can be set to value 1 for shallow references across objects, other values reserved. + + + :param object_status: The object_status of this EntityShapeFromSQL. + :type: int + """ + self._object_status = object_status + + @property + def identifier(self): + """ + Gets the identifier of this EntityShapeFromSQL. + Value can only contain upper case letters, underscore and numbers. It should begin with upper case letter or underscore. The value can be modified. + + + :return: The identifier of this EntityShapeFromSQL. + :rtype: str + """ + return self._identifier + + @identifier.setter + def identifier(self, identifier): + """ + Sets the identifier of this EntityShapeFromSQL. + Value can only contain upper case letters, underscore and numbers. It should begin with upper case letter or underscore. The value can be modified. + + + :param identifier: The identifier of this EntityShapeFromSQL. + :type: str + """ + self._identifier = identifier + + @property + def sql_query(self): + """ + Gets the sql_query of this EntityShapeFromSQL. + sqlQuery + + + :return: The sql_query of this EntityShapeFromSQL. + :rtype: str + """ + return self._sql_query + + @sql_query.setter + def sql_query(self, sql_query): + """ + Sets the sql_query of this EntityShapeFromSQL. + sqlQuery + + + :param sql_query: The sql_query of this EntityShapeFromSQL. + :type: str + """ + self._sql_query = sql_query + + 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_integration/models/execute_rest_call_config.py b/src/oci/data_integration/models/execute_rest_call_config.py new file mode 100644 index 0000000000..f82553d0aa --- /dev/null +++ b/src/oci/data_integration/models/execute_rest_call_config.py @@ -0,0 +1,156 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 ExecuteRestCallConfig(object): + """ + The REST API configuration for execution. + """ + + #: A constant which can be used with the method_type property of a ExecuteRestCallConfig. + #: This constant has a value of "GET" + METHOD_TYPE_GET = "GET" + + #: A constant which can be used with the method_type property of a ExecuteRestCallConfig. + #: This constant has a value of "POST" + METHOD_TYPE_POST = "POST" + + #: A constant which can be used with the method_type property of a ExecuteRestCallConfig. + #: This constant has a value of "PATCH" + METHOD_TYPE_PATCH = "PATCH" + + #: A constant which can be used with the method_type property of a ExecuteRestCallConfig. + #: This constant has a value of "DELETE" + METHOD_TYPE_DELETE = "DELETE" + + #: A constant which can be used with the method_type property of a ExecuteRestCallConfig. + #: This constant has a value of "PUT" + METHOD_TYPE_PUT = "PUT" + + def __init__(self, **kwargs): + """ + Initializes a new ExecuteRestCallConfig object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param method_type: + The value to assign to the method_type property of this ExecuteRestCallConfig. + Allowed values for this property are: "GET", "POST", "PATCH", "DELETE", "PUT", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type method_type: str + + :param request_headers: + The value to assign to the request_headers property of this ExecuteRestCallConfig. + :type request_headers: dict(str, str) + + :param config_values: + The value to assign to the config_values property of this ExecuteRestCallConfig. + :type config_values: oci.data_integration.models.ConfigValues + + """ + self.swagger_types = { + 'method_type': 'str', + 'request_headers': 'dict(str, str)', + 'config_values': 'ConfigValues' + } + + self.attribute_map = { + 'method_type': 'methodType', + 'request_headers': 'requestHeaders', + 'config_values': 'configValues' + } + + self._method_type = None + self._request_headers = None + self._config_values = None + + @property + def method_type(self): + """ + Gets the method_type of this ExecuteRestCallConfig. + The REST method to use. + + Allowed values for this property are: "GET", "POST", "PATCH", "DELETE", "PUT", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The method_type of this ExecuteRestCallConfig. + :rtype: str + """ + return self._method_type + + @method_type.setter + def method_type(self, method_type): + """ + Sets the method_type of this ExecuteRestCallConfig. + The REST method to use. + + + :param method_type: The method_type of this ExecuteRestCallConfig. + :type: str + """ + allowed_values = ["GET", "POST", "PATCH", "DELETE", "PUT"] + if not value_allowed_none_or_none_sentinel(method_type, allowed_values): + method_type = 'UNKNOWN_ENUM_VALUE' + self._method_type = method_type + + @property + def request_headers(self): + """ + Gets the request_headers of this ExecuteRestCallConfig. + The headers for the REST call. + + + :return: The request_headers of this ExecuteRestCallConfig. + :rtype: dict(str, str) + """ + return self._request_headers + + @request_headers.setter + def request_headers(self, request_headers): + """ + Sets the request_headers of this ExecuteRestCallConfig. + The headers for the REST call. + + + :param request_headers: The request_headers of this ExecuteRestCallConfig. + :type: dict(str, str) + """ + self._request_headers = request_headers + + @property + def config_values(self): + """ + Gets the config_values of this ExecuteRestCallConfig. + + :return: The config_values of this ExecuteRestCallConfig. + :rtype: oci.data_integration.models.ConfigValues + """ + return self._config_values + + @config_values.setter + def config_values(self, config_values): + """ + Sets the config_values of this ExecuteRestCallConfig. + + :param config_values: The config_values of this ExecuteRestCallConfig. + :type: oci.data_integration.models.ConfigValues + """ + self._config_values = config_values + + 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_integration/models/function_library.py b/src/oci/data_integration/models/function_library.py new file mode 100644 index 0000000000..e48609f30a --- /dev/null +++ b/src/oci/data_integration/models/function_library.py @@ -0,0 +1,415 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 FunctionLibrary(object): + """ + The FunctionLibrary type contains the audit summary information and the definition of the FunctionLibrary. + """ + + #: A constant which can be used with the model_type property of a FunctionLibrary. + #: This constant has a value of "FUNCTION_LIBRARY" + MODEL_TYPE_FUNCTION_LIBRARY = "FUNCTION_LIBRARY" + + def __init__(self, **kwargs): + """ + Initializes a new FunctionLibrary object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param key: + The value to assign to the key property of this FunctionLibrary. + :type key: str + + :param model_type: + The value to assign to the model_type property of this FunctionLibrary. + Allowed values for this property are: "FUNCTION_LIBRARY", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type model_type: str + + :param model_version: + The value to assign to the model_version property of this FunctionLibrary. + :type model_version: str + + :param name: + The value to assign to the name property of this FunctionLibrary. + :type name: str + + :param description: + The value to assign to the description property of this FunctionLibrary. + :type description: str + + :param category_name: + The value to assign to the category_name property of this FunctionLibrary. + :type category_name: str + + :param object_status: + The value to assign to the object_status property of this FunctionLibrary. + :type object_status: int + + :param identifier: + The value to assign to the identifier property of this FunctionLibrary. + :type identifier: str + + :param parent_ref: + The value to assign to the parent_ref property of this FunctionLibrary. + :type parent_ref: oci.data_integration.models.ParentReference + + :param object_version: + The value to assign to the object_version property of this FunctionLibrary. + :type object_version: int + + :param metadata: + The value to assign to the metadata property of this FunctionLibrary. + :type metadata: oci.data_integration.models.ObjectMetadata + + :param key_map: + The value to assign to the key_map property of this FunctionLibrary. + :type key_map: dict(str, str) + + """ + self.swagger_types = { + 'key': 'str', + 'model_type': 'str', + 'model_version': 'str', + 'name': 'str', + 'description': 'str', + 'category_name': 'str', + 'object_status': 'int', + 'identifier': 'str', + 'parent_ref': 'ParentReference', + 'object_version': 'int', + 'metadata': 'ObjectMetadata', + 'key_map': 'dict(str, str)' + } + + self.attribute_map = { + 'key': 'key', + 'model_type': 'modelType', + 'model_version': 'modelVersion', + 'name': 'name', + 'description': 'description', + 'category_name': 'categoryName', + 'object_status': 'objectStatus', + 'identifier': 'identifier', + 'parent_ref': 'parentRef', + 'object_version': 'objectVersion', + 'metadata': 'metadata', + 'key_map': 'keyMap' + } + + self._key = None + self._model_type = None + self._model_version = None + self._name = None + self._description = None + self._category_name = None + self._object_status = None + self._identifier = None + self._parent_ref = None + self._object_version = None + self._metadata = None + self._key_map = None + + @property + def key(self): + """ + Gets the key of this FunctionLibrary. + Generated key that can be used in API calls to identify FunctionLibrary. + + + :return: The key of this FunctionLibrary. + :rtype: str + """ + return self._key + + @key.setter + def key(self, key): + """ + Sets the key of this FunctionLibrary. + Generated key that can be used in API calls to identify FunctionLibrary. + + + :param key: The key of this FunctionLibrary. + :type: str + """ + self._key = key + + @property + def model_type(self): + """ + Gets the model_type of this FunctionLibrary. + The type of the object. + + Allowed values for this property are: "FUNCTION_LIBRARY", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The model_type of this FunctionLibrary. + :rtype: str + """ + return self._model_type + + @model_type.setter + def model_type(self, model_type): + """ + Sets the model_type of this FunctionLibrary. + The type of the object. + + + :param model_type: The model_type of this FunctionLibrary. + :type: str + """ + allowed_values = ["FUNCTION_LIBRARY"] + if not value_allowed_none_or_none_sentinel(model_type, allowed_values): + model_type = 'UNKNOWN_ENUM_VALUE' + self._model_type = model_type + + @property + def model_version(self): + """ + Gets the model_version of this FunctionLibrary. + The model version of an object. + + + :return: The model_version of this FunctionLibrary. + :rtype: str + """ + return self._model_version + + @model_version.setter + def model_version(self, model_version): + """ + Sets the model_version of this FunctionLibrary. + The model version of an object. + + + :param model_version: The model_version of this FunctionLibrary. + :type: str + """ + self._model_version = model_version + + @property + def name(self): + """ + Gets the name of this FunctionLibrary. + Free form text without any restriction on permitted characters. Name can have letters, numbers, and special characters. The value is editable and is restricted to 1000 characters. + + + :return: The name of this FunctionLibrary. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """ + Sets the name of this FunctionLibrary. + Free form text without any restriction on permitted characters. Name can have letters, numbers, and special characters. The value is editable and is restricted to 1000 characters. + + + :param name: The name of this FunctionLibrary. + :type: str + """ + self._name = name + + @property + def description(self): + """ + Gets the description of this FunctionLibrary. + A user defined description for the Function Library. + + + :return: The description of this FunctionLibrary. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this FunctionLibrary. + A user defined description for the Function Library. + + + :param description: The description of this FunctionLibrary. + :type: str + """ + self._description = description + + @property + def category_name(self): + """ + Gets the category_name of this FunctionLibrary. + The category name. + + + :return: The category_name of this FunctionLibrary. + :rtype: str + """ + return self._category_name + + @category_name.setter + def category_name(self, category_name): + """ + Sets the category_name of this FunctionLibrary. + The category name. + + + :param category_name: The category_name of this FunctionLibrary. + :type: str + """ + self._category_name = category_name + + @property + def object_status(self): + """ + Gets the object_status of this FunctionLibrary. + The status of an object that can be set to value 1 for shallow references across objects, other values reserved. + + + :return: The object_status of this FunctionLibrary. + :rtype: int + """ + return self._object_status + + @object_status.setter + def object_status(self, object_status): + """ + Sets the object_status of this FunctionLibrary. + The status of an object that can be set to value 1 for shallow references across objects, other values reserved. + + + :param object_status: The object_status of this FunctionLibrary. + :type: int + """ + self._object_status = object_status + + @property + def identifier(self): + """ + Gets the identifier of this FunctionLibrary. + Value can only contain upper case letters, underscore, and numbers. It should begin with upper case letter or underscore. The value can be modified. + + + :return: The identifier of this FunctionLibrary. + :rtype: str + """ + return self._identifier + + @identifier.setter + def identifier(self, identifier): + """ + Sets the identifier of this FunctionLibrary. + Value can only contain upper case letters, underscore, and numbers. It should begin with upper case letter or underscore. The value can be modified. + + + :param identifier: The identifier of this FunctionLibrary. + :type: str + """ + self._identifier = identifier + + @property + def parent_ref(self): + """ + Gets the parent_ref of this FunctionLibrary. + + :return: The parent_ref of this FunctionLibrary. + :rtype: oci.data_integration.models.ParentReference + """ + return self._parent_ref + + @parent_ref.setter + def parent_ref(self, parent_ref): + """ + Sets the parent_ref of this FunctionLibrary. + + :param parent_ref: The parent_ref of this FunctionLibrary. + :type: oci.data_integration.models.ParentReference + """ + self._parent_ref = parent_ref + + @property + def object_version(self): + """ + Gets the object_version of this FunctionLibrary. + The version of the object that is used to track changes in the object instance. + + + :return: The object_version of this FunctionLibrary. + :rtype: int + """ + return self._object_version + + @object_version.setter + def object_version(self, object_version): + """ + Sets the object_version of this FunctionLibrary. + The version of the object that is used to track changes in the object instance. + + + :param object_version: The object_version of this FunctionLibrary. + :type: int + """ + self._object_version = object_version + + @property + def metadata(self): + """ + Gets the metadata of this FunctionLibrary. + + :return: The metadata of this FunctionLibrary. + :rtype: oci.data_integration.models.ObjectMetadata + """ + return self._metadata + + @metadata.setter + def metadata(self, metadata): + """ + Sets the metadata of this FunctionLibrary. + + :param metadata: The metadata of this FunctionLibrary. + :type: oci.data_integration.models.ObjectMetadata + """ + self._metadata = metadata + + @property + def key_map(self): + """ + Gets the key_map of this FunctionLibrary. + A key map. If provided, the key is replaced with generated key. This structure provides mapping between user provided key and generated key. + + + :return: The key_map of this FunctionLibrary. + :rtype: dict(str, str) + """ + return self._key_map + + @key_map.setter + def key_map(self, key_map): + """ + Sets the key_map of this FunctionLibrary. + A key map. If provided, the key is replaced with generated key. This structure provides mapping between user provided key and generated key. + + + :param key_map: The key_map of this FunctionLibrary. + :type: dict(str, str) + """ + self._key_map = key_map + + 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_integration/models/function_library_details.py b/src/oci/data_integration/models/function_library_details.py new file mode 100644 index 0000000000..a01a71cb0e --- /dev/null +++ b/src/oci/data_integration/models/function_library_details.py @@ -0,0 +1,385 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 FunctionLibraryDetails(object): + """ + The details including name, description for the function library, which is a container for user defined functions. + """ + + #: A constant which can be used with the model_type property of a FunctionLibraryDetails. + #: This constant has a value of "FUNCTION_LIBRARY" + MODEL_TYPE_FUNCTION_LIBRARY = "FUNCTION_LIBRARY" + + def __init__(self, **kwargs): + """ + Initializes a new FunctionLibraryDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param key: + The value to assign to the key property of this FunctionLibraryDetails. + :type key: str + + :param model_type: + The value to assign to the model_type property of this FunctionLibraryDetails. + Allowed values for this property are: "FUNCTION_LIBRARY" + :type model_type: str + + :param model_version: + The value to assign to the model_version property of this FunctionLibraryDetails. + :type model_version: str + + :param name: + The value to assign to the name property of this FunctionLibraryDetails. + :type name: str + + :param description: + The value to assign to the description property of this FunctionLibraryDetails. + :type description: str + + :param category_name: + The value to assign to the category_name property of this FunctionLibraryDetails. + :type category_name: str + + :param object_status: + The value to assign to the object_status property of this FunctionLibraryDetails. + :type object_status: int + + :param identifier: + The value to assign to the identifier property of this FunctionLibraryDetails. + :type identifier: str + + :param parent_ref: + The value to assign to the parent_ref property of this FunctionLibraryDetails. + :type parent_ref: oci.data_integration.models.ParentReference + + :param object_version: + The value to assign to the object_version property of this FunctionLibraryDetails. + :type object_version: int + + :param registry_metadata: + The value to assign to the registry_metadata property of this FunctionLibraryDetails. + :type registry_metadata: oci.data_integration.models.RegistryMetadata + + """ + self.swagger_types = { + 'key': 'str', + 'model_type': 'str', + 'model_version': 'str', + 'name': 'str', + 'description': 'str', + 'category_name': 'str', + 'object_status': 'int', + 'identifier': 'str', + 'parent_ref': 'ParentReference', + 'object_version': 'int', + 'registry_metadata': 'RegistryMetadata' + } + + self.attribute_map = { + 'key': 'key', + 'model_type': 'modelType', + 'model_version': 'modelVersion', + 'name': 'name', + 'description': 'description', + 'category_name': 'categoryName', + 'object_status': 'objectStatus', + 'identifier': 'identifier', + 'parent_ref': 'parentRef', + 'object_version': 'objectVersion', + 'registry_metadata': 'registryMetadata' + } + + self._key = None + self._model_type = None + self._model_version = None + self._name = None + self._description = None + self._category_name = None + self._object_status = None + self._identifier = None + self._parent_ref = None + self._object_version = None + self._registry_metadata = None + + @property + def key(self): + """ + **[Required]** Gets the key of this FunctionLibraryDetails. + Generated key that can be used in API calls to identify FunctionLibrary. + + + :return: The key of this FunctionLibraryDetails. + :rtype: str + """ + return self._key + + @key.setter + def key(self, key): + """ + Sets the key of this FunctionLibraryDetails. + Generated key that can be used in API calls to identify FunctionLibrary. + + + :param key: The key of this FunctionLibraryDetails. + :type: str + """ + self._key = key + + @property + def model_type(self): + """ + **[Required]** Gets the model_type of this FunctionLibraryDetails. + The type of the object. + + Allowed values for this property are: "FUNCTION_LIBRARY" + + + :return: The model_type of this FunctionLibraryDetails. + :rtype: str + """ + return self._model_type + + @model_type.setter + def model_type(self, model_type): + """ + Sets the model_type of this FunctionLibraryDetails. + The type of the object. + + + :param model_type: The model_type of this FunctionLibraryDetails. + :type: str + """ + allowed_values = ["FUNCTION_LIBRARY"] + if not value_allowed_none_or_none_sentinel(model_type, allowed_values): + raise ValueError( + "Invalid value for `model_type`, must be None or one of {0}" + .format(allowed_values) + ) + self._model_type = model_type + + @property + def model_version(self): + """ + Gets the model_version of this FunctionLibraryDetails. + The model version of an object. + + + :return: The model_version of this FunctionLibraryDetails. + :rtype: str + """ + return self._model_version + + @model_version.setter + def model_version(self, model_version): + """ + Sets the model_version of this FunctionLibraryDetails. + The model version of an object. + + + :param model_version: The model_version of this FunctionLibraryDetails. + :type: str + """ + self._model_version = model_version + + @property + def name(self): + """ + Gets the name of this FunctionLibraryDetails. + Free form text without any restriction on permitted characters. Name can have letters, numbers, and special characters. The value is editable and is restricted to 1000 characters. + + + :return: The name of this FunctionLibraryDetails. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """ + Sets the name of this FunctionLibraryDetails. + Free form text without any restriction on permitted characters. Name can have letters, numbers, and special characters. The value is editable and is restricted to 1000 characters. + + + :param name: The name of this FunctionLibraryDetails. + :type: str + """ + self._name = name + + @property + def description(self): + """ + Gets the description of this FunctionLibraryDetails. + A user defined description for the FunctionLibrary. + + + :return: The description of this FunctionLibraryDetails. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this FunctionLibraryDetails. + A user defined description for the FunctionLibrary. + + + :param description: The description of this FunctionLibraryDetails. + :type: str + """ + self._description = description + + @property + def category_name(self): + """ + Gets the category_name of this FunctionLibraryDetails. + The category name. + + + :return: The category_name of this FunctionLibraryDetails. + :rtype: str + """ + return self._category_name + + @category_name.setter + def category_name(self, category_name): + """ + Sets the category_name of this FunctionLibraryDetails. + The category name. + + + :param category_name: The category_name of this FunctionLibraryDetails. + :type: str + """ + self._category_name = category_name + + @property + def object_status(self): + """ + Gets the object_status of this FunctionLibraryDetails. + The status of an object that can be set to value 1 for shallow references across objects, other values reserved. + + + :return: The object_status of this FunctionLibraryDetails. + :rtype: int + """ + return self._object_status + + @object_status.setter + def object_status(self, object_status): + """ + Sets the object_status of this FunctionLibraryDetails. + The status of an object that can be set to value 1 for shallow references across objects, other values reserved. + + + :param object_status: The object_status of this FunctionLibraryDetails. + :type: int + """ + self._object_status = object_status + + @property + def identifier(self): + """ + Gets the identifier of this FunctionLibraryDetails. + Value can only contain upper case letters, underscore, and numbers. It should begin with upper case letter or underscore. The value can be modified. + + + :return: The identifier of this FunctionLibraryDetails. + :rtype: str + """ + return self._identifier + + @identifier.setter + def identifier(self, identifier): + """ + Sets the identifier of this FunctionLibraryDetails. + Value can only contain upper case letters, underscore, and numbers. It should begin with upper case letter or underscore. The value can be modified. + + + :param identifier: The identifier of this FunctionLibraryDetails. + :type: str + """ + self._identifier = identifier + + @property + def parent_ref(self): + """ + Gets the parent_ref of this FunctionLibraryDetails. + + :return: The parent_ref of this FunctionLibraryDetails. + :rtype: oci.data_integration.models.ParentReference + """ + return self._parent_ref + + @parent_ref.setter + def parent_ref(self, parent_ref): + """ + Sets the parent_ref of this FunctionLibraryDetails. + + :param parent_ref: The parent_ref of this FunctionLibraryDetails. + :type: oci.data_integration.models.ParentReference + """ + self._parent_ref = parent_ref + + @property + def object_version(self): + """ + **[Required]** Gets the object_version of this FunctionLibraryDetails. + The version of the object that is used to track changes in the object instance. + + + :return: The object_version of this FunctionLibraryDetails. + :rtype: int + """ + return self._object_version + + @object_version.setter + def object_version(self, object_version): + """ + Sets the object_version of this FunctionLibraryDetails. + The version of the object that is used to track changes in the object instance. + + + :param object_version: The object_version of this FunctionLibraryDetails. + :type: int + """ + self._object_version = object_version + + @property + def registry_metadata(self): + """ + Gets the registry_metadata of this FunctionLibraryDetails. + + :return: The registry_metadata of this FunctionLibraryDetails. + :rtype: oci.data_integration.models.RegistryMetadata + """ + return self._registry_metadata + + @registry_metadata.setter + def registry_metadata(self, registry_metadata): + """ + Sets the registry_metadata of this FunctionLibraryDetails. + + :param registry_metadata: The registry_metadata of this FunctionLibraryDetails. + :type: oci.data_integration.models.RegistryMetadata + """ + self._registry_metadata = registry_metadata + + 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_integration/models/function_library_summary.py b/src/oci/data_integration/models/function_library_summary.py new file mode 100644 index 0000000000..4e21f1b462 --- /dev/null +++ b/src/oci/data_integration/models/function_library_summary.py @@ -0,0 +1,415 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 FunctionLibrarySummary(object): + """ + The FunctionLibrary summary type contains the audit summary information and the definition of the Function Library. + """ + + #: A constant which can be used with the model_type property of a FunctionLibrarySummary. + #: This constant has a value of "FUNCTION_LIBRARY" + MODEL_TYPE_FUNCTION_LIBRARY = "FUNCTION_LIBRARY" + + def __init__(self, **kwargs): + """ + Initializes a new FunctionLibrarySummary object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param key: + The value to assign to the key property of this FunctionLibrarySummary. + :type key: str + + :param model_type: + The value to assign to the model_type property of this FunctionLibrarySummary. + Allowed values for this property are: "FUNCTION_LIBRARY", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type model_type: str + + :param model_version: + The value to assign to the model_version property of this FunctionLibrarySummary. + :type model_version: str + + :param name: + The value to assign to the name property of this FunctionLibrarySummary. + :type name: str + + :param description: + The value to assign to the description property of this FunctionLibrarySummary. + :type description: str + + :param category_name: + The value to assign to the category_name property of this FunctionLibrarySummary. + :type category_name: str + + :param object_status: + The value to assign to the object_status property of this FunctionLibrarySummary. + :type object_status: int + + :param identifier: + The value to assign to the identifier property of this FunctionLibrarySummary. + :type identifier: str + + :param parent_ref: + The value to assign to the parent_ref property of this FunctionLibrarySummary. + :type parent_ref: oci.data_integration.models.ParentReference + + :param object_version: + The value to assign to the object_version property of this FunctionLibrarySummary. + :type object_version: int + + :param metadata: + The value to assign to the metadata property of this FunctionLibrarySummary. + :type metadata: oci.data_integration.models.ObjectMetadata + + :param key_map: + The value to assign to the key_map property of this FunctionLibrarySummary. + :type key_map: dict(str, str) + + """ + self.swagger_types = { + 'key': 'str', + 'model_type': 'str', + 'model_version': 'str', + 'name': 'str', + 'description': 'str', + 'category_name': 'str', + 'object_status': 'int', + 'identifier': 'str', + 'parent_ref': 'ParentReference', + 'object_version': 'int', + 'metadata': 'ObjectMetadata', + 'key_map': 'dict(str, str)' + } + + self.attribute_map = { + 'key': 'key', + 'model_type': 'modelType', + 'model_version': 'modelVersion', + 'name': 'name', + 'description': 'description', + 'category_name': 'categoryName', + 'object_status': 'objectStatus', + 'identifier': 'identifier', + 'parent_ref': 'parentRef', + 'object_version': 'objectVersion', + 'metadata': 'metadata', + 'key_map': 'keyMap' + } + + self._key = None + self._model_type = None + self._model_version = None + self._name = None + self._description = None + self._category_name = None + self._object_status = None + self._identifier = None + self._parent_ref = None + self._object_version = None + self._metadata = None + self._key_map = None + + @property + def key(self): + """ + Gets the key of this FunctionLibrarySummary. + Generated key that can be used in API calls to identify FunctionLibrary. + + + :return: The key of this FunctionLibrarySummary. + :rtype: str + """ + return self._key + + @key.setter + def key(self, key): + """ + Sets the key of this FunctionLibrarySummary. + Generated key that can be used in API calls to identify FunctionLibrary. + + + :param key: The key of this FunctionLibrarySummary. + :type: str + """ + self._key = key + + @property + def model_type(self): + """ + Gets the model_type of this FunctionLibrarySummary. + The type of the object. + + Allowed values for this property are: "FUNCTION_LIBRARY", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The model_type of this FunctionLibrarySummary. + :rtype: str + """ + return self._model_type + + @model_type.setter + def model_type(self, model_type): + """ + Sets the model_type of this FunctionLibrarySummary. + The type of the object. + + + :param model_type: The model_type of this FunctionLibrarySummary. + :type: str + """ + allowed_values = ["FUNCTION_LIBRARY"] + if not value_allowed_none_or_none_sentinel(model_type, allowed_values): + model_type = 'UNKNOWN_ENUM_VALUE' + self._model_type = model_type + + @property + def model_version(self): + """ + Gets the model_version of this FunctionLibrarySummary. + The model version of an object. + + + :return: The model_version of this FunctionLibrarySummary. + :rtype: str + """ + return self._model_version + + @model_version.setter + def model_version(self, model_version): + """ + Sets the model_version of this FunctionLibrarySummary. + The model version of an object. + + + :param model_version: The model_version of this FunctionLibrarySummary. + :type: str + """ + self._model_version = model_version + + @property + def name(self): + """ + Gets the name of this FunctionLibrarySummary. + Free form text without any restriction on permitted characters. Name can have letters, numbers, and special characters. The value is editable and is restricted to 1000 characters. + + + :return: The name of this FunctionLibrarySummary. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """ + Sets the name of this FunctionLibrarySummary. + Free form text without any restriction on permitted characters. Name can have letters, numbers, and special characters. The value is editable and is restricted to 1000 characters. + + + :param name: The name of this FunctionLibrarySummary. + :type: str + """ + self._name = name + + @property + def description(self): + """ + Gets the description of this FunctionLibrarySummary. + A user defined description for the Function Library. + + + :return: The description of this FunctionLibrarySummary. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this FunctionLibrarySummary. + A user defined description for the Function Library. + + + :param description: The description of this FunctionLibrarySummary. + :type: str + """ + self._description = description + + @property + def category_name(self): + """ + Gets the category_name of this FunctionLibrarySummary. + The category name. + + + :return: The category_name of this FunctionLibrarySummary. + :rtype: str + """ + return self._category_name + + @category_name.setter + def category_name(self, category_name): + """ + Sets the category_name of this FunctionLibrarySummary. + The category name. + + + :param category_name: The category_name of this FunctionLibrarySummary. + :type: str + """ + self._category_name = category_name + + @property + def object_status(self): + """ + Gets the object_status of this FunctionLibrarySummary. + The status of an object that can be set to value 1 for shallow references across objects, other values reserved. + + + :return: The object_status of this FunctionLibrarySummary. + :rtype: int + """ + return self._object_status + + @object_status.setter + def object_status(self, object_status): + """ + Sets the object_status of this FunctionLibrarySummary. + The status of an object that can be set to value 1 for shallow references across objects, other values reserved. + + + :param object_status: The object_status of this FunctionLibrarySummary. + :type: int + """ + self._object_status = object_status + + @property + def identifier(self): + """ + Gets the identifier of this FunctionLibrarySummary. + Value can only contain upper case letters, underscore, and numbers. It should begin with upper case letter or underscore. The value can be modified. + + + :return: The identifier of this FunctionLibrarySummary. + :rtype: str + """ + return self._identifier + + @identifier.setter + def identifier(self, identifier): + """ + Sets the identifier of this FunctionLibrarySummary. + Value can only contain upper case letters, underscore, and numbers. It should begin with upper case letter or underscore. The value can be modified. + + + :param identifier: The identifier of this FunctionLibrarySummary. + :type: str + """ + self._identifier = identifier + + @property + def parent_ref(self): + """ + Gets the parent_ref of this FunctionLibrarySummary. + + :return: The parent_ref of this FunctionLibrarySummary. + :rtype: oci.data_integration.models.ParentReference + """ + return self._parent_ref + + @parent_ref.setter + def parent_ref(self, parent_ref): + """ + Sets the parent_ref of this FunctionLibrarySummary. + + :param parent_ref: The parent_ref of this FunctionLibrarySummary. + :type: oci.data_integration.models.ParentReference + """ + self._parent_ref = parent_ref + + @property + def object_version(self): + """ + Gets the object_version of this FunctionLibrarySummary. + The version of the object that is used to track changes in the object instance. + + + :return: The object_version of this FunctionLibrarySummary. + :rtype: int + """ + return self._object_version + + @object_version.setter + def object_version(self, object_version): + """ + Sets the object_version of this FunctionLibrarySummary. + The version of the object that is used to track changes in the object instance. + + + :param object_version: The object_version of this FunctionLibrarySummary. + :type: int + """ + self._object_version = object_version + + @property + def metadata(self): + """ + Gets the metadata of this FunctionLibrarySummary. + + :return: The metadata of this FunctionLibrarySummary. + :rtype: oci.data_integration.models.ObjectMetadata + """ + return self._metadata + + @metadata.setter + def metadata(self, metadata): + """ + Sets the metadata of this FunctionLibrarySummary. + + :param metadata: The metadata of this FunctionLibrarySummary. + :type: oci.data_integration.models.ObjectMetadata + """ + self._metadata = metadata + + @property + def key_map(self): + """ + Gets the key_map of this FunctionLibrarySummary. + A key map. If provided, the key is replaced with generated key. This structure provides mapping between user provided key and generated key. + + + :return: The key_map of this FunctionLibrarySummary. + :rtype: dict(str, str) + """ + return self._key_map + + @key_map.setter + def key_map(self, key_map): + """ + Sets the key_map of this FunctionLibrarySummary. + A key map. If provided, the key is replaced with generated key. This structure provides mapping between user provided key and generated key. + + + :param key_map: The key_map of this FunctionLibrarySummary. + :type: dict(str, str) + """ + self._key_map = key_map + + 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_integration/models/function_library_summary_collection.py b/src/oci/data_integration/models/function_library_summary_collection.py new file mode 100644 index 0000000000..5c50bbcaec --- /dev/null +++ b/src/oci/data_integration/models/function_library_summary_collection.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 FunctionLibrarySummaryCollection(object): + """ + A collection of FunctionLibrary summaries. The collection can be lightweight details or full definitions. + """ + + def __init__(self, **kwargs): + """ + Initializes a new FunctionLibrarySummaryCollection object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param items: + The value to assign to the items property of this FunctionLibrarySummaryCollection. + :type items: list[oci.data_integration.models.FunctionLibrarySummary] + + """ + self.swagger_types = { + 'items': 'list[FunctionLibrarySummary]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this FunctionLibrarySummaryCollection. + The array of FunctionLibrary summaries. + + + :return: The items of this FunctionLibrarySummaryCollection. + :rtype: list[oci.data_integration.models.FunctionLibrarySummary] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this FunctionLibrarySummaryCollection. + The array of FunctionLibrary summaries. + + + :param items: The items of this FunctionLibrarySummaryCollection. + :type: list[oci.data_integration.models.FunctionLibrarySummary] + """ + self._items = items + + 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_integration/models/function_signature.py b/src/oci/data_integration/models/function_signature.py new file mode 100644 index 0000000000..f1411fb7fd --- /dev/null +++ b/src/oci/data_integration/models/function_signature.py @@ -0,0 +1,322 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 FunctionSignature(object): + """ + The function signature can specify function paramaters and/or function return type. + """ + + #: A constant which can be used with the model_type property of a FunctionSignature. + #: This constant has a value of "DIS_FUNCTION_SIGNATURE" + MODEL_TYPE_DIS_FUNCTION_SIGNATURE = "DIS_FUNCTION_SIGNATURE" + + def __init__(self, **kwargs): + """ + Initializes a new FunctionSignature object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param key: + The value to assign to the key property of this FunctionSignature. + :type key: str + + :param model_type: + The value to assign to the model_type property of this FunctionSignature. + Allowed values for this property are: "DIS_FUNCTION_SIGNATURE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type model_type: str + + :param model_version: + The value to assign to the model_version property of this FunctionSignature. + :type model_version: str + + :param parent_ref: + The value to assign to the parent_ref property of this FunctionSignature. + :type parent_ref: oci.data_integration.models.ParentReference + + :param name: + The value to assign to the name property of this FunctionSignature. + :type name: str + + :param ret_type: + The value to assign to the ret_type property of this FunctionSignature. + :type ret_type: oci.data_integration.models.ConfiguredType + + :param arguments: + The value to assign to the arguments property of this FunctionSignature. + :type arguments: list[oci.data_integration.models.TypedObject] + + :param description: + The value to assign to the description property of this FunctionSignature. + :type description: str + + :param object_status: + The value to assign to the object_status property of this FunctionSignature. + :type object_status: int + + """ + self.swagger_types = { + 'key': 'str', + 'model_type': 'str', + 'model_version': 'str', + 'parent_ref': 'ParentReference', + 'name': 'str', + 'ret_type': 'ConfiguredType', + 'arguments': 'list[TypedObject]', + 'description': 'str', + 'object_status': 'int' + } + + self.attribute_map = { + 'key': 'key', + 'model_type': 'modelType', + 'model_version': 'modelVersion', + 'parent_ref': 'parentRef', + 'name': 'name', + 'ret_type': 'retType', + 'arguments': 'arguments', + 'description': 'description', + 'object_status': 'objectStatus' + } + + self._key = None + self._model_type = None + self._model_version = None + self._parent_ref = None + self._name = None + self._ret_type = None + self._arguments = None + self._description = None + self._object_status = None + + @property + def key(self): + """ + Gets the key of this FunctionSignature. + The key of the object. + + + :return: The key of this FunctionSignature. + :rtype: str + """ + return self._key + + @key.setter + def key(self, key): + """ + Sets the key of this FunctionSignature. + The key of the object. + + + :param key: The key of this FunctionSignature. + :type: str + """ + self._key = key + + @property + def model_type(self): + """ + Gets the model_type of this FunctionSignature. + The type of the object. + + Allowed values for this property are: "DIS_FUNCTION_SIGNATURE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The model_type of this FunctionSignature. + :rtype: str + """ + return self._model_type + + @model_type.setter + def model_type(self, model_type): + """ + Sets the model_type of this FunctionSignature. + The type of the object. + + + :param model_type: The model_type of this FunctionSignature. + :type: str + """ + allowed_values = ["DIS_FUNCTION_SIGNATURE"] + if not value_allowed_none_or_none_sentinel(model_type, allowed_values): + model_type = 'UNKNOWN_ENUM_VALUE' + self._model_type = model_type + + @property + def model_version(self): + """ + Gets the model_version of this FunctionSignature. + The model version of an object. + + + :return: The model_version of this FunctionSignature. + :rtype: str + """ + return self._model_version + + @model_version.setter + def model_version(self, model_version): + """ + Sets the model_version of this FunctionSignature. + The model version of an object. + + + :param model_version: The model_version of this FunctionSignature. + :type: str + """ + self._model_version = model_version + + @property + def parent_ref(self): + """ + Gets the parent_ref of this FunctionSignature. + + :return: The parent_ref of this FunctionSignature. + :rtype: oci.data_integration.models.ParentReference + """ + return self._parent_ref + + @parent_ref.setter + def parent_ref(self, parent_ref): + """ + Sets the parent_ref of this FunctionSignature. + + :param parent_ref: The parent_ref of this FunctionSignature. + :type: oci.data_integration.models.ParentReference + """ + self._parent_ref = parent_ref + + @property + def name(self): + """ + Gets the name of this FunctionSignature. + Free form text without any restriction on permitted characters. Name can have letters, numbers, and special characters. The value is editable and is restricted to 1000 characters. + + + :return: The name of this FunctionSignature. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """ + Sets the name of this FunctionSignature. + Free form text without any restriction on permitted characters. Name can have letters, numbers, and special characters. The value is editable and is restricted to 1000 characters. + + + :param name: The name of this FunctionSignature. + :type: str + """ + self._name = name + + @property + def ret_type(self): + """ + Gets the ret_type of this FunctionSignature. + + :return: The ret_type of this FunctionSignature. + :rtype: oci.data_integration.models.ConfiguredType + """ + return self._ret_type + + @ret_type.setter + def ret_type(self, ret_type): + """ + Sets the ret_type of this FunctionSignature. + + :param ret_type: The ret_type of this FunctionSignature. + :type: oci.data_integration.models.ConfiguredType + """ + self._ret_type = ret_type + + @property + def arguments(self): + """ + Gets the arguments of this FunctionSignature. + An array of function arguments. + + + :return: The arguments of this FunctionSignature. + :rtype: list[oci.data_integration.models.TypedObject] + """ + return self._arguments + + @arguments.setter + def arguments(self, arguments): + """ + Sets the arguments of this FunctionSignature. + An array of function arguments. + + + :param arguments: The arguments of this FunctionSignature. + :type: list[oci.data_integration.models.TypedObject] + """ + self._arguments = arguments + + @property + def description(self): + """ + Gets the description of this FunctionSignature. + Detailed description for the object. + + + :return: The description of this FunctionSignature. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this FunctionSignature. + Detailed description for the object. + + + :param description: The description of this FunctionSignature. + :type: str + """ + self._description = description + + @property + def object_status(self): + """ + Gets the object_status of this FunctionSignature. + The status of an object that can be set to value 1 for shallow references across objects, other values reserved. + + + :return: The object_status of this FunctionSignature. + :rtype: int + """ + return self._object_status + + @object_status.setter + def object_status(self, object_status): + """ + Sets the object_status of this FunctionSignature. + The status of an object that can be set to value 1 for shallow references across objects, other values reserved. + + + :param object_status: The object_status of this FunctionSignature. + :type: int + """ + self._object_status = object_status + + 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_integration/models/hourly_frequency_details.py b/src/oci/data_integration/models/hourly_frequency_details.py index 6593fa9924..99a273997b 100644 --- a/src/oci/data_integration/models/hourly_frequency_details.py +++ b/src/oci/data_integration/models/hourly_frequency_details.py @@ -21,12 +21,12 @@ def __init__(self, **kwargs): :param model_type: The value to assign to the model_type property of this HourlyFrequencyDetails. - Allowed values for this property are: "HOURLY", "DAILY", "MONTHLY" + Allowed values for this property are: "HOURLY", "DAILY", "MONTHLY", "WEEKLY", "MONTHLY_RULE", "CUSTOM" :type model_type: str :param frequency: The value to assign to the frequency property of this HourlyFrequencyDetails. - Allowed values for this property are: "HOURLY", "DAILY", "MONTHLY" + Allowed values for this property are: "HOURLY", "DAILY", "MONTHLY", "WEEKLY", "CUSTOM" :type frequency: str :param interval: diff --git a/src/oci/data_integration/models/key_attribute.py b/src/oci/data_integration/models/key_attribute.py index e1ec8d6c0f..a867f4d63b 100644 --- a/src/oci/data_integration/models/key_attribute.py +++ b/src/oci/data_integration/models/key_attribute.py @@ -10,7 +10,7 @@ @init_model_state_from_kwargs class KeyAttribute(object): """ - An attribute within a key. + An attribute within a key, the attribute property is being deprecated. """ def __init__(self, **kwargs): @@ -22,6 +22,10 @@ def __init__(self, **kwargs): The value to assign to the position property of this KeyAttribute. :type position: int + :param shape_field: + The value to assign to the shape_field property of this KeyAttribute. + :type shape_field: oci.data_integration.models.ShapeField + :param attribute: The value to assign to the attribute property of this KeyAttribute. :type attribute: oci.data_integration.models.ShapeField @@ -29,15 +33,18 @@ def __init__(self, **kwargs): """ self.swagger_types = { 'position': 'int', + 'shape_field': 'ShapeField', 'attribute': 'ShapeField' } self.attribute_map = { 'position': 'position', + 'shape_field': 'shapeField', 'attribute': 'attribute' } self._position = None + self._shape_field = None self._attribute = None @property @@ -64,6 +71,26 @@ def position(self, position): """ self._position = position + @property + def shape_field(self): + """ + Gets the shape_field of this KeyAttribute. + + :return: The shape_field of this KeyAttribute. + :rtype: oci.data_integration.models.ShapeField + """ + return self._shape_field + + @shape_field.setter + def shape_field(self, shape_field): + """ + Sets the shape_field of this KeyAttribute. + + :param shape_field: The shape_field of this KeyAttribute. + :type: oci.data_integration.models.ShapeField + """ + self._shape_field = shape_field + @property def attribute(self): """ diff --git a/src/oci/data_integration/models/monthly_frequency_details.py b/src/oci/data_integration/models/monthly_frequency_details.py index 0f73b5f25b..61abedfa2c 100644 --- a/src/oci/data_integration/models/monthly_frequency_details.py +++ b/src/oci/data_integration/models/monthly_frequency_details.py @@ -21,12 +21,12 @@ def __init__(self, **kwargs): :param model_type: The value to assign to the model_type property of this MonthlyFrequencyDetails. - Allowed values for this property are: "HOURLY", "DAILY", "MONTHLY" + Allowed values for this property are: "HOURLY", "DAILY", "MONTHLY", "WEEKLY", "MONTHLY_RULE", "CUSTOM" :type model_type: str :param frequency: The value to assign to the frequency property of this MonthlyFrequencyDetails. - Allowed values for this property are: "HOURLY", "DAILY", "MONTHLY" + Allowed values for this property are: "HOURLY", "DAILY", "MONTHLY", "WEEKLY", "CUSTOM" :type frequency: str :param interval: diff --git a/src/oci/data_integration/models/monthly_rule_frequency_details.py b/src/oci/data_integration/models/monthly_rule_frequency_details.py new file mode 100644 index 0000000000..5b49b43fff --- /dev/null +++ b/src/oci/data_integration/models/monthly_rule_frequency_details.py @@ -0,0 +1,247 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .abstract_frequency_details import AbstractFrequencyDetails +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 MonthlyRuleFrequencyDetails(AbstractFrequencyDetails): + """ + Frequency Details model for monthly frequency based on week of month and day of week. + """ + + #: A constant which can be used with the week_of_month property of a MonthlyRuleFrequencyDetails. + #: This constant has a value of "FIRST" + WEEK_OF_MONTH_FIRST = "FIRST" + + #: A constant which can be used with the week_of_month property of a MonthlyRuleFrequencyDetails. + #: This constant has a value of "SECOND" + WEEK_OF_MONTH_SECOND = "SECOND" + + #: A constant which can be used with the week_of_month property of a MonthlyRuleFrequencyDetails. + #: This constant has a value of "THIRD" + WEEK_OF_MONTH_THIRD = "THIRD" + + #: A constant which can be used with the week_of_month property of a MonthlyRuleFrequencyDetails. + #: This constant has a value of "FOURTH" + WEEK_OF_MONTH_FOURTH = "FOURTH" + + #: A constant which can be used with the week_of_month property of a MonthlyRuleFrequencyDetails. + #: This constant has a value of "FIFTH" + WEEK_OF_MONTH_FIFTH = "FIFTH" + + #: A constant which can be used with the week_of_month property of a MonthlyRuleFrequencyDetails. + #: This constant has a value of "LAST" + WEEK_OF_MONTH_LAST = "LAST" + + #: A constant which can be used with the day_of_week property of a MonthlyRuleFrequencyDetails. + #: This constant has a value of "SUNDAY" + DAY_OF_WEEK_SUNDAY = "SUNDAY" + + #: A constant which can be used with the day_of_week property of a MonthlyRuleFrequencyDetails. + #: This constant has a value of "MONDAY" + DAY_OF_WEEK_MONDAY = "MONDAY" + + #: A constant which can be used with the day_of_week property of a MonthlyRuleFrequencyDetails. + #: This constant has a value of "TUESDAY" + DAY_OF_WEEK_TUESDAY = "TUESDAY" + + #: A constant which can be used with the day_of_week property of a MonthlyRuleFrequencyDetails. + #: This constant has a value of "WEDNESDAY" + DAY_OF_WEEK_WEDNESDAY = "WEDNESDAY" + + #: A constant which can be used with the day_of_week property of a MonthlyRuleFrequencyDetails. + #: This constant has a value of "THURSDAY" + DAY_OF_WEEK_THURSDAY = "THURSDAY" + + #: A constant which can be used with the day_of_week property of a MonthlyRuleFrequencyDetails. + #: This constant has a value of "FRIDAY" + DAY_OF_WEEK_FRIDAY = "FRIDAY" + + #: A constant which can be used with the day_of_week property of a MonthlyRuleFrequencyDetails. + #: This constant has a value of "SATURDAY" + DAY_OF_WEEK_SATURDAY = "SATURDAY" + + def __init__(self, **kwargs): + """ + Initializes a new MonthlyRuleFrequencyDetails object with values from keyword arguments. The default value of the :py:attr:`~oci.data_integration.models.MonthlyRuleFrequencyDetails.model_type` attribute + of this class is ``MONTHLY_RULE`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param model_type: + The value to assign to the model_type property of this MonthlyRuleFrequencyDetails. + Allowed values for this property are: "HOURLY", "DAILY", "MONTHLY", "WEEKLY", "MONTHLY_RULE", "CUSTOM", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type model_type: str + + :param frequency: + The value to assign to the frequency property of this MonthlyRuleFrequencyDetails. + Allowed values for this property are: "HOURLY", "DAILY", "MONTHLY", "WEEKLY", "CUSTOM", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type frequency: str + + :param week_of_month: + The value to assign to the week_of_month property of this MonthlyRuleFrequencyDetails. + Allowed values for this property are: "FIRST", "SECOND", "THIRD", "FOURTH", "FIFTH", "LAST", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type week_of_month: str + + :param interval: + The value to assign to the interval property of this MonthlyRuleFrequencyDetails. + :type interval: int + + :param time: + The value to assign to the time property of this MonthlyRuleFrequencyDetails. + :type time: oci.data_integration.models.Time + + :param day_of_week: + The value to assign to the day_of_week property of this MonthlyRuleFrequencyDetails. + Allowed values for this property are: "SUNDAY", "MONDAY", "TUESDAY", "WEDNESDAY", "THURSDAY", "FRIDAY", "SATURDAY", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type day_of_week: str + + """ + self.swagger_types = { + 'model_type': 'str', + 'frequency': 'str', + 'week_of_month': 'str', + 'interval': 'int', + 'time': 'Time', + 'day_of_week': 'str' + } + + self.attribute_map = { + 'model_type': 'modelType', + 'frequency': 'frequency', + 'week_of_month': 'weekOfMonth', + 'interval': 'interval', + 'time': 'time', + 'day_of_week': 'dayOfWeek' + } + + self._model_type = None + self._frequency = None + self._week_of_month = None + self._interval = None + self._time = None + self._day_of_week = None + self._model_type = 'MONTHLY_RULE' + + @property + def week_of_month(self): + """ + Gets the week_of_month of this MonthlyRuleFrequencyDetails. + This holds the week of the month in which the schedule should be triggered. + + Allowed values for this property are: "FIRST", "SECOND", "THIRD", "FOURTH", "FIFTH", "LAST", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The week_of_month of this MonthlyRuleFrequencyDetails. + :rtype: str + """ + return self._week_of_month + + @week_of_month.setter + def week_of_month(self, week_of_month): + """ + Sets the week_of_month of this MonthlyRuleFrequencyDetails. + This holds the week of the month in which the schedule should be triggered. + + + :param week_of_month: The week_of_month of this MonthlyRuleFrequencyDetails. + :type: str + """ + allowed_values = ["FIRST", "SECOND", "THIRD", "FOURTH", "FIFTH", "LAST"] + if not value_allowed_none_or_none_sentinel(week_of_month, allowed_values): + week_of_month = 'UNKNOWN_ENUM_VALUE' + self._week_of_month = week_of_month + + @property + def interval(self): + """ + Gets the interval of this MonthlyRuleFrequencyDetails. + This hold the repeatability aspect of a schedule. i.e. in a monhtly frequency, a task can be scheduled for every month, once in two months, once in tree months etc. + + + :return: The interval of this MonthlyRuleFrequencyDetails. + :rtype: int + """ + return self._interval + + @interval.setter + def interval(self, interval): + """ + Sets the interval of this MonthlyRuleFrequencyDetails. + This hold the repeatability aspect of a schedule. i.e. in a monhtly frequency, a task can be scheduled for every month, once in two months, once in tree months etc. + + + :param interval: The interval of this MonthlyRuleFrequencyDetails. + :type: int + """ + self._interval = interval + + @property + def time(self): + """ + Gets the time of this MonthlyRuleFrequencyDetails. + + :return: The time of this MonthlyRuleFrequencyDetails. + :rtype: oci.data_integration.models.Time + """ + return self._time + + @time.setter + def time(self, time): + """ + Sets the time of this MonthlyRuleFrequencyDetails. + + :param time: The time of this MonthlyRuleFrequencyDetails. + :type: oci.data_integration.models.Time + """ + self._time = time + + @property + def day_of_week(self): + """ + Gets the day_of_week of this MonthlyRuleFrequencyDetails. + This holds the day of the week on which the schedule should be triggered. + + Allowed values for this property are: "SUNDAY", "MONDAY", "TUESDAY", "WEDNESDAY", "THURSDAY", "FRIDAY", "SATURDAY", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The day_of_week of this MonthlyRuleFrequencyDetails. + :rtype: str + """ + return self._day_of_week + + @day_of_week.setter + def day_of_week(self, day_of_week): + """ + Sets the day_of_week of this MonthlyRuleFrequencyDetails. + This holds the day of the week on which the schedule should be triggered. + + + :param day_of_week: The day_of_week of this MonthlyRuleFrequencyDetails. + :type: str + """ + allowed_values = ["SUNDAY", "MONDAY", "TUESDAY", "WEDNESDAY", "THURSDAY", "FRIDAY", "SATURDAY"] + if not value_allowed_none_or_none_sentinel(day_of_week, allowed_values): + day_of_week = 'UNKNOWN_ENUM_VALUE' + self._day_of_week = day_of_week + + 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_integration/models/parameter.py b/src/oci/data_integration/models/parameter.py index 3329341060..4ecdaa9988 100644 --- a/src/oci/data_integration/models/parameter.py +++ b/src/oci/data_integration/models/parameter.py @@ -99,6 +99,10 @@ def __init__(self, **kwargs): The value to assign to the type_name property of this Parameter. :type type_name: str + :param used_for: + The value to assign to the used_for property of this Parameter. + :type used_for: str + """ self.swagger_types = { 'model_type': 'str', @@ -115,7 +119,8 @@ def __init__(self, **kwargs): 'is_input': 'bool', 'is_output': 'bool', 'output_aggregation_type': 'str', - 'type_name': 'str' + 'type_name': 'str', + 'used_for': 'str' } self.attribute_map = { @@ -133,7 +138,8 @@ def __init__(self, **kwargs): 'is_input': 'isInput', 'is_output': 'isOutput', 'output_aggregation_type': 'outputAggregationType', - 'type_name': 'typeName' + 'type_name': 'typeName', + 'used_for': 'usedFor' } self._model_type = None @@ -151,6 +157,7 @@ def __init__(self, **kwargs): self._is_output = None self._output_aggregation_type = None self._type_name = None + self._used_for = None self._model_type = 'PARAMETER' @property @@ -327,6 +334,30 @@ def type_name(self, type_name): """ self._type_name = type_name + @property + def used_for(self): + """ + Gets the used_for of this Parameter. + The param name for which parameter is created for for eg. driver Shape, Operation etc. + + + :return: The used_for of this Parameter. + :rtype: str + """ + return self._used_for + + @used_for.setter + def used_for(self, used_for): + """ + Sets the used_for of this Parameter. + The param name for which parameter is created for for eg. driver Shape, Operation etc. + + + :param used_for: The used_for of this Parameter. + :type: str + """ + self._used_for = used_for + def __repr__(self): return formatted_flat_dict(self) diff --git a/src/oci/data_integration/models/rest_call_config.py b/src/oci/data_integration/models/rest_call_config.py new file mode 100644 index 0000000000..74398ba42b --- /dev/null +++ b/src/oci/data_integration/models/rest_call_config.py @@ -0,0 +1,157 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 RestCallConfig(object): + """ + The REST API configuration. + """ + + #: A constant which can be used with the method_type property of a RestCallConfig. + #: This constant has a value of "GET" + METHOD_TYPE_GET = "GET" + + #: A constant which can be used with the method_type property of a RestCallConfig. + #: This constant has a value of "POST" + METHOD_TYPE_POST = "POST" + + #: A constant which can be used with the method_type property of a RestCallConfig. + #: This constant has a value of "PATCH" + METHOD_TYPE_PATCH = "PATCH" + + #: A constant which can be used with the method_type property of a RestCallConfig. + #: This constant has a value of "DELETE" + METHOD_TYPE_DELETE = "DELETE" + + #: A constant which can be used with the method_type property of a RestCallConfig. + #: This constant has a value of "PUT" + METHOD_TYPE_PUT = "PUT" + + def __init__(self, **kwargs): + """ + Initializes a new RestCallConfig object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param method_type: + The value to assign to the method_type property of this RestCallConfig. + Allowed values for this property are: "GET", "POST", "PATCH", "DELETE", "PUT" + :type method_type: str + + :param request_headers: + The value to assign to the request_headers property of this RestCallConfig. + :type request_headers: dict(str, str) + + :param config_values: + The value to assign to the config_values property of this RestCallConfig. + :type config_values: oci.data_integration.models.ConfigValues + + """ + self.swagger_types = { + 'method_type': 'str', + 'request_headers': 'dict(str, str)', + 'config_values': 'ConfigValues' + } + + self.attribute_map = { + 'method_type': 'methodType', + 'request_headers': 'requestHeaders', + 'config_values': 'configValues' + } + + self._method_type = None + self._request_headers = None + self._config_values = None + + @property + def method_type(self): + """ + Gets the method_type of this RestCallConfig. + The REST method to use. + + Allowed values for this property are: "GET", "POST", "PATCH", "DELETE", "PUT" + + + :return: The method_type of this RestCallConfig. + :rtype: str + """ + return self._method_type + + @method_type.setter + def method_type(self, method_type): + """ + Sets the method_type of this RestCallConfig. + The REST method to use. + + + :param method_type: The method_type of this RestCallConfig. + :type: str + """ + allowed_values = ["GET", "POST", "PATCH", "DELETE", "PUT"] + if not value_allowed_none_or_none_sentinel(method_type, allowed_values): + raise ValueError( + "Invalid value for `method_type`, must be None or one of {0}" + .format(allowed_values) + ) + self._method_type = method_type + + @property + def request_headers(self): + """ + Gets the request_headers of this RestCallConfig. + The headers for the REST call. + + + :return: The request_headers of this RestCallConfig. + :rtype: dict(str, str) + """ + return self._request_headers + + @request_headers.setter + def request_headers(self, request_headers): + """ + Sets the request_headers of this RestCallConfig. + The headers for the REST call. + + + :param request_headers: The request_headers of this RestCallConfig. + :type: dict(str, str) + """ + self._request_headers = request_headers + + @property + def config_values(self): + """ + Gets the config_values of this RestCallConfig. + + :return: The config_values of this RestCallConfig. + :rtype: oci.data_integration.models.ConfigValues + """ + return self._config_values + + @config_values.setter + def config_values(self, config_values): + """ + Sets the config_values of this RestCallConfig. + + :param config_values: The config_values of this RestCallConfig. + :type: oci.data_integration.models.ConfigValues + """ + self._config_values = config_values + + 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_integration/models/task_from_rest_task_details.py b/src/oci/data_integration/models/task_from_rest_task_details.py index c5a6b5977f..e1524f6f52 100644 --- a/src/oci/data_integration/models/task_from_rest_task_details.py +++ b/src/oci/data_integration/models/task_from_rest_task_details.py @@ -10,7 +10,7 @@ @init_model_state_from_kwargs class TaskFromRestTaskDetails(Task): """ - The information about the Generic REST task. + The information about the Generic REST task. The endpoint and cancelEndpoint properties are deprecated, use the properties executeRestCallConfig, cancelRestCallConfig and pollRestCallConfig for execute, cancel and polling of the calls. """ #: A constant which can be used with the method_type property of a TaskFromRestTaskDetails. @@ -41,6 +41,10 @@ class TaskFromRestTaskDetails(Task): #: This constant has a value of "ASYNC_OCI_WORKREQUEST" API_CALL_MODE_ASYNC_OCI_WORKREQUEST = "ASYNC_OCI_WORKREQUEST" + #: A constant which can be used with the api_call_mode property of a TaskFromRestTaskDetails. + #: This constant has a value of "ASYNC_GENERIC" + API_CALL_MODE_ASYNC_GENERIC = "ASYNC_GENERIC" + #: A constant which can be used with the cancel_method_type property of a TaskFromRestTaskDetails. #: This constant has a value of "GET" CANCEL_METHOD_TYPE_GET = "GET" @@ -161,7 +165,7 @@ def __init__(self, **kwargs): :param api_call_mode: The value to assign to the api_call_mode property of this TaskFromRestTaskDetails. - Allowed values for this property are: "SYNCHRONOUS", "ASYNC_OCI_WORKREQUEST", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "SYNCHRONOUS", "ASYNC_OCI_WORKREQUEST", "ASYNC_GENERIC", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type api_call_mode: str @@ -175,6 +179,14 @@ def __init__(self, **kwargs): Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type cancel_method_type: str + :param execute_rest_call_config: + The value to assign to the execute_rest_call_config property of this TaskFromRestTaskDetails. + :type execute_rest_call_config: oci.data_integration.models.ExecuteRestCallConfig + + :param cancel_rest_call_config: + The value to assign to the cancel_rest_call_config property of this TaskFromRestTaskDetails. + :type cancel_rest_call_config: oci.data_integration.models.CancelRestCallConfig + """ self.swagger_types = { 'model_type': 'str', @@ -201,7 +213,9 @@ def __init__(self, **kwargs): 'json_data': 'str', 'api_call_mode': 'str', 'cancel_endpoint': 'Expression', - 'cancel_method_type': 'str' + 'cancel_method_type': 'str', + 'execute_rest_call_config': 'ExecuteRestCallConfig', + 'cancel_rest_call_config': 'CancelRestCallConfig' } self.attribute_map = { @@ -229,7 +243,9 @@ def __init__(self, **kwargs): 'json_data': 'jsonData', 'api_call_mode': 'apiCallMode', 'cancel_endpoint': 'cancelEndpoint', - 'cancel_method_type': 'cancelMethodType' + 'cancel_method_type': 'cancelMethodType', + 'execute_rest_call_config': 'executeRestCallConfig', + 'cancel_rest_call_config': 'cancelRestCallConfig' } self._model_type = None @@ -257,6 +273,8 @@ def __init__(self, **kwargs): self._api_call_mode = None self._cancel_endpoint = None self._cancel_method_type = None + self._execute_rest_call_config = None + self._cancel_rest_call_config = None self._model_type = 'REST_TASK' @property @@ -303,7 +321,7 @@ def endpoint(self, endpoint): def method_type(self): """ Gets the method_type of this TaskFromRestTaskDetails. - The REST method to use. + The REST method to use. This property is deprecated, use ExecuteRestCallConfig's methodType property instead. Allowed values for this property are: "GET", "POST", "PATCH", "DELETE", "PUT", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. @@ -318,7 +336,7 @@ def method_type(self): def method_type(self, method_type): """ Sets the method_type of this TaskFromRestTaskDetails. - The REST method to use. + The REST method to use. This property is deprecated, use ExecuteRestCallConfig's methodType property instead. :param method_type: The method_type of this TaskFromRestTaskDetails. @@ -333,7 +351,7 @@ def method_type(self, method_type): def headers(self): """ Gets the headers of this TaskFromRestTaskDetails. - The headers for the REST call. + The headers for the REST call. This property is deprecated, use ExecuteRestCallConfig's headers property instead. :return: The headers of this TaskFromRestTaskDetails. @@ -345,7 +363,7 @@ def headers(self): def headers(self, headers): """ Sets the headers of this TaskFromRestTaskDetails. - The headers for the REST call. + The headers for the REST call. This property is deprecated, use ExecuteRestCallConfig's headers property instead. :param headers: The headers of this TaskFromRestTaskDetails. @@ -357,7 +375,7 @@ def headers(self, headers): def json_data(self): """ Gets the json_data of this TaskFromRestTaskDetails. - JSON data for payload body. + JSON data for payload body. This property is deprecated, use ExecuteRestCallConfig's payload config param instead. :return: The json_data of this TaskFromRestTaskDetails. @@ -369,7 +387,7 @@ def json_data(self): def json_data(self, json_data): """ Sets the json_data of this TaskFromRestTaskDetails. - JSON data for payload body. + JSON data for payload body. This property is deprecated, use ExecuteRestCallConfig's payload config param instead. :param json_data: The json_data of this TaskFromRestTaskDetails. @@ -381,9 +399,9 @@ def json_data(self, json_data): def api_call_mode(self): """ Gets the api_call_mode of this TaskFromRestTaskDetails. - The invocation type to be used for Generic REST invocation. + The REST invocation pattern to use. ASYNC_OCI_WORKREQUEST is being deprecated as well as cancelEndpoint/MethodType. - Allowed values for this property are: "SYNCHRONOUS", "ASYNC_OCI_WORKREQUEST", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "SYNCHRONOUS", "ASYNC_OCI_WORKREQUEST", "ASYNC_GENERIC", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. @@ -396,13 +414,13 @@ def api_call_mode(self): def api_call_mode(self, api_call_mode): """ Sets the api_call_mode of this TaskFromRestTaskDetails. - The invocation type to be used for Generic REST invocation. + The REST invocation pattern to use. ASYNC_OCI_WORKREQUEST is being deprecated as well as cancelEndpoint/MethodType. :param api_call_mode: The api_call_mode of this TaskFromRestTaskDetails. :type: str """ - allowed_values = ["SYNCHRONOUS", "ASYNC_OCI_WORKREQUEST"] + allowed_values = ["SYNCHRONOUS", "ASYNC_OCI_WORKREQUEST", "ASYNC_GENERIC"] if not value_allowed_none_or_none_sentinel(api_call_mode, allowed_values): api_call_mode = 'UNKNOWN_ENUM_VALUE' self._api_call_mode = api_call_mode @@ -457,6 +475,46 @@ def cancel_method_type(self, cancel_method_type): cancel_method_type = 'UNKNOWN_ENUM_VALUE' self._cancel_method_type = cancel_method_type + @property + def execute_rest_call_config(self): + """ + Gets the execute_rest_call_config of this TaskFromRestTaskDetails. + + :return: The execute_rest_call_config of this TaskFromRestTaskDetails. + :rtype: oci.data_integration.models.ExecuteRestCallConfig + """ + return self._execute_rest_call_config + + @execute_rest_call_config.setter + def execute_rest_call_config(self, execute_rest_call_config): + """ + Sets the execute_rest_call_config of this TaskFromRestTaskDetails. + + :param execute_rest_call_config: The execute_rest_call_config of this TaskFromRestTaskDetails. + :type: oci.data_integration.models.ExecuteRestCallConfig + """ + self._execute_rest_call_config = execute_rest_call_config + + @property + def cancel_rest_call_config(self): + """ + Gets the cancel_rest_call_config of this TaskFromRestTaskDetails. + + :return: The cancel_rest_call_config of this TaskFromRestTaskDetails. + :rtype: oci.data_integration.models.CancelRestCallConfig + """ + return self._cancel_rest_call_config + + @cancel_rest_call_config.setter + def cancel_rest_call_config(self, cancel_rest_call_config): + """ + Sets the cancel_rest_call_config of this TaskFromRestTaskDetails. + + :param cancel_rest_call_config: The cancel_rest_call_config of this TaskFromRestTaskDetails. + :type: oci.data_integration.models.CancelRestCallConfig + """ + self._cancel_rest_call_config = cancel_rest_call_config + def __repr__(self): return formatted_flat_dict(self) diff --git a/src/oci/data_integration/models/task_run_details.py b/src/oci/data_integration/models/task_run_details.py index 89dfc74024..fc073038de 100644 --- a/src/oci/data_integration/models/task_run_details.py +++ b/src/oci/data_integration/models/task_run_details.py @@ -65,6 +65,18 @@ class TaskRunDetails(object): #: This constant has a value of "REST_TASK" TASK_TYPE_REST_TASK = "REST_TASK" + #: A constant which can be used with the re_run_type property of a TaskRunDetails. + #: This constant has a value of "BEGINNING" + RE_RUN_TYPE_BEGINNING = "BEGINNING" + + #: A constant which can be used with the re_run_type property of a TaskRunDetails. + #: This constant has a value of "FAILED" + RE_RUN_TYPE_FAILED = "FAILED" + + #: A constant which can be used with the re_run_type property of a TaskRunDetails. + #: This constant has a value of "STEP" + RE_RUN_TYPE_STEP = "STEP" + def __init__(self, **kwargs): """ Initializes a new TaskRunDetails object with values from keyword arguments. @@ -138,6 +150,20 @@ def __init__(self, **kwargs): The value to assign to the identifier property of this TaskRunDetails. :type identifier: str + :param ref_task_run_id: + The value to assign to the ref_task_run_id property of this TaskRunDetails. + :type ref_task_run_id: str + + :param re_run_type: + The value to assign to the re_run_type property of this TaskRunDetails. + Allowed values for this property are: "BEGINNING", "FAILED", "STEP", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type re_run_type: str + + :param step_id: + The value to assign to the step_id property of this TaskRunDetails. + :type step_id: str + :param metadata: The value to assign to the metadata property of this TaskRunDetails. :type metadata: oci.data_integration.models.ObjectMetadata @@ -160,6 +186,9 @@ def __init__(self, **kwargs): 'object_status': 'int', 'task_type': 'str', 'identifier': 'str', + 'ref_task_run_id': 'str', + 're_run_type': 'str', + 'step_id': 'str', 'metadata': 'ObjectMetadata' } @@ -180,6 +209,9 @@ def __init__(self, **kwargs): 'object_status': 'objectStatus', 'task_type': 'taskType', 'identifier': 'identifier', + 'ref_task_run_id': 'refTaskRunId', + 're_run_type': 'reRunType', + 'step_id': 'stepId', 'metadata': 'metadata' } @@ -199,6 +231,9 @@ def __init__(self, **kwargs): self._object_status = None self._task_type = None self._identifier = None + self._ref_task_run_id = None + self._re_run_type = None + self._step_id = None self._metadata = None @property @@ -593,6 +628,84 @@ def identifier(self, identifier): """ self._identifier = identifier + @property + def ref_task_run_id(self): + """ + Gets the ref_task_run_id of this TaskRunDetails. + Reference Task Run Id to be used for re-run + + + :return: The ref_task_run_id of this TaskRunDetails. + :rtype: str + """ + return self._ref_task_run_id + + @ref_task_run_id.setter + def ref_task_run_id(self, ref_task_run_id): + """ + Sets the ref_task_run_id of this TaskRunDetails. + Reference Task Run Id to be used for re-run + + + :param ref_task_run_id: The ref_task_run_id of this TaskRunDetails. + :type: str + """ + self._ref_task_run_id = ref_task_run_id + + @property + def re_run_type(self): + """ + Gets the re_run_type of this TaskRunDetails. + Supported re-run types + + Allowed values for this property are: "BEGINNING", "FAILED", "STEP", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The re_run_type of this TaskRunDetails. + :rtype: str + """ + return self._re_run_type + + @re_run_type.setter + def re_run_type(self, re_run_type): + """ + Sets the re_run_type of this TaskRunDetails. + Supported re-run types + + + :param re_run_type: The re_run_type of this TaskRunDetails. + :type: str + """ + allowed_values = ["BEGINNING", "FAILED", "STEP"] + if not value_allowed_none_or_none_sentinel(re_run_type, allowed_values): + re_run_type = 'UNKNOWN_ENUM_VALUE' + self._re_run_type = re_run_type + + @property + def step_id(self): + """ + Gets the step_id of this TaskRunDetails. + Step Id for running from a certain step. + + + :return: The step_id of this TaskRunDetails. + :rtype: str + """ + return self._step_id + + @step_id.setter + def step_id(self, step_id): + """ + Sets the step_id of this TaskRunDetails. + Step Id for running from a certain step. + + + :param step_id: The step_id of this TaskRunDetails. + :type: str + """ + self._step_id = step_id + @property def metadata(self): """ diff --git a/src/oci/data_integration/models/task_run_summary.py b/src/oci/data_integration/models/task_run_summary.py index 4bd77c0acd..3bb2525994 100644 --- a/src/oci/data_integration/models/task_run_summary.py +++ b/src/oci/data_integration/models/task_run_summary.py @@ -65,6 +65,18 @@ class TaskRunSummary(object): #: This constant has a value of "REST_TASK" TASK_TYPE_REST_TASK = "REST_TASK" + #: A constant which can be used with the re_run_type property of a TaskRunSummary. + #: This constant has a value of "BEGINNING" + RE_RUN_TYPE_BEGINNING = "BEGINNING" + + #: A constant which can be used with the re_run_type property of a TaskRunSummary. + #: This constant has a value of "FAILED" + RE_RUN_TYPE_FAILED = "FAILED" + + #: A constant which can be used with the re_run_type property of a TaskRunSummary. + #: This constant has a value of "STEP" + RE_RUN_TYPE_STEP = "STEP" + def __init__(self, **kwargs): """ Initializes a new TaskRunSummary object with values from keyword arguments. @@ -138,6 +150,20 @@ def __init__(self, **kwargs): The value to assign to the identifier property of this TaskRunSummary. :type identifier: str + :param ref_task_run_id: + The value to assign to the ref_task_run_id property of this TaskRunSummary. + :type ref_task_run_id: str + + :param re_run_type: + The value to assign to the re_run_type property of this TaskRunSummary. + Allowed values for this property are: "BEGINNING", "FAILED", "STEP", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type re_run_type: str + + :param step_id: + The value to assign to the step_id property of this TaskRunSummary. + :type step_id: str + :param metadata: The value to assign to the metadata property of this TaskRunSummary. :type metadata: oci.data_integration.models.ObjectMetadata @@ -160,6 +186,9 @@ def __init__(self, **kwargs): 'object_status': 'int', 'task_type': 'str', 'identifier': 'str', + 'ref_task_run_id': 'str', + 're_run_type': 'str', + 'step_id': 'str', 'metadata': 'ObjectMetadata' } @@ -180,6 +209,9 @@ def __init__(self, **kwargs): 'object_status': 'objectStatus', 'task_type': 'taskType', 'identifier': 'identifier', + 'ref_task_run_id': 'refTaskRunId', + 're_run_type': 'reRunType', + 'step_id': 'stepId', 'metadata': 'metadata' } @@ -199,6 +231,9 @@ def __init__(self, **kwargs): self._object_status = None self._task_type = None self._identifier = None + self._ref_task_run_id = None + self._re_run_type = None + self._step_id = None self._metadata = None @property @@ -593,6 +628,84 @@ def identifier(self, identifier): """ self._identifier = identifier + @property + def ref_task_run_id(self): + """ + Gets the ref_task_run_id of this TaskRunSummary. + Reference Task Run Id to be used for re-run + + + :return: The ref_task_run_id of this TaskRunSummary. + :rtype: str + """ + return self._ref_task_run_id + + @ref_task_run_id.setter + def ref_task_run_id(self, ref_task_run_id): + """ + Sets the ref_task_run_id of this TaskRunSummary. + Reference Task Run Id to be used for re-run + + + :param ref_task_run_id: The ref_task_run_id of this TaskRunSummary. + :type: str + """ + self._ref_task_run_id = ref_task_run_id + + @property + def re_run_type(self): + """ + Gets the re_run_type of this TaskRunSummary. + Supported re-run types + + Allowed values for this property are: "BEGINNING", "FAILED", "STEP", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The re_run_type of this TaskRunSummary. + :rtype: str + """ + return self._re_run_type + + @re_run_type.setter + def re_run_type(self, re_run_type): + """ + Sets the re_run_type of this TaskRunSummary. + Supported re-run types + + + :param re_run_type: The re_run_type of this TaskRunSummary. + :type: str + """ + allowed_values = ["BEGINNING", "FAILED", "STEP"] + if not value_allowed_none_or_none_sentinel(re_run_type, allowed_values): + re_run_type = 'UNKNOWN_ENUM_VALUE' + self._re_run_type = re_run_type + + @property + def step_id(self): + """ + Gets the step_id of this TaskRunSummary. + Step Id for running from a certain step. + + + :return: The step_id of this TaskRunSummary. + :rtype: str + """ + return self._step_id + + @step_id.setter + def step_id(self, step_id): + """ + Sets the step_id of this TaskRunSummary. + Step Id for running from a certain step. + + + :param step_id: The step_id of this TaskRunSummary. + :type: str + """ + self._step_id = step_id + @property def metadata(self): """ diff --git a/src/oci/data_integration/models/task_summary_from_rest_task.py b/src/oci/data_integration/models/task_summary_from_rest_task.py index c6449c4563..e75b479746 100644 --- a/src/oci/data_integration/models/task_summary_from_rest_task.py +++ b/src/oci/data_integration/models/task_summary_from_rest_task.py @@ -10,7 +10,7 @@ @init_model_state_from_kwargs class TaskSummaryFromRestTask(TaskSummary): """ - The information about the Generic REST task. + The information about the Generic REST task. The endpoint and cancelEndpoint properties are deprecated, use the properties executeRestCallConfig, cancelRestCallConfig and pollRestCallConfig for execute, cancel and polling of the calls. """ #: A constant which can be used with the method_type property of a TaskSummaryFromRestTask. @@ -41,6 +41,10 @@ class TaskSummaryFromRestTask(TaskSummary): #: This constant has a value of "ASYNC_OCI_WORKREQUEST" API_CALL_MODE_ASYNC_OCI_WORKREQUEST = "ASYNC_OCI_WORKREQUEST" + #: A constant which can be used with the api_call_mode property of a TaskSummaryFromRestTask. + #: This constant has a value of "ASYNC_GENERIC" + API_CALL_MODE_ASYNC_GENERIC = "ASYNC_GENERIC" + #: A constant which can be used with the cancel_method_type property of a TaskSummaryFromRestTask. #: This constant has a value of "GET" CANCEL_METHOD_TYPE_GET = "GET" @@ -69,7 +73,8 @@ def __init__(self, **kwargs): :param model_type: The value to assign to the model_type property of this TaskSummaryFromRestTask. - Allowed values for this property are: "INTEGRATION_TASK", "DATA_LOADER_TASK", "PIPELINE_TASK", "SQL_TASK", "OCI_DATAFLOW_TASK", "REST_TASK" + Allowed values for this property are: "INTEGRATION_TASK", "DATA_LOADER_TASK", "PIPELINE_TASK", "SQL_TASK", "OCI_DATAFLOW_TASK", "REST_TASK", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type model_type: str :param key: @@ -142,7 +147,8 @@ def __init__(self, **kwargs): :param method_type: The value to assign to the method_type property of this TaskSummaryFromRestTask. - Allowed values for this property are: "GET", "POST", "PATCH", "DELETE", "PUT" + Allowed values for this property are: "GET", "POST", "PATCH", "DELETE", "PUT", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type method_type: str :param headers: @@ -155,7 +161,8 @@ def __init__(self, **kwargs): :param api_call_mode: The value to assign to the api_call_mode property of this TaskSummaryFromRestTask. - Allowed values for this property are: "SYNCHRONOUS", "ASYNC_OCI_WORKREQUEST" + Allowed values for this property are: "SYNCHRONOUS", "ASYNC_OCI_WORKREQUEST", "ASYNC_GENERIC", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type api_call_mode: str :param cancel_endpoint: @@ -164,9 +171,18 @@ def __init__(self, **kwargs): :param cancel_method_type: The value to assign to the cancel_method_type property of this TaskSummaryFromRestTask. - Allowed values for this property are: "GET", "POST", "PATCH", "DELETE", "PUT" + Allowed values for this property are: "GET", "POST", "PATCH", "DELETE", "PUT", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type cancel_method_type: str + :param execute_rest_call_config: + The value to assign to the execute_rest_call_config property of this TaskSummaryFromRestTask. + :type execute_rest_call_config: oci.data_integration.models.ExecuteRestCallConfig + + :param cancel_rest_call_config: + The value to assign to the cancel_rest_call_config property of this TaskSummaryFromRestTask. + :type cancel_rest_call_config: oci.data_integration.models.CancelRestCallConfig + """ self.swagger_types = { 'model_type': 'str', @@ -192,7 +208,9 @@ def __init__(self, **kwargs): 'json_data': 'str', 'api_call_mode': 'str', 'cancel_endpoint': 'Expression', - 'cancel_method_type': 'str' + 'cancel_method_type': 'str', + 'execute_rest_call_config': 'ExecuteRestCallConfig', + 'cancel_rest_call_config': 'CancelRestCallConfig' } self.attribute_map = { @@ -219,7 +237,9 @@ def __init__(self, **kwargs): 'json_data': 'jsonData', 'api_call_mode': 'apiCallMode', 'cancel_endpoint': 'cancelEndpoint', - 'cancel_method_type': 'cancelMethodType' + 'cancel_method_type': 'cancelMethodType', + 'execute_rest_call_config': 'executeRestCallConfig', + 'cancel_rest_call_config': 'cancelRestCallConfig' } self._model_type = None @@ -246,6 +266,8 @@ def __init__(self, **kwargs): self._api_call_mode = None self._cancel_endpoint = None self._cancel_method_type = None + self._execute_rest_call_config = None + self._cancel_rest_call_config = None self._model_type = 'REST_TASK' @property @@ -292,9 +314,10 @@ def endpoint(self, endpoint): def method_type(self): """ Gets the method_type of this TaskSummaryFromRestTask. - The REST method to use. + The REST method to use. This property is deprecated, use ExecuteRestCallConfig's methodType property instead. - Allowed values for this property are: "GET", "POST", "PATCH", "DELETE", "PUT" + Allowed values for this property are: "GET", "POST", "PATCH", "DELETE", "PUT", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :return: The method_type of this TaskSummaryFromRestTask. @@ -306,7 +329,7 @@ def method_type(self): def method_type(self, method_type): """ Sets the method_type of this TaskSummaryFromRestTask. - The REST method to use. + The REST method to use. This property is deprecated, use ExecuteRestCallConfig's methodType property instead. :param method_type: The method_type of this TaskSummaryFromRestTask. @@ -314,18 +337,13 @@ def method_type(self, method_type): """ allowed_values = ["GET", "POST", "PATCH", "DELETE", "PUT"] if not value_allowed_none_or_none_sentinel(method_type, allowed_values): - raise ValueError( - "Invalid value for `method_type`, must be None or one of {0}" - .format(allowed_values) - ) + method_type = 'UNKNOWN_ENUM_VALUE' self._method_type = method_type @property def headers(self): """ Gets the headers of this TaskSummaryFromRestTask. - The headers for the REST call. - :return: The headers of this TaskSummaryFromRestTask. :rtype: object @@ -336,8 +354,6 @@ def headers(self): def headers(self, headers): """ Sets the headers of this TaskSummaryFromRestTask. - The headers for the REST call. - :param headers: The headers of this TaskSummaryFromRestTask. :type: object @@ -348,7 +364,7 @@ def headers(self, headers): def json_data(self): """ Gets the json_data of this TaskSummaryFromRestTask. - JSON data for payload body. + JSON data for payload body. This property is deprecated, use ExecuteRestCallConfig's payload config param instead. :return: The json_data of this TaskSummaryFromRestTask. @@ -360,7 +376,7 @@ def json_data(self): def json_data(self, json_data): """ Sets the json_data of this TaskSummaryFromRestTask. - JSON data for payload body. + JSON data for payload body. This property is deprecated, use ExecuteRestCallConfig's payload config param instead. :param json_data: The json_data of this TaskSummaryFromRestTask. @@ -372,9 +388,10 @@ def json_data(self, json_data): def api_call_mode(self): """ Gets the api_call_mode of this TaskSummaryFromRestTask. - The invocation type to be used for Generic REST invocation. + The REST invocation pattern to use. ASYNC_OCI_WORKREQUEST is being deprecated as well as cancelEndpoint/MethodType. - Allowed values for this property are: "SYNCHRONOUS", "ASYNC_OCI_WORKREQUEST" + Allowed values for this property are: "SYNCHRONOUS", "ASYNC_OCI_WORKREQUEST", "ASYNC_GENERIC", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :return: The api_call_mode of this TaskSummaryFromRestTask. @@ -386,18 +403,15 @@ def api_call_mode(self): def api_call_mode(self, api_call_mode): """ Sets the api_call_mode of this TaskSummaryFromRestTask. - The invocation type to be used for Generic REST invocation. + The REST invocation pattern to use. ASYNC_OCI_WORKREQUEST is being deprecated as well as cancelEndpoint/MethodType. :param api_call_mode: The api_call_mode of this TaskSummaryFromRestTask. :type: str """ - allowed_values = ["SYNCHRONOUS", "ASYNC_OCI_WORKREQUEST"] + allowed_values = ["SYNCHRONOUS", "ASYNC_OCI_WORKREQUEST", "ASYNC_GENERIC"] if not value_allowed_none_or_none_sentinel(api_call_mode, allowed_values): - raise ValueError( - "Invalid value for `api_call_mode`, must be None or one of {0}" - .format(allowed_values) - ) + api_call_mode = 'UNKNOWN_ENUM_VALUE' self._api_call_mode = api_call_mode @property @@ -426,7 +440,8 @@ def cancel_method_type(self): Gets the cancel_method_type of this TaskSummaryFromRestTask. The REST method to use for canceling the original request. - Allowed values for this property are: "GET", "POST", "PATCH", "DELETE", "PUT" + Allowed values for this property are: "GET", "POST", "PATCH", "DELETE", "PUT", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :return: The cancel_method_type of this TaskSummaryFromRestTask. @@ -446,12 +461,49 @@ def cancel_method_type(self, cancel_method_type): """ allowed_values = ["GET", "POST", "PATCH", "DELETE", "PUT"] if not value_allowed_none_or_none_sentinel(cancel_method_type, allowed_values): - raise ValueError( - "Invalid value for `cancel_method_type`, must be None or one of {0}" - .format(allowed_values) - ) + cancel_method_type = 'UNKNOWN_ENUM_VALUE' self._cancel_method_type = cancel_method_type + @property + def execute_rest_call_config(self): + """ + Gets the execute_rest_call_config of this TaskSummaryFromRestTask. + + :return: The execute_rest_call_config of this TaskSummaryFromRestTask. + :rtype: oci.data_integration.models.ExecuteRestCallConfig + """ + return self._execute_rest_call_config + + @execute_rest_call_config.setter + def execute_rest_call_config(self, execute_rest_call_config): + """ + Sets the execute_rest_call_config of this TaskSummaryFromRestTask. + + :param execute_rest_call_config: The execute_rest_call_config of this TaskSummaryFromRestTask. + :type: oci.data_integration.models.ExecuteRestCallConfig + """ + self._execute_rest_call_config = execute_rest_call_config + + @property + def cancel_rest_call_config(self): + """ + Gets the cancel_rest_call_config of this TaskSummaryFromRestTask. + + :return: The cancel_rest_call_config of this TaskSummaryFromRestTask. + :rtype: oci.data_integration.models.CancelRestCallConfig + """ + return self._cancel_rest_call_config + + @cancel_rest_call_config.setter + def cancel_rest_call_config(self, cancel_rest_call_config): + """ + Sets the cancel_rest_call_config of this TaskSummaryFromRestTask. + + :param cancel_rest_call_config: The cancel_rest_call_config of this TaskSummaryFromRestTask. + :type: oci.data_integration.models.CancelRestCallConfig + """ + self._cancel_rest_call_config = cancel_rest_call_config + def __repr__(self): return formatted_flat_dict(self) diff --git a/src/oci/data_integration/models/typed_object.py b/src/oci/data_integration/models/typed_object.py index 8d92175d43..fcf6d8f061 100644 --- a/src/oci/data_integration/models/typed_object.py +++ b/src/oci/data_integration/models/typed_object.py @@ -85,7 +85,8 @@ def __init__(self, **kwargs): :param model_type: The value to assign to the model_type property of this TypedObject. - Allowed values for this property are: "SHAPE", "INPUT_PORT", "SHAPE_FIELD", "INPUT_FIELD", "DERIVED_FIELD", "MACRO_FIELD", "OUTPUT_FIELD", "DYNAMIC_PROXY_FIELD", "OUTPUT_PORT", "DYNAMIC_INPUT_FIELD", "PROXY_FIELD", "PARAMETER" + Allowed values for this property are: "SHAPE", "INPUT_PORT", "SHAPE_FIELD", "INPUT_FIELD", "DERIVED_FIELD", "MACRO_FIELD", "OUTPUT_FIELD", "DYNAMIC_PROXY_FIELD", "OUTPUT_PORT", "DYNAMIC_INPUT_FIELD", "PROXY_FIELD", "PARAMETER", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type model_type: str :param key: @@ -206,7 +207,8 @@ def model_type(self): **[Required]** Gets the model_type of this TypedObject. The type of the types object. - Allowed values for this property are: "SHAPE", "INPUT_PORT", "SHAPE_FIELD", "INPUT_FIELD", "DERIVED_FIELD", "MACRO_FIELD", "OUTPUT_FIELD", "DYNAMIC_PROXY_FIELD", "OUTPUT_PORT", "DYNAMIC_INPUT_FIELD", "PROXY_FIELD", "PARAMETER" + Allowed values for this property are: "SHAPE", "INPUT_PORT", "SHAPE_FIELD", "INPUT_FIELD", "DERIVED_FIELD", "MACRO_FIELD", "OUTPUT_FIELD", "DYNAMIC_PROXY_FIELD", "OUTPUT_PORT", "DYNAMIC_INPUT_FIELD", "PROXY_FIELD", "PARAMETER", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :return: The model_type of this TypedObject. @@ -226,10 +228,7 @@ def model_type(self, model_type): """ allowed_values = ["SHAPE", "INPUT_PORT", "SHAPE_FIELD", "INPUT_FIELD", "DERIVED_FIELD", "MACRO_FIELD", "OUTPUT_FIELD", "DYNAMIC_PROXY_FIELD", "OUTPUT_PORT", "DYNAMIC_INPUT_FIELD", "PROXY_FIELD", "PARAMETER"] if not value_allowed_none_or_none_sentinel(model_type, allowed_values): - raise ValueError( - "Invalid value for `model_type`, must be None or one of {0}" - .format(allowed_values) - ) + model_type = 'UNKNOWN_ENUM_VALUE' self._model_type = model_type @property diff --git a/src/oci/data_integration/models/unique_data_key.py b/src/oci/data_integration/models/unique_data_key.py new file mode 100644 index 0000000000..2a9f6a4b82 --- /dev/null +++ b/src/oci/data_integration/models/unique_data_key.py @@ -0,0 +1,91 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .unique_key import UniqueKey +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 UniqueDataKey(UniqueKey): + """ + The unique key object. + """ + + def __init__(self, **kwargs): + """ + Initializes a new UniqueDataKey object with values from keyword arguments. The default value of the :py:attr:`~oci.data_integration.models.UniqueDataKey.model_type` attribute + of this class is ``UNIQUE_KEY`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param model_type: + The value to assign to the model_type property of this UniqueDataKey. + Allowed values for this property are: "PRIMARY_KEY", "UNIQUE_KEY" + :type model_type: str + + :param key: + The value to assign to the key property of this UniqueDataKey. + :type key: str + + :param model_version: + The value to assign to the model_version property of this UniqueDataKey. + :type model_version: str + + :param parent_ref: + The value to assign to the parent_ref property of this UniqueDataKey. + :type parent_ref: oci.data_integration.models.ParentReference + + :param name: + The value to assign to the name property of this UniqueDataKey. + :type name: str + + :param attribute_refs: + The value to assign to the attribute_refs property of this UniqueDataKey. + :type attribute_refs: list[oci.data_integration.models.KeyAttribute] + + :param object_status: + The value to assign to the object_status property of this UniqueDataKey. + :type object_status: int + + """ + self.swagger_types = { + 'model_type': 'str', + 'key': 'str', + 'model_version': 'str', + 'parent_ref': 'ParentReference', + 'name': 'str', + 'attribute_refs': 'list[KeyAttribute]', + 'object_status': 'int' + } + + self.attribute_map = { + 'model_type': 'modelType', + 'key': 'key', + 'model_version': 'modelVersion', + 'parent_ref': 'parentRef', + 'name': 'name', + 'attribute_refs': 'attributeRefs', + 'object_status': 'objectStatus' + } + + self._model_type = None + self._key = None + self._model_version = None + self._parent_ref = None + self._name = None + self._attribute_refs = None + self._object_status = None + self._model_type = 'UNIQUE_KEY' + + 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_integration/models/unique_key.py b/src/oci/data_integration/models/unique_key.py index 93f4e70c20..967c9cf5e7 100644 --- a/src/oci/data_integration/models/unique_key.py +++ b/src/oci/data_integration/models/unique_key.py @@ -27,6 +27,7 @@ def __init__(self, **kwargs): to a service operations then you should favor using a subclass over the base class: * :class:`~oci.data_integration.models.PrimaryKey` + * :class:`~oci.data_integration.models.UniqueDataKey` The following keyword arguments are supported (corresponding to the getters/setters of this class): @@ -99,6 +100,9 @@ def get_subtype(object_dictionary): if type == 'PRIMARY_KEY': return 'PrimaryKey' + + if type == 'UNIQUE_KEY': + return 'UniqueDataKey' else: return 'UniqueKey' diff --git a/src/oci/data_integration/models/update_connection_from_adwc.py b/src/oci/data_integration/models/update_connection_from_adwc.py index ce006348fc..31f83afea1 100644 --- a/src/oci/data_integration/models/update_connection_from_adwc.py +++ b/src/oci/data_integration/models/update_connection_from_adwc.py @@ -64,6 +64,14 @@ def __init__(self, **kwargs): The value to assign to the registry_metadata property of this UpdateConnectionFromAdwc. :type registry_metadata: oci.data_integration.models.RegistryMetadata + :param tns_alias: + The value to assign to the tns_alias property of this UpdateConnectionFromAdwc. + :type tns_alias: str + + :param tns_names: + The value to assign to the tns_names property of this UpdateConnectionFromAdwc. + :type tns_names: list[str] + :param username: The value to assign to the username property of this UpdateConnectionFromAdwc. :type username: str @@ -89,6 +97,8 @@ def __init__(self, **kwargs): 'identifier': 'str', 'connection_properties': 'list[ConnectionProperty]', 'registry_metadata': 'RegistryMetadata', + 'tns_alias': 'str', + 'tns_names': 'list[str]', 'username': 'str', 'password': 'str', 'password_secret': 'SensitiveAttribute' @@ -106,6 +116,8 @@ def __init__(self, **kwargs): 'identifier': 'identifier', 'connection_properties': 'connectionProperties', 'registry_metadata': 'registryMetadata', + 'tns_alias': 'tnsAlias', + 'tns_names': 'tnsNames', 'username': 'username', 'password': 'password', 'password_secret': 'passwordSecret' @@ -122,11 +134,61 @@ def __init__(self, **kwargs): self._identifier = None self._connection_properties = None self._registry_metadata = None + self._tns_alias = None + self._tns_names = None self._username = None self._password = None self._password_secret = None self._model_type = 'ORACLE_ADWC_CONNECTION' + @property + def tns_alias(self): + """ + Gets the tns_alias of this UpdateConnectionFromAdwc. + The Autonomous Data Warehouse instance service name. + + + :return: The tns_alias of this UpdateConnectionFromAdwc. + :rtype: str + """ + return self._tns_alias + + @tns_alias.setter + def tns_alias(self, tns_alias): + """ + Sets the tns_alias of this UpdateConnectionFromAdwc. + The Autonomous Data Warehouse instance service name. + + + :param tns_alias: The tns_alias of this UpdateConnectionFromAdwc. + :type: str + """ + self._tns_alias = tns_alias + + @property + def tns_names(self): + """ + Gets the tns_names of this UpdateConnectionFromAdwc. + Array of service names that are available for selection in the tnsAlias property. + + + :return: The tns_names of this UpdateConnectionFromAdwc. + :rtype: list[str] + """ + return self._tns_names + + @tns_names.setter + def tns_names(self, tns_names): + """ + Sets the tns_names of this UpdateConnectionFromAdwc. + Array of service names that are available for selection in the tnsAlias property. + + + :param tns_names: The tns_names of this UpdateConnectionFromAdwc. + :type: list[str] + """ + self._tns_names = tns_names + @property def username(self): """ diff --git a/src/oci/data_integration/models/update_connection_from_atp.py b/src/oci/data_integration/models/update_connection_from_atp.py index 42b7ffddc2..cf7cac6a86 100644 --- a/src/oci/data_integration/models/update_connection_from_atp.py +++ b/src/oci/data_integration/models/update_connection_from_atp.py @@ -64,6 +64,14 @@ def __init__(self, **kwargs): The value to assign to the registry_metadata property of this UpdateConnectionFromAtp. :type registry_metadata: oci.data_integration.models.RegistryMetadata + :param tns_alias: + The value to assign to the tns_alias property of this UpdateConnectionFromAtp. + :type tns_alias: str + + :param tns_names: + The value to assign to the tns_names property of this UpdateConnectionFromAtp. + :type tns_names: list[str] + :param username: The value to assign to the username property of this UpdateConnectionFromAtp. :type username: str @@ -89,6 +97,8 @@ def __init__(self, **kwargs): 'identifier': 'str', 'connection_properties': 'list[ConnectionProperty]', 'registry_metadata': 'RegistryMetadata', + 'tns_alias': 'str', + 'tns_names': 'list[str]', 'username': 'str', 'password': 'str', 'password_secret': 'SensitiveAttribute' @@ -106,6 +116,8 @@ def __init__(self, **kwargs): 'identifier': 'identifier', 'connection_properties': 'connectionProperties', 'registry_metadata': 'registryMetadata', + 'tns_alias': 'tnsAlias', + 'tns_names': 'tnsNames', 'username': 'username', 'password': 'password', 'password_secret': 'passwordSecret' @@ -122,11 +134,61 @@ def __init__(self, **kwargs): self._identifier = None self._connection_properties = None self._registry_metadata = None + self._tns_alias = None + self._tns_names = None self._username = None self._password = None self._password_secret = None self._model_type = 'ORACLE_ATP_CONNECTION' + @property + def tns_alias(self): + """ + Gets the tns_alias of this UpdateConnectionFromAtp. + The Autonomous Transaction Processing instance service name. + + + :return: The tns_alias of this UpdateConnectionFromAtp. + :rtype: str + """ + return self._tns_alias + + @tns_alias.setter + def tns_alias(self, tns_alias): + """ + Sets the tns_alias of this UpdateConnectionFromAtp. + The Autonomous Transaction Processing instance service name. + + + :param tns_alias: The tns_alias of this UpdateConnectionFromAtp. + :type: str + """ + self._tns_alias = tns_alias + + @property + def tns_names(self): + """ + Gets the tns_names of this UpdateConnectionFromAtp. + Array of service names that are available for selection in the tnsAlias property. + + + :return: The tns_names of this UpdateConnectionFromAtp. + :rtype: list[str] + """ + return self._tns_names + + @tns_names.setter + def tns_names(self, tns_names): + """ + Sets the tns_names of this UpdateConnectionFromAtp. + Array of service names that are available for selection in the tnsAlias property. + + + :param tns_names: The tns_names of this UpdateConnectionFromAtp. + :type: list[str] + """ + self._tns_names = tns_names + @property def username(self): """ diff --git a/src/oci/data_integration/models/update_connection_from_bicc.py b/src/oci/data_integration/models/update_connection_from_bicc.py index 1e1f782565..95b977362a 100644 --- a/src/oci/data_integration/models/update_connection_from_bicc.py +++ b/src/oci/data_integration/models/update_connection_from_bicc.py @@ -10,7 +10,7 @@ @init_model_state_from_kwargs class UpdateConnectionFromBICC(UpdateConnectionDetails): """ - The details to update an Oracle Database data asset connection. + The details to update a FUSION_APP BICC connection. """ def __init__(self, **kwargs): diff --git a/src/oci/data_integration/models/update_data_asset_from_object_storage.py b/src/oci/data_integration/models/update_data_asset_from_object_storage.py index b300d1e666..af1ec10a54 100644 --- a/src/oci/data_integration/models/update_data_asset_from_object_storage.py +++ b/src/oci/data_integration/models/update_data_asset_from_object_storage.py @@ -64,6 +64,10 @@ def __init__(self, **kwargs): The value to assign to the registry_metadata property of this UpdateDataAssetFromObjectStorage. :type registry_metadata: oci.data_integration.models.RegistryMetadata + :param oci_region: + The value to assign to the oci_region property of this UpdateDataAssetFromObjectStorage. + :type oci_region: str + :param url: The value to assign to the url property of this UpdateDataAssetFromObjectStorage. :type url: str @@ -93,6 +97,7 @@ def __init__(self, **kwargs): 'external_key': 'str', 'asset_properties': 'dict(str, str)', 'registry_metadata': 'RegistryMetadata', + 'oci_region': 'str', 'url': 'str', 'tenancy_id': 'str', 'namespace': 'str', @@ -111,6 +116,7 @@ def __init__(self, **kwargs): 'external_key': 'externalKey', 'asset_properties': 'assetProperties', 'registry_metadata': 'registryMetadata', + 'oci_region': 'ociRegion', 'url': 'url', 'tenancy_id': 'tenancyId', 'namespace': 'namespace', @@ -128,12 +134,37 @@ def __init__(self, **kwargs): self._external_key = None self._asset_properties = None self._registry_metadata = None + self._oci_region = None self._url = None self._tenancy_id = None self._namespace = None self._default_connection = None self._model_type = 'ORACLE_OBJECT_STORAGE_DATA_ASSET' + @property + def oci_region(self): + """ + Gets the oci_region of this UpdateDataAssetFromObjectStorage. + The Oracle Object storage Region ie. us-ashburn-1 + + + :return: The oci_region of this UpdateDataAssetFromObjectStorage. + :rtype: str + """ + return self._oci_region + + @oci_region.setter + def oci_region(self, oci_region): + """ + Sets the oci_region of this UpdateDataAssetFromObjectStorage. + The Oracle Object storage Region ie. us-ashburn-1 + + + :param oci_region: The oci_region of this UpdateDataAssetFromObjectStorage. + :type: str + """ + self._oci_region = oci_region + @property def url(self): """ diff --git a/src/oci/data_integration/models/update_function_library_details.py b/src/oci/data_integration/models/update_function_library_details.py new file mode 100644 index 0000000000..a0c080e70c --- /dev/null +++ b/src/oci/data_integration/models/update_function_library_details.py @@ -0,0 +1,283 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 UpdateFunctionLibraryDetails(object): + """ + The properties used in FunctionLibrary update operations. + """ + + def __init__(self, **kwargs): + """ + Initializes a new UpdateFunctionLibraryDetails 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 UpdateFunctionLibraryDetails. + :type name: str + + :param description: + The value to assign to the description property of this UpdateFunctionLibraryDetails. + :type description: str + + :param category_name: + The value to assign to the category_name property of this UpdateFunctionLibraryDetails. + :type category_name: str + + :param object_status: + The value to assign to the object_status property of this UpdateFunctionLibraryDetails. + :type object_status: int + + :param identifier: + The value to assign to the identifier property of this UpdateFunctionLibraryDetails. + :type identifier: str + + :param model_version: + The value to assign to the model_version property of this UpdateFunctionLibraryDetails. + :type model_version: str + + :param object_version: + The value to assign to the object_version property of this UpdateFunctionLibraryDetails. + :type object_version: int + + :param registry_metadata: + The value to assign to the registry_metadata property of this UpdateFunctionLibraryDetails. + :type registry_metadata: oci.data_integration.models.RegistryMetadata + + """ + self.swagger_types = { + 'name': 'str', + 'description': 'str', + 'category_name': 'str', + 'object_status': 'int', + 'identifier': 'str', + 'model_version': 'str', + 'object_version': 'int', + 'registry_metadata': 'RegistryMetadata' + } + + self.attribute_map = { + 'name': 'name', + 'description': 'description', + 'category_name': 'categoryName', + 'object_status': 'objectStatus', + 'identifier': 'identifier', + 'model_version': 'modelVersion', + 'object_version': 'objectVersion', + 'registry_metadata': 'registryMetadata' + } + + self._name = None + self._description = None + self._category_name = None + self._object_status = None + self._identifier = None + self._model_version = None + self._object_version = None + self._registry_metadata = None + + @property + def name(self): + """ + Gets the name of this UpdateFunctionLibraryDetails. + Free form text without any restriction on permitted characters. Name can have letters, numbers, and special characters. The value is editable and is restricted to 1000 characters. + + + :return: The name of this UpdateFunctionLibraryDetails. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """ + Sets the name of this UpdateFunctionLibraryDetails. + Free form text without any restriction on permitted characters. Name can have letters, numbers, and special characters. The value is editable and is restricted to 1000 characters. + + + :param name: The name of this UpdateFunctionLibraryDetails. + :type: str + """ + self._name = name + + @property + def description(self): + """ + Gets the description of this UpdateFunctionLibraryDetails. + A user defined description for the FunctionLibrary. + + + :return: The description of this UpdateFunctionLibraryDetails. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this UpdateFunctionLibraryDetails. + A user defined description for the FunctionLibrary. + + + :param description: The description of this UpdateFunctionLibraryDetails. + :type: str + """ + self._description = description + + @property + def category_name(self): + """ + Gets the category_name of this UpdateFunctionLibraryDetails. + The category name. + + + :return: The category_name of this UpdateFunctionLibraryDetails. + :rtype: str + """ + return self._category_name + + @category_name.setter + def category_name(self, category_name): + """ + Sets the category_name of this UpdateFunctionLibraryDetails. + The category name. + + + :param category_name: The category_name of this UpdateFunctionLibraryDetails. + :type: str + """ + self._category_name = category_name + + @property + def object_status(self): + """ + Gets the object_status of this UpdateFunctionLibraryDetails. + The status of an object that can be set to value 1 for shallow references across objects, other values reserved. + + + :return: The object_status of this UpdateFunctionLibraryDetails. + :rtype: int + """ + return self._object_status + + @object_status.setter + def object_status(self, object_status): + """ + Sets the object_status of this UpdateFunctionLibraryDetails. + The status of an object that can be set to value 1 for shallow references across objects, other values reserved. + + + :param object_status: The object_status of this UpdateFunctionLibraryDetails. + :type: int + """ + self._object_status = object_status + + @property + def identifier(self): + """ + Gets the identifier of this UpdateFunctionLibraryDetails. + Value can only contain upper case letters, underscore, and numbers. It should begin with upper case letter or underscore. The value can be modified. + + + :return: The identifier of this UpdateFunctionLibraryDetails. + :rtype: str + """ + return self._identifier + + @identifier.setter + def identifier(self, identifier): + """ + Sets the identifier of this UpdateFunctionLibraryDetails. + Value can only contain upper case letters, underscore, and numbers. It should begin with upper case letter or underscore. The value can be modified. + + + :param identifier: The identifier of this UpdateFunctionLibraryDetails. + :type: str + """ + self._identifier = identifier + + @property + def model_version(self): + """ + Gets the model_version of this UpdateFunctionLibraryDetails. + The model version of an object. + + + :return: The model_version of this UpdateFunctionLibraryDetails. + :rtype: str + """ + return self._model_version + + @model_version.setter + def model_version(self, model_version): + """ + Sets the model_version of this UpdateFunctionLibraryDetails. + The model version of an object. + + + :param model_version: The model_version of this UpdateFunctionLibraryDetails. + :type: str + """ + self._model_version = model_version + + @property + def object_version(self): + """ + Gets the object_version of this UpdateFunctionLibraryDetails. + The version of the object that is used to track changes in the object instance. + + + :return: The object_version of this UpdateFunctionLibraryDetails. + :rtype: int + """ + return self._object_version + + @object_version.setter + def object_version(self, object_version): + """ + Sets the object_version of this UpdateFunctionLibraryDetails. + The version of the object that is used to track changes in the object instance. + + + :param object_version: The object_version of this UpdateFunctionLibraryDetails. + :type: int + """ + self._object_version = object_version + + @property + def registry_metadata(self): + """ + Gets the registry_metadata of this UpdateFunctionLibraryDetails. + + :return: The registry_metadata of this UpdateFunctionLibraryDetails. + :rtype: oci.data_integration.models.RegistryMetadata + """ + return self._registry_metadata + + @registry_metadata.setter + def registry_metadata(self, registry_metadata): + """ + Sets the registry_metadata of this UpdateFunctionLibraryDetails. + + :param registry_metadata: The registry_metadata of this UpdateFunctionLibraryDetails. + :type: oci.data_integration.models.RegistryMetadata + """ + self._registry_metadata = registry_metadata + + 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_integration/models/update_task_from_rest_task.py b/src/oci/data_integration/models/update_task_from_rest_task.py index 0c42a989a6..1ca1834885 100644 --- a/src/oci/data_integration/models/update_task_from_rest_task.py +++ b/src/oci/data_integration/models/update_task_from_rest_task.py @@ -10,7 +10,7 @@ @init_model_state_from_kwargs class UpdateTaskFromRestTask(UpdateTaskDetails): """ - The information about the Generic REST task. + The information about the Generic REST task. The endpoint and cancelEndpoint properties are deprecated, use the properties executeRestCallConfig, cancelRestCallConfig and pollRestCallConfig for execute, cancel and polling of the calls. """ #: A constant which can be used with the method_type property of a UpdateTaskFromRestTask. @@ -41,6 +41,10 @@ class UpdateTaskFromRestTask(UpdateTaskDetails): #: This constant has a value of "ASYNC_OCI_WORKREQUEST" API_CALL_MODE_ASYNC_OCI_WORKREQUEST = "ASYNC_OCI_WORKREQUEST" + #: A constant which can be used with the api_call_mode property of a UpdateTaskFromRestTask. + #: This constant has a value of "ASYNC_GENERIC" + API_CALL_MODE_ASYNC_GENERIC = "ASYNC_GENERIC" + #: A constant which can be used with the cancel_method_type property of a UpdateTaskFromRestTask. #: This constant has a value of "GET" CANCEL_METHOD_TYPE_GET = "GET" @@ -155,7 +159,7 @@ def __init__(self, **kwargs): :param api_call_mode: The value to assign to the api_call_mode property of this UpdateTaskFromRestTask. - Allowed values for this property are: "SYNCHRONOUS", "ASYNC_OCI_WORKREQUEST" + Allowed values for this property are: "SYNCHRONOUS", "ASYNC_OCI_WORKREQUEST", "ASYNC_GENERIC" :type api_call_mode: str :param cancel_endpoint: @@ -167,6 +171,14 @@ def __init__(self, **kwargs): Allowed values for this property are: "GET", "POST", "PATCH", "DELETE", "PUT" :type cancel_method_type: str + :param execute_rest_call_config: + The value to assign to the execute_rest_call_config property of this UpdateTaskFromRestTask. + :type execute_rest_call_config: oci.data_integration.models.ExecuteRestCallConfig + + :param cancel_rest_call_config: + The value to assign to the cancel_rest_call_config property of this UpdateTaskFromRestTask. + :type cancel_rest_call_config: oci.data_integration.models.CancelRestCallConfig + """ self.swagger_types = { 'model_type': 'str', @@ -192,7 +204,9 @@ def __init__(self, **kwargs): 'json_data': 'str', 'api_call_mode': 'str', 'cancel_endpoint': 'Expression', - 'cancel_method_type': 'str' + 'cancel_method_type': 'str', + 'execute_rest_call_config': 'ExecuteRestCallConfig', + 'cancel_rest_call_config': 'CancelRestCallConfig' } self.attribute_map = { @@ -219,7 +233,9 @@ def __init__(self, **kwargs): 'json_data': 'jsonData', 'api_call_mode': 'apiCallMode', 'cancel_endpoint': 'cancelEndpoint', - 'cancel_method_type': 'cancelMethodType' + 'cancel_method_type': 'cancelMethodType', + 'execute_rest_call_config': 'executeRestCallConfig', + 'cancel_rest_call_config': 'cancelRestCallConfig' } self._model_type = None @@ -246,6 +262,8 @@ def __init__(self, **kwargs): self._api_call_mode = None self._cancel_endpoint = None self._cancel_method_type = None + self._execute_rest_call_config = None + self._cancel_rest_call_config = None self._model_type = 'REST_TASK' @property @@ -292,7 +310,7 @@ def endpoint(self, endpoint): def method_type(self): """ Gets the method_type of this UpdateTaskFromRestTask. - The REST method to use. + The REST method to use. This property is deprecated, use ExecuteRestCallConfig's methodType property instead. Allowed values for this property are: "GET", "POST", "PATCH", "DELETE", "PUT" @@ -306,7 +324,7 @@ def method_type(self): def method_type(self, method_type): """ Sets the method_type of this UpdateTaskFromRestTask. - The REST method to use. + The REST method to use. This property is deprecated, use ExecuteRestCallConfig's methodType property instead. :param method_type: The method_type of this UpdateTaskFromRestTask. @@ -324,8 +342,6 @@ def method_type(self, method_type): def headers(self): """ Gets the headers of this UpdateTaskFromRestTask. - The headers for the REST call. - :return: The headers of this UpdateTaskFromRestTask. :rtype: object @@ -336,8 +352,6 @@ def headers(self): def headers(self, headers): """ Sets the headers of this UpdateTaskFromRestTask. - The headers for the REST call. - :param headers: The headers of this UpdateTaskFromRestTask. :type: object @@ -372,7 +386,7 @@ def additional_properties(self, additional_properties): def json_data(self): """ Gets the json_data of this UpdateTaskFromRestTask. - JSON data for payload body. + JSON data for payload body. This property is deprecated, use ExecuteRestCallConfig's payload config param instead. :return: The json_data of this UpdateTaskFromRestTask. @@ -384,7 +398,7 @@ def json_data(self): def json_data(self, json_data): """ Sets the json_data of this UpdateTaskFromRestTask. - JSON data for payload body. + JSON data for payload body. This property is deprecated, use ExecuteRestCallConfig's payload config param instead. :param json_data: The json_data of this UpdateTaskFromRestTask. @@ -396,9 +410,9 @@ def json_data(self, json_data): def api_call_mode(self): """ Gets the api_call_mode of this UpdateTaskFromRestTask. - The invocation type to be used for Generic REST invocation. + The REST invocation pattern to use. ASYNC_OCI_WORKREQUEST is being deprecated as well as cancelEndpoint/MethodType. - Allowed values for this property are: "SYNCHRONOUS", "ASYNC_OCI_WORKREQUEST" + Allowed values for this property are: "SYNCHRONOUS", "ASYNC_OCI_WORKREQUEST", "ASYNC_GENERIC" :return: The api_call_mode of this UpdateTaskFromRestTask. @@ -410,13 +424,13 @@ def api_call_mode(self): def api_call_mode(self, api_call_mode): """ Sets the api_call_mode of this UpdateTaskFromRestTask. - The invocation type to be used for Generic REST invocation. + The REST invocation pattern to use. ASYNC_OCI_WORKREQUEST is being deprecated as well as cancelEndpoint/MethodType. :param api_call_mode: The api_call_mode of this UpdateTaskFromRestTask. :type: str """ - allowed_values = ["SYNCHRONOUS", "ASYNC_OCI_WORKREQUEST"] + allowed_values = ["SYNCHRONOUS", "ASYNC_OCI_WORKREQUEST", "ASYNC_GENERIC"] if not value_allowed_none_or_none_sentinel(api_call_mode, allowed_values): raise ValueError( "Invalid value for `api_call_mode`, must be None or one of {0}" @@ -476,6 +490,46 @@ def cancel_method_type(self, cancel_method_type): ) self._cancel_method_type = cancel_method_type + @property + def execute_rest_call_config(self): + """ + Gets the execute_rest_call_config of this UpdateTaskFromRestTask. + + :return: The execute_rest_call_config of this UpdateTaskFromRestTask. + :rtype: oci.data_integration.models.ExecuteRestCallConfig + """ + return self._execute_rest_call_config + + @execute_rest_call_config.setter + def execute_rest_call_config(self, execute_rest_call_config): + """ + Sets the execute_rest_call_config of this UpdateTaskFromRestTask. + + :param execute_rest_call_config: The execute_rest_call_config of this UpdateTaskFromRestTask. + :type: oci.data_integration.models.ExecuteRestCallConfig + """ + self._execute_rest_call_config = execute_rest_call_config + + @property + def cancel_rest_call_config(self): + """ + Gets the cancel_rest_call_config of this UpdateTaskFromRestTask. + + :return: The cancel_rest_call_config of this UpdateTaskFromRestTask. + :rtype: oci.data_integration.models.CancelRestCallConfig + """ + return self._cancel_rest_call_config + + @cancel_rest_call_config.setter + def cancel_rest_call_config(self, cancel_rest_call_config): + """ + Sets the cancel_rest_call_config of this UpdateTaskFromRestTask. + + :param cancel_rest_call_config: The cancel_rest_call_config of this UpdateTaskFromRestTask. + :type: oci.data_integration.models.CancelRestCallConfig + """ + self._cancel_rest_call_config = cancel_rest_call_config + def __repr__(self): return formatted_flat_dict(self) diff --git a/src/oci/data_integration/models/update_user_defined_function_details.py b/src/oci/data_integration/models/update_user_defined_function_details.py new file mode 100644 index 0000000000..b8dae7328a --- /dev/null +++ b/src/oci/data_integration/models/update_user_defined_function_details.py @@ -0,0 +1,337 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 UpdateUserDefinedFunctionDetails(object): + """ + Properties used in user defined function update operations. + """ + + def __init__(self, **kwargs): + """ + Initializes a new UpdateUserDefinedFunctionDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param parent_ref: + The value to assign to the parent_ref property of this UpdateUserDefinedFunctionDetails. + :type parent_ref: oci.data_integration.models.ParentReference + + :param name: + The value to assign to the name property of this UpdateUserDefinedFunctionDetails. + :type name: str + + :param identifier: + The value to assign to the identifier property of this UpdateUserDefinedFunctionDetails. + :type identifier: str + + :param model_version: + The value to assign to the model_version property of this UpdateUserDefinedFunctionDetails. + :type model_version: str + + :param object_version: + The value to assign to the object_version property of this UpdateUserDefinedFunctionDetails. + :type object_version: int + + :param signatures: + The value to assign to the signatures property of this UpdateUserDefinedFunctionDetails. + :type signatures: list[oci.data_integration.models.FunctionSignature] + + :param expr: + The value to assign to the expr property of this UpdateUserDefinedFunctionDetails. + :type expr: oci.data_integration.models.Expression + + :param description: + The value to assign to the description property of this UpdateUserDefinedFunctionDetails. + :type description: str + + :param object_status: + The value to assign to the object_status property of this UpdateUserDefinedFunctionDetails. + :type object_status: int + + :param registry_metadata: + The value to assign to the registry_metadata property of this UpdateUserDefinedFunctionDetails. + :type registry_metadata: oci.data_integration.models.RegistryMetadata + + """ + self.swagger_types = { + 'parent_ref': 'ParentReference', + 'name': 'str', + 'identifier': 'str', + 'model_version': 'str', + 'object_version': 'int', + 'signatures': 'list[FunctionSignature]', + 'expr': 'Expression', + 'description': 'str', + 'object_status': 'int', + 'registry_metadata': 'RegistryMetadata' + } + + self.attribute_map = { + 'parent_ref': 'parentRef', + 'name': 'name', + 'identifier': 'identifier', + 'model_version': 'modelVersion', + 'object_version': 'objectVersion', + 'signatures': 'signatures', + 'expr': 'expr', + 'description': 'description', + 'object_status': 'objectStatus', + 'registry_metadata': 'registryMetadata' + } + + self._parent_ref = None + self._name = None + self._identifier = None + self._model_version = None + self._object_version = None + self._signatures = None + self._expr = None + self._description = None + self._object_status = None + self._registry_metadata = None + + @property + def parent_ref(self): + """ + Gets the parent_ref of this UpdateUserDefinedFunctionDetails. + + :return: The parent_ref of this UpdateUserDefinedFunctionDetails. + :rtype: oci.data_integration.models.ParentReference + """ + return self._parent_ref + + @parent_ref.setter + def parent_ref(self, parent_ref): + """ + Sets the parent_ref of this UpdateUserDefinedFunctionDetails. + + :param parent_ref: The parent_ref of this UpdateUserDefinedFunctionDetails. + :type: oci.data_integration.models.ParentReference + """ + self._parent_ref = parent_ref + + @property + def name(self): + """ + Gets the name of this UpdateUserDefinedFunctionDetails. + Free form text without any restriction on permitted characters. Name can have letters, numbers, and special characters. The value is editable and is restricted to 1000 characters. + + + :return: The name of this UpdateUserDefinedFunctionDetails. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """ + Sets the name of this UpdateUserDefinedFunctionDetails. + Free form text without any restriction on permitted characters. Name can have letters, numbers, and special characters. The value is editable and is restricted to 1000 characters. + + + :param name: The name of this UpdateUserDefinedFunctionDetails. + :type: str + """ + self._name = name + + @property + def identifier(self): + """ + Gets the identifier of this UpdateUserDefinedFunctionDetails. + Value can only contain upper case letters, underscore, and numbers. It should begin with upper case letter or underscore. The value can be modified. + + + :return: The identifier of this UpdateUserDefinedFunctionDetails. + :rtype: str + """ + return self._identifier + + @identifier.setter + def identifier(self, identifier): + """ + Sets the identifier of this UpdateUserDefinedFunctionDetails. + Value can only contain upper case letters, underscore, and numbers. It should begin with upper case letter or underscore. The value can be modified. + + + :param identifier: The identifier of this UpdateUserDefinedFunctionDetails. + :type: str + """ + self._identifier = identifier + + @property + def model_version(self): + """ + Gets the model_version of this UpdateUserDefinedFunctionDetails. + The model version of an object. + + + :return: The model_version of this UpdateUserDefinedFunctionDetails. + :rtype: str + """ + return self._model_version + + @model_version.setter + def model_version(self, model_version): + """ + Sets the model_version of this UpdateUserDefinedFunctionDetails. + The model version of an object. + + + :param model_version: The model_version of this UpdateUserDefinedFunctionDetails. + :type: str + """ + self._model_version = model_version + + @property + def object_version(self): + """ + Gets the object_version of this UpdateUserDefinedFunctionDetails. + The version of the object that is used to track changes in the object instance. + + + :return: The object_version of this UpdateUserDefinedFunctionDetails. + :rtype: int + """ + return self._object_version + + @object_version.setter + def object_version(self, object_version): + """ + Sets the object_version of this UpdateUserDefinedFunctionDetails. + The version of the object that is used to track changes in the object instance. + + + :param object_version: The object_version of this UpdateUserDefinedFunctionDetails. + :type: int + """ + self._object_version = object_version + + @property + def signatures(self): + """ + Gets the signatures of this UpdateUserDefinedFunctionDetails. + An array of function signature. + + + :return: The signatures of this UpdateUserDefinedFunctionDetails. + :rtype: list[oci.data_integration.models.FunctionSignature] + """ + return self._signatures + + @signatures.setter + def signatures(self, signatures): + """ + Sets the signatures of this UpdateUserDefinedFunctionDetails. + An array of function signature. + + + :param signatures: The signatures of this UpdateUserDefinedFunctionDetails. + :type: list[oci.data_integration.models.FunctionSignature] + """ + self._signatures = signatures + + @property + def expr(self): + """ + Gets the expr of this UpdateUserDefinedFunctionDetails. + + :return: The expr of this UpdateUserDefinedFunctionDetails. + :rtype: oci.data_integration.models.Expression + """ + return self._expr + + @expr.setter + def expr(self, expr): + """ + Sets the expr of this UpdateUserDefinedFunctionDetails. + + :param expr: The expr of this UpdateUserDefinedFunctionDetails. + :type: oci.data_integration.models.Expression + """ + self._expr = expr + + @property + def description(self): + """ + Gets the description of this UpdateUserDefinedFunctionDetails. + Detailed description for the object. + + + :return: The description of this UpdateUserDefinedFunctionDetails. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this UpdateUserDefinedFunctionDetails. + Detailed description for the object. + + + :param description: The description of this UpdateUserDefinedFunctionDetails. + :type: str + """ + self._description = description + + @property + def object_status(self): + """ + Gets the object_status of this UpdateUserDefinedFunctionDetails. + The status of an object that can be set to value 1 for shallow references across objects, other values reserved. + + + :return: The object_status of this UpdateUserDefinedFunctionDetails. + :rtype: int + """ + return self._object_status + + @object_status.setter + def object_status(self, object_status): + """ + Sets the object_status of this UpdateUserDefinedFunctionDetails. + The status of an object that can be set to value 1 for shallow references across objects, other values reserved. + + + :param object_status: The object_status of this UpdateUserDefinedFunctionDetails. + :type: int + """ + self._object_status = object_status + + @property + def registry_metadata(self): + """ + Gets the registry_metadata of this UpdateUserDefinedFunctionDetails. + + :return: The registry_metadata of this UpdateUserDefinedFunctionDetails. + :rtype: oci.data_integration.models.RegistryMetadata + """ + return self._registry_metadata + + @registry_metadata.setter + def registry_metadata(self, registry_metadata): + """ + Sets the registry_metadata of this UpdateUserDefinedFunctionDetails. + + :param registry_metadata: The registry_metadata of this UpdateUserDefinedFunctionDetails. + :type: oci.data_integration.models.RegistryMetadata + """ + self._registry_metadata = registry_metadata + + 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_integration/models/user_defined_function.py b/src/oci/data_integration/models/user_defined_function.py new file mode 100644 index 0000000000..43232532a9 --- /dev/null +++ b/src/oci/data_integration/models/user_defined_function.py @@ -0,0 +1,442 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 UserDefinedFunction(object): + """ + The user defined function type contains the audit summary information and the definition of the user defined function. + """ + + #: A constant which can be used with the model_type property of a UserDefinedFunction. + #: This constant has a value of "DIS_USER_DEFINED_FUNCTION" + MODEL_TYPE_DIS_USER_DEFINED_FUNCTION = "DIS_USER_DEFINED_FUNCTION" + + def __init__(self, **kwargs): + """ + Initializes a new UserDefinedFunction object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param key: + The value to assign to the key property of this UserDefinedFunction. + :type key: str + + :param model_type: + The value to assign to the model_type property of this UserDefinedFunction. + Allowed values for this property are: "DIS_USER_DEFINED_FUNCTION", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type model_type: str + + :param model_version: + The value to assign to the model_version property of this UserDefinedFunction. + :type model_version: str + + :param parent_ref: + The value to assign to the parent_ref property of this UserDefinedFunction. + :type parent_ref: oci.data_integration.models.ParentReference + + :param name: + The value to assign to the name property of this UserDefinedFunction. + :type name: str + + :param identifier: + The value to assign to the identifier property of this UserDefinedFunction. + :type identifier: str + + :param object_version: + The value to assign to the object_version property of this UserDefinedFunction. + :type object_version: int + + :param signatures: + The value to assign to the signatures property of this UserDefinedFunction. + :type signatures: list[oci.data_integration.models.FunctionSignature] + + :param expr: + The value to assign to the expr property of this UserDefinedFunction. + :type expr: oci.data_integration.models.Expression + + :param description: + The value to assign to the description property of this UserDefinedFunction. + :type description: str + + :param object_status: + The value to assign to the object_status property of this UserDefinedFunction. + :type object_status: int + + :param metadata: + The value to assign to the metadata property of this UserDefinedFunction. + :type metadata: oci.data_integration.models.ObjectMetadata + + :param key_map: + The value to assign to the key_map property of this UserDefinedFunction. + :type key_map: dict(str, str) + + """ + self.swagger_types = { + 'key': 'str', + 'model_type': 'str', + 'model_version': 'str', + 'parent_ref': 'ParentReference', + 'name': 'str', + 'identifier': 'str', + 'object_version': 'int', + 'signatures': 'list[FunctionSignature]', + 'expr': 'Expression', + 'description': 'str', + 'object_status': 'int', + 'metadata': 'ObjectMetadata', + 'key_map': 'dict(str, str)' + } + + self.attribute_map = { + 'key': 'key', + 'model_type': 'modelType', + 'model_version': 'modelVersion', + 'parent_ref': 'parentRef', + 'name': 'name', + 'identifier': 'identifier', + 'object_version': 'objectVersion', + 'signatures': 'signatures', + 'expr': 'expr', + 'description': 'description', + 'object_status': 'objectStatus', + 'metadata': 'metadata', + 'key_map': 'keyMap' + } + + self._key = None + self._model_type = None + self._model_version = None + self._parent_ref = None + self._name = None + self._identifier = None + self._object_version = None + self._signatures = None + self._expr = None + self._description = None + self._object_status = None + self._metadata = None + self._key_map = None + + @property + def key(self): + """ + Gets the key of this UserDefinedFunction. + Generated key that can be used in API calls to identify user defined function. On scenarios where reference to the user defined function is needed, a value can be passed in create. + + + :return: The key of this UserDefinedFunction. + :rtype: str + """ + return self._key + + @key.setter + def key(self, key): + """ + Sets the key of this UserDefinedFunction. + Generated key that can be used in API calls to identify user defined function. On scenarios where reference to the user defined function is needed, a value can be passed in create. + + + :param key: The key of this UserDefinedFunction. + :type: str + """ + self._key = key + + @property + def model_type(self): + """ + Gets the model_type of this UserDefinedFunction. + The type of the object. + + Allowed values for this property are: "DIS_USER_DEFINED_FUNCTION", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The model_type of this UserDefinedFunction. + :rtype: str + """ + return self._model_type + + @model_type.setter + def model_type(self, model_type): + """ + Sets the model_type of this UserDefinedFunction. + The type of the object. + + + :param model_type: The model_type of this UserDefinedFunction. + :type: str + """ + allowed_values = ["DIS_USER_DEFINED_FUNCTION"] + if not value_allowed_none_or_none_sentinel(model_type, allowed_values): + model_type = 'UNKNOWN_ENUM_VALUE' + self._model_type = model_type + + @property + def model_version(self): + """ + Gets the model_version of this UserDefinedFunction. + The model version of an object. + + + :return: The model_version of this UserDefinedFunction. + :rtype: str + """ + return self._model_version + + @model_version.setter + def model_version(self, model_version): + """ + Sets the model_version of this UserDefinedFunction. + The model version of an object. + + + :param model_version: The model_version of this UserDefinedFunction. + :type: str + """ + self._model_version = model_version + + @property + def parent_ref(self): + """ + Gets the parent_ref of this UserDefinedFunction. + + :return: The parent_ref of this UserDefinedFunction. + :rtype: oci.data_integration.models.ParentReference + """ + return self._parent_ref + + @parent_ref.setter + def parent_ref(self, parent_ref): + """ + Sets the parent_ref of this UserDefinedFunction. + + :param parent_ref: The parent_ref of this UserDefinedFunction. + :type: oci.data_integration.models.ParentReference + """ + self._parent_ref = parent_ref + + @property + def name(self): + """ + Gets the name of this UserDefinedFunction. + Free form text without any restriction on permitted characters. Name can have letters, numbers, and special characters. The value is editable and is restricted to 1000 characters. + + + :return: The name of this UserDefinedFunction. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """ + Sets the name of this UserDefinedFunction. + Free form text without any restriction on permitted characters. Name can have letters, numbers, and special characters. The value is editable and is restricted to 1000 characters. + + + :param name: The name of this UserDefinedFunction. + :type: str + """ + self._name = name + + @property + def identifier(self): + """ + Gets the identifier of this UserDefinedFunction. + Value can only contain upper case letters, underscore, and numbers. It should begin with upper case letter or underscore. The value can be modified. + + + :return: The identifier of this UserDefinedFunction. + :rtype: str + """ + return self._identifier + + @identifier.setter + def identifier(self, identifier): + """ + Sets the identifier of this UserDefinedFunction. + Value can only contain upper case letters, underscore, and numbers. It should begin with upper case letter or underscore. The value can be modified. + + + :param identifier: The identifier of this UserDefinedFunction. + :type: str + """ + self._identifier = identifier + + @property + def object_version(self): + """ + Gets the object_version of this UserDefinedFunction. + The version of the object that is used to track changes in the object instance. + + + :return: The object_version of this UserDefinedFunction. + :rtype: int + """ + return self._object_version + + @object_version.setter + def object_version(self, object_version): + """ + Sets the object_version of this UserDefinedFunction. + The version of the object that is used to track changes in the object instance. + + + :param object_version: The object_version of this UserDefinedFunction. + :type: int + """ + self._object_version = object_version + + @property + def signatures(self): + """ + Gets the signatures of this UserDefinedFunction. + An array of function signature. + + + :return: The signatures of this UserDefinedFunction. + :rtype: list[oci.data_integration.models.FunctionSignature] + """ + return self._signatures + + @signatures.setter + def signatures(self, signatures): + """ + Sets the signatures of this UserDefinedFunction. + An array of function signature. + + + :param signatures: The signatures of this UserDefinedFunction. + :type: list[oci.data_integration.models.FunctionSignature] + """ + self._signatures = signatures + + @property + def expr(self): + """ + Gets the expr of this UserDefinedFunction. + + :return: The expr of this UserDefinedFunction. + :rtype: oci.data_integration.models.Expression + """ + return self._expr + + @expr.setter + def expr(self, expr): + """ + Sets the expr of this UserDefinedFunction. + + :param expr: The expr of this UserDefinedFunction. + :type: oci.data_integration.models.Expression + """ + self._expr = expr + + @property + def description(self): + """ + Gets the description of this UserDefinedFunction. + Detailed description for the object. + + + :return: The description of this UserDefinedFunction. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this UserDefinedFunction. + Detailed description for the object. + + + :param description: The description of this UserDefinedFunction. + :type: str + """ + self._description = description + + @property + def object_status(self): + """ + Gets the object_status of this UserDefinedFunction. + The status of an object that can be set to value 1 for shallow references across objects, other values reserved. + + + :return: The object_status of this UserDefinedFunction. + :rtype: int + """ + return self._object_status + + @object_status.setter + def object_status(self, object_status): + """ + Sets the object_status of this UserDefinedFunction. + The status of an object that can be set to value 1 for shallow references across objects, other values reserved. + + + :param object_status: The object_status of this UserDefinedFunction. + :type: int + """ + self._object_status = object_status + + @property + def metadata(self): + """ + Gets the metadata of this UserDefinedFunction. + + :return: The metadata of this UserDefinedFunction. + :rtype: oci.data_integration.models.ObjectMetadata + """ + return self._metadata + + @metadata.setter + def metadata(self, metadata): + """ + Sets the metadata of this UserDefinedFunction. + + :param metadata: The metadata of this UserDefinedFunction. + :type: oci.data_integration.models.ObjectMetadata + """ + self._metadata = metadata + + @property + def key_map(self): + """ + Gets the key_map of this UserDefinedFunction. + A key map. If provided, key is replaced with generated key. This structure provides mapping between user provided key and generated key. + + + :return: The key_map of this UserDefinedFunction. + :rtype: dict(str, str) + """ + return self._key_map + + @key_map.setter + def key_map(self, key_map): + """ + Sets the key_map of this UserDefinedFunction. + A key map. If provided, key is replaced with generated key. This structure provides mapping between user provided key and generated key. + + + :param key_map: The key_map of this UserDefinedFunction. + :type: dict(str, str) + """ + self._key_map = key_map + + 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_integration/models/user_defined_function_details.py b/src/oci/data_integration/models/user_defined_function_details.py new file mode 100644 index 0000000000..c525df64c4 --- /dev/null +++ b/src/oci/data_integration/models/user_defined_function_details.py @@ -0,0 +1,412 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 UserDefinedFunctionDetails(object): + """ + The information about a user defined function. + """ + + #: A constant which can be used with the model_type property of a UserDefinedFunctionDetails. + #: This constant has a value of "DIS_USER_DEFINED_FUNCTION" + MODEL_TYPE_DIS_USER_DEFINED_FUNCTION = "DIS_USER_DEFINED_FUNCTION" + + def __init__(self, **kwargs): + """ + Initializes a new UserDefinedFunctionDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param key: + The value to assign to the key property of this UserDefinedFunctionDetails. + :type key: str + + :param model_type: + The value to assign to the model_type property of this UserDefinedFunctionDetails. + Allowed values for this property are: "DIS_USER_DEFINED_FUNCTION" + :type model_type: str + + :param model_version: + The value to assign to the model_version property of this UserDefinedFunctionDetails. + :type model_version: str + + :param parent_ref: + The value to assign to the parent_ref property of this UserDefinedFunctionDetails. + :type parent_ref: oci.data_integration.models.ParentReference + + :param name: + The value to assign to the name property of this UserDefinedFunctionDetails. + :type name: str + + :param identifier: + The value to assign to the identifier property of this UserDefinedFunctionDetails. + :type identifier: str + + :param object_version: + The value to assign to the object_version property of this UserDefinedFunctionDetails. + :type object_version: int + + :param signatures: + The value to assign to the signatures property of this UserDefinedFunctionDetails. + :type signatures: list[oci.data_integration.models.FunctionSignature] + + :param expr: + The value to assign to the expr property of this UserDefinedFunctionDetails. + :type expr: oci.data_integration.models.Expression + + :param description: + The value to assign to the description property of this UserDefinedFunctionDetails. + :type description: str + + :param object_status: + The value to assign to the object_status property of this UserDefinedFunctionDetails. + :type object_status: int + + :param registry_metadata: + The value to assign to the registry_metadata property of this UserDefinedFunctionDetails. + :type registry_metadata: oci.data_integration.models.RegistryMetadata + + """ + self.swagger_types = { + 'key': 'str', + 'model_type': 'str', + 'model_version': 'str', + 'parent_ref': 'ParentReference', + 'name': 'str', + 'identifier': 'str', + 'object_version': 'int', + 'signatures': 'list[FunctionSignature]', + 'expr': 'Expression', + 'description': 'str', + 'object_status': 'int', + 'registry_metadata': 'RegistryMetadata' + } + + self.attribute_map = { + 'key': 'key', + 'model_type': 'modelType', + 'model_version': 'modelVersion', + 'parent_ref': 'parentRef', + 'name': 'name', + 'identifier': 'identifier', + 'object_version': 'objectVersion', + 'signatures': 'signatures', + 'expr': 'expr', + 'description': 'description', + 'object_status': 'objectStatus', + 'registry_metadata': 'registryMetadata' + } + + self._key = None + self._model_type = None + self._model_version = None + self._parent_ref = None + self._name = None + self._identifier = None + self._object_version = None + self._signatures = None + self._expr = None + self._description = None + self._object_status = None + self._registry_metadata = None + + @property + def key(self): + """ + **[Required]** Gets the key of this UserDefinedFunctionDetails. + Generated key that can be used in API calls to identify user defined function. On scenarios where reference to the user defined function is needed, a value can be passed in create. + + + :return: The key of this UserDefinedFunctionDetails. + :rtype: str + """ + return self._key + + @key.setter + def key(self, key): + """ + Sets the key of this UserDefinedFunctionDetails. + Generated key that can be used in API calls to identify user defined function. On scenarios where reference to the user defined function is needed, a value can be passed in create. + + + :param key: The key of this UserDefinedFunctionDetails. + :type: str + """ + self._key = key + + @property + def model_type(self): + """ + **[Required]** Gets the model_type of this UserDefinedFunctionDetails. + The type of the object. + + Allowed values for this property are: "DIS_USER_DEFINED_FUNCTION" + + + :return: The model_type of this UserDefinedFunctionDetails. + :rtype: str + """ + return self._model_type + + @model_type.setter + def model_type(self, model_type): + """ + Sets the model_type of this UserDefinedFunctionDetails. + The type of the object. + + + :param model_type: The model_type of this UserDefinedFunctionDetails. + :type: str + """ + allowed_values = ["DIS_USER_DEFINED_FUNCTION"] + if not value_allowed_none_or_none_sentinel(model_type, allowed_values): + raise ValueError( + "Invalid value for `model_type`, must be None or one of {0}" + .format(allowed_values) + ) + self._model_type = model_type + + @property + def model_version(self): + """ + Gets the model_version of this UserDefinedFunctionDetails. + The model version of an object. + + + :return: The model_version of this UserDefinedFunctionDetails. + :rtype: str + """ + return self._model_version + + @model_version.setter + def model_version(self, model_version): + """ + Sets the model_version of this UserDefinedFunctionDetails. + The model version of an object. + + + :param model_version: The model_version of this UserDefinedFunctionDetails. + :type: str + """ + self._model_version = model_version + + @property + def parent_ref(self): + """ + Gets the parent_ref of this UserDefinedFunctionDetails. + + :return: The parent_ref of this UserDefinedFunctionDetails. + :rtype: oci.data_integration.models.ParentReference + """ + return self._parent_ref + + @parent_ref.setter + def parent_ref(self, parent_ref): + """ + Sets the parent_ref of this UserDefinedFunctionDetails. + + :param parent_ref: The parent_ref of this UserDefinedFunctionDetails. + :type: oci.data_integration.models.ParentReference + """ + self._parent_ref = parent_ref + + @property + def name(self): + """ + Gets the name of this UserDefinedFunctionDetails. + Free form text without any restriction on permitted characters. Name can have letters, numbers, and special characters. The value is editable and is restricted to 1000 characters. + + + :return: The name of this UserDefinedFunctionDetails. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """ + Sets the name of this UserDefinedFunctionDetails. + Free form text without any restriction on permitted characters. Name can have letters, numbers, and special characters. The value is editable and is restricted to 1000 characters. + + + :param name: The name of this UserDefinedFunctionDetails. + :type: str + """ + self._name = name + + @property + def identifier(self): + """ + Gets the identifier of this UserDefinedFunctionDetails. + Value can only contain upper case letters, underscore, and numbers. It should begin with upper case letter or underscore. The value can be modified. + + + :return: The identifier of this UserDefinedFunctionDetails. + :rtype: str + """ + return self._identifier + + @identifier.setter + def identifier(self, identifier): + """ + Sets the identifier of this UserDefinedFunctionDetails. + Value can only contain upper case letters, underscore, and numbers. It should begin with upper case letter or underscore. The value can be modified. + + + :param identifier: The identifier of this UserDefinedFunctionDetails. + :type: str + """ + self._identifier = identifier + + @property + def object_version(self): + """ + **[Required]** Gets the object_version of this UserDefinedFunctionDetails. + The version of the object that is used to track changes in the object instance. + + + :return: The object_version of this UserDefinedFunctionDetails. + :rtype: int + """ + return self._object_version + + @object_version.setter + def object_version(self, object_version): + """ + Sets the object_version of this UserDefinedFunctionDetails. + The version of the object that is used to track changes in the object instance. + + + :param object_version: The object_version of this UserDefinedFunctionDetails. + :type: int + """ + self._object_version = object_version + + @property + def signatures(self): + """ + Gets the signatures of this UserDefinedFunctionDetails. + An array of function signature. + + + :return: The signatures of this UserDefinedFunctionDetails. + :rtype: list[oci.data_integration.models.FunctionSignature] + """ + return self._signatures + + @signatures.setter + def signatures(self, signatures): + """ + Sets the signatures of this UserDefinedFunctionDetails. + An array of function signature. + + + :param signatures: The signatures of this UserDefinedFunctionDetails. + :type: list[oci.data_integration.models.FunctionSignature] + """ + self._signatures = signatures + + @property + def expr(self): + """ + Gets the expr of this UserDefinedFunctionDetails. + + :return: The expr of this UserDefinedFunctionDetails. + :rtype: oci.data_integration.models.Expression + """ + return self._expr + + @expr.setter + def expr(self, expr): + """ + Sets the expr of this UserDefinedFunctionDetails. + + :param expr: The expr of this UserDefinedFunctionDetails. + :type: oci.data_integration.models.Expression + """ + self._expr = expr + + @property + def description(self): + """ + Gets the description of this UserDefinedFunctionDetails. + Detailed description for the object. + + + :return: The description of this UserDefinedFunctionDetails. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this UserDefinedFunctionDetails. + Detailed description for the object. + + + :param description: The description of this UserDefinedFunctionDetails. + :type: str + """ + self._description = description + + @property + def object_status(self): + """ + Gets the object_status of this UserDefinedFunctionDetails. + The status of an object that can be set to value 1 for shallow references across objects, other values reserved. + + + :return: The object_status of this UserDefinedFunctionDetails. + :rtype: int + """ + return self._object_status + + @object_status.setter + def object_status(self, object_status): + """ + Sets the object_status of this UserDefinedFunctionDetails. + The status of an object that can be set to value 1 for shallow references across objects, other values reserved. + + + :param object_status: The object_status of this UserDefinedFunctionDetails. + :type: int + """ + self._object_status = object_status + + @property + def registry_metadata(self): + """ + Gets the registry_metadata of this UserDefinedFunctionDetails. + + :return: The registry_metadata of this UserDefinedFunctionDetails. + :rtype: oci.data_integration.models.RegistryMetadata + """ + return self._registry_metadata + + @registry_metadata.setter + def registry_metadata(self, registry_metadata): + """ + Sets the registry_metadata of this UserDefinedFunctionDetails. + + :param registry_metadata: The registry_metadata of this UserDefinedFunctionDetails. + :type: oci.data_integration.models.RegistryMetadata + """ + self._registry_metadata = registry_metadata + + 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_integration/models/user_defined_function_summary.py b/src/oci/data_integration/models/user_defined_function_summary.py new file mode 100644 index 0000000000..66dc98582f --- /dev/null +++ b/src/oci/data_integration/models/user_defined_function_summary.py @@ -0,0 +1,442 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 UserDefinedFunctionSummary(object): + """ + The user defined function summary type contains the audit summary information and the definition of the user defined function. + """ + + #: A constant which can be used with the model_type property of a UserDefinedFunctionSummary. + #: This constant has a value of "DIS_USER_DEFINED_FUNCTION" + MODEL_TYPE_DIS_USER_DEFINED_FUNCTION = "DIS_USER_DEFINED_FUNCTION" + + def __init__(self, **kwargs): + """ + Initializes a new UserDefinedFunctionSummary object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param key: + The value to assign to the key property of this UserDefinedFunctionSummary. + :type key: str + + :param model_type: + The value to assign to the model_type property of this UserDefinedFunctionSummary. + Allowed values for this property are: "DIS_USER_DEFINED_FUNCTION", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type model_type: str + + :param model_version: + The value to assign to the model_version property of this UserDefinedFunctionSummary. + :type model_version: str + + :param parent_ref: + The value to assign to the parent_ref property of this UserDefinedFunctionSummary. + :type parent_ref: oci.data_integration.models.ParentReference + + :param name: + The value to assign to the name property of this UserDefinedFunctionSummary. + :type name: str + + :param identifier: + The value to assign to the identifier property of this UserDefinedFunctionSummary. + :type identifier: str + + :param object_version: + The value to assign to the object_version property of this UserDefinedFunctionSummary. + :type object_version: int + + :param signatures: + The value to assign to the signatures property of this UserDefinedFunctionSummary. + :type signatures: list[oci.data_integration.models.FunctionSignature] + + :param expr: + The value to assign to the expr property of this UserDefinedFunctionSummary. + :type expr: oci.data_integration.models.Expression + + :param description: + The value to assign to the description property of this UserDefinedFunctionSummary. + :type description: str + + :param object_status: + The value to assign to the object_status property of this UserDefinedFunctionSummary. + :type object_status: int + + :param metadata: + The value to assign to the metadata property of this UserDefinedFunctionSummary. + :type metadata: oci.data_integration.models.ObjectMetadata + + :param key_map: + The value to assign to the key_map property of this UserDefinedFunctionSummary. + :type key_map: dict(str, str) + + """ + self.swagger_types = { + 'key': 'str', + 'model_type': 'str', + 'model_version': 'str', + 'parent_ref': 'ParentReference', + 'name': 'str', + 'identifier': 'str', + 'object_version': 'int', + 'signatures': 'list[FunctionSignature]', + 'expr': 'Expression', + 'description': 'str', + 'object_status': 'int', + 'metadata': 'ObjectMetadata', + 'key_map': 'dict(str, str)' + } + + self.attribute_map = { + 'key': 'key', + 'model_type': 'modelType', + 'model_version': 'modelVersion', + 'parent_ref': 'parentRef', + 'name': 'name', + 'identifier': 'identifier', + 'object_version': 'objectVersion', + 'signatures': 'signatures', + 'expr': 'expr', + 'description': 'description', + 'object_status': 'objectStatus', + 'metadata': 'metadata', + 'key_map': 'keyMap' + } + + self._key = None + self._model_type = None + self._model_version = None + self._parent_ref = None + self._name = None + self._identifier = None + self._object_version = None + self._signatures = None + self._expr = None + self._description = None + self._object_status = None + self._metadata = None + self._key_map = None + + @property + def key(self): + """ + Gets the key of this UserDefinedFunctionSummary. + Generated key that can be used in API calls to identify user defined function. On scenarios where reference to the user defined function is needed, a value can be passed in create. + + + :return: The key of this UserDefinedFunctionSummary. + :rtype: str + """ + return self._key + + @key.setter + def key(self, key): + """ + Sets the key of this UserDefinedFunctionSummary. + Generated key that can be used in API calls to identify user defined function. On scenarios where reference to the user defined function is needed, a value can be passed in create. + + + :param key: The key of this UserDefinedFunctionSummary. + :type: str + """ + self._key = key + + @property + def model_type(self): + """ + Gets the model_type of this UserDefinedFunctionSummary. + The type of the object. + + Allowed values for this property are: "DIS_USER_DEFINED_FUNCTION", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The model_type of this UserDefinedFunctionSummary. + :rtype: str + """ + return self._model_type + + @model_type.setter + def model_type(self, model_type): + """ + Sets the model_type of this UserDefinedFunctionSummary. + The type of the object. + + + :param model_type: The model_type of this UserDefinedFunctionSummary. + :type: str + """ + allowed_values = ["DIS_USER_DEFINED_FUNCTION"] + if not value_allowed_none_or_none_sentinel(model_type, allowed_values): + model_type = 'UNKNOWN_ENUM_VALUE' + self._model_type = model_type + + @property + def model_version(self): + """ + Gets the model_version of this UserDefinedFunctionSummary. + The model version of an object. + + + :return: The model_version of this UserDefinedFunctionSummary. + :rtype: str + """ + return self._model_version + + @model_version.setter + def model_version(self, model_version): + """ + Sets the model_version of this UserDefinedFunctionSummary. + The model version of an object. + + + :param model_version: The model_version of this UserDefinedFunctionSummary. + :type: str + """ + self._model_version = model_version + + @property + def parent_ref(self): + """ + Gets the parent_ref of this UserDefinedFunctionSummary. + + :return: The parent_ref of this UserDefinedFunctionSummary. + :rtype: oci.data_integration.models.ParentReference + """ + return self._parent_ref + + @parent_ref.setter + def parent_ref(self, parent_ref): + """ + Sets the parent_ref of this UserDefinedFunctionSummary. + + :param parent_ref: The parent_ref of this UserDefinedFunctionSummary. + :type: oci.data_integration.models.ParentReference + """ + self._parent_ref = parent_ref + + @property + def name(self): + """ + Gets the name of this UserDefinedFunctionSummary. + Free form text without any restriction on permitted characters. Name can have letters, numbers, and special characters. The value is editable and is restricted to 1000 characters. + + + :return: The name of this UserDefinedFunctionSummary. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """ + Sets the name of this UserDefinedFunctionSummary. + Free form text without any restriction on permitted characters. Name can have letters, numbers, and special characters. The value is editable and is restricted to 1000 characters. + + + :param name: The name of this UserDefinedFunctionSummary. + :type: str + """ + self._name = name + + @property + def identifier(self): + """ + Gets the identifier of this UserDefinedFunctionSummary. + Value can only contain upper case letters, underscore, and numbers. It should begin with upper case letter or underscore. The value can be modified. + + + :return: The identifier of this UserDefinedFunctionSummary. + :rtype: str + """ + return self._identifier + + @identifier.setter + def identifier(self, identifier): + """ + Sets the identifier of this UserDefinedFunctionSummary. + Value can only contain upper case letters, underscore, and numbers. It should begin with upper case letter or underscore. The value can be modified. + + + :param identifier: The identifier of this UserDefinedFunctionSummary. + :type: str + """ + self._identifier = identifier + + @property + def object_version(self): + """ + Gets the object_version of this UserDefinedFunctionSummary. + The version of the object that is used to track changes in the object instance. + + + :return: The object_version of this UserDefinedFunctionSummary. + :rtype: int + """ + return self._object_version + + @object_version.setter + def object_version(self, object_version): + """ + Sets the object_version of this UserDefinedFunctionSummary. + The version of the object that is used to track changes in the object instance. + + + :param object_version: The object_version of this UserDefinedFunctionSummary. + :type: int + """ + self._object_version = object_version + + @property + def signatures(self): + """ + Gets the signatures of this UserDefinedFunctionSummary. + An array of function signature. + + + :return: The signatures of this UserDefinedFunctionSummary. + :rtype: list[oci.data_integration.models.FunctionSignature] + """ + return self._signatures + + @signatures.setter + def signatures(self, signatures): + """ + Sets the signatures of this UserDefinedFunctionSummary. + An array of function signature. + + + :param signatures: The signatures of this UserDefinedFunctionSummary. + :type: list[oci.data_integration.models.FunctionSignature] + """ + self._signatures = signatures + + @property + def expr(self): + """ + Gets the expr of this UserDefinedFunctionSummary. + + :return: The expr of this UserDefinedFunctionSummary. + :rtype: oci.data_integration.models.Expression + """ + return self._expr + + @expr.setter + def expr(self, expr): + """ + Sets the expr of this UserDefinedFunctionSummary. + + :param expr: The expr of this UserDefinedFunctionSummary. + :type: oci.data_integration.models.Expression + """ + self._expr = expr + + @property + def description(self): + """ + Gets the description of this UserDefinedFunctionSummary. + Detailed description for the object. + + + :return: The description of this UserDefinedFunctionSummary. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this UserDefinedFunctionSummary. + Detailed description for the object. + + + :param description: The description of this UserDefinedFunctionSummary. + :type: str + """ + self._description = description + + @property + def object_status(self): + """ + Gets the object_status of this UserDefinedFunctionSummary. + The status of an object that can be set to value 1 for shallow references across objects, other values reserved. + + + :return: The object_status of this UserDefinedFunctionSummary. + :rtype: int + """ + return self._object_status + + @object_status.setter + def object_status(self, object_status): + """ + Sets the object_status of this UserDefinedFunctionSummary. + The status of an object that can be set to value 1 for shallow references across objects, other values reserved. + + + :param object_status: The object_status of this UserDefinedFunctionSummary. + :type: int + """ + self._object_status = object_status + + @property + def metadata(self): + """ + Gets the metadata of this UserDefinedFunctionSummary. + + :return: The metadata of this UserDefinedFunctionSummary. + :rtype: oci.data_integration.models.ObjectMetadata + """ + return self._metadata + + @metadata.setter + def metadata(self, metadata): + """ + Sets the metadata of this UserDefinedFunctionSummary. + + :param metadata: The metadata of this UserDefinedFunctionSummary. + :type: oci.data_integration.models.ObjectMetadata + """ + self._metadata = metadata + + @property + def key_map(self): + """ + Gets the key_map of this UserDefinedFunctionSummary. + A key map. If provided, key is replaced with generated key. This structure provides mapping between user provided key and generated key. + + + :return: The key_map of this UserDefinedFunctionSummary. + :rtype: dict(str, str) + """ + return self._key_map + + @key_map.setter + def key_map(self, key_map): + """ + Sets the key_map of this UserDefinedFunctionSummary. + A key map. If provided, key is replaced with generated key. This structure provides mapping between user provided key and generated key. + + + :param key_map: The key_map of this UserDefinedFunctionSummary. + :type: dict(str, str) + """ + self._key_map = key_map + + 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_integration/models/user_defined_function_summary_collection.py b/src/oci/data_integration/models/user_defined_function_summary_collection.py new file mode 100644 index 0000000000..4f517fdf12 --- /dev/null +++ b/src/oci/data_integration/models/user_defined_function_summary_collection.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 UserDefinedFunctionSummaryCollection(object): + """ + This is the collection of user defined function summaries, it may be a collection of lightweight details or full definitions. + """ + + def __init__(self, **kwargs): + """ + Initializes a new UserDefinedFunctionSummaryCollection object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param items: + The value to assign to the items property of this UserDefinedFunctionSummaryCollection. + :type items: list[oci.data_integration.models.UserDefinedFunctionSummary] + + """ + self.swagger_types = { + 'items': 'list[UserDefinedFunctionSummary]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this UserDefinedFunctionSummaryCollection. + The array of user defined function summaries. + + + :return: The items of this UserDefinedFunctionSummaryCollection. + :rtype: list[oci.data_integration.models.UserDefinedFunctionSummary] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this UserDefinedFunctionSummaryCollection. + The array of user defined function summaries. + + + :param items: The items of this UserDefinedFunctionSummaryCollection. + :type: list[oci.data_integration.models.UserDefinedFunctionSummary] + """ + self._items = items + + 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_integration/models/user_defined_function_validation.py b/src/oci/data_integration/models/user_defined_function_validation.py new file mode 100644 index 0000000000..57a39e154e --- /dev/null +++ b/src/oci/data_integration/models/user_defined_function_validation.py @@ -0,0 +1,496 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 UserDefinedFunctionValidation(object): + """ + The information about a UserDefinedFunction validation. + """ + + def __init__(self, **kwargs): + """ + Initializes a new UserDefinedFunctionValidation object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param total_message_count: + The value to assign to the total_message_count property of this UserDefinedFunctionValidation. + :type total_message_count: int + + :param error_message_count: + The value to assign to the error_message_count property of this UserDefinedFunctionValidation. + :type error_message_count: int + + :param warn_message_count: + The value to assign to the warn_message_count property of this UserDefinedFunctionValidation. + :type warn_message_count: int + + :param info_message_count: + The value to assign to the info_message_count property of this UserDefinedFunctionValidation. + :type info_message_count: int + + :param validation_messages: + The value to assign to the validation_messages property of this UserDefinedFunctionValidation. + :type validation_messages: dict(str, list[ValidationMessage]) + + :param key: + The value to assign to the key property of this UserDefinedFunctionValidation. + :type key: str + + :param model_type: + The value to assign to the model_type property of this UserDefinedFunctionValidation. + :type model_type: str + + :param model_version: + The value to assign to the model_version property of this UserDefinedFunctionValidation. + :type model_version: str + + :param parent_ref: + The value to assign to the parent_ref property of this UserDefinedFunctionValidation. + :type parent_ref: oci.data_integration.models.ParentReference + + :param name: + The value to assign to the name property of this UserDefinedFunctionValidation. + :type name: str + + :param description: + The value to assign to the description property of this UserDefinedFunctionValidation. + :type description: str + + :param object_version: + The value to assign to the object_version property of this UserDefinedFunctionValidation. + :type object_version: int + + :param object_status: + The value to assign to the object_status property of this UserDefinedFunctionValidation. + :type object_status: int + + :param identifier: + The value to assign to the identifier property of this UserDefinedFunctionValidation. + :type identifier: str + + :param metadata: + The value to assign to the metadata property of this UserDefinedFunctionValidation. + :type metadata: oci.data_integration.models.ObjectMetadata + + """ + self.swagger_types = { + 'total_message_count': 'int', + 'error_message_count': 'int', + 'warn_message_count': 'int', + 'info_message_count': 'int', + 'validation_messages': 'dict(str, list[ValidationMessage])', + 'key': 'str', + 'model_type': 'str', + 'model_version': 'str', + 'parent_ref': 'ParentReference', + 'name': 'str', + 'description': 'str', + 'object_version': 'int', + 'object_status': 'int', + 'identifier': 'str', + 'metadata': 'ObjectMetadata' + } + + self.attribute_map = { + 'total_message_count': 'totalMessageCount', + 'error_message_count': 'errorMessageCount', + 'warn_message_count': 'warnMessageCount', + 'info_message_count': 'infoMessageCount', + 'validation_messages': 'validationMessages', + 'key': 'key', + 'model_type': 'modelType', + 'model_version': 'modelVersion', + 'parent_ref': 'parentRef', + 'name': 'name', + 'description': 'description', + 'object_version': 'objectVersion', + 'object_status': 'objectStatus', + 'identifier': 'identifier', + 'metadata': 'metadata' + } + + self._total_message_count = None + self._error_message_count = None + self._warn_message_count = None + self._info_message_count = None + self._validation_messages = None + self._key = None + self._model_type = None + self._model_version = None + self._parent_ref = None + self._name = None + self._description = None + self._object_version = None + self._object_status = None + self._identifier = None + self._metadata = None + + @property + def total_message_count(self): + """ + Gets the total_message_count of this UserDefinedFunctionValidation. + The total number of validation messages. + + + :return: The total_message_count of this UserDefinedFunctionValidation. + :rtype: int + """ + return self._total_message_count + + @total_message_count.setter + def total_message_count(self, total_message_count): + """ + Sets the total_message_count of this UserDefinedFunctionValidation. + The total number of validation messages. + + + :param total_message_count: The total_message_count of this UserDefinedFunctionValidation. + :type: int + """ + self._total_message_count = total_message_count + + @property + def error_message_count(self): + """ + Gets the error_message_count of this UserDefinedFunctionValidation. + The total number of validation error messages. + + + :return: The error_message_count of this UserDefinedFunctionValidation. + :rtype: int + """ + return self._error_message_count + + @error_message_count.setter + def error_message_count(self, error_message_count): + """ + Sets the error_message_count of this UserDefinedFunctionValidation. + The total number of validation error messages. + + + :param error_message_count: The error_message_count of this UserDefinedFunctionValidation. + :type: int + """ + self._error_message_count = error_message_count + + @property + def warn_message_count(self): + """ + Gets the warn_message_count of this UserDefinedFunctionValidation. + The total number of validation warning messages. + + + :return: The warn_message_count of this UserDefinedFunctionValidation. + :rtype: int + """ + return self._warn_message_count + + @warn_message_count.setter + def warn_message_count(self, warn_message_count): + """ + Sets the warn_message_count of this UserDefinedFunctionValidation. + The total number of validation warning messages. + + + :param warn_message_count: The warn_message_count of this UserDefinedFunctionValidation. + :type: int + """ + self._warn_message_count = warn_message_count + + @property + def info_message_count(self): + """ + Gets the info_message_count of this UserDefinedFunctionValidation. + The total number of validation information messages. + + + :return: The info_message_count of this UserDefinedFunctionValidation. + :rtype: int + """ + return self._info_message_count + + @info_message_count.setter + def info_message_count(self, info_message_count): + """ + Sets the info_message_count of this UserDefinedFunctionValidation. + The total number of validation information messages. + + + :param info_message_count: The info_message_count of this UserDefinedFunctionValidation. + :type: int + """ + self._info_message_count = info_message_count + + @property + def validation_messages(self): + """ + Gets the validation_messages of this UserDefinedFunctionValidation. + The detailed information of the UserDefinedFunction object validation. + + + :return: The validation_messages of this UserDefinedFunctionValidation. + :rtype: dict(str, list[ValidationMessage]) + """ + return self._validation_messages + + @validation_messages.setter + def validation_messages(self, validation_messages): + """ + Sets the validation_messages of this UserDefinedFunctionValidation. + The detailed information of the UserDefinedFunction object validation. + + + :param validation_messages: The validation_messages of this UserDefinedFunctionValidation. + :type: dict(str, list[ValidationMessage]) + """ + self._validation_messages = validation_messages + + @property + def key(self): + """ + Gets the key of this UserDefinedFunctionValidation. + Objects will use a 36 character key as unique ID. It is system generated and cannot be modified. + + + :return: The key of this UserDefinedFunctionValidation. + :rtype: str + """ + return self._key + + @key.setter + def key(self, key): + """ + Sets the key of this UserDefinedFunctionValidation. + Objects will use a 36 character key as unique ID. It is system generated and cannot be modified. + + + :param key: The key of this UserDefinedFunctionValidation. + :type: str + """ + self._key = key + + @property + def model_type(self): + """ + Gets the model_type of this UserDefinedFunctionValidation. + The type of the object. + + + :return: The model_type of this UserDefinedFunctionValidation. + :rtype: str + """ + return self._model_type + + @model_type.setter + def model_type(self, model_type): + """ + Sets the model_type of this UserDefinedFunctionValidation. + The type of the object. + + + :param model_type: The model_type of this UserDefinedFunctionValidation. + :type: str + """ + self._model_type = model_type + + @property + def model_version(self): + """ + Gets the model_version of this UserDefinedFunctionValidation. + The model version of the object. + + + :return: The model_version of this UserDefinedFunctionValidation. + :rtype: str + """ + return self._model_version + + @model_version.setter + def model_version(self, model_version): + """ + Sets the model_version of this UserDefinedFunctionValidation. + The model version of the object. + + + :param model_version: The model_version of this UserDefinedFunctionValidation. + :type: str + """ + self._model_version = model_version + + @property + def parent_ref(self): + """ + Gets the parent_ref of this UserDefinedFunctionValidation. + + :return: The parent_ref of this UserDefinedFunctionValidation. + :rtype: oci.data_integration.models.ParentReference + """ + return self._parent_ref + + @parent_ref.setter + def parent_ref(self, parent_ref): + """ + Sets the parent_ref of this UserDefinedFunctionValidation. + + :param parent_ref: The parent_ref of this UserDefinedFunctionValidation. + :type: oci.data_integration.models.ParentReference + """ + self._parent_ref = parent_ref + + @property + def name(self): + """ + Gets the name of this UserDefinedFunctionValidation. + Free form text without any restriction on permitted characters. Name can have letters, numbers, and special characters. The value is editable and is restricted to 1000 characters. + + + :return: The name of this UserDefinedFunctionValidation. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """ + Sets the name of this UserDefinedFunctionValidation. + Free form text without any restriction on permitted characters. Name can have letters, numbers, and special characters. The value is editable and is restricted to 1000 characters. + + + :param name: The name of this UserDefinedFunctionValidation. + :type: str + """ + self._name = name + + @property + def description(self): + """ + Gets the description of this UserDefinedFunctionValidation. + Detailed description for the object. + + + :return: The description of this UserDefinedFunctionValidation. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this UserDefinedFunctionValidation. + Detailed description for the object. + + + :param description: The description of this UserDefinedFunctionValidation. + :type: str + """ + self._description = description + + @property + def object_version(self): + """ + Gets the object_version of this UserDefinedFunctionValidation. + The version of the object that is used to track changes in the object instance. + + + :return: The object_version of this UserDefinedFunctionValidation. + :rtype: int + """ + return self._object_version + + @object_version.setter + def object_version(self, object_version): + """ + Sets the object_version of this UserDefinedFunctionValidation. + The version of the object that is used to track changes in the object instance. + + + :param object_version: The object_version of this UserDefinedFunctionValidation. + :type: int + """ + self._object_version = object_version + + @property + def object_status(self): + """ + Gets the object_status of this UserDefinedFunctionValidation. + The status of an object that can be set to value 1 for shallow references across objects, other values reserved. + + + :return: The object_status of this UserDefinedFunctionValidation. + :rtype: int + """ + return self._object_status + + @object_status.setter + def object_status(self, object_status): + """ + Sets the object_status of this UserDefinedFunctionValidation. + The status of an object that can be set to value 1 for shallow references across objects, other values reserved. + + + :param object_status: The object_status of this UserDefinedFunctionValidation. + :type: int + """ + self._object_status = object_status + + @property + def identifier(self): + """ + Gets the identifier of this UserDefinedFunctionValidation. + Value can only contain upper case letters, underscore, and numbers. It should begin with upper case letter or underscore. The value can be modified. + + + :return: The identifier of this UserDefinedFunctionValidation. + :rtype: str + """ + return self._identifier + + @identifier.setter + def identifier(self, identifier): + """ + Sets the identifier of this UserDefinedFunctionValidation. + Value can only contain upper case letters, underscore, and numbers. It should begin with upper case letter or underscore. The value can be modified. + + + :param identifier: The identifier of this UserDefinedFunctionValidation. + :type: str + """ + self._identifier = identifier + + @property + def metadata(self): + """ + Gets the metadata of this UserDefinedFunctionValidation. + + :return: The metadata of this UserDefinedFunctionValidation. + :rtype: oci.data_integration.models.ObjectMetadata + """ + return self._metadata + + @metadata.setter + def metadata(self, metadata): + """ + Sets the metadata of this UserDefinedFunctionValidation. + + :param metadata: The metadata of this UserDefinedFunctionValidation. + :type: oci.data_integration.models.ObjectMetadata + """ + self._metadata = metadata + + 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_integration/models/user_defined_function_validation_summary.py b/src/oci/data_integration/models/user_defined_function_validation_summary.py new file mode 100644 index 0000000000..4988ef8ca2 --- /dev/null +++ b/src/oci/data_integration/models/user_defined_function_validation_summary.py @@ -0,0 +1,496 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 UserDefinedFunctionValidationSummary(object): + """ + The information about a UserDefinedFunction validation. + """ + + def __init__(self, **kwargs): + """ + Initializes a new UserDefinedFunctionValidationSummary object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param total_message_count: + The value to assign to the total_message_count property of this UserDefinedFunctionValidationSummary. + :type total_message_count: int + + :param error_message_count: + The value to assign to the error_message_count property of this UserDefinedFunctionValidationSummary. + :type error_message_count: int + + :param warn_message_count: + The value to assign to the warn_message_count property of this UserDefinedFunctionValidationSummary. + :type warn_message_count: int + + :param info_message_count: + The value to assign to the info_message_count property of this UserDefinedFunctionValidationSummary. + :type info_message_count: int + + :param validation_messages: + The value to assign to the validation_messages property of this UserDefinedFunctionValidationSummary. + :type validation_messages: dict(str, list[ValidationMessage]) + + :param key: + The value to assign to the key property of this UserDefinedFunctionValidationSummary. + :type key: str + + :param model_type: + The value to assign to the model_type property of this UserDefinedFunctionValidationSummary. + :type model_type: str + + :param model_version: + The value to assign to the model_version property of this UserDefinedFunctionValidationSummary. + :type model_version: str + + :param parent_ref: + The value to assign to the parent_ref property of this UserDefinedFunctionValidationSummary. + :type parent_ref: oci.data_integration.models.ParentReference + + :param name: + The value to assign to the name property of this UserDefinedFunctionValidationSummary. + :type name: str + + :param description: + The value to assign to the description property of this UserDefinedFunctionValidationSummary. + :type description: str + + :param object_version: + The value to assign to the object_version property of this UserDefinedFunctionValidationSummary. + :type object_version: int + + :param object_status: + The value to assign to the object_status property of this UserDefinedFunctionValidationSummary. + :type object_status: int + + :param identifier: + The value to assign to the identifier property of this UserDefinedFunctionValidationSummary. + :type identifier: str + + :param metadata: + The value to assign to the metadata property of this UserDefinedFunctionValidationSummary. + :type metadata: oci.data_integration.models.ObjectMetadata + + """ + self.swagger_types = { + 'total_message_count': 'int', + 'error_message_count': 'int', + 'warn_message_count': 'int', + 'info_message_count': 'int', + 'validation_messages': 'dict(str, list[ValidationMessage])', + 'key': 'str', + 'model_type': 'str', + 'model_version': 'str', + 'parent_ref': 'ParentReference', + 'name': 'str', + 'description': 'str', + 'object_version': 'int', + 'object_status': 'int', + 'identifier': 'str', + 'metadata': 'ObjectMetadata' + } + + self.attribute_map = { + 'total_message_count': 'totalMessageCount', + 'error_message_count': 'errorMessageCount', + 'warn_message_count': 'warnMessageCount', + 'info_message_count': 'infoMessageCount', + 'validation_messages': 'validationMessages', + 'key': 'key', + 'model_type': 'modelType', + 'model_version': 'modelVersion', + 'parent_ref': 'parentRef', + 'name': 'name', + 'description': 'description', + 'object_version': 'objectVersion', + 'object_status': 'objectStatus', + 'identifier': 'identifier', + 'metadata': 'metadata' + } + + self._total_message_count = None + self._error_message_count = None + self._warn_message_count = None + self._info_message_count = None + self._validation_messages = None + self._key = None + self._model_type = None + self._model_version = None + self._parent_ref = None + self._name = None + self._description = None + self._object_version = None + self._object_status = None + self._identifier = None + self._metadata = None + + @property + def total_message_count(self): + """ + Gets the total_message_count of this UserDefinedFunctionValidationSummary. + The total number of validation messages. + + + :return: The total_message_count of this UserDefinedFunctionValidationSummary. + :rtype: int + """ + return self._total_message_count + + @total_message_count.setter + def total_message_count(self, total_message_count): + """ + Sets the total_message_count of this UserDefinedFunctionValidationSummary. + The total number of validation messages. + + + :param total_message_count: The total_message_count of this UserDefinedFunctionValidationSummary. + :type: int + """ + self._total_message_count = total_message_count + + @property + def error_message_count(self): + """ + Gets the error_message_count of this UserDefinedFunctionValidationSummary. + The total number of validation error messages. + + + :return: The error_message_count of this UserDefinedFunctionValidationSummary. + :rtype: int + """ + return self._error_message_count + + @error_message_count.setter + def error_message_count(self, error_message_count): + """ + Sets the error_message_count of this UserDefinedFunctionValidationSummary. + The total number of validation error messages. + + + :param error_message_count: The error_message_count of this UserDefinedFunctionValidationSummary. + :type: int + """ + self._error_message_count = error_message_count + + @property + def warn_message_count(self): + """ + Gets the warn_message_count of this UserDefinedFunctionValidationSummary. + The total number of validation warning messages. + + + :return: The warn_message_count of this UserDefinedFunctionValidationSummary. + :rtype: int + """ + return self._warn_message_count + + @warn_message_count.setter + def warn_message_count(self, warn_message_count): + """ + Sets the warn_message_count of this UserDefinedFunctionValidationSummary. + The total number of validation warning messages. + + + :param warn_message_count: The warn_message_count of this UserDefinedFunctionValidationSummary. + :type: int + """ + self._warn_message_count = warn_message_count + + @property + def info_message_count(self): + """ + Gets the info_message_count of this UserDefinedFunctionValidationSummary. + The total number of validation information messages. + + + :return: The info_message_count of this UserDefinedFunctionValidationSummary. + :rtype: int + """ + return self._info_message_count + + @info_message_count.setter + def info_message_count(self, info_message_count): + """ + Sets the info_message_count of this UserDefinedFunctionValidationSummary. + The total number of validation information messages. + + + :param info_message_count: The info_message_count of this UserDefinedFunctionValidationSummary. + :type: int + """ + self._info_message_count = info_message_count + + @property + def validation_messages(self): + """ + Gets the validation_messages of this UserDefinedFunctionValidationSummary. + The detailed information of the UserDefinedFunction object validation. + + + :return: The validation_messages of this UserDefinedFunctionValidationSummary. + :rtype: dict(str, list[ValidationMessage]) + """ + return self._validation_messages + + @validation_messages.setter + def validation_messages(self, validation_messages): + """ + Sets the validation_messages of this UserDefinedFunctionValidationSummary. + The detailed information of the UserDefinedFunction object validation. + + + :param validation_messages: The validation_messages of this UserDefinedFunctionValidationSummary. + :type: dict(str, list[ValidationMessage]) + """ + self._validation_messages = validation_messages + + @property + def key(self): + """ + Gets the key of this UserDefinedFunctionValidationSummary. + Objects will use a 36 character key as unique ID. It is system generated and cannot be modified. + + + :return: The key of this UserDefinedFunctionValidationSummary. + :rtype: str + """ + return self._key + + @key.setter + def key(self, key): + """ + Sets the key of this UserDefinedFunctionValidationSummary. + Objects will use a 36 character key as unique ID. It is system generated and cannot be modified. + + + :param key: The key of this UserDefinedFunctionValidationSummary. + :type: str + """ + self._key = key + + @property + def model_type(self): + """ + Gets the model_type of this UserDefinedFunctionValidationSummary. + The type of the object. + + + :return: The model_type of this UserDefinedFunctionValidationSummary. + :rtype: str + """ + return self._model_type + + @model_type.setter + def model_type(self, model_type): + """ + Sets the model_type of this UserDefinedFunctionValidationSummary. + The type of the object. + + + :param model_type: The model_type of this UserDefinedFunctionValidationSummary. + :type: str + """ + self._model_type = model_type + + @property + def model_version(self): + """ + Gets the model_version of this UserDefinedFunctionValidationSummary. + The model version of the object. + + + :return: The model_version of this UserDefinedFunctionValidationSummary. + :rtype: str + """ + return self._model_version + + @model_version.setter + def model_version(self, model_version): + """ + Sets the model_version of this UserDefinedFunctionValidationSummary. + The model version of the object. + + + :param model_version: The model_version of this UserDefinedFunctionValidationSummary. + :type: str + """ + self._model_version = model_version + + @property + def parent_ref(self): + """ + Gets the parent_ref of this UserDefinedFunctionValidationSummary. + + :return: The parent_ref of this UserDefinedFunctionValidationSummary. + :rtype: oci.data_integration.models.ParentReference + """ + return self._parent_ref + + @parent_ref.setter + def parent_ref(self, parent_ref): + """ + Sets the parent_ref of this UserDefinedFunctionValidationSummary. + + :param parent_ref: The parent_ref of this UserDefinedFunctionValidationSummary. + :type: oci.data_integration.models.ParentReference + """ + self._parent_ref = parent_ref + + @property + def name(self): + """ + Gets the name of this UserDefinedFunctionValidationSummary. + Free form text without any restriction on permitted characters. Name can have letters, numbers, and special characters. The value is editable and is restricted to 1000 characters. + + + :return: The name of this UserDefinedFunctionValidationSummary. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """ + Sets the name of this UserDefinedFunctionValidationSummary. + Free form text without any restriction on permitted characters. Name can have letters, numbers, and special characters. The value is editable and is restricted to 1000 characters. + + + :param name: The name of this UserDefinedFunctionValidationSummary. + :type: str + """ + self._name = name + + @property + def description(self): + """ + Gets the description of this UserDefinedFunctionValidationSummary. + Detailed description for the object. + + + :return: The description of this UserDefinedFunctionValidationSummary. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this UserDefinedFunctionValidationSummary. + Detailed description for the object. + + + :param description: The description of this UserDefinedFunctionValidationSummary. + :type: str + """ + self._description = description + + @property + def object_version(self): + """ + Gets the object_version of this UserDefinedFunctionValidationSummary. + The version of the object that is used to track changes in the object instance. + + + :return: The object_version of this UserDefinedFunctionValidationSummary. + :rtype: int + """ + return self._object_version + + @object_version.setter + def object_version(self, object_version): + """ + Sets the object_version of this UserDefinedFunctionValidationSummary. + The version of the object that is used to track changes in the object instance. + + + :param object_version: The object_version of this UserDefinedFunctionValidationSummary. + :type: int + """ + self._object_version = object_version + + @property + def object_status(self): + """ + Gets the object_status of this UserDefinedFunctionValidationSummary. + The status of an object that can be set to value 1 for shallow references across objects, other values reserved. + + + :return: The object_status of this UserDefinedFunctionValidationSummary. + :rtype: int + """ + return self._object_status + + @object_status.setter + def object_status(self, object_status): + """ + Sets the object_status of this UserDefinedFunctionValidationSummary. + The status of an object that can be set to value 1 for shallow references across objects, other values reserved. + + + :param object_status: The object_status of this UserDefinedFunctionValidationSummary. + :type: int + """ + self._object_status = object_status + + @property + def identifier(self): + """ + Gets the identifier of this UserDefinedFunctionValidationSummary. + Value can only contain upper case letters, underscore, and numbers. It should begin with upper case letter or underscore. The value can be modified. + + + :return: The identifier of this UserDefinedFunctionValidationSummary. + :rtype: str + """ + return self._identifier + + @identifier.setter + def identifier(self, identifier): + """ + Sets the identifier of this UserDefinedFunctionValidationSummary. + Value can only contain upper case letters, underscore, and numbers. It should begin with upper case letter or underscore. The value can be modified. + + + :param identifier: The identifier of this UserDefinedFunctionValidationSummary. + :type: str + """ + self._identifier = identifier + + @property + def metadata(self): + """ + Gets the metadata of this UserDefinedFunctionValidationSummary. + + :return: The metadata of this UserDefinedFunctionValidationSummary. + :rtype: oci.data_integration.models.ObjectMetadata + """ + return self._metadata + + @metadata.setter + def metadata(self, metadata): + """ + Sets the metadata of this UserDefinedFunctionValidationSummary. + + :param metadata: The metadata of this UserDefinedFunctionValidationSummary. + :type: oci.data_integration.models.ObjectMetadata + """ + self._metadata = metadata + + 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_integration/models/user_defined_function_validation_summary_collection.py b/src/oci/data_integration/models/user_defined_function_validation_summary_collection.py new file mode 100644 index 0000000000..ae81109be8 --- /dev/null +++ b/src/oci/data_integration/models/user_defined_function_validation_summary_collection.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 UserDefinedFunctionValidationSummaryCollection(object): + """ + A list of UserDefinedFunction validation summaries. + """ + + def __init__(self, **kwargs): + """ + Initializes a new UserDefinedFunctionValidationSummaryCollection object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param items: + The value to assign to the items property of this UserDefinedFunctionValidationSummaryCollection. + :type items: list[oci.data_integration.models.UserDefinedFunctionValidationSummary] + + """ + self.swagger_types = { + 'items': 'list[UserDefinedFunctionValidationSummary]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this UserDefinedFunctionValidationSummaryCollection. + The array of validation summaries. + + + :return: The items of this UserDefinedFunctionValidationSummaryCollection. + :rtype: list[oci.data_integration.models.UserDefinedFunctionValidationSummary] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this UserDefinedFunctionValidationSummaryCollection. + The array of validation summaries. + + + :param items: The items of this UserDefinedFunctionValidationSummaryCollection. + :type: list[oci.data_integration.models.UserDefinedFunctionValidationSummary] + """ + self._items = items + + 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_integration/models/weekly_frequency_details.py b/src/oci/data_integration/models/weekly_frequency_details.py new file mode 100644 index 0000000000..c856d2b11a --- /dev/null +++ b/src/oci/data_integration/models/weekly_frequency_details.py @@ -0,0 +1,153 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .abstract_frequency_details import AbstractFrequencyDetails +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 WeeklyFrequencyDetails(AbstractFrequencyDetails): + """ + Frequency Details model for weekly frequency based on day of week. + """ + + #: A constant which can be used with the days property of a WeeklyFrequencyDetails. + #: This constant has a value of "SUNDAY" + DAYS_SUNDAY = "SUNDAY" + + #: A constant which can be used with the days property of a WeeklyFrequencyDetails. + #: This constant has a value of "MONDAY" + DAYS_MONDAY = "MONDAY" + + #: A constant which can be used with the days property of a WeeklyFrequencyDetails. + #: This constant has a value of "TUESDAY" + DAYS_TUESDAY = "TUESDAY" + + #: A constant which can be used with the days property of a WeeklyFrequencyDetails. + #: This constant has a value of "WEDNESDAY" + DAYS_WEDNESDAY = "WEDNESDAY" + + #: A constant which can be used with the days property of a WeeklyFrequencyDetails. + #: This constant has a value of "THURSDAY" + DAYS_THURSDAY = "THURSDAY" + + #: A constant which can be used with the days property of a WeeklyFrequencyDetails. + #: This constant has a value of "FRIDAY" + DAYS_FRIDAY = "FRIDAY" + + #: A constant which can be used with the days property of a WeeklyFrequencyDetails. + #: This constant has a value of "SATURDAY" + DAYS_SATURDAY = "SATURDAY" + + def __init__(self, **kwargs): + """ + Initializes a new WeeklyFrequencyDetails object with values from keyword arguments. The default value of the :py:attr:`~oci.data_integration.models.WeeklyFrequencyDetails.model_type` attribute + of this class is ``WEEKLY`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param model_type: + The value to assign to the model_type property of this WeeklyFrequencyDetails. + Allowed values for this property are: "HOURLY", "DAILY", "MONTHLY", "WEEKLY", "MONTHLY_RULE", "CUSTOM", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type model_type: str + + :param frequency: + The value to assign to the frequency property of this WeeklyFrequencyDetails. + Allowed values for this property are: "HOURLY", "DAILY", "MONTHLY", "WEEKLY", "CUSTOM", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type frequency: str + + :param time: + The value to assign to the time property of this WeeklyFrequencyDetails. + :type time: oci.data_integration.models.Time + + :param days: + The value to assign to the days property of this WeeklyFrequencyDetails. + Allowed values for items in this list are: "SUNDAY", "MONDAY", "TUESDAY", "WEDNESDAY", "THURSDAY", "FRIDAY", "SATURDAY", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type days: list[str] + + """ + self.swagger_types = { + 'model_type': 'str', + 'frequency': 'str', + 'time': 'Time', + 'days': 'list[str]' + } + + self.attribute_map = { + 'model_type': 'modelType', + 'frequency': 'frequency', + 'time': 'time', + 'days': 'days' + } + + self._model_type = None + self._frequency = None + self._time = None + self._days = None + self._model_type = 'WEEKLY' + + @property + def time(self): + """ + Gets the time of this WeeklyFrequencyDetails. + + :return: The time of this WeeklyFrequencyDetails. + :rtype: oci.data_integration.models.Time + """ + return self._time + + @time.setter + def time(self, time): + """ + Sets the time of this WeeklyFrequencyDetails. + + :param time: The time of this WeeklyFrequencyDetails. + :type: oci.data_integration.models.Time + """ + self._time = time + + @property + def days(self): + """ + Gets the days of this WeeklyFrequencyDetails. + A list of days of the week to be scheduled. i.e. execute on Monday and Thursday. + + Allowed values for items in this list are: "SUNDAY", "MONDAY", "TUESDAY", "WEDNESDAY", "THURSDAY", "FRIDAY", "SATURDAY", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The days of this WeeklyFrequencyDetails. + :rtype: list[str] + """ + return self._days + + @days.setter + def days(self, days): + """ + Sets the days of this WeeklyFrequencyDetails. + A list of days of the week to be scheduled. i.e. execute on Monday and Thursday. + + + :param days: The days of this WeeklyFrequencyDetails. + :type: list[str] + """ + allowed_values = ["SUNDAY", "MONDAY", "TUESDAY", "WEDNESDAY", "THURSDAY", "FRIDAY", "SATURDAY"] + if days: + days[:] = ['UNKNOWN_ENUM_VALUE' if not value_allowed_none_or_none_sentinel(x, allowed_values) else x for x in days] + self._days = days + + 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/devops/devops_client.py b/src/oci/devops/devops_client.py index b42f1e832f..6dc1caf8c7 100644 --- a/src/oci/devops/devops_client.py +++ b/src/oci/devops/devops_client.py @@ -191,6 +191,101 @@ def approve_deployment(self, deployment_id, approve_deployment_details, **kwargs body=approve_deployment_details, response_type="Deployment") + def cancel_build_run(self, cancel_build_run_details, build_run_id, **kwargs): + """ + Cancels the Build Run based on build run id provided in request + + + :param oci.devops.models.CancelBuildRunDetails cancel_build_run_details: (required) + Details the input parameters required to cancel a build run. + + :param str build_run_id: (required) + Unique build run identifier. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + + :param str opc_request_id: (optional) + Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, 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 earlier due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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.devops.models.BuildRun` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use cancel_build_run API. + """ + resource_path = "/buildRuns/{buildRunId}/actions/cancel" + 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( + "cancel_build_run got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "buildRunId": build_run_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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + 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=cancel_build_run_details, + response_type="BuildRun") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=cancel_build_run_details, + response_type="BuildRun") + def cancel_deployment(self, deployment_id, cancel_deployment_details, **kwargs): """ Cancels a deployment resource by identifier. @@ -379,13 +474,13 @@ def change_project_compartment(self, project_id, change_project_compartment_deta header_params=header_params, body=change_project_compartment_details) - def create_deploy_artifact(self, create_deploy_artifact_details, **kwargs): + def create_build_pipeline(self, create_build_pipeline_details, **kwargs): """ - Creates a new deployment artifact. + Creates a new BuildPipeline. - :param oci.devops.models.CreateDeployArtifactDetails create_deploy_artifact_details: (required) - Details for the new deployment artifact. + :param oci.devops.models.CreateBuildPipelineDetails create_build_pipeline_details: (required) + Details for the new BuildPipeline. :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 earlier 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. @@ -401,13 +496,13 @@ def create_deploy_artifact(self, create_deploy_artifact_details, **kwargs): 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.devops.models.DeployArtifact` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.devops.models.BuildPipeline` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use create_deploy_artifact API. + Click `here `__ to see an example of how to use create_build_pipeline API. """ - resource_path = "/deployArtifacts" + resource_path = "/buildPipelines" method = "POST" # Don't accept unknown kwargs @@ -419,7 +514,7 @@ def create_deploy_artifact(self, create_deploy_artifact_details, **kwargs): extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "create_deploy_artifact got unknown kwargs: {!r}".format(extra_kwargs)) + "create_build_pipeline got unknown kwargs: {!r}".format(extra_kwargs)) header_params = { "accept": "application/json", @@ -444,23 +539,23 @@ def create_deploy_artifact(self, create_deploy_artifact_details, **kwargs): resource_path=resource_path, method=method, header_params=header_params, - body=create_deploy_artifact_details, - response_type="DeployArtifact") + body=create_build_pipeline_details, + response_type="BuildPipeline") else: return self.base_client.call_api( resource_path=resource_path, method=method, header_params=header_params, - body=create_deploy_artifact_details, - response_type="DeployArtifact") + body=create_build_pipeline_details, + response_type="BuildPipeline") - def create_deploy_environment(self, create_deploy_environment_details, **kwargs): + def create_build_pipeline_stage(self, create_build_pipeline_stage_details, **kwargs): """ - Creates a new deployment environment. + Creates a new Stage. - :param oci.devops.models.CreateDeployEnvironmentDetails create_deploy_environment_details: (required) - Details for the new deployment environment. + :param oci.devops.models.CreateBuildPipelineStageDetails create_build_pipeline_stage_details: (required) + Details for the new Stage. :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 earlier 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. @@ -476,13 +571,13 @@ def create_deploy_environment(self, create_deploy_environment_details, **kwargs) 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.devops.models.DeployEnvironment` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.devops.models.BuildPipelineStage` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use create_deploy_environment API. + Click `here `__ to see an example of how to use create_build_pipeline_stage API. """ - resource_path = "/deployEnvironments" + resource_path = "/buildPipelineStages" method = "POST" # Don't accept unknown kwargs @@ -494,7 +589,7 @@ def create_deploy_environment(self, create_deploy_environment_details, **kwargs) extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "create_deploy_environment got unknown kwargs: {!r}".format(extra_kwargs)) + "create_build_pipeline_stage got unknown kwargs: {!r}".format(extra_kwargs)) header_params = { "accept": "application/json", @@ -519,23 +614,23 @@ def create_deploy_environment(self, create_deploy_environment_details, **kwargs) resource_path=resource_path, method=method, header_params=header_params, - body=create_deploy_environment_details, - response_type="DeployEnvironment") + body=create_build_pipeline_stage_details, + response_type="BuildPipelineStage") else: return self.base_client.call_api( resource_path=resource_path, method=method, header_params=header_params, - body=create_deploy_environment_details, - response_type="DeployEnvironment") + body=create_build_pipeline_stage_details, + response_type="BuildPipelineStage") - def create_deploy_pipeline(self, create_deploy_pipeline_details, **kwargs): + def create_build_run(self, create_build_run_details, **kwargs): """ - Creates a new deployment pipeline. + Starts a build pipeline run for a predefined build pipeline - :param oci.devops.models.CreateDeployPipelineDetails create_deploy_pipeline_details: (required) - Details for the new deployment pipeline. + :param oci.devops.models.CreateBuildRunDetails create_build_run_details: (required) + Details the input parameters required to create a new build run. :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 earlier 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. @@ -543,6 +638,9 @@ def create_deploy_pipeline(self, create_deploy_pipeline_details, **kwargs): :param str opc_request_id: (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, 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. @@ -551,31 +649,33 @@ def create_deploy_pipeline(self, create_deploy_pipeline_details, **kwargs): 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.devops.models.DeployPipeline` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.devops.models.BuildRun` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use create_deploy_pipeline API. + Click `here `__ to see an example of how to use create_build_run API. """ - resource_path = "/deployPipelines" + resource_path = "/buildRuns" method = "POST" # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", "opc_retry_token", - "opc_request_id" + "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( - "create_deploy_pipeline got unknown kwargs: {!r}".format(extra_kwargs)) + "create_build_run got unknown kwargs: {!r}".format(extra_kwargs)) header_params = { "accept": "application/json", "content-type": "application/json", "opc-retry-token": kwargs.get("opc_retry_token", missing), - "opc-request-id": kwargs.get("opc_request_id", missing) + "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} @@ -594,23 +694,23 @@ def create_deploy_pipeline(self, create_deploy_pipeline_details, **kwargs): resource_path=resource_path, method=method, header_params=header_params, - body=create_deploy_pipeline_details, - response_type="DeployPipeline") + body=create_build_run_details, + response_type="BuildRun") else: return self.base_client.call_api( resource_path=resource_path, method=method, header_params=header_params, - body=create_deploy_pipeline_details, - response_type="DeployPipeline") + body=create_build_run_details, + response_type="BuildRun") - def create_deploy_stage(self, create_deploy_stage_details, **kwargs): + def create_connection(self, create_connection_details, **kwargs): """ - Creates a new deployment stage. + Creates a new Connection. - :param oci.devops.models.CreateDeployStageDetails create_deploy_stage_details: (required) - Details for the new DeployStage. + :param oci.devops.models.CreateConnectionDetails create_connection_details: (required) + Details for the new Connection. :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 earlier 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. @@ -626,13 +726,13 @@ def create_deploy_stage(self, create_deploy_stage_details, **kwargs): 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.devops.models.DeployStage` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.devops.models.Connection` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use create_deploy_stage API. + Click `here `__ to see an example of how to use create_connection API. """ - resource_path = "/deployStages" + resource_path = "/connections" method = "POST" # Don't accept unknown kwargs @@ -644,7 +744,7 @@ def create_deploy_stage(self, create_deploy_stage_details, **kwargs): extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "create_deploy_stage got unknown kwargs: {!r}".format(extra_kwargs)) + "create_connection got unknown kwargs: {!r}".format(extra_kwargs)) header_params = { "accept": "application/json", @@ -669,23 +769,23 @@ def create_deploy_stage(self, create_deploy_stage_details, **kwargs): resource_path=resource_path, method=method, header_params=header_params, - body=create_deploy_stage_details, - response_type="DeployStage") + body=create_connection_details, + response_type="Connection") else: return self.base_client.call_api( resource_path=resource_path, method=method, header_params=header_params, - body=create_deploy_stage_details, - response_type="DeployStage") + body=create_connection_details, + response_type="Connection") - def create_deployment(self, create_deployment_details, **kwargs): + def create_deploy_artifact(self, create_deploy_artifact_details, **kwargs): """ - Creates a new deployment. + Creates a new deployment artifact. - :param oci.devops.models.CreateDeploymentDetails create_deployment_details: (required) - Details for the new deployment. + :param oci.devops.models.CreateDeployArtifactDetails create_deploy_artifact_details: (required) + Details for the new deployment artifact. :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 earlier 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. @@ -701,13 +801,13 @@ def create_deployment(self, create_deployment_details, **kwargs): 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.devops.models.Deployment` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.devops.models.DeployArtifact` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use create_deployment API. + Click `here `__ to see an example of how to use create_deploy_artifact API. """ - resource_path = "/deployments" + resource_path = "/deployArtifacts" method = "POST" # Don't accept unknown kwargs @@ -719,7 +819,7 @@ def create_deployment(self, create_deployment_details, **kwargs): extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "create_deployment got unknown kwargs: {!r}".format(extra_kwargs)) + "create_deploy_artifact got unknown kwargs: {!r}".format(extra_kwargs)) header_params = { "accept": "application/json", @@ -744,23 +844,23 @@ def create_deployment(self, create_deployment_details, **kwargs): resource_path=resource_path, method=method, header_params=header_params, - body=create_deployment_details, - response_type="Deployment") + body=create_deploy_artifact_details, + response_type="DeployArtifact") else: return self.base_client.call_api( resource_path=resource_path, method=method, header_params=header_params, - body=create_deployment_details, - response_type="Deployment") + body=create_deploy_artifact_details, + response_type="DeployArtifact") - def create_project(self, create_project_details, **kwargs): + def create_deploy_environment(self, create_deploy_environment_details, **kwargs): """ - Creates a new project. + Creates a new deployment environment. - :param oci.devops.models.CreateProjectDetails create_project_details: (required) - Details for the new project. + :param oci.devops.models.CreateDeployEnvironmentDetails create_deploy_environment_details: (required) + Details for the new deployment environment. :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 earlier 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. @@ -776,13 +876,13 @@ def create_project(self, create_project_details, **kwargs): 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.devops.models.Project` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.devops.models.DeployEnvironment` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use create_project API. + Click `here `__ to see an example of how to use create_deploy_environment API. """ - resource_path = "/projects" + resource_path = "/deployEnvironments" method = "POST" # Don't accept unknown kwargs @@ -794,7 +894,7 @@ def create_project(self, create_project_details, **kwargs): 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)) + "create_deploy_environment got unknown kwargs: {!r}".format(extra_kwargs)) header_params = { "accept": "application/json", @@ -819,26 +919,26 @@ def create_project(self, create_project_details, **kwargs): resource_path=resource_path, method=method, header_params=header_params, - body=create_project_details, - response_type="Project") + body=create_deploy_environment_details, + response_type="DeployEnvironment") else: return self.base_client.call_api( resource_path=resource_path, method=method, header_params=header_params, - body=create_project_details, - response_type="Project") + body=create_deploy_environment_details, + response_type="DeployEnvironment") - def delete_deploy_artifact(self, deploy_artifact_id, **kwargs): + def create_deploy_pipeline(self, create_deploy_pipeline_details, **kwargs): """ - Deletes a deployment artifact resource by identifier. + Creates a new deployment pipeline. - :param str deploy_artifact_id: (required) - Unique artifact identifier. + :param oci.devops.models.CreateDeployPipelineDetails create_deploy_pipeline_details: (required) + Details for the new deployment pipeline. - :param str if_match: (optional) - For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + :param str opc_retry_token: (optional) + A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated earlier due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected. :param str opc_request_id: (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. @@ -851,40 +951,30 @@ def delete_deploy_artifact(self, deploy_artifact_id, **kwargs): 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 + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.devops.models.DeployPipeline` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use delete_deploy_artifact API. + Click `here `__ to see an example of how to use create_deploy_pipeline API. """ - resource_path = "/deployArtifacts/{deployArtifactId}" - method = "DELETE" + resource_path = "/deployPipelines" + method = "POST" # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", - "if_match", + "opc_retry_token", "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "delete_deploy_artifact got unknown kwargs: {!r}".format(extra_kwargs)) - - path_params = { - "deployArtifactId": deploy_artifact_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)) + "create_deploy_pipeline got unknown kwargs: {!r}".format(extra_kwargs)) header_params = { "accept": "application/json", "content-type": "application/json", - "if-match": kwargs.get("if_match", missing), + "opc-retry-token": kwargs.get("opc_retry_token", 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} @@ -896,31 +986,34 @@ def delete_deploy_artifact(self, deploy_artifact_id, **kwargs): if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 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) + header_params=header_params, + body=create_deploy_pipeline_details, + response_type="DeployPipeline") else: return self.base_client.call_api( resource_path=resource_path, method=method, - path_params=path_params, - header_params=header_params) + header_params=header_params, + body=create_deploy_pipeline_details, + response_type="DeployPipeline") - def delete_deploy_environment(self, deploy_environment_id, **kwargs): + def create_deploy_stage(self, create_deploy_stage_details, **kwargs): """ - Deletes a deployment environment resource by identifier. + Creates a new deployment stage. - :param str deploy_environment_id: (required) - Unique environment identifier. + :param oci.devops.models.CreateDeployStageDetails create_deploy_stage_details: (required) + Details for the new DeployStage. - :param str if_match: (optional) - For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + :param str opc_retry_token: (optional) + A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated earlier due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected. :param str opc_request_id: (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. @@ -933,40 +1026,30 @@ def delete_deploy_environment(self, deploy_environment_id, **kwargs): 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 + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.devops.models.DeployStage` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use delete_deploy_environment API. + Click `here `__ to see an example of how to use create_deploy_stage API. """ - resource_path = "/deployEnvironments/{deployEnvironmentId}" - method = "DELETE" + resource_path = "/deployStages" + method = "POST" # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", - "if_match", + "opc_retry_token", "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "delete_deploy_environment got unknown kwargs: {!r}".format(extra_kwargs)) - - path_params = { - "deployEnvironmentId": deploy_environment_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)) + "create_deploy_stage got unknown kwargs: {!r}".format(extra_kwargs)) header_params = { "accept": "application/json", "content-type": "application/json", - "if-match": kwargs.get("if_match", missing), + "opc-retry-token": kwargs.get("opc_retry_token", 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} @@ -978,31 +1061,34 @@ def delete_deploy_environment(self, deploy_environment_id, **kwargs): if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 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) + header_params=header_params, + body=create_deploy_stage_details, + response_type="DeployStage") else: return self.base_client.call_api( resource_path=resource_path, method=method, - path_params=path_params, - header_params=header_params) + header_params=header_params, + body=create_deploy_stage_details, + response_type="DeployStage") - def delete_deploy_pipeline(self, deploy_pipeline_id, **kwargs): + def create_deployment(self, create_deployment_details, **kwargs): """ - Deletes a deployment pipeline resource by identifier. + Creates a new deployment. - :param str deploy_pipeline_id: (required) - Unique pipeline identifier. + :param oci.devops.models.CreateDeploymentDetails create_deployment_details: (required) + Details for the new deployment. - :param str if_match: (optional) - For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + :param str opc_retry_token: (optional) + A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated earlier due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected. :param str opc_request_id: (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. @@ -1015,40 +1101,30 @@ def delete_deploy_pipeline(self, deploy_pipeline_id, **kwargs): 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 + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.devops.models.Deployment` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use delete_deploy_pipeline API. + Click `here `__ to see an example of how to use create_deployment API. """ - resource_path = "/deployPipelines/{deployPipelineId}" - method = "DELETE" + resource_path = "/deployments" + method = "POST" # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", - "if_match", + "opc_retry_token", "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "delete_deploy_pipeline got unknown kwargs: {!r}".format(extra_kwargs)) - - path_params = { - "deployPipelineId": deploy_pipeline_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)) + "create_deployment got unknown kwargs: {!r}".format(extra_kwargs)) header_params = { "accept": "application/json", "content-type": "application/json", - "if-match": kwargs.get("if_match", missing), + "opc-retry-token": kwargs.get("opc_retry_token", 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} @@ -1060,31 +1136,34 @@ def delete_deploy_pipeline(self, deploy_pipeline_id, **kwargs): if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 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) + header_params=header_params, + body=create_deployment_details, + response_type="Deployment") else: return self.base_client.call_api( resource_path=resource_path, method=method, - path_params=path_params, - header_params=header_params) + header_params=header_params, + body=create_deployment_details, + response_type="Deployment") - def delete_deploy_stage(self, deploy_stage_id, **kwargs): + def create_project(self, create_project_details, **kwargs): """ - Deletes a deployment stage resource by identifier. + Creates a new project. - :param str deploy_stage_id: (required) - Unique stage identifier. + :param oci.devops.models.CreateProjectDetails create_project_details: (required) + Details for the new 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_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 earlier due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected. :param str opc_request_id: (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. @@ -1097,40 +1176,30 @@ def delete_deploy_stage(self, deploy_stage_id, **kwargs): 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 + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.devops.models.Project` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use delete_deploy_stage API. + Click `here `__ to see an example of how to use create_project API. """ - resource_path = "/deployStages/{deployStageId}" - method = "DELETE" + resource_path = "/projects" + method = "POST" # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", - "if_match", + "opc_retry_token", "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "delete_deploy_stage got unknown kwargs: {!r}".format(extra_kwargs)) - - path_params = { - "deployStageId": deploy_stage_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)) + "create_project got unknown kwargs: {!r}".format(extra_kwargs)) header_params = { "accept": "application/json", "content-type": "application/json", - "if-match": kwargs.get("if_match", missing), + "opc-retry-token": kwargs.get("opc_retry_token", 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} @@ -1142,31 +1211,34 @@ def delete_deploy_stage(self, deploy_stage_id, **kwargs): if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 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) + header_params=header_params, + body=create_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) + header_params=header_params, + body=create_project_details, + response_type="Project") - def delete_project(self, project_id, **kwargs): + def create_repository(self, create_repository_details, **kwargs): """ - Deletes a project resource by identifier + Creates a new Repository. - :param str project_id: (required) - Unique project identifier. + :param oci.devops.models.CreateRepositoryDetails create_repository_details: (required) + Details for the new Repository. - :param str if_match: (optional) - For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + :param str opc_retry_token: (optional) + A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated earlier due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected. :param str opc_request_id: (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. @@ -1179,40 +1251,30 @@ def delete_project(self, project_id, **kwargs): 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 + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.devops.models.Repository` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use delete_project API. + Click `here `__ to see an example of how to use create_repository API. """ - resource_path = "/projects/{projectId}" - method = "DELETE" + resource_path = "/repositories" + method = "POST" # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", - "if_match", + "opc_retry_token", "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)) + "create_repository got unknown kwargs: {!r}".format(extra_kwargs)) header_params = { "accept": "application/json", "content-type": "application/json", - "if-match": kwargs.get("if_match", missing), + "opc-retry-token": kwargs.get("opc_retry_token", 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} @@ -1224,28 +1286,34 @@ def delete_project(self, project_id, **kwargs): if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 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) + header_params=header_params, + body=create_repository_details, + response_type="Repository") else: return self.base_client.call_api( resource_path=resource_path, method=method, - path_params=path_params, - header_params=header_params) + header_params=header_params, + body=create_repository_details, + response_type="Repository") - def get_deploy_artifact(self, deploy_artifact_id, **kwargs): + def create_trigger(self, create_trigger_details, **kwargs): """ - Retrieves a deployment artifact by identifier. + Creates a new Trigger. - :param str deploy_artifact_id: (required) - Unique artifact identifier. + :param oci.devops.models.CreateTriggerDetails create_trigger_details: (required) + Details for the new Trigger. + + :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 earlier due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected. :param str opc_request_id: (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. @@ -1258,38 +1326,30 @@ def get_deploy_artifact(self, deploy_artifact_id, **kwargs): 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.devops.models.DeployArtifact` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.devops.models.TriggerCreateResult` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use get_deploy_artifact API. + Click `here `__ to see an example of how to use create_trigger API. """ - resource_path = "/deployArtifacts/{deployArtifactId}" - method = "GET" + resource_path = "/triggers" + method = "POST" # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", + "opc_retry_token", "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "get_deploy_artifact got unknown kwargs: {!r}".format(extra_kwargs)) - - path_params = { - "deployArtifactId": deploy_artifact_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)) + "create_trigger got unknown kwargs: {!r}".format(extra_kwargs)) header_params = { "accept": "application/json", "content-type": "application/json", + "opc-retry-token": kwargs.get("opc_retry_token", 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} @@ -1301,30 +1361,34 @@ def get_deploy_artifact(self, deploy_artifact_id, **kwargs): if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) 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="DeployArtifact") + body=create_trigger_details, + response_type="TriggerCreateResult") else: return self.base_client.call_api( resource_path=resource_path, method=method, - path_params=path_params, header_params=header_params, - response_type="DeployArtifact") + body=create_trigger_details, + response_type="TriggerCreateResult") - def get_deploy_environment(self, deploy_environment_id, **kwargs): + def delete_build_pipeline(self, build_pipeline_id, **kwargs): """ - Retrieves a deployment environment by identifier. + Deletes a BuildPipeline resource by identifier - :param str deploy_environment_id: (required) - Unique environment identifier. + :param str build_pipeline_id: (required) + unique BuildPipeline identifier + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. :param str opc_request_id: (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. @@ -1337,27 +1401,28 @@ def get_deploy_environment(self, deploy_environment_id, **kwargs): 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.devops.models.DeployEnvironment` + :return: A :class:`~oci.response.Response` object with data of type None :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use get_deploy_environment API. + Click `here `__ to see an example of how to use delete_build_pipeline API. """ - resource_path = "/deployEnvironments/{deployEnvironmentId}" - method = "GET" + resource_path = "/buildPipelines/{buildPipelineId}" + 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( - "get_deploy_environment got unknown kwargs: {!r}".format(extra_kwargs)) + "delete_build_pipeline got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { - "deployEnvironmentId": deploy_environment_id + "buildPipelineId": build_pipeline_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -1369,6 +1434,7 @@ def get_deploy_environment(self, deploy_environment_id, **kwargs): 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} @@ -1387,23 +1453,24 @@ def get_deploy_environment(self, deploy_environment_id, **kwargs): resource_path=resource_path, method=method, path_params=path_params, - header_params=header_params, - response_type="DeployEnvironment") + 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, - response_type="DeployEnvironment") + header_params=header_params) - def get_deploy_pipeline(self, deploy_pipeline_id, **kwargs): + def delete_build_pipeline_stage(self, build_pipeline_stage_id, **kwargs): """ - Retrieves a deployment pipeline by identifier. + Deletes a Stage based on stage id provided in request - :param str deploy_pipeline_id: (required) - Unique pipeline identifier. + :param str build_pipeline_stage_id: (required) + Unique stage identifier. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. :param str opc_request_id: (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. @@ -1416,27 +1483,28 @@ def get_deploy_pipeline(self, deploy_pipeline_id, **kwargs): 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.devops.models.DeployPipeline` + :return: A :class:`~oci.response.Response` object with data of type None :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use get_deploy_pipeline API. + Click `here `__ to see an example of how to use delete_build_pipeline_stage API. """ - resource_path = "/deployPipelines/{deployPipelineId}" - method = "GET" + resource_path = "/buildPipelineStages/{buildPipelineStageId}" + 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( - "get_deploy_pipeline got unknown kwargs: {!r}".format(extra_kwargs)) + "delete_build_pipeline_stage got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { - "deployPipelineId": deploy_pipeline_id + "buildPipelineStageId": build_pipeline_stage_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -1448,6 +1516,7 @@ def get_deploy_pipeline(self, deploy_pipeline_id, **kwargs): 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} @@ -1466,23 +1535,24 @@ def get_deploy_pipeline(self, deploy_pipeline_id, **kwargs): resource_path=resource_path, method=method, path_params=path_params, - header_params=header_params, - response_type="DeployPipeline") + 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, - response_type="DeployPipeline") + header_params=header_params) - def get_deploy_stage(self, deploy_stage_id, **kwargs): + def delete_connection(self, connection_id, **kwargs): """ - Retrieves a deployment stage by identifier. + Deletes a Connection resource by identifier - :param str deploy_stage_id: (required) - Unique stage identifier. + :param str connection_id: (required) + unique Connection identifier + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. :param str opc_request_id: (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. @@ -1495,27 +1565,28 @@ def get_deploy_stage(self, deploy_stage_id, **kwargs): 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.devops.models.DeployStage` + :return: A :class:`~oci.response.Response` object with data of type None :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use get_deploy_stage API. + Click `here `__ to see an example of how to use delete_connection API. """ - resource_path = "/deployStages/{deployStageId}" - method = "GET" + resource_path = "/connections/{connectionId}" + 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( - "get_deploy_stage got unknown kwargs: {!r}".format(extra_kwargs)) + "delete_connection got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { - "deployStageId": deploy_stage_id + "connectionId": connection_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -1527,6 +1598,7 @@ def get_deploy_stage(self, deploy_stage_id, **kwargs): 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} @@ -1545,23 +1617,24 @@ def get_deploy_stage(self, deploy_stage_id, **kwargs): resource_path=resource_path, method=method, path_params=path_params, - header_params=header_params, - response_type="DeployStage") + 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, - response_type="DeployStage") + header_params=header_params) - def get_deployment(self, deployment_id, **kwargs): + def delete_deploy_artifact(self, deploy_artifact_id, **kwargs): """ - Retrieves a deployment by identifier. + Deletes a deployment artifact resource by identifier. - :param str deployment_id: (required) - Unique deployment identifier. + :param str deploy_artifact_id: (required) + Unique artifact identifier. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. :param str opc_request_id: (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. @@ -1574,27 +1647,28 @@ def get_deployment(self, deployment_id, **kwargs): 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.devops.models.Deployment` + :return: A :class:`~oci.response.Response` object with data of type None :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use get_deployment API. + Click `here `__ to see an example of how to use delete_deploy_artifact API. """ - resource_path = "/deployments/{deploymentId}" - method = "GET" + resource_path = "/deployArtifacts/{deployArtifactId}" + 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( - "get_deployment got unknown kwargs: {!r}".format(extra_kwargs)) + "delete_deploy_artifact got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { - "deploymentId": deployment_id + "deployArtifactId": deploy_artifact_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -1606,6 +1680,7 @@ def get_deployment(self, deployment_id, **kwargs): 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} @@ -1624,23 +1699,24 @@ def get_deployment(self, deployment_id, **kwargs): resource_path=resource_path, method=method, path_params=path_params, - header_params=header_params, - response_type="Deployment") + 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, - response_type="Deployment") + header_params=header_params) - def get_project(self, project_id, **kwargs): + def delete_deploy_environment(self, deploy_environment_id, **kwargs): """ - Retrieves a project by identifier. + Deletes a deployment environment resource by identifier. - :param str project_id: (required) - Unique project identifier. + :param str deploy_environment_id: (required) + Unique environment identifier. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. :param str opc_request_id: (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. @@ -1653,27 +1729,28 @@ def get_project(self, project_id, **kwargs): 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.devops.models.Project` + :return: A :class:`~oci.response.Response` object with data of type None :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use get_project API. + Click `here `__ to see an example of how to use delete_deploy_environment API. """ - resource_path = "/projects/{projectId}" - method = "GET" + resource_path = "/deployEnvironments/{deployEnvironmentId}" + 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( - "get_project got unknown kwargs: {!r}".format(extra_kwargs)) + "delete_deploy_environment got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { - "projectId": project_id + "deployEnvironmentId": deploy_environment_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -1685,6 +1762,7 @@ def get_project(self, project_id, **kwargs): 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} @@ -1703,23 +1781,24 @@ def get_project(self, project_id, **kwargs): resource_path=resource_path, method=method, path_params=path_params, - header_params=header_params, - response_type="Project") + 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, - response_type="Project") + header_params=header_params) - def get_work_request(self, work_request_id, **kwargs): + def delete_deploy_pipeline(self, deploy_pipeline_id, **kwargs): """ - Retrieves the status of the work request with the given ID. + Deletes a deployment pipeline resource by identifier. - :param str work_request_id: (required) - The ID of the asynchronous work request. + :param str deploy_pipeline_id: (required) + Unique pipeline identifier. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. :param str opc_request_id: (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. @@ -1732,27 +1811,28 @@ def get_work_request(self, work_request_id, **kwargs): 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.devops.models.WorkRequest` + :return: A :class:`~oci.response.Response` object with data of type None :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use get_work_request API. + Click `here `__ to see an example of how to use delete_deploy_pipeline API. """ - resource_path = "/workRequests/{workRequestId}" - method = "GET" + resource_path = "/deployPipelines/{deployPipelineId}" + 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( - "get_work_request got unknown kwargs: {!r}".format(extra_kwargs)) + "delete_deploy_pipeline got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { - "workRequestId": work_request_id + "deployPipelineId": deploy_pipeline_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -1764,6 +1844,7 @@ def get_work_request(self, work_request_id, **kwargs): 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} @@ -1782,53 +1863,24 @@ def get_work_request(self, work_request_id, **kwargs): resource_path=resource_path, method=method, path_params=path_params, - header_params=header_params, - response_type="WorkRequest") + 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, - response_type="WorkRequest") + header_params=header_params) - def list_deploy_artifacts(self, **kwargs): + def delete_deploy_stage(self, deploy_stage_id, **kwargs): """ - Returns a list of deployment artifacts. - - - :param str id: (optional) - Unique identifier or OCID for listing a single resource by ID. - - :param str project_id: (optional) - unique project identifier - - :param str compartment_id: (optional) - The OCID of the compartment in which to list resources. - - :param str lifecycle_state: (optional) - A filter to return only DeployArtifacts that matches the given lifecycleState. - - Allowed values are: "CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED" - - :param str display_name: (optional) - A filter to return only resources that match the entire display name given. - - :param int limit: (optional) - The maximum number of items to return. - - :param str page: (optional) - The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. - - :param str sort_order: (optional) - The sort order to use. Use either ascending or descending. + Deletes a deployment stage resource by identifier. - Allowed values are: "ASC", "DESC" - :param str sort_by: (optional) - The field to sort by. Only one sort order may be provided. Default order for time created is descending. Default order for display name is ascending. If no value is specified, then the default time created value is considered. + :param str deploy_stage_id: (required) + Unique stage identifier. - Allowed values are: "timeCreated", "displayName" + :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, provide the request ID. @@ -1841,71 +1893,40 @@ def list_deploy_artifacts(self, **kwargs): 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.devops.models.DeployArtifactCollection` + :return: A :class:`~oci.response.Response` object with data of type None :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use list_deploy_artifacts API. + Click `here `__ to see an example of how to use delete_deploy_stage API. """ - resource_path = "/deployArtifacts" - method = "GET" + resource_path = "/deployStages/{deployStageId}" + method = "DELETE" # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", - "id", - "project_id", - "compartment_id", - "lifecycle_state", - "display_name", - "limit", - "page", - "sort_order", - "sort_by", + "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( - "list_deploy_artifacts got unknown kwargs: {!r}".format(extra_kwargs)) - - if 'lifecycle_state' in kwargs: - lifecycle_state_allowed_values = ["CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED"] - 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) - ) + "delete_deploy_stage got unknown kwargs: {!r}".format(extra_kwargs)) - 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) - ) + path_params = { + "deployStageId": deploy_stage_id + } - 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) - ) + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} - query_params = { - "id": kwargs.get("id", missing), - "projectId": kwargs.get("project_id", missing), - "compartmentId": kwargs.get("compartment_id", missing), - "lifecycleState": kwargs.get("lifecycle_state", missing), - "displayName": kwargs.get("display_name", 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} + 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} @@ -1923,54 +1944,25 @@ def list_deploy_artifacts(self, **kwargs): self.base_client.call_api, resource_path=resource_path, method=method, - query_params=query_params, - header_params=header_params, - response_type="DeployArtifactCollection") + path_params=path_params, + header_params=header_params) else: return self.base_client.call_api( resource_path=resource_path, method=method, - query_params=query_params, - header_params=header_params, - response_type="DeployArtifactCollection") + path_params=path_params, + header_params=header_params) - def list_deploy_environments(self, **kwargs): + def delete_project(self, project_id, **kwargs): """ - Returns a list of deployment environments. - - - :param str project_id: (optional) - unique project identifier - - :param str compartment_id: (optional) - The OCID of the compartment in which to list resources. - - :param str id: (optional) - Unique identifier or OCID for listing a single resource by ID. - - :param str lifecycle_state: (optional) - A filter to return only DeployEnvironments that matches the given lifecycleState. - - Allowed values are: "CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED" - - :param str display_name: (optional) - A filter to return only resources that match the entire display name given. - - :param int limit: (optional) - The maximum number of items to return. - - :param str page: (optional) - The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. - - :param str sort_order: (optional) - The sort order to use. Use either ascending or descending. + Deletes a project resource by identifier - Allowed values are: "ASC", "DESC" - :param str sort_by: (optional) - The field to sort by. Only one sort order may be provided. Default order for time created is descending. Default order for display name is ascending. If no value is specified, then the default time created value is considered. + :param str project_id: (required) + Unique project identifier. - Allowed values are: "timeCreated", "displayName" + :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, provide the request ID. @@ -1983,36 +1975,4636 @@ def list_deploy_environments(self, **kwargs): 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.devops.models.DeployEnvironmentCollection` + :return: A :class:`~oci.response.Response` object with data of type None :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use list_deploy_environments API. + Click `here `__ to see an example of how to use delete_project API. """ - resource_path = "/deployEnvironments" - method = "GET" + resource_path = "/projects/{projectId}" + method = "DELETE" # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", - "project_id", - "compartment_id", - "id", - "lifecycle_state", - "display_name", - "limit", - "page", - "sort_order", - "sort_by", + "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( - "list_deploy_environments got unknown kwargs: {!r}".format(extra_kwargs)) + "delete_project got unknown kwargs: {!r}".format(extra_kwargs)) - if 'lifecycle_state' in kwargs: - lifecycle_state_allowed_values = ["CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED"] + 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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + 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_ref(self, repository_id, ref_name, **kwargs): + """ + Deletes a Repository's Ref by its name. Returns an error if the name is ambiguous. Can be disambiguated by using full names like \"heads/\" or \"tags/\". + + + :param str repository_id: (required) + unique Repository identifier. + + :param str ref_name: (required) + A filter to return only resources that match the given Ref name. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + + :param str opc_retry_token: (optional) + A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated earlier due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected. + + :param str opc_request_id: (optional) + Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, 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. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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` + + :example: + Click `here `__ to see an example of how to use delete_ref API. + """ + resource_path = "/repositories/{repositoryId}/refs/{refName}" + method = "DELETE" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "if_match", + "opc_retry_token", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "delete_ref got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "repositoryId": repository_id, + "refName": ref_name + } + + 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-retry-token": kwargs.get("opc_retry_token", 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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + 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_repository(self, repository_id, **kwargs): + """ + Deletes a Repository resource by identifier + + + :param str repository_id: (required) + unique Repository identifier. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + + :param str opc_request_id: (optional) + Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, 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. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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` + + :example: + Click `here `__ to see an example of how to use delete_repository API. + """ + resource_path = "/repositories/{repositoryId}" + 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_repository got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "repositoryId": repository_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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + 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_trigger(self, trigger_id, **kwargs): + """ + Deletes a Trigger resource by identifier + + + :param str trigger_id: (required) + unique Trigger identifier + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + + :param str opc_request_id: (optional) + Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, 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. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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` + + :example: + Click `here `__ to see an example of how to use delete_trigger API. + """ + resource_path = "/triggers/{triggerId}" + 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_trigger got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "triggerId": trigger_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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + 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_build_pipeline(self, build_pipeline_id, **kwargs): + """ + Gets a BuildPipeline by identifier + + + :param str build_pipeline_id: (required) + unique BuildPipeline identifier + + :param str opc_request_id: (optional) + Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, 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. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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.devops.models.BuildPipeline` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_build_pipeline API. + """ + resource_path = "/buildPipelines/{buildPipelineId}" + 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_build_pipeline got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "buildPipelineId": build_pipeline_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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + 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="BuildPipeline") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="BuildPipeline") + + def get_build_pipeline_stage(self, build_pipeline_stage_id, **kwargs): + """ + Gets a Stage based on the stage id provided in request + + + :param str build_pipeline_stage_id: (required) + Unique stage identifier. + + :param str opc_request_id: (optional) + Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, 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. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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.devops.models.BuildPipelineStage` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_build_pipeline_stage API. + """ + resource_path = "/buildPipelineStages/{buildPipelineStageId}" + 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_build_pipeline_stage got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "buildPipelineStageId": build_pipeline_stage_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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + 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="BuildPipelineStage") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="BuildPipelineStage") + + def get_build_run(self, build_run_id, **kwargs): + """ + Returns the details of a build exection for a given build run id. + + + :param str build_run_id: (required) + Unique build run identifier. + + :param str opc_request_id: (optional) + Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, 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. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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.devops.models.BuildRun` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_build_run API. + """ + resource_path = "/buildRuns/{buildRunId}" + 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_build_run got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "buildRunId": build_run_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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + 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="BuildRun") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="BuildRun") + + def get_commit(self, repository_id, commit_id, **kwargs): + """ + Gets a Repository's Commit by commitId + + + :param str repository_id: (required) + unique Repository identifier. + + :param str commit_id: (required) + A filter to return only resources that match the given commit Id. + + :param str opc_request_id: (optional) + Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, 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. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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.devops.models.RepositoryCommit` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_commit API. + """ + resource_path = "/repositories/{repositoryId}/commits/{commitId}" + 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_commit got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "repositoryId": repository_id, + "commitId": commit_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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + 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="RepositoryCommit") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="RepositoryCommit") + + def get_commit_diff(self, repository_id, target_version, **kwargs): + """ + Compares two revisions for their differences. Supports comparison between two refs or commits. + + + :param str repository_id: (required) + unique Repository identifier. + + :param str target_version: (required) + The commit or ref name where changes are coming from + + :param str base_version: (optional) + The commit or ref name to compare changes against. If baseVersion is not provided, the diff will be gone against an empty tree. + + :param bool is_comparison_from_merge_base: (optional) + boolean for whether to use merge base or most recent revision + + :param str opc_request_id: (optional) + Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, 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. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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.devops.models.DiffResponse` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_commit_diff API. + """ + resource_path = "/repositories/{repositoryId}/diff" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "base_version", + "is_comparison_from_merge_base", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "get_commit_diff got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "repositoryId": repository_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)) + + query_params = { + "baseVersion": kwargs.get("base_version", missing), + "targetVersion": target_version, + "isComparisonFromMergeBase": kwargs.get("is_comparison_from_merge_base", 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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="DiffResponse") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="DiffResponse") + + def get_connection(self, connection_id, **kwargs): + """ + Gets a Connection by identifier + + + :param str connection_id: (required) + unique Connection identifier + + :param str opc_request_id: (optional) + Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, 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. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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.devops.models.Connection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_connection API. + """ + resource_path = "/connections/{connectionId}" + 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_connection got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "connectionId": connection_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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + 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="Connection") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="Connection") + + def get_deploy_artifact(self, deploy_artifact_id, **kwargs): + """ + Retrieves a deployment artifact by identifier. + + + :param str deploy_artifact_id: (required) + Unique artifact identifier. + + :param str opc_request_id: (optional) + Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, 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. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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.devops.models.DeployArtifact` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_deploy_artifact API. + """ + resource_path = "/deployArtifacts/{deployArtifactId}" + 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_deploy_artifact got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "deployArtifactId": deploy_artifact_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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + 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="DeployArtifact") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="DeployArtifact") + + def get_deploy_environment(self, deploy_environment_id, **kwargs): + """ + Retrieves a deployment environment by identifier. + + + :param str deploy_environment_id: (required) + Unique environment identifier. + + :param str opc_request_id: (optional) + Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, 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. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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.devops.models.DeployEnvironment` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_deploy_environment API. + """ + resource_path = "/deployEnvironments/{deployEnvironmentId}" + 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_deploy_environment got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "deployEnvironmentId": deploy_environment_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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + 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="DeployEnvironment") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="DeployEnvironment") + + def get_deploy_pipeline(self, deploy_pipeline_id, **kwargs): + """ + Retrieves a deployment pipeline by identifier. + + + :param str deploy_pipeline_id: (required) + Unique pipeline identifier. + + :param str opc_request_id: (optional) + Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, 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. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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.devops.models.DeployPipeline` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_deploy_pipeline API. + """ + resource_path = "/deployPipelines/{deployPipelineId}" + 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_deploy_pipeline got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "deployPipelineId": deploy_pipeline_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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + 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="DeployPipeline") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="DeployPipeline") + + def get_deploy_stage(self, deploy_stage_id, **kwargs): + """ + Retrieves a deployment stage by identifier. + + + :param str deploy_stage_id: (required) + Unique stage identifier. + + :param str opc_request_id: (optional) + Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, 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. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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.devops.models.DeployStage` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_deploy_stage API. + """ + resource_path = "/deployStages/{deployStageId}" + 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_deploy_stage got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "deployStageId": deploy_stage_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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + 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="DeployStage") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="DeployStage") + + def get_deployment(self, deployment_id, **kwargs): + """ + Retrieves a deployment by identifier. + + + :param str deployment_id: (required) + Unique deployment identifier. + + :param str opc_request_id: (optional) + Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, 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. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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.devops.models.Deployment` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_deployment API. + """ + resource_path = "/deployments/{deploymentId}" + 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_deployment got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "deploymentId": deployment_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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + 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="Deployment") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="Deployment") + + def get_file_diff(self, repository_id, file_path, base_version, target_version, **kwargs): + """ + Gets the line-by-line difference between files on different commits. + + + :param str repository_id: (required) + unique Repository identifier. + + :param str file_path: (required) + Path to a file within a repository. + + :param str base_version: (required) + The branch to compare changes against + + :param str target_version: (required) + The branch where changes are coming from + + :param bool is_comparison_from_merge_base: (optional) + boolean for whether to use merge base or most recent revision + + :param str opc_request_id: (optional) + Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, 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. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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.devops.models.FileDiffResponse` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_file_diff API. + """ + resource_path = "/repositories/{repositoryId}/diffs/{filePath}" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "is_comparison_from_merge_base", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "get_file_diff got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "repositoryId": repository_id, + "filePath": file_path + } + + 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)) + + query_params = { + "baseVersion": base_version, + "targetVersion": target_version, + "isComparisonFromMergeBase": kwargs.get("is_comparison_from_merge_base", 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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="FileDiffResponse") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="FileDiffResponse") + + def get_mirror_record(self, repository_id, mirror_record_type, **kwargs): + """ + Returns either current mirror record or last successful mirror record for a specific mirror repository + + + :param str repository_id: (required) + unique Repository identifier. + + :param str mirror_record_type: (required) + The field of mirror record type. Only one mirror record type may be provided. + current - The current mirror record. + lastSuccessful - The last successful mirror record + + Allowed values are: "current", "lastSuccessful" + + :param str opc_request_id: (optional) + Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, 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. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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.devops.models.RepositoryMirrorRecord` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_mirror_record API. + """ + resource_path = "/repositories/{repositoryId}/mirrorRecords/{mirrorRecordType}" + 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_mirror_record got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "repositoryId": repository_id, + "mirrorRecordType": mirror_record_type + } + + 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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + 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="RepositoryMirrorRecord") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="RepositoryMirrorRecord") + + def get_object(self, repository_id, **kwargs): + """ + Get blob of specific branch name/commit id and file path + + + :param str repository_id: (required) + unique Repository identifier. + + :param str file_path: (optional) + A filter to return only commits that affect any of the specified paths. + + :param str ref_name: (optional) + A filter to return only resources that match the given Ref name. + + :param str opc_request_id: (optional) + Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, 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. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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.devops.models.RepositoryObject` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_object API. + """ + resource_path = "/repositories/{repositoryId}/object" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "file_path", + "ref_name", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "get_object got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "repositoryId": repository_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)) + + query_params = { + "filePath": kwargs.get("file_path", missing), + "refName": kwargs.get("ref_name", 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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="RepositoryObject") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="RepositoryObject") + + def get_object_content(self, repository_id, sha, **kwargs): + """ + Get contents of a specified Object + + + :param str repository_id: (required) + unique Repository identifier. + + :param str sha: (required) + The SHA of a blob or tree + + :param str file_path: (optional) + A filter to return only commits that affect any of the specified paths. + + :param str opc_request_id: (optional) + Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, 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. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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` + + :example: + Click `here `__ to see an example of how to use get_object_content API. + """ + resource_path = "/repositories/{repositoryId}/objects/{sha}/content" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "file_path", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "get_object_content got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "repositoryId": repository_id, + "sha": sha + } + + 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)) + + query_params = { + "filePath": kwargs.get("file_path", 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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_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, + query_params=query_params, + header_params=header_params, + response_type="stream") + + def get_project(self, project_id, **kwargs): + """ + Retrieves a project by identifier. + + + :param str project_id: (required) + Unique project identifier. + + :param str opc_request_id: (optional) + Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, 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. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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.devops.models.Project` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_project API. + """ + 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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + 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_ref(self, repository_id, ref_name, **kwargs): + """ + Gets a Repository's Ref by its name with preference for branches over tags if the name is ambiguous. Can be disambiguated by using full names like \"heads/\" or \"tags/\". + + + :param str repository_id: (required) + unique Repository identifier. + + :param str ref_name: (required) + A filter to return only resources that match the given Ref name. + + :param str opc_request_id: (optional) + Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, 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. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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.devops.models.RepositoryRef` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_ref API. + """ + resource_path = "/repositories/{repositoryId}/refs/{refName}" + 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_ref got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "repositoryId": repository_id, + "refName": ref_name + } + + 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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + 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="RepositoryRef") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="RepositoryRef") + + def get_repository(self, repository_id, **kwargs): + """ + Gets a Repository by identifier + + + :param str repository_id: (required) + unique Repository identifier. + + :param str opc_request_id: (optional) + Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + + :param list[str] fields: (optional) + Fields param can contain multiple flags useful in deciding the API functionality + + Allowed values are: "branchCount", "commitCount", "sizeInBytes" + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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.devops.models.Repository` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_repository API. + """ + resource_path = "/repositories/{repositoryId}" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "opc_request_id", + "fields" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "get_repository got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "repositoryId": repository_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)) + + if 'fields' in kwargs: + fields_allowed_values = ["branchCount", "commitCount", "sizeInBytes"] + for fields_item in kwargs['fields']: + if fields_item not in fields_allowed_values: + raise ValueError( + "Invalid value for `fields`, must be one of {0}".format(fields_allowed_values) + ) + + query_params = { + "fields": self.base_client.generate_collection_format_param(kwargs.get("fields", missing), 'multi') + } + 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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="Repository") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="Repository") + + def get_repository_archive_content(self, repository_id, **kwargs): + """ + Return the archived repository information + + + :param str repository_id: (required) + unique Repository identifier. + + :param str ref_name: (optional) + A filter to return only resources that match the given Ref name. + + :param str format: (optional) + The archive format query parm for download repo endpoint. + + :param str opc_request_id: (optional) + Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, 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. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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` + + :example: + Click `here `__ to see an example of how to use get_repository_archive_content API. + """ + resource_path = "/repositories/{repositoryId}/archive/content" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "ref_name", + "format", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "get_repository_archive_content got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "repositoryId": repository_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)) + + query_params = { + "refName": kwargs.get("ref_name", missing), + "format": kwargs.get("format", 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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_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, + query_params=query_params, + header_params=header_params, + response_type="stream") + + def get_repository_file_lines(self, repository_id, file_path, revision, **kwargs): + """ + Get lines of a specified file. Supports starting line number and limit. + + + :param str repository_id: (required) + unique Repository identifier. + + :param str file_path: (required) + Path to a file within a repository. + + :param str revision: (required) + Retrive file lines from specific revision. + + :param int start_line_number: (optional) + Line number from where to start returning file lines. 1 indexed. + + :param int limit: (optional) + The maximum number of items to return. + + :param str opc_request_id: (optional) + Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, 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. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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.devops.models.RepositoryFileLines` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_repository_file_lines API. + """ + resource_path = "/repositories/{repositoryId}/files/{filePath}/lines" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "start_line_number", + "limit", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "get_repository_file_lines got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "repositoryId": repository_id, + "filePath": file_path + } + + 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)) + + query_params = { + "revision": revision, + "startLineNumber": kwargs.get("start_line_number", missing), + "limit": kwargs.get("limit", 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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="RepositoryFileLines") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="RepositoryFileLines") + + def get_trigger(self, trigger_id, **kwargs): + """ + Gets a Trigger by identifier + + + :param str trigger_id: (required) + unique Trigger identifier + + :param str opc_request_id: (optional) + Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, 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. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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.devops.models.Trigger` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_trigger API. + """ + resource_path = "/triggers/{triggerId}" + 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_trigger got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "triggerId": trigger_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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + 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="Trigger") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="Trigger") + + def get_work_request(self, work_request_id, **kwargs): + """ + Retrieves the status of the work request with the given ID. + + + :param str work_request_id: (required) + The ID of the asynchronous work request. + + :param str opc_request_id: (optional) + Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, 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. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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.devops.models.WorkRequest` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_work_request API. + """ + 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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + 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 list_authors(self, repository_id, **kwargs): + """ + Get a list of all the authors + + + :param str repository_id: (required) + unique Repository identifier. + + :param str ref_name: (optional) + A filter to return only resources that match the given Ref name. + + :param int limit: (optional) + The maximum number of items to return. + + :param str page: (optional) + The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + + :param str sort_order: (optional) + The sort order to use. Use either ascending or descending. + + Allowed values are: "ASC", "DESC" + + :param str opc_request_id: (optional) + Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, 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. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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.devops.models.RepositoryAuthorCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_authors API. + """ + resource_path = "/repositories/{repositoryId}/authors" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "ref_name", + "limit", + "page", + "sort_order", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_authors got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "repositoryId": repository_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)) + + 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) + ) + + query_params = { + "refName": kwargs.get("ref_name", missing), + "limit": kwargs.get("limit", missing), + "page": kwargs.get("page", missing), + "sortOrder": kwargs.get("sort_order", 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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="RepositoryAuthorCollection") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="RepositoryAuthorCollection") + + def list_build_pipeline_stages(self, **kwargs): + """ + Returns summary of list of all Stages in a compartment or buildPipeline + + + :param str id: (optional) + Unique identifier or OCID for listing a single resource by ID. + + :param str build_pipeline_id: (optional) + The ID of the parent build pipeline. + + :param str compartment_id: (optional) + The OCID of the compartment in which to list resources. + + :param str lifecycle_state: (optional) + A filter to return the stages that match with the given lifecycleState. + + Allowed values are: "CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED" + + :param str display_name: (optional) + A filter to return only resources that match the entire display name given. + + :param int limit: (optional) + The maximum number of items to return. + + :param str page: (optional) + The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + + :param str sort_order: (optional) + The sort order to use. Use either ascending or descending. + + Allowed values are: "ASC", "DESC" + + :param str sort_by: (optional) + The field to sort by. Only one sort order may be provided. Default order for time created is descending. Default order for display name is ascending. If no value is specified, then the default time created value is considered. + + 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, 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. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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.devops.models.BuildPipelineStageCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_build_pipeline_stages API. + """ + resource_path = "/buildPipelineStages" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "id", + "build_pipeline_id", + "compartment_id", + "lifecycle_state", + "display_name", + "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_build_pipeline_stages got unknown kwargs: {!r}".format(extra_kwargs)) + + if 'lifecycle_state' in kwargs: + lifecycle_state_allowed_values = ["CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED"] + 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 = { + "id": kwargs.get("id", missing), + "buildPipelineId": kwargs.get("build_pipeline_id", missing), + "compartmentId": kwargs.get("compartment_id", missing), + "lifecycleState": kwargs.get("lifecycle_state", missing), + "displayName": kwargs.get("display_name", 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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + 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="BuildPipelineStageCollection") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="BuildPipelineStageCollection") + + def list_build_pipelines(self, **kwargs): + """ + Returns a list of BuildPipelines. + + + :param str id: (optional) + Unique identifier or OCID for listing a single resource by ID. + + :param str project_id: (optional) + unique project identifier + + :param str compartment_id: (optional) + The OCID of the compartment in which to list resources. + + :param str lifecycle_state: (optional) + A filter to return only BuildPipelines that matches the given lifecycleState + + Allowed values are: "CREATING", "UPDATING", "ACTIVE", "INACTIVE", "DELETING", "DELETED", "FAILED" + + :param str display_name: (optional) + A filter to return only resources that match the entire display name given. + + :param int limit: (optional) + The maximum number of items to return. + + :param str page: (optional) + The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + + :param str sort_order: (optional) + The sort order to use. Use either ascending or descending. + + Allowed values are: "ASC", "DESC" + + :param str sort_by: (optional) + The field to sort by. Only one sort order may be provided. Default order for time created is descending. Default order for display name is ascending. If no value is specified, then the default time created value is considered. + + 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, 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. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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.devops.models.BuildPipelineCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_build_pipelines API. + """ + resource_path = "/buildPipelines" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "id", + "project_id", + "compartment_id", + "lifecycle_state", + "display_name", + "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_build_pipelines got unknown kwargs: {!r}".format(extra_kwargs)) + + if 'lifecycle_state' in kwargs: + lifecycle_state_allowed_values = ["CREATING", "UPDATING", "ACTIVE", "INACTIVE", "DELETING", "DELETED", "FAILED"] + 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 = { + "id": kwargs.get("id", missing), + "projectId": kwargs.get("project_id", missing), + "compartmentId": kwargs.get("compartment_id", missing), + "lifecycleState": kwargs.get("lifecycle_state", missing), + "displayName": kwargs.get("display_name", 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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + 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="BuildPipelineCollection") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="BuildPipelineCollection") + + def list_build_runs(self, **kwargs): + """ + Returns a list of build runs summary. + + + :param str id: (optional) + Unique identifier or OCID for listing a single resource by ID. + + :param str build_pipeline_id: (optional) + Unique build pipeline identifier. + + :param str project_id: (optional) + unique project identifier + + :param str compartment_id: (optional) + The OCID of the compartment in which to list resources. + + :param str display_name: (optional) + A filter to return only resources that match the entire display name given. + + :param str lifecycle_state: (optional) + A filter to return only Build Runs that matches the given lifecycleState. + + Allowed values are: "ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED" + + :param int limit: (optional) + The maximum number of items to return. + + :param str page: (optional) + The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + + :param str sort_order: (optional) + The sort order to use. Use either ascending or descending. + + Allowed values are: "ASC", "DESC" + + :param str sort_by: (optional) + The field to sort by. Only one sort order may be provided. Default order for time created is descending. Default order for display name is ascending. If no value is specified, then the default time created value is considered. + + 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, 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. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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.devops.models.BuildRunSummaryCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_build_runs API. + """ + resource_path = "/buildRuns" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "id", + "build_pipeline_id", + "project_id", + "compartment_id", + "display_name", + "lifecycle_state", + "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_build_runs got unknown kwargs: {!r}".format(extra_kwargs)) + + if 'lifecycle_state' in kwargs: + lifecycle_state_allowed_values = ["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED"] + 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 = { + "id": kwargs.get("id", missing), + "buildPipelineId": kwargs.get("build_pipeline_id", missing), + "projectId": kwargs.get("project_id", missing), + "compartmentId": kwargs.get("compartment_id", missing), + "displayName": kwargs.get("display_name", missing), + "lifecycleState": kwargs.get("lifecycle_state", 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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + 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="BuildRunSummaryCollection") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="BuildRunSummaryCollection") + + def list_commit_diffs(self, repository_id, base_version, target_version, **kwargs): + """ + Compares two revisions and lists the differences. Supports comparison between two refs or commits. + + + :param str repository_id: (required) + unique Repository identifier. + + :param str base_version: (required) + The commit or ref name to compare changes against + + :param str target_version: (required) + The commit or ref name where changes are coming from + + :param bool is_comparison_from_merge_base: (optional) + boolean for whether to use merge base or most recent revision + + :param int limit: (optional) + The maximum number of items to return. + + :param str page: (optional) + The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + + :param str opc_request_id: (optional) + Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, 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. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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.devops.models.DiffCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_commit_diffs API. + """ + resource_path = "/repositories/{repositoryId}/diffs" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "is_comparison_from_merge_base", + "limit", + "page", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_commit_diffs got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "repositoryId": repository_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)) + + query_params = { + "baseVersion": base_version, + "targetVersion": target_version, + "isComparisonFromMergeBase": kwargs.get("is_comparison_from_merge_base", missing), + "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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="DiffCollection") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="DiffCollection") + + def list_commits(self, repository_id, **kwargs): + """ + Returns a list of Commits. + + + :param str repository_id: (required) + unique Repository identifier. + + :param str ref_name: (optional) + A filter to return only resources that match the given Ref name. + + :param str exclude_ref_name: (optional) + A filter to exclude commits that match the given Ref name. + + :param str file_path: (optional) + A filter to return only commits that affect any of the specified paths. + + :param datetime timestamp_greater_than_or_equal_to: (optional) + A filter to return commits only created after the specified timestamp value. + + :param datetime timestamp_less_than_or_equal_to: (optional) + A filter to return commits only created before the specified timestamp value. + + :param str commit_message: (optional) + A filter to return any commits that contains the given message. + + :param str author_name: (optional) + A filter to return any commits that are pushed by the requested author. + + :param int limit: (optional) + The maximum number of items to return. + + :param str page: (optional) + The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + + :param str opc_request_id: (optional) + Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, 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. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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.devops.models.RepositoryCommitCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_commits API. + """ + resource_path = "/repositories/{repositoryId}/commits" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "ref_name", + "exclude_ref_name", + "file_path", + "timestamp_greater_than_or_equal_to", + "timestamp_less_than_or_equal_to", + "commit_message", + "author_name", + "limit", + "page", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_commits got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "repositoryId": repository_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)) + + query_params = { + "refName": kwargs.get("ref_name", missing), + "excludeRefName": kwargs.get("exclude_ref_name", missing), + "filePath": kwargs.get("file_path", missing), + "timestampGreaterThanOrEqualTo": kwargs.get("timestamp_greater_than_or_equal_to", missing), + "timestampLessThanOrEqualTo": kwargs.get("timestamp_less_than_or_equal_to", missing), + "commitMessage": kwargs.get("commit_message", missing), + "authorName": kwargs.get("author_name", missing), + "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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="RepositoryCommitCollection") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="RepositoryCommitCollection") + + def list_connections(self, **kwargs): + """ + Returns a list of Connections. + + + :param str id: (optional) + Unique identifier or OCID for listing a single resource by ID. + + :param str project_id: (optional) + unique project identifier + + :param str compartment_id: (optional) + The OCID of the compartment in which to list resources. + + :param str lifecycle_state: (optional) + A filter to return only Connections that matches the given lifecycleState + + Allowed values are: "ACTIVE" + + :param str display_name: (optional) + A filter to return only resources that match the entire display name given. + + :param str connection_type: (optional) + A filter to return only resources that match the connection type given. + + Allowed values are: "GITHUB_ACCESS_TOKEN", "GITLAB_ACCESS_TOKEN" + + :param int limit: (optional) + The maximum number of items to return. + + :param str page: (optional) + The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + + :param str sort_order: (optional) + The sort order to use. Use either ascending or descending. + + Allowed values are: "ASC", "DESC" + + :param str sort_by: (optional) + The field to sort by. Only one sort order may be provided. Default order for time created is descending. Default order for display name is ascending. If no value is specified, then the default time created value is considered. + + 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, 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. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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.devops.models.ConnectionCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_connections API. + """ + resource_path = "/connections" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "id", + "project_id", + "compartment_id", + "lifecycle_state", + "display_name", + "connection_type", + "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_connections got unknown kwargs: {!r}".format(extra_kwargs)) + + if 'lifecycle_state' in kwargs: + lifecycle_state_allowed_values = ["ACTIVE"] + 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 'connection_type' in kwargs: + connection_type_allowed_values = ["GITHUB_ACCESS_TOKEN", "GITLAB_ACCESS_TOKEN"] + if kwargs['connection_type'] not in connection_type_allowed_values: + raise ValueError( + "Invalid value for `connection_type`, must be one of {0}".format(connection_type_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 = { + "id": kwargs.get("id", missing), + "projectId": kwargs.get("project_id", missing), + "compartmentId": kwargs.get("compartment_id", missing), + "lifecycleState": kwargs.get("lifecycle_state", missing), + "displayName": kwargs.get("display_name", missing), + "connectionType": kwargs.get("connection_type", 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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + 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="ConnectionCollection") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="ConnectionCollection") + + def list_deploy_artifacts(self, **kwargs): + """ + Returns a list of deployment artifacts. + + + :param str id: (optional) + Unique identifier or OCID for listing a single resource by ID. + + :param str project_id: (optional) + unique project identifier + + :param str compartment_id: (optional) + The OCID of the compartment in which to list resources. + + :param str lifecycle_state: (optional) + A filter to return only DeployArtifacts that matches the given lifecycleState. + + Allowed values are: "CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED" + + :param str display_name: (optional) + A filter to return only resources that match the entire display name given. + + :param int limit: (optional) + The maximum number of items to return. + + :param str page: (optional) + The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + + :param str sort_order: (optional) + The sort order to use. Use either ascending or descending. + + Allowed values are: "ASC", "DESC" + + :param str sort_by: (optional) + The field to sort by. Only one sort order may be provided. Default order for time created is descending. Default order for display name is ascending. If no value is specified, then the default time created value is considered. + + 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, 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. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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.devops.models.DeployArtifactCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_deploy_artifacts API. + """ + resource_path = "/deployArtifacts" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "id", + "project_id", + "compartment_id", + "lifecycle_state", + "display_name", + "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_deploy_artifacts got unknown kwargs: {!r}".format(extra_kwargs)) + + if 'lifecycle_state' in kwargs: + lifecycle_state_allowed_values = ["CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED"] + 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 = { + "id": kwargs.get("id", missing), + "projectId": kwargs.get("project_id", missing), + "compartmentId": kwargs.get("compartment_id", missing), + "lifecycleState": kwargs.get("lifecycle_state", missing), + "displayName": kwargs.get("display_name", 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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + 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="DeployArtifactCollection") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="DeployArtifactCollection") + + def list_deploy_environments(self, **kwargs): + """ + Returns a list of deployment environments. + + + :param str project_id: (optional) + unique project identifier + + :param str compartment_id: (optional) + The OCID of the compartment in which to list resources. + + :param str id: (optional) + Unique identifier or OCID for listing a single resource by ID. + + :param str lifecycle_state: (optional) + A filter to return only DeployEnvironments that matches the given lifecycleState. + + Allowed values are: "CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED" + + :param str display_name: (optional) + A filter to return only resources that match the entire display name given. + + :param int limit: (optional) + The maximum number of items to return. + + :param str page: (optional) + The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + + :param str sort_order: (optional) + The sort order to use. Use either ascending or descending. + + Allowed values are: "ASC", "DESC" + + :param str sort_by: (optional) + The field to sort by. Only one sort order may be provided. Default order for time created is descending. Default order for display name is ascending. If no value is specified, then the default time created value is considered. + + 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, 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. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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.devops.models.DeployEnvironmentCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_deploy_environments API. + """ + resource_path = "/deployEnvironments" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "project_id", + "compartment_id", + "id", + "lifecycle_state", + "display_name", + "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_deploy_environments got unknown kwargs: {!r}".format(extra_kwargs)) + + if 'lifecycle_state' in kwargs: + lifecycle_state_allowed_values = ["CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED"] + 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 = { + "projectId": kwargs.get("project_id", missing), + "compartmentId": kwargs.get("compartment_id", missing), + "id": kwargs.get("id", missing), + "lifecycleState": kwargs.get("lifecycle_state", missing), + "displayName": kwargs.get("display_name", 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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + 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="DeployEnvironmentCollection") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="DeployEnvironmentCollection") + + def list_deploy_pipelines(self, **kwargs): + """ + Returns a list of deployment pipelines. + + + :param str id: (optional) + Unique identifier or OCID for listing a single resource by ID. + + :param str project_id: (optional) + unique project identifier + + :param str compartment_id: (optional) + The OCID of the compartment in which to list resources. + + :param str lifecycle_state: (optional) + A filter to return only DeployPipelines that matches the given lifecycleState. + + Allowed values are: "CREATING", "UPDATING", "ACTIVE", "INACTIVE", "DELETING", "DELETED", "FAILED" + + :param str display_name: (optional) + A filter to return only resources that match the entire display name given. + + :param int limit: (optional) + The maximum number of items to return. + + :param str page: (optional) + The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + + :param str sort_order: (optional) + The sort order to use. Use either ascending or descending. + + Allowed values are: "ASC", "DESC" + + :param str sort_by: (optional) + The field to sort by. Only one sort order may be provided. Default order for time created is descending. Default order for display name is ascending. If no value is specified, then the default time created value is considered. + + 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, 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. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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.devops.models.DeployPipelineCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_deploy_pipelines API. + """ + resource_path = "/deployPipelines" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "id", + "project_id", + "compartment_id", + "lifecycle_state", + "display_name", + "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_deploy_pipelines got unknown kwargs: {!r}".format(extra_kwargs)) + + if 'lifecycle_state' in kwargs: + lifecycle_state_allowed_values = ["CREATING", "UPDATING", "ACTIVE", "INACTIVE", "DELETING", "DELETED", "FAILED"] + 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 = { + "id": kwargs.get("id", missing), + "projectId": kwargs.get("project_id", missing), + "compartmentId": kwargs.get("compartment_id", missing), + "lifecycleState": kwargs.get("lifecycle_state", missing), + "displayName": kwargs.get("display_name", 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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + 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="DeployPipelineCollection") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="DeployPipelineCollection") + + def list_deploy_stages(self, **kwargs): + """ + Retrieves a list of deployment stages. + + + :param str id: (optional) + Unique identifier or OCID for listing a single resource by ID. + + :param str deploy_pipeline_id: (optional) + The ID of the parent pipeline. + + :param str compartment_id: (optional) + The OCID of the compartment in which to list resources. + + :param str lifecycle_state: (optional) + A filter to return only deployment stages that matches the given lifecycle state. + + Allowed values are: "CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED" + + :param str display_name: (optional) + A filter to return only resources that match the entire display name given. + + :param int limit: (optional) + The maximum number of items to return. + + :param str page: (optional) + The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + + :param str sort_order: (optional) + The sort order to use. Use either ascending or descending. + + Allowed values are: "ASC", "DESC" + + :param str sort_by: (optional) + The field to sort by. Only one sort order may be provided. Default order for time created is descending. Default order for display name is ascending. If no value is specified, then the default time created value is considered. + + 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, 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. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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.devops.models.DeployStageCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_deploy_stages API. + """ + resource_path = "/deployStages" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "id", + "deploy_pipeline_id", + "compartment_id", + "lifecycle_state", + "display_name", + "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_deploy_stages got unknown kwargs: {!r}".format(extra_kwargs)) + + if 'lifecycle_state' in kwargs: + lifecycle_state_allowed_values = ["CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED"] + 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 = { + "id": kwargs.get("id", missing), + "deployPipelineId": kwargs.get("deploy_pipeline_id", missing), + "compartmentId": kwargs.get("compartment_id", missing), + "lifecycleState": kwargs.get("lifecycle_state", missing), + "displayName": kwargs.get("display_name", 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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + 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="DeployStageCollection") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="DeployStageCollection") + + def list_deployments(self, **kwargs): + """ + Returns a list of deployments. + + + :param str deploy_pipeline_id: (optional) + The ID of the parent pipeline. + + :param str id: (optional) + Unique identifier or OCID for listing a single resource by ID. + + :param str compartment_id: (optional) + The OCID of the compartment in which to list resources. + + :param str project_id: (optional) + unique project identifier + + :param str lifecycle_state: (optional) + A filter to return only Deployments that matches the given lifecycleState. + + Allowed values are: "ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED" + + :param str display_name: (optional) + A filter to return only resources that match the entire display name given. + + :param int limit: (optional) + The maximum number of items to return. + + :param str page: (optional) + The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + + :param str sort_order: (optional) + The sort order to use. Use either ascending or descending. + + Allowed values are: "ASC", "DESC" + + :param str sort_by: (optional) + The field to sort by. Only one sort order may be provided. Default order for time created is descending. Default order for display name is ascending. If no value is specified, then the default time created value is considered. + + 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, provide the request ID. + + :param datetime time_created_less_than: (optional) + Search for DevOps resources that were created before a specific date. Specifying this parameter corresponding to `timeCreatedLessThan` parameter will retrieve all assessments created before the specified created date, in \"YYYY-MM-ddThh:mmZ\" format with a Z offset, as defined by `RFC3339`__. + + __ https://datatracker.ietf.org/doc/html/rfc3339 + + :param datetime time_created_greater_than_or_equal_to: (optional) + Search for DevOps resources that were created after a specific date. Specifying this parameter corresponding to `timeCreatedGreaterThanOrEqualTo` parameter will retrieve all security assessments created after the specified created date, in \"YYYY-MM-ddThh:mmZ\" format with a Z offset, as defined by `RFC3339`__. + + __ https://datatracker.ietf.org/doc/html/rfc3339 + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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.devops.models.DeploymentCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_deployments API. + """ + resource_path = "/deployments" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "deploy_pipeline_id", + "id", + "compartment_id", + "project_id", + "lifecycle_state", + "display_name", + "limit", + "page", + "sort_order", + "sort_by", + "opc_request_id", + "time_created_less_than", + "time_created_greater_than_or_equal_to" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_deployments got unknown kwargs: {!r}".format(extra_kwargs)) + + if 'lifecycle_state' in kwargs: + lifecycle_state_allowed_values = ["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED"] + 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 = { + "deployPipelineId": kwargs.get("deploy_pipeline_id", missing), + "id": kwargs.get("id", missing), + "compartmentId": kwargs.get("compartment_id", missing), + "projectId": kwargs.get("project_id", missing), + "lifecycleState": kwargs.get("lifecycle_state", missing), + "displayName": kwargs.get("display_name", missing), + "limit": kwargs.get("limit", missing), + "page": kwargs.get("page", missing), + "sortOrder": kwargs.get("sort_order", missing), + "sortBy": kwargs.get("sort_by", missing), + "timeCreatedLessThan": kwargs.get("time_created_less_than", missing), + "timeCreatedGreaterThanOrEqualTo": kwargs.get("time_created_greater_than_or_equal_to", 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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + 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="DeploymentCollection") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="DeploymentCollection") + + def list_mirror_records(self, repository_id, **kwargs): + """ + Returns a list of mirror entry in history within 30 days + + + :param str repository_id: (required) + unique Repository identifier. + + :param int limit: (optional) + The maximum number of items to return. + + :param str page: (optional) + The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + + :param str sort_order: (optional) + The sort order to use. Use either ascending or descending. + + Allowed values are: "ASC", "DESC" + + :param str opc_request_id: (optional) + Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, 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. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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.devops.models.RepositoryMirrorRecordCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_mirror_records API. + """ + resource_path = "/repositories/{repositoryId}/mirrorRecords" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "limit", + "page", + "sort_order", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_mirror_records got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "repositoryId": repository_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)) + + 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) + ) + + query_params = { + "limit": kwargs.get("limit", missing), + "page": kwargs.get("page", missing), + "sortOrder": kwargs.get("sort_order", 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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="RepositoryMirrorRecordCollection") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="RepositoryMirrorRecordCollection") + + def list_paths(self, repository_id, **kwargs): + """ + Fetches a list of files and directories in a repository. + + + :param str repository_id: (required) + unique Repository identifier. + + :param str ref: (optional) + The name of branch/tag or commit hash it points to. If names conflict order of preference is commit > branch > tag. + You can disambiguate with \"heads/foobar\" and \"tags/foobar\". Repository's default branch will be used if left blank. + + :param bool paths_in_subtree: (optional) + Flag to determine if files should be retrived recursively. false by default + + :param str folder_path: (optional) + The fully qualified path to the folder whose contents are returned, including the folder name. For example, /examples is a fully-qualified path to a folder named examples that was created off of the root directory (/) of a repository. + + :param int limit: (optional) + The maximum number of items to return. + + :param str page: (optional) + The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + + :param str display_name: (optional) + A filter to return only resources that match the entire display name given. + + :param str sort_order: (optional) + The sort order to use. Use either ascending or descending. + + Allowed values are: "ASC", "DESC" + + :param str sort_by: (optional) + The field to sort by. Only one sort order may be provided. Default order is ascending. If no value is specified name is default. + + Allowed values are: "type", "sizeInBytes", "name" + + :param str opc_request_id: (optional) + Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, 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. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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.devops.models.RepositoryPathCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_paths API. + """ + resource_path = "/repositories/{repositoryId}/paths" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "ref", + "paths_in_subtree", + "folder_path", + "limit", + "page", + "display_name", + "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_paths got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "repositoryId": repository_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)) + + 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 = ["type", "sizeInBytes", "name"] + 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 = { + "ref": kwargs.get("ref", missing), + "pathsInSubtree": kwargs.get("paths_in_subtree", missing), + "folderPath": kwargs.get("folder_path", missing), + "limit": kwargs.get("limit", missing), + "page": kwargs.get("page", missing), + "displayName": kwargs.get("display_name", 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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="RepositoryPathCollection") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="RepositoryPathCollection") + + def list_projects(self, compartment_id, **kwargs): + """ + Returns a list of projects. + + + :param str compartment_id: (required) + The OCID of the compartment in which to list resources. + + :param str id: (optional) + Unique identifier or OCID for listing a single resource by ID. + + :param str lifecycle_state: (optional) + A filter to return only Projects that matches the given lifecycleState. + + Allowed values are: "CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED" + + :param str name: (optional) + A filter to return only resources that match the entire name given. + + :param int limit: (optional) + The maximum number of items to return. + + :param str page: (optional) + The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + + :param str sort_order: (optional) + The sort order to use. Use either ascending or descending. + + Allowed values are: "ASC", "DESC" + + :param str sort_by: (optional) + The field to sort by. Only one sort order may be provided. Default order for time created is descending. Default order for display name is ascending. If no value is specified, then the default time created value is considered. + + 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, 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. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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.devops.models.ProjectCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_projects API. + """ + resource_path = "/projects" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "id", + "lifecycle_state", + "name", + "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 = ["CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED"] + 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 = { + "id": kwargs.get("id", missing), + "compartmentId": compartment_id, + "lifecycleState": kwargs.get("lifecycle_state", missing), + "name": kwargs.get("name", 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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + 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="ProjectCollection") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="ProjectCollection") + + def list_refs(self, repository_id, **kwargs): + """ + Returns a list of Refs. + + + :param str repository_id: (required) + unique Repository identifier. + + :param str ref_type: (optional) + Ref type to distinguish between branch and tag. If it is not specified, return all refs. + + Allowed values are: "BRANCH", "TAG" + + :param str commit_id: (optional) + Commit id in a repository + + :param int limit: (optional) + The maximum number of items to return. + + :param str page: (optional) + The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + + :param str ref_name: (optional) + A filter to return only resources that match the given Ref name. + + :param str sort_order: (optional) + The sort order to use. Use either ascending or descending. + + Allowed values are: "ASC", "DESC" + + :param str sort_by: (optional) + The field to sort by. Only one sort order may be provided. Default order for refName is ascending. Default order for refType is ascending. If no value is specified refName is default. + + Allowed values are: "refType", "refName" + + :param str opc_request_id: (optional) + Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, 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. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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.devops.models.RepositoryRefCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_refs API. + """ + resource_path = "/repositories/{repositoryId}/refs" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "ref_type", + "commit_id", + "limit", + "page", + "ref_name", + "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_refs got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "repositoryId": repository_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)) + + if 'ref_type' in kwargs: + ref_type_allowed_values = ["BRANCH", "TAG"] + if kwargs['ref_type'] not in ref_type_allowed_values: + raise ValueError( + "Invalid value for `ref_type`, must be one of {0}".format(ref_type_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 = ["refType", "refName"] + 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 = { + "refType": kwargs.get("ref_type", missing), + "commitId": kwargs.get("commit_id", missing), + "limit": kwargs.get("limit", missing), + "page": kwargs.get("page", missing), + "refName": kwargs.get("ref_name", 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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="RepositoryRefCollection") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="RepositoryRefCollection") + + def list_repositories(self, **kwargs): + """ + Returns a list of Repositories given a compartmentId or a projectId. + + + :param str compartment_id: (optional) + The OCID of the compartment in which to list resources. + + :param str project_id: (optional) + unique project identifier + + :param str repository_id: (optional) + unique Repository identifier. + + :param str lifecycle_state: (optional) + A filter to return only resources their lifecycleState matches the given lifecycleState. + + Allowed values are: "ACTIVE", "CREATING", "DELETED" + + :param str name: (optional) + A filter to return only resources that match the entire name given. + + :param int limit: (optional) + The maximum number of items to return. + + :param str page: (optional) + The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + + :param str sort_order: (optional) + The sort order to use. Use either ascending or descending. + + Allowed values are: "ASC", "DESC" + + :param str sort_by: (optional) + The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for name is ascending. If no value is specified timeCreated is default. + + Allowed values are: "timeCreated", "name" + + :param str opc_request_id: (optional) + Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, 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. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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.devops.models.RepositoryCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_repositories API. + """ + resource_path = "/repositories" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "compartment_id", + "project_id", + "repository_id", + "lifecycle_state", + "name", + "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_repositories got unknown kwargs: {!r}".format(extra_kwargs)) + + if 'lifecycle_state' in kwargs: + lifecycle_state_allowed_values = ["ACTIVE", "CREATING", "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", "name"] + 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": kwargs.get("compartment_id", missing), + "projectId": kwargs.get("project_id", missing), + "repositoryId": kwargs.get("repository_id", missing), + "lifecycleState": kwargs.get("lifecycle_state", missing), + "name": kwargs.get("name", 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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + 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="RepositoryCollection") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="RepositoryCollection") + + def list_triggers(self, **kwargs): + """ + Returns a list of Triggers. + + + :param str compartment_id: (optional) + The OCID of the compartment in which to list resources. + + :param str project_id: (optional) + unique project identifier + + :param str lifecycle_state: (optional) + A filter to return only Triggers that matches the given lifecycleState + + Allowed values are: "ACTIVE" + + :param str display_name: (optional) + A filter to return only resources that match the entire display name given. + + :param str id: (optional) + unique Trigger identifier + + :param int limit: (optional) + The maximum number of items to return. + + :param str page: (optional) + The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + + :param str sort_order: (optional) + The sort order to use. Use either ascending or descending. + + Allowed values are: "ASC", "DESC" + + :param str sort_by: (optional) + The field to sort by. Only one sort order may be provided. Default order for time created is descending. Default order for display name is ascending. If no value is specified, then the default time created value is considered. + + 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, 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. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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.devops.models.TriggerCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_triggers API. + """ + resource_path = "/triggers" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "compartment_id", + "project_id", + "lifecycle_state", + "display_name", + "id", + "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_triggers got unknown kwargs: {!r}".format(extra_kwargs)) + + if 'lifecycle_state' in kwargs: + lifecycle_state_allowed_values = ["ACTIVE"] 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) @@ -2033,11 +6625,11 @@ def list_deploy_environments(self, **kwargs): ) query_params = { - "projectId": kwargs.get("project_id", missing), "compartmentId": kwargs.get("compartment_id", missing), - "id": kwargs.get("id", missing), + "projectId": kwargs.get("project_id", missing), "lifecycleState": kwargs.get("lifecycle_state", missing), "displayName": kwargs.get("display_name", missing), + "id": kwargs.get("id", missing), "limit": kwargs.get("limit", missing), "page": kwargs.get("page", missing), "sortOrder": kwargs.get("sort_order", missing), @@ -2067,55 +6659,164 @@ def list_deploy_environments(self, **kwargs): method=method, query_params=query_params, header_params=header_params, - response_type="DeployEnvironmentCollection") + response_type="TriggerCollection") else: return self.base_client.call_api( resource_path=resource_path, method=method, query_params=query_params, header_params=header_params, - response_type="DeployEnvironmentCollection") + response_type="TriggerCollection") - def list_deploy_pipelines(self, **kwargs): + def list_work_request_errors(self, work_request_id, **kwargs): """ - Returns a list of deployment pipelines. + Returns a list of errors for a given work request. - :param str id: (optional) - Unique identifier or OCID for listing a single resource by ID. + :param str work_request_id: (required) + The ID of the asynchronous work request. - :param str project_id: (optional) - unique project identifier + :param str opc_request_id: (optional) + Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. - :param str compartment_id: (optional) - The OCID of the compartment in which to list resources. + :param str page: (optional) + The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. - :param str lifecycle_state: (optional) - A filter to return only DeployPipelines that matches the given lifecycleState. + :param int limit: (optional) + The maximum number of items to return. - Allowed values are: "CREATING", "UPDATING", "ACTIVE", "INACTIVE", "DELETING", "DELETED", "FAILED" + :param str sort_order: (optional) + The sort order to use. Use either ascending or descending. - :param str display_name: (optional) - A filter to return only resources that match the entire display name given. + Allowed values are: "ASC", "DESC" + + :param str sort_by: (optional) + The field to sort by. Only one sort order can be provided. Default sort order is descending and is based on the timeAccepted field. + + Allowed values are: "timeAccepted" + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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.devops.models.WorkRequestErrorCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_work_request_errors API. + """ + resource_path = "/workRequests/{workRequestId}/errors" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "opc_request_id", + "page", + "limit", + "sort_order", + "sort_by" + ] + 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)) + + 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 = ["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 = { + "page": kwargs.get("page", missing), + "limit": kwargs.get("limit", 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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="WorkRequestErrorCollection") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="WorkRequestErrorCollection") + + def list_work_request_logs(self, work_request_id, **kwargs): + """ + Returns a list of logs for a given work request. - :param int limit: (optional) - The maximum number of items to return. + + :param str work_request_id: (required) + The ID of the asynchronous work request. + + :param str opc_request_id: (optional) + Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. :param str page: (optional) The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + :param int limit: (optional) + The maximum number of items to return. + :param str sort_order: (optional) The sort order to use. Use either ascending or descending. Allowed values are: "ASC", "DESC" :param str sort_by: (optional) - The field to sort by. Only one sort order may be provided. Default order for time created is descending. Default order for display name is ascending. If no value is specified, then the default time created value is considered. - - Allowed values are: "timeCreated", "displayName" + The field to sort by. Only one sort order can be provided. Default sort order is descending and is based on the timeAccepted field. - :param str opc_request_id: (optional) - Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + Allowed values are: "timeAccepted" :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. @@ -2125,40 +6826,38 @@ def list_deploy_pipelines(self, **kwargs): 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.devops.models.DeployPipelineCollection` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.devops.models.WorkRequestLogEntryCollection` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use list_deploy_pipelines API. + Click `here `__ to see an example of how to use list_work_request_logs API. """ - resource_path = "/deployPipelines" + resource_path = "/workRequests/{workRequestId}/logs" method = "GET" # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", - "id", - "project_id", - "compartment_id", - "lifecycle_state", - "display_name", - "limit", + "opc_request_id", "page", + "limit", "sort_order", - "sort_by", - "opc_request_id" + "sort_by" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "list_deploy_pipelines got unknown kwargs: {!r}".format(extra_kwargs)) + "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} - if 'lifecycle_state' in kwargs: - lifecycle_state_allowed_values = ["CREATING", "UPDATING", "ACTIVE", "INACTIVE", "DELETING", "DELETED", "FAILED"] - 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) - ) + 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)) if 'sort_order' in kwargs: sort_order_allowed_values = ["ASC", "DESC"] @@ -2168,20 +6867,15 @@ def list_deploy_pipelines(self, **kwargs): ) if 'sort_by' in kwargs: - sort_by_allowed_values = ["timeCreated", "displayName"] + sort_by_allowed_values = ["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 = { - "id": kwargs.get("id", missing), - "projectId": kwargs.get("project_id", missing), - "compartmentId": kwargs.get("compartment_id", missing), - "lifecycleState": kwargs.get("lifecycle_state", missing), - "displayName": kwargs.get("display_name", missing), - "limit": kwargs.get("limit", missing), "page": kwargs.get("page", missing), + "limit": kwargs.get("limit", missing), "sortOrder": kwargs.get("sort_order", missing), "sortBy": kwargs.get("sort_by", missing) } @@ -2207,57 +6901,56 @@ def list_deploy_pipelines(self, **kwargs): self.base_client.call_api, resource_path=resource_path, method=method, + path_params=path_params, query_params=query_params, header_params=header_params, - response_type="DeployPipelineCollection") + response_type="WorkRequestLogEntryCollection") else: return self.base_client.call_api( resource_path=resource_path, method=method, + path_params=path_params, query_params=query_params, header_params=header_params, - response_type="DeployPipelineCollection") + response_type="WorkRequestLogEntryCollection") - def list_deploy_stages(self, **kwargs): + def list_work_requests(self, compartment_id, **kwargs): """ - Retrieves a list of deployment stages. - - - :param str id: (optional) - Unique identifier or OCID for listing a single resource by ID. + Lists the work requests in a compartment. - :param str deploy_pipeline_id: (optional) - The ID of the parent pipeline. - :param str compartment_id: (optional) + :param str compartment_id: (required) The OCID of the compartment in which to list resources. - :param str lifecycle_state: (optional) - A filter to return only deployment stages that matches the given lifecycle state. + :param str work_request_id: (optional) + The ID of the asynchronous work request. - Allowed values are: "CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED" + :param str status: (optional) + A filter to return only resources where the lifecycle state matches the given operation status. - :param str display_name: (optional) - A filter to return only resources that match the entire display name given. + Allowed values are: "ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED" - :param int limit: (optional) - The maximum number of items to return. + :param str resource_id: (optional) + The ID of the resource affected by the work request. + + :param str opc_request_id: (optional) + Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. :param str page: (optional) The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + :param int limit: (optional) + The maximum number of items to return. + :param str sort_order: (optional) The sort order to use. Use either ascending or descending. Allowed values are: "ASC", "DESC" :param str sort_by: (optional) - The field to sort by. Only one sort order may be provided. Default order for time created is descending. Default order for display name is ascending. If no value is specified, then the default time created value is considered. - - Allowed values are: "timeCreated", "displayName" + The field to sort by. Only one sort order can be provided. Default sort order is descending and is based on the timeAccepted field. - :param str opc_request_id: (optional) - Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + Allowed values are: "timeAccepted" :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. @@ -2267,39 +6960,37 @@ def list_deploy_stages(self, **kwargs): 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.devops.models.DeployStageCollection` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.devops.models.WorkRequestCollection` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use list_deploy_stages API. + Click `here `__ to see an example of how to use list_work_requests API. """ - resource_path = "/deployStages" + resource_path = "/workRequests" method = "GET" # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", - "id", - "deploy_pipeline_id", - "compartment_id", - "lifecycle_state", - "display_name", - "limit", + "work_request_id", + "status", + "resource_id", + "opc_request_id", "page", + "limit", "sort_order", - "sort_by", - "opc_request_id" + "sort_by" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "list_deploy_stages got unknown kwargs: {!r}".format(extra_kwargs)) + "list_work_requests got unknown kwargs: {!r}".format(extra_kwargs)) - if 'lifecycle_state' in kwargs: - lifecycle_state_allowed_values = ["CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED"] - if kwargs['lifecycle_state'] not in lifecycle_state_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 `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values) + "Invalid value for `status`, must be one of {0}".format(status_allowed_values) ) if 'sort_order' in kwargs: @@ -2310,20 +7001,19 @@ def list_deploy_stages(self, **kwargs): ) if 'sort_by' in kwargs: - sort_by_allowed_values = ["timeCreated", "displayName"] + sort_by_allowed_values = ["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 = { - "id": kwargs.get("id", missing), - "deployPipelineId": kwargs.get("deploy_pipeline_id", missing), - "compartmentId": kwargs.get("compartment_id", missing), - "lifecycleState": kwargs.get("lifecycle_state", missing), - "displayName": kwargs.get("display_name", missing), - "limit": kwargs.get("limit", missing), + "compartmentId": compartment_id, + "workRequestId": kwargs.get("work_request_id", missing), + "status": kwargs.get("status", missing), + "resourceId": kwargs.get("resource_id", missing), "page": kwargs.get("page", missing), + "limit": kwargs.get("limit", missing), "sortOrder": kwargs.get("sort_order", missing), "sortBy": kwargs.get("sort_by", missing) } @@ -2351,68 +7041,119 @@ def list_deploy_stages(self, **kwargs): method=method, query_params=query_params, header_params=header_params, - response_type="DeployStageCollection") + response_type="WorkRequestCollection") else: return self.base_client.call_api( resource_path=resource_path, method=method, query_params=query_params, header_params=header_params, - response_type="DeployStageCollection") + response_type="WorkRequestCollection") - def list_deployments(self, **kwargs): + def mirror_repository(self, repository_id, **kwargs): """ - Returns a list of deployments. + Synchronize a mirrored repository to the latest version from external providers - :param str deploy_pipeline_id: (optional) - The ID of the parent pipeline. + :param str repository_id: (required) + unique Repository identifier. - :param str id: (optional) - Unique identifier or OCID for listing a single resource by 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 str compartment_id: (optional) - The OCID of the compartment in which to list resources. + :param str opc_request_id: (optional) + Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. - :param str project_id: (optional) - unique project identifier + :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. - :param str lifecycle_state: (optional) - A filter to return only Deployments that matches the given lifecycleState. + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. - Allowed values are: "ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED" + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. - :param str display_name: (optional) - A filter to return only resources that match the entire display name given. + :return: A :class:`~oci.response.Response` object with data of type None + :rtype: :class:`~oci.response.Response` - :param int limit: (optional) - The maximum number of items to return. + :example: + Click `here `__ to see an example of how to use mirror_repository API. + """ + resource_path = "/repositories/{repositoryId}/actions/mirror" + method = "POST" - :param str page: (optional) - The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + # 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( + "mirror_repository got unknown kwargs: {!r}".format(extra_kwargs)) - :param str sort_order: (optional) - The sort order to use. Use either ascending or descending. + path_params = { + "repositoryId": repository_id + } - Allowed values are: "ASC", "DESC" + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} - :param str sort_by: (optional) - The field to sort by. Only one sort order may be provided. Default order for time created is descending. Default order for display name is ascending. If no value is specified, then the default time created value is considered. + 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)) - Allowed values are: "timeCreated", "displayName" + 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} - :param str opc_request_id: (optional) - Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) - :param datetime time_created_less_than: (optional) - Search for DevOps resources that were created before a specific date. Specifying this parameter corresponding to `timeCreatedLessThan` parameter will retrieve all assessments created before the specified created date, in \"YYYY-MM-ddThh:mmZ\" format with a Z offset, as defined by `RFC3339`__. + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + 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) - __ https://datatracker.ietf.org/doc/html/rfc3339 + def put_repository_ref(self, repository_id, ref_name, put_repository_ref_details, **kwargs): + """ + Creates a new Ref or updates an existing one. - :param datetime time_created_greater_than_or_equal_to: (optional) - Search for DevOps resources that were created after a specific date. Specifying this parameter corresponding to `timeCreatedGreaterThanOrEqualTo` parameter will retrieve all security assessments created after the specified created date, in \"YYYY-MM-ddThh:mmZ\" format with a Z offset, as defined by `RFC3339`__. - __ https://datatracker.ietf.org/doc/html/rfc3339 + :param str repository_id: (required) + unique Repository identifier. + + :param str ref_name: (required) + A filter to return only resources that match the given Ref name. + + :param oci.devops.models.PutRepositoryRefDetails put_repository_ref_details: (required) + The information to create a Ref with the type specified in the query + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + + :param str opc_retry_token: (optional) + A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated earlier due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected. + + :param str opc_request_id: (optional) + Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, 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. @@ -2422,77 +7163,43 @@ def list_deployments(self, **kwargs): 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.devops.models.DeploymentCollection` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.devops.models.RepositoryRef` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use list_deployments API. + Click `here `__ to see an example of how to use put_repository_ref API. """ - resource_path = "/deployments" - method = "GET" + resource_path = "/repositories/{repositoryId}/refs/{refName}" + method = "PUT" # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", - "deploy_pipeline_id", - "id", - "compartment_id", - "project_id", - "lifecycle_state", - "display_name", - "limit", - "page", - "sort_order", - "sort_by", - "opc_request_id", - "time_created_less_than", - "time_created_greater_than_or_equal_to" + "if_match", + "opc_retry_token", + "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: - raise ValueError( - "list_deployments got unknown kwargs: {!r}".format(extra_kwargs)) - - if 'lifecycle_state' in kwargs: - lifecycle_state_allowed_values = ["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED"] - 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) - ) + raise ValueError( + "put_repository_ref got unknown kwargs: {!r}".format(extra_kwargs)) - query_params = { - "deployPipelineId": kwargs.get("deploy_pipeline_id", missing), - "id": kwargs.get("id", missing), - "compartmentId": kwargs.get("compartment_id", missing), - "projectId": kwargs.get("project_id", missing), - "lifecycleState": kwargs.get("lifecycle_state", missing), - "displayName": kwargs.get("display_name", missing), - "limit": kwargs.get("limit", missing), - "page": kwargs.get("page", missing), - "sortOrder": kwargs.get("sort_order", missing), - "sortBy": kwargs.get("sort_by", missing), - "timeCreatedLessThan": kwargs.get("time_created_less_than", missing), - "timeCreatedGreaterThanOrEqualTo": kwargs.get("time_created_greater_than_or_equal_to", missing) + path_params = { + "repositoryId": repository_id, + "refName": ref_name } - query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + + 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-retry-token": kwargs.get("opc_retry_token", 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} @@ -2504,57 +7211,39 @@ def list_deployments(self, **kwargs): if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, - query_params=query_params, + path_params=path_params, header_params=header_params, - response_type="DeploymentCollection") + body=put_repository_ref_details, + response_type="RepositoryRef") else: return self.base_client.call_api( resource_path=resource_path, method=method, - query_params=query_params, + path_params=path_params, header_params=header_params, - response_type="DeploymentCollection") + body=put_repository_ref_details, + response_type="RepositoryRef") - def list_projects(self, compartment_id, **kwargs): + def update_build_pipeline(self, build_pipeline_id, update_build_pipeline_details, **kwargs): """ - Returns a list of projects. - - - :param str compartment_id: (required) - The OCID of the compartment in which to list resources. - - :param str id: (optional) - Unique identifier or OCID for listing a single resource by ID. - - :param str lifecycle_state: (optional) - A filter to return only Projects that matches the given lifecycleState. - - Allowed values are: "CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED" - - :param str name: (optional) - A filter to return only resources that match the entire name given. + Updates the BuildPipeline - :param int limit: (optional) - The maximum number of items to return. - - :param str page: (optional) - The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. - - :param str sort_order: (optional) - The sort order to use. Use either ascending or descending. - Allowed values are: "ASC", "DESC" + :param str build_pipeline_id: (required) + unique BuildPipeline identifier - :param str sort_by: (optional) - The field to sort by. Only one sort order may be provided. Default order for time created is descending. Default order for display name is ascending. If no value is specified, then the default time created value is considered. + :param oci.devops.models.UpdateBuildPipelineDetails update_build_pipeline_details: (required) + The information to be updated. - Allowed values are: "timeCreated", "displayName" + :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, provide the request ID. @@ -2567,68 +7256,40 @@ def list_projects(self, compartment_id, **kwargs): 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.devops.models.ProjectCollection` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.devops.models.BuildPipeline` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use list_projects API. + Click `here `__ to see an example of how to use update_build_pipeline API. """ - resource_path = "/projects" - method = "GET" + resource_path = "/buildPipelines/{buildPipelineId}" + method = "PUT" # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", - "id", - "lifecycle_state", - "name", - "limit", - "page", - "sort_order", - "sort_by", + "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( - "list_projects got unknown kwargs: {!r}".format(extra_kwargs)) - - if 'lifecycle_state' in kwargs: - lifecycle_state_allowed_values = ["CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED"] - 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) - ) + "update_build_pipeline got unknown kwargs: {!r}".format(extra_kwargs)) - 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) - ) + path_params = { + "buildPipelineId": build_pipeline_id + } - 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) - ) + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} - query_params = { - "id": kwargs.get("id", missing), - "compartmentId": compartment_id, - "lifecycleState": kwargs.get("lifecycle_state", missing), - "name": kwargs.get("name", 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} + 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} @@ -2646,43 +7307,35 @@ def list_projects(self, compartment_id, **kwargs): self.base_client.call_api, resource_path=resource_path, method=method, - query_params=query_params, + path_params=path_params, header_params=header_params, - response_type="ProjectCollection") + body=update_build_pipeline_details, + response_type="BuildPipeline") else: return self.base_client.call_api( resource_path=resource_path, method=method, - query_params=query_params, + path_params=path_params, header_params=header_params, - response_type="ProjectCollection") + body=update_build_pipeline_details, + response_type="BuildPipeline") - def list_work_request_errors(self, work_request_id, **kwargs): + def update_build_pipeline_stage(self, build_pipeline_stage_id, update_build_pipeline_stage_details, **kwargs): """ - Returns a list of errors for a given work request. - - - :param str work_request_id: (required) - The ID of the asynchronous work request. - - :param str opc_request_id: (optional) - Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. - - :param str page: (optional) - The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + Updates the Stage based on the stage id provided in request - :param int limit: (optional) - The maximum number of items to return. - :param str sort_order: (optional) - The sort order to use. Use either ascending or descending. + :param str build_pipeline_stage_id: (required) + Unique stage identifier. - Allowed values are: "ASC", "DESC" + :param oci.devops.models.UpdateBuildPipelineStageDetails update_build_pipeline_stage_details: (required) + The information to be updated. - :param str sort_by: (optional) - The field to sort by. Only one sort order can be provided. Default sort order is descending and is based on the timeAccepted field. + :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. - Allowed values are: "timeAccepted" + :param str opc_request_id: (optional) + Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, 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. @@ -2692,31 +7345,28 @@ def list_work_request_errors(self, work_request_id, **kwargs): 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.devops.models.WorkRequestErrorCollection` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.devops.models.BuildPipelineStage` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use list_work_request_errors API. + Click `here `__ to see an example of how to use update_build_pipeline_stage API. """ - resource_path = "/workRequests/{workRequestId}/errors" - method = "GET" + resource_path = "/buildPipelineStages/{buildPipelineStageId}" + method = "PUT" # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", - "opc_request_id", - "page", - "limit", - "sort_order", - "sort_by" + "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( - "list_work_request_errors got unknown kwargs: {!r}".format(extra_kwargs)) + "update_build_pipeline_stage got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { - "workRequestId": work_request_id + "buildPipelineStageId": build_pipeline_stage_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -2725,31 +7375,10 @@ def list_work_request_errors(self, work_request_id, **kwargs): 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)) - 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 = ["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 = { - "page": kwargs.get("page", missing), - "limit": kwargs.get("limit", 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", + "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} @@ -2768,44 +7397,34 @@ def list_work_request_errors(self, work_request_id, **kwargs): resource_path=resource_path, method=method, path_params=path_params, - query_params=query_params, header_params=header_params, - response_type="WorkRequestErrorCollection") + body=update_build_pipeline_stage_details, + response_type="BuildPipelineStage") else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, - query_params=query_params, header_params=header_params, - response_type="WorkRequestErrorCollection") + body=update_build_pipeline_stage_details, + response_type="BuildPipelineStage") - def list_work_request_logs(self, work_request_id, **kwargs): + def update_build_run(self, build_run_id, update_build_run_details, **kwargs): """ - Returns a list of logs for a given work request. - - - :param str work_request_id: (required) - The ID of the asynchronous work request. - - :param str opc_request_id: (optional) - Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + Updates the BuildRun - :param str page: (optional) - The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. - - :param int limit: (optional) - The maximum number of items to return. - :param str sort_order: (optional) - The sort order to use. Use either ascending or descending. + :param str build_run_id: (required) + Unique build run identifier. - Allowed values are: "ASC", "DESC" + :param oci.devops.models.UpdateBuildRunDetails update_build_run_details: (required) + The information to be updated. - :param str sort_by: (optional) - The field to sort by. Only one sort order can be provided. Default sort order is descending and is based on the timeAccepted field. + :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. - Allowed values are: "timeAccepted" + :param str opc_request_id: (optional) + Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, 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. @@ -2815,64 +7434,40 @@ def list_work_request_logs(self, work_request_id, **kwargs): 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.devops.models.WorkRequestLogEntryCollection` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.devops.models.BuildRun` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use list_work_request_logs API. + Click `here `__ to see an example of how to use update_build_run API. """ - resource_path = "/workRequests/{workRequestId}/logs" - method = "GET" + resource_path = "/buildRuns/{buildRunId}" + method = "PUT" # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", - "opc_request_id", - "page", - "limit", - "sort_order", - "sort_by" + "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( - "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)) - - 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 = ["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 = { - "page": kwargs.get("page", missing), - "limit": kwargs.get("limit", missing), - "sortOrder": kwargs.get("sort_order", missing), - "sortBy": kwargs.get("sort_by", missing) + raise ValueError( + "update_build_run got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "buildRunId": build_run_id } - query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + + 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} @@ -2891,56 +7486,35 @@ def list_work_request_logs(self, work_request_id, **kwargs): resource_path=resource_path, method=method, path_params=path_params, - query_params=query_params, header_params=header_params, - response_type="WorkRequestLogEntryCollection") + body=update_build_run_details, + response_type="BuildRun") else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, - query_params=query_params, header_params=header_params, - response_type="WorkRequestLogEntryCollection") + body=update_build_run_details, + response_type="BuildRun") - def list_work_requests(self, compartment_id, **kwargs): + def update_connection(self, connection_id, update_connection_details, **kwargs): """ - Lists the work requests in a compartment. - - - :param str compartment_id: (required) - The OCID of the compartment in which to list resources. + Updates the Connection - :param str work_request_id: (optional) - The ID of the asynchronous work request. - :param str status: (optional) - A filter to return only resources where the lifecycle state matches the given operation status. + :param str connection_id: (required) + unique Connection identifier - Allowed values are: "ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED" + :param oci.devops.models.UpdateConnectionDetails update_connection_details: (required) + The information to be updated. - :param str resource_id: (optional) - The ID of the resource affected by the work request. + :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, provide the request ID. - :param str page: (optional) - The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. - - :param int limit: (optional) - The maximum number of items to return. - - :param str sort_order: (optional) - The sort order to use. Use either ascending or descending. - - Allowed values are: "ASC", "DESC" - - :param str sort_by: (optional) - The field to sort by. Only one sort order can be provided. Default sort order is descending and is based on the timeAccepted field. - - Allowed values are: "timeAccepted" - :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. @@ -2949,68 +7523,40 @@ def list_work_requests(self, compartment_id, **kwargs): 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.devops.models.WorkRequestCollection` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.devops.models.Connection` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use list_work_requests API. + Click `here `__ to see an example of how to use update_connection API. """ - resource_path = "/workRequests" - method = "GET" + resource_path = "/connections/{connectionId}" + method = "PUT" # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", - "work_request_id", - "status", - "resource_id", - "opc_request_id", - "page", - "limit", - "sort_order", - "sort_by" + "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( - "list_work_requests got unknown kwargs: {!r}".format(extra_kwargs)) - - 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) - ) + "update_connection got unknown kwargs: {!r}".format(extra_kwargs)) - 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) - ) + path_params = { + "connectionId": connection_id + } - if 'sort_by' in kwargs: - sort_by_allowed_values = ["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) - ) + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} - query_params = { - "compartmentId": compartment_id, - "workRequestId": kwargs.get("work_request_id", missing), - "status": kwargs.get("status", missing), - "resourceId": kwargs.get("resource_id", missing), - "page": kwargs.get("page", missing), - "limit": kwargs.get("limit", 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} + 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} @@ -3028,16 +7574,18 @@ def list_work_requests(self, compartment_id, **kwargs): self.base_client.call_api, resource_path=resource_path, method=method, - query_params=query_params, + path_params=path_params, header_params=header_params, - response_type="WorkRequestCollection") + body=update_connection_details, + response_type="Connection") else: return self.base_client.call_api( resource_path=resource_path, method=method, - query_params=query_params, + path_params=path_params, header_params=header_params, - response_type="WorkRequestCollection") + body=update_connection_details, + response_type="Connection") def update_deploy_artifact(self, deploy_artifact_id, update_deploy_artifact_details, **kwargs): """ @@ -3572,3 +8120,181 @@ def update_project(self, project_id, update_project_details, **kwargs): header_params=header_params, body=update_project_details, response_type="Project") + + def update_repository(self, repository_id, update_repository_details, **kwargs): + """ + Updates the Repository + + + :param str repository_id: (required) + unique Repository identifier. + + :param oci.devops.models.UpdateRepositoryDetails update_repository_details: (required) + The information to be updated. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + + :param str opc_request_id: (optional) + Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, 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. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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.devops.models.Repository` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use update_repository API. + """ + resource_path = "/repositories/{repositoryId}" + 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_repository got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "repositoryId": repository_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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + 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_repository_details, + response_type="Repository") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=update_repository_details, + response_type="Repository") + + def update_trigger(self, trigger_id, update_trigger_details, **kwargs): + """ + Updates the Trigger + + + :param str trigger_id: (required) + unique Trigger identifier + + :param oci.devops.models.UpdateTriggerDetails update_trigger_details: (required) + The information to be updated. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + + :param str opc_request_id: (optional) + Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, 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. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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.devops.models.Trigger` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use update_trigger API. + """ + resource_path = "/triggers/{triggerId}" + 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_trigger got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "triggerId": trigger_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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + 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_trigger_details, + response_type="Trigger") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=update_trigger_details, + response_type="Trigger") diff --git a/src/oci/devops/devops_client_composite_operations.py b/src/oci/devops/devops_client_composite_operations.py index fc245c9ccb..34bb911331 100644 --- a/src/oci/devops/devops_client_composite_operations.py +++ b/src/oci/devops/devops_client_composite_operations.py @@ -64,6 +64,47 @@ def approve_deployment_and_wait_for_state(self, deployment_id, approve_deploymen except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def cancel_build_run_and_wait_for_state(self, cancel_build_run_details, build_run_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.devops.DevopsClient.cancel_build_run` and waits for the :py:class:`~oci.devops.models.BuildRun` acted upon + to enter the given state(s). + + :param oci.devops.models.CancelBuildRunDetails cancel_build_run_details: (required) + Details the input parameters required to cancel a build run. + + :param str build_run_id: (required) + Unique build run identifier. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.devops.models.BuildRun.lifecycle_state` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.devops.DevopsClient.cancel_build_run` + + :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.cancel_build_run(cancel_build_run_details, build_run_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_build_run(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 cancel_deployment_and_wait_for_state(self, deployment_id, cancel_deployment_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ Calls :py:func:`~oci.devops.DevopsClient.cancel_deployment` and waits for the :py:class:`~oci.devops.models.Deployment` acted upon @@ -146,25 +187,765 @@ def change_project_compartment_and_wait_for_state(self, project_id, change_proje except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) - def create_deploy_artifact_and_wait_for_state(self, create_deploy_artifact_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + def create_build_pipeline_and_wait_for_state(self, create_build_pipeline_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.devops.DevopsClient.create_build_pipeline` and waits for the :py:class:`~oci.devops.models.WorkRequest` + to enter the given state(s). + + :param oci.devops.models.CreateBuildPipelineDetails create_build_pipeline_details: (required) + Details for the new BuildPipeline. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.devops.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.devops.DevopsClient.create_build_pipeline` + + :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_build_pipeline(create_build_pipeline_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_build_pipeline_stage_and_wait_for_state(self, create_build_pipeline_stage_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.devops.DevopsClient.create_build_pipeline_stage` and waits for the :py:class:`~oci.devops.models.WorkRequest` + to enter the given state(s). + + :param oci.devops.models.CreateBuildPipelineStageDetails create_build_pipeline_stage_details: (required) + Details for the new Stage. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.devops.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.devops.DevopsClient.create_build_pipeline_stage` + + :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_build_pipeline_stage(create_build_pipeline_stage_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_build_run_and_wait_for_state(self, create_build_run_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.devops.DevopsClient.create_build_run` and waits for the :py:class:`~oci.devops.models.BuildRun` acted upon + to enter the given state(s). + + :param oci.devops.models.CreateBuildRunDetails create_build_run_details: (required) + Details the input parameters required to create a new build run. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.devops.models.BuildRun.lifecycle_state` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.devops.DevopsClient.create_build_run` + + :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_build_run(create_build_run_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_build_run(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_connection_and_wait_for_state(self, create_connection_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.devops.DevopsClient.create_connection` and waits for the :py:class:`~oci.devops.models.WorkRequest` + to enter the given state(s). + + :param oci.devops.models.CreateConnectionDetails create_connection_details: (required) + Details for the new Connection. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.devops.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.devops.DevopsClient.create_connection` + + :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_connection(create_connection_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_deploy_artifact_and_wait_for_state(self, create_deploy_artifact_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.devops.DevopsClient.create_deploy_artifact` and waits for the :py:class:`~oci.devops.models.WorkRequest` + to enter the given state(s). + + :param oci.devops.models.CreateDeployArtifactDetails create_deploy_artifact_details: (required) + Details for the new deployment artifact. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.devops.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.devops.DevopsClient.create_deploy_artifact` + + :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_deploy_artifact(create_deploy_artifact_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_deploy_environment_and_wait_for_state(self, create_deploy_environment_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.devops.DevopsClient.create_deploy_environment` and waits for the :py:class:`~oci.devops.models.WorkRequest` + to enter the given state(s). + + :param oci.devops.models.CreateDeployEnvironmentDetails create_deploy_environment_details: (required) + Details for the new deployment environment. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.devops.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.devops.DevopsClient.create_deploy_environment` + + :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_deploy_environment(create_deploy_environment_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_deploy_pipeline_and_wait_for_state(self, create_deploy_pipeline_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.devops.DevopsClient.create_deploy_pipeline` and waits for the :py:class:`~oci.devops.models.WorkRequest` + to enter the given state(s). + + :param oci.devops.models.CreateDeployPipelineDetails create_deploy_pipeline_details: (required) + Details for the new deployment pipeline. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.devops.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.devops.DevopsClient.create_deploy_pipeline` + + :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_deploy_pipeline(create_deploy_pipeline_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_deploy_stage_and_wait_for_state(self, create_deploy_stage_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.devops.DevopsClient.create_deploy_stage` and waits for the :py:class:`~oci.devops.models.WorkRequest` + to enter the given state(s). + + :param oci.devops.models.CreateDeployStageDetails create_deploy_stage_details: (required) + Details for the new DeployStage. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.devops.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.devops.DevopsClient.create_deploy_stage` + + :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_deploy_stage(create_deploy_stage_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_deployment_and_wait_for_state(self, create_deployment_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.devops.DevopsClient.create_deployment` and waits for the :py:class:`~oci.devops.models.Deployment` acted upon + to enter the given state(s). + + :param oci.devops.models.CreateDeploymentDetails create_deployment_details: (required) + Details for the new deployment. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.devops.models.Deployment.lifecycle_state` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.devops.DevopsClient.create_deployment` + + :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_deployment(create_deployment_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_deployment(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_project_and_wait_for_state(self, create_project_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.devops.DevopsClient.create_project` and waits for the :py:class:`~oci.devops.models.WorkRequest` + to enter the given state(s). + + :param oci.devops.models.CreateProjectDetails create_project_details: (required) + Details for the new project. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.devops.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.devops.DevopsClient.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.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_repository_and_wait_for_state(self, create_repository_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.devops.DevopsClient.create_repository` and waits for the :py:class:`~oci.devops.models.WorkRequest` + to enter the given state(s). + + :param oci.devops.models.CreateRepositoryDetails create_repository_details: (required) + Details for the new Repository. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.devops.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.devops.DevopsClient.create_repository` + + :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_repository(create_repository_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_trigger_and_wait_for_state(self, create_trigger_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.devops.DevopsClient.create_trigger` and waits for the :py:class:`~oci.devops.models.WorkRequest` + to enter the given state(s). + + :param oci.devops.models.CreateTriggerDetails create_trigger_details: (required) + Details for the new Trigger. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.devops.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.devops.DevopsClient.create_trigger` + + :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_trigger(create_trigger_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 delete_build_pipeline_and_wait_for_state(self, build_pipeline_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.devops.DevopsClient.delete_build_pipeline` and waits for the :py:class:`~oci.devops.models.WorkRequest` + to enter the given state(s). + + :param str build_pipeline_id: (required) + unique BuildPipeline identifier + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.devops.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.devops.DevopsClient.delete_build_pipeline` + + :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_build_pipeline(build_pipeline_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_build_pipeline_stage_and_wait_for_state(self, build_pipeline_stage_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.devops.DevopsClient.delete_build_pipeline_stage` and waits for the :py:class:`~oci.devops.models.WorkRequest` + to enter the given state(s). + + :param str build_pipeline_stage_id: (required) + Unique stage identifier. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.devops.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.devops.DevopsClient.delete_build_pipeline_stage` + + :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_build_pipeline_stage(build_pipeline_stage_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_connection_and_wait_for_state(self, connection_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.devops.DevopsClient.delete_connection` and waits for the :py:class:`~oci.devops.models.WorkRequest` + to enter the given state(s). + + :param str connection_id: (required) + unique Connection identifier + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.devops.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.devops.DevopsClient.delete_connection` + + :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_connection(connection_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_deploy_artifact_and_wait_for_state(self, deploy_artifact_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.devops.DevopsClient.delete_deploy_artifact` and waits for the :py:class:`~oci.devops.models.WorkRequest` + to enter the given state(s). + + :param str deploy_artifact_id: (required) + Unique artifact identifier. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.devops.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.devops.DevopsClient.delete_deploy_artifact` + + :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_deploy_artifact(deploy_artifact_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_deploy_environment_and_wait_for_state(self, deploy_environment_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.devops.DevopsClient.delete_deploy_environment` and waits for the :py:class:`~oci.devops.models.WorkRequest` + to enter the given state(s). + + :param str deploy_environment_id: (required) + Unique environment identifier. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.devops.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.devops.DevopsClient.delete_deploy_environment` + + :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_deploy_environment(deploy_environment_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_deploy_pipeline_and_wait_for_state(self, deploy_pipeline_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.devops.DevopsClient.delete_deploy_pipeline` and waits for the :py:class:`~oci.devops.models.WorkRequest` + to enter the given state(s). + + :param str deploy_pipeline_id: (required) + Unique pipeline identifier. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.devops.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.devops.DevopsClient.delete_deploy_pipeline` + + :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_deploy_pipeline(deploy_pipeline_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_deploy_stage_and_wait_for_state(self, deploy_stage_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ - Calls :py:func:`~oci.devops.DevopsClient.create_deploy_artifact` and waits for the :py:class:`~oci.devops.models.WorkRequest` + Calls :py:func:`~oci.devops.DevopsClient.delete_deploy_stage` and waits for the :py:class:`~oci.devops.models.WorkRequest` to enter the given state(s). - :param oci.devops.models.CreateDeployArtifactDetails create_deploy_artifact_details: (required) - Details for the new deployment artifact. + :param str deploy_stage_id: (required) + Unique stage identifier. :param list[str] wait_for_states: An array of states to wait on. These should be valid values for :py:attr:`~oci.devops.models.WorkRequest.status` :param dict operation_kwargs: - A dictionary of keyword arguments to pass to :py:func:`~oci.devops.DevopsClient.create_deploy_artifact` + A dictionary of keyword arguments to pass to :py:func:`~oci.devops.DevopsClient.delete_deploy_stage` :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_deploy_artifact(create_deploy_artifact_details, **operation_kwargs) + operation_result = None + try: + operation_result = self.client.delete_deploy_stage(deploy_stage_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 @@ -184,25 +965,33 @@ def create_deploy_artifact_and_wait_for_state(self, create_deploy_artifact_detai except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) - def create_deploy_environment_and_wait_for_state(self, create_deploy_environment_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + def delete_project_and_wait_for_state(self, project_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ - Calls :py:func:`~oci.devops.DevopsClient.create_deploy_environment` and waits for the :py:class:`~oci.devops.models.WorkRequest` + Calls :py:func:`~oci.devops.DevopsClient.delete_project` and waits for the :py:class:`~oci.devops.models.WorkRequest` to enter the given state(s). - :param oci.devops.models.CreateDeployEnvironmentDetails create_deploy_environment_details: (required) - Details for the new deployment environment. + :param str project_id: (required) + Unique project identifier. :param list[str] wait_for_states: An array of states to wait on. These should be valid values for :py:attr:`~oci.devops.models.WorkRequest.status` :param dict operation_kwargs: - A dictionary of keyword arguments to pass to :py:func:`~oci.devops.DevopsClient.create_deploy_environment` + A dictionary of keyword arguments to pass to :py:func:`~oci.devops.DevopsClient.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 = self.client.create_deploy_environment(create_deploy_environment_details, **operation_kwargs) + 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 @@ -222,25 +1011,36 @@ def create_deploy_environment_and_wait_for_state(self, create_deploy_environment except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) - def create_deploy_pipeline_and_wait_for_state(self, create_deploy_pipeline_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + def delete_ref_and_wait_for_state(self, repository_id, ref_name, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ - Calls :py:func:`~oci.devops.DevopsClient.create_deploy_pipeline` and waits for the :py:class:`~oci.devops.models.WorkRequest` + Calls :py:func:`~oci.devops.DevopsClient.delete_ref` and waits for the :py:class:`~oci.devops.models.WorkRequest` to enter the given state(s). - :param oci.devops.models.CreateDeployPipelineDetails create_deploy_pipeline_details: (required) - Details for the new deployment pipeline. + :param str repository_id: (required) + unique Repository identifier. + + :param str ref_name: (required) + A filter to return only resources that match the given Ref name. :param list[str] wait_for_states: An array of states to wait on. These should be valid values for :py:attr:`~oci.devops.models.WorkRequest.status` :param dict operation_kwargs: - A dictionary of keyword arguments to pass to :py:func:`~oci.devops.DevopsClient.create_deploy_pipeline` + A dictionary of keyword arguments to pass to :py:func:`~oci.devops.DevopsClient.delete_ref` :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_deploy_pipeline(create_deploy_pipeline_details, **operation_kwargs) + operation_result = None + try: + operation_result = self.client.delete_ref(repository_id, ref_name, **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 @@ -260,25 +1060,33 @@ def create_deploy_pipeline_and_wait_for_state(self, create_deploy_pipeline_detai except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) - def create_deploy_stage_and_wait_for_state(self, create_deploy_stage_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + def delete_repository_and_wait_for_state(self, repository_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ - Calls :py:func:`~oci.devops.DevopsClient.create_deploy_stage` and waits for the :py:class:`~oci.devops.models.WorkRequest` + Calls :py:func:`~oci.devops.DevopsClient.delete_repository` and waits for the :py:class:`~oci.devops.models.WorkRequest` to enter the given state(s). - :param oci.devops.models.CreateDeployStageDetails create_deploy_stage_details: (required) - Details for the new DeployStage. + :param str repository_id: (required) + unique Repository identifier. :param list[str] wait_for_states: An array of states to wait on. These should be valid values for :py:attr:`~oci.devops.models.WorkRequest.status` :param dict operation_kwargs: - A dictionary of keyword arguments to pass to :py:func:`~oci.devops.DevopsClient.create_deploy_stage` + A dictionary of keyword arguments to pass to :py:func:`~oci.devops.DevopsClient.delete_repository` :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_deploy_stage(create_deploy_stage_details, **operation_kwargs) + operation_result = None + try: + operation_result = self.client.delete_repository(repository_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 @@ -298,36 +1106,44 @@ def create_deploy_stage_and_wait_for_state(self, create_deploy_stage_details, wa except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) - def create_deployment_and_wait_for_state(self, create_deployment_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + def delete_trigger_and_wait_for_state(self, trigger_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ - Calls :py:func:`~oci.devops.DevopsClient.create_deployment` and waits for the :py:class:`~oci.devops.models.Deployment` acted upon + Calls :py:func:`~oci.devops.DevopsClient.delete_trigger` and waits for the :py:class:`~oci.devops.models.WorkRequest` to enter the given state(s). - :param oci.devops.models.CreateDeploymentDetails create_deployment_details: (required) - Details for the new deployment. + :param str trigger_id: (required) + unique Trigger identifier :param list[str] wait_for_states: - An array of states to wait on. These should be valid values for :py:attr:`~oci.devops.models.Deployment.lifecycle_state` + An array of states to wait on. These should be valid values for :py:attr:`~oci.devops.models.WorkRequest.status` :param dict operation_kwargs: - A dictionary of keyword arguments to pass to :py:func:`~oci.devops.DevopsClient.create_deployment` + A dictionary of keyword arguments to pass to :py:func:`~oci.devops.DevopsClient.delete_trigger` :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_deployment(create_deployment_details, **operation_kwargs) + operation_result = None + try: + operation_result = self.client.delete_trigger(trigger_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.data.id + wait_for_resource_id = operation_result.headers['opc-work-request-id'] try: waiter_result = oci.wait_until( self.client, - self.client.get_deployment(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, + 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 @@ -336,25 +1152,25 @@ def create_deployment_and_wait_for_state(self, create_deployment_details, wait_f 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={}): + def mirror_repository_and_wait_for_state(self, repository_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ - Calls :py:func:`~oci.devops.DevopsClient.create_project` and waits for the :py:class:`~oci.devops.models.WorkRequest` + Calls :py:func:`~oci.devops.DevopsClient.mirror_repository` and waits for the :py:class:`~oci.devops.models.WorkRequest` to enter the given state(s). - :param oci.devops.models.CreateProjectDetails create_project_details: (required) - Details for the new project. + :param str repository_id: (required) + unique Repository identifier. :param list[str] wait_for_states: An array of states to wait on. These should be valid values for :py:attr:`~oci.devops.models.WorkRequest.status` :param dict operation_kwargs: - A dictionary of keyword arguments to pass to :py:func:`~oci.devops.DevopsClient.create_project` + A dictionary of keyword arguments to pass to :py:func:`~oci.devops.DevopsClient.mirror_repository` :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) + operation_result = self.client.mirror_repository(repository_id, **operation_kwargs) if not wait_for_states: return operation_result @@ -374,33 +1190,31 @@ def create_project_and_wait_for_state(self, create_project_details, wait_for_sta except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) - def delete_deploy_artifact_and_wait_for_state(self, deploy_artifact_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + def put_repository_ref_and_wait_for_state(self, repository_id, ref_name, put_repository_ref_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ - Calls :py:func:`~oci.devops.DevopsClient.delete_deploy_artifact` and waits for the :py:class:`~oci.devops.models.WorkRequest` + Calls :py:func:`~oci.devops.DevopsClient.put_repository_ref` and waits for the :py:class:`~oci.devops.models.WorkRequest` to enter the given state(s). - :param str deploy_artifact_id: (required) - Unique artifact identifier. + :param str repository_id: (required) + unique Repository identifier. + + :param str ref_name: (required) + A filter to return only resources that match the given Ref name. + + :param oci.devops.models.PutRepositoryRefDetails put_repository_ref_details: (required) + The information to create a Ref with the type specified in the query :param list[str] wait_for_states: An array of states to wait on. These should be valid values for :py:attr:`~oci.devops.models.WorkRequest.status` :param dict operation_kwargs: - A dictionary of keyword arguments to pass to :py:func:`~oci.devops.DevopsClient.delete_deploy_artifact` + A dictionary of keyword arguments to pass to :py:func:`~oci.devops.DevopsClient.put_repository_ref` :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_deploy_artifact(deploy_artifact_id, **operation_kwargs) - except oci.exceptions.ServiceError as e: - if e.status == 404: - return WAIT_RESOURCE_NOT_FOUND - else: - raise e - + operation_result = self.client.put_repository_ref(repository_id, ref_name, put_repository_ref_details, **operation_kwargs) if not wait_for_states: return operation_result @@ -420,33 +1234,28 @@ def delete_deploy_artifact_and_wait_for_state(self, deploy_artifact_id, wait_for except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) - def delete_deploy_environment_and_wait_for_state(self, deploy_environment_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + def update_build_pipeline_and_wait_for_state(self, build_pipeline_id, update_build_pipeline_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ - Calls :py:func:`~oci.devops.DevopsClient.delete_deploy_environment` and waits for the :py:class:`~oci.devops.models.WorkRequest` + Calls :py:func:`~oci.devops.DevopsClient.update_build_pipeline` and waits for the :py:class:`~oci.devops.models.WorkRequest` to enter the given state(s). - :param str deploy_environment_id: (required) - Unique environment identifier. + :param str build_pipeline_id: (required) + unique BuildPipeline identifier + + :param oci.devops.models.UpdateBuildPipelineDetails update_build_pipeline_details: (required) + The information to be updated. :param list[str] wait_for_states: An array of states to wait on. These should be valid values for :py:attr:`~oci.devops.models.WorkRequest.status` :param dict operation_kwargs: - A dictionary of keyword arguments to pass to :py:func:`~oci.devops.DevopsClient.delete_deploy_environment` + A dictionary of keyword arguments to pass to :py:func:`~oci.devops.DevopsClient.update_build_pipeline` :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_deploy_environment(deploy_environment_id, **operation_kwargs) - except oci.exceptions.ServiceError as e: - if e.status == 404: - return WAIT_RESOURCE_NOT_FOUND - else: - raise e - + operation_result = self.client.update_build_pipeline(build_pipeline_id, update_build_pipeline_details, **operation_kwargs) if not wait_for_states: return operation_result @@ -466,33 +1275,28 @@ def delete_deploy_environment_and_wait_for_state(self, deploy_environment_id, wa except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) - def delete_deploy_pipeline_and_wait_for_state(self, deploy_pipeline_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + def update_build_pipeline_stage_and_wait_for_state(self, build_pipeline_stage_id, update_build_pipeline_stage_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ - Calls :py:func:`~oci.devops.DevopsClient.delete_deploy_pipeline` and waits for the :py:class:`~oci.devops.models.WorkRequest` + Calls :py:func:`~oci.devops.DevopsClient.update_build_pipeline_stage` and waits for the :py:class:`~oci.devops.models.WorkRequest` to enter the given state(s). - :param str deploy_pipeline_id: (required) - Unique pipeline identifier. + :param str build_pipeline_stage_id: (required) + Unique stage identifier. + + :param oci.devops.models.UpdateBuildPipelineStageDetails update_build_pipeline_stage_details: (required) + The information to be updated. :param list[str] wait_for_states: An array of states to wait on. These should be valid values for :py:attr:`~oci.devops.models.WorkRequest.status` :param dict operation_kwargs: - A dictionary of keyword arguments to pass to :py:func:`~oci.devops.DevopsClient.delete_deploy_pipeline` + A dictionary of keyword arguments to pass to :py:func:`~oci.devops.DevopsClient.update_build_pipeline_stage` :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_deploy_pipeline(deploy_pipeline_id, **operation_kwargs) - except oci.exceptions.ServiceError as e: - if e.status == 404: - return WAIT_RESOURCE_NOT_FOUND - else: - raise e - + operation_result = self.client.update_build_pipeline_stage(build_pipeline_stage_id, update_build_pipeline_stage_details, **operation_kwargs) if not wait_for_states: return operation_result @@ -512,44 +1316,39 @@ def delete_deploy_pipeline_and_wait_for_state(self, deploy_pipeline_id, wait_for except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) - def delete_deploy_stage_and_wait_for_state(self, deploy_stage_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + def update_build_run_and_wait_for_state(self, build_run_id, update_build_run_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ - Calls :py:func:`~oci.devops.DevopsClient.delete_deploy_stage` and waits for the :py:class:`~oci.devops.models.WorkRequest` + Calls :py:func:`~oci.devops.DevopsClient.update_build_run` and waits for the :py:class:`~oci.devops.models.BuildRun` acted upon to enter the given state(s). - :param str deploy_stage_id: (required) - Unique stage identifier. + :param str build_run_id: (required) + Unique build run identifier. + + :param oci.devops.models.UpdateBuildRunDetails update_build_run_details: (required) + The information to be updated. :param list[str] wait_for_states: - An array of states to wait on. These should be valid values for :py:attr:`~oci.devops.models.WorkRequest.status` + An array of states to wait on. These should be valid values for :py:attr:`~oci.devops.models.BuildRun.lifecycle_state` :param dict operation_kwargs: - A dictionary of keyword arguments to pass to :py:func:`~oci.devops.DevopsClient.delete_deploy_stage` + A dictionary of keyword arguments to pass to :py:func:`~oci.devops.DevopsClient.update_build_run` :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_deploy_stage(deploy_stage_id, **operation_kwargs) - except oci.exceptions.ServiceError as e: - if e.status == 404: - return WAIT_RESOURCE_NOT_FOUND - else: - raise e - + operation_result = self.client.update_build_run(build_run_id, update_build_run_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'] + wait_for_resource_id = operation_result.data.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, + self.client.get_build_run(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 @@ -558,33 +1357,28 @@ def delete_deploy_stage_and_wait_for_state(self, deploy_stage_id, wait_for_state 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={}): + def update_connection_and_wait_for_state(self, connection_id, update_connection_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ - Calls :py:func:`~oci.devops.DevopsClient.delete_project` and waits for the :py:class:`~oci.devops.models.WorkRequest` + Calls :py:func:`~oci.devops.DevopsClient.update_connection` and waits for the :py:class:`~oci.devops.models.WorkRequest` to enter the given state(s). - :param str project_id: (required) - Unique project identifier. + :param str connection_id: (required) + unique Connection identifier + + :param oci.devops.models.UpdateConnectionDetails update_connection_details: (required) + The information to be updated. :param list[str] wait_for_states: An array of states to wait on. These should be valid values for :py:attr:`~oci.devops.models.WorkRequest.status` :param dict operation_kwargs: - A dictionary of keyword arguments to pass to :py:func:`~oci.devops.DevopsClient.delete_project` + A dictionary of keyword arguments to pass to :py:func:`~oci.devops.DevopsClient.update_connection` :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 - + operation_result = self.client.update_connection(connection_id, update_connection_details, **operation_kwargs) if not wait_for_states: return operation_result @@ -849,3 +1643,85 @@ def update_project_and_wait_for_state(self, project_id, update_project_details, return result_to_return except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + + def update_repository_and_wait_for_state(self, repository_id, update_repository_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.devops.DevopsClient.update_repository` and waits for the :py:class:`~oci.devops.models.WorkRequest` + to enter the given state(s). + + :param str repository_id: (required) + unique Repository identifier. + + :param oci.devops.models.UpdateRepositoryDetails update_repository_details: (required) + The information to be updated. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.devops.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.devops.DevopsClient.update_repository` + + :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_repository(repository_id, update_repository_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 update_trigger_and_wait_for_state(self, trigger_id, update_trigger_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.devops.DevopsClient.update_trigger` and waits for the :py:class:`~oci.devops.models.WorkRequest` + to enter the given state(s). + + :param str trigger_id: (required) + unique Trigger identifier + + :param oci.devops.models.UpdateTriggerDetails update_trigger_details: (required) + The information to be updated. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.devops.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.devops.DevopsClient.update_trigger` + + :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_trigger(trigger_id, update_trigger_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) diff --git a/src/oci/devops/models/__init__.py b/src/oci/devops/models/__init__.py index c51df93e08..7e0f2af882 100644 --- a/src/oci/devops/models/__init__.py +++ b/src/oci/devops/models/__init__.py @@ -6,20 +6,44 @@ from .absolute_wait_criteria import AbsoluteWaitCriteria from .absolute_wait_criteria_summary import AbsoluteWaitCriteriaSummary +from .actual_build_runner_shape_config import ActualBuildRunnerShapeConfig from .approval_action import ApprovalAction from .approval_policy import ApprovalPolicy from .approve_deployment_details import ApproveDeploymentDetails from .automated_deploy_stage_rollback_policy import AutomatedDeployStageRollbackPolicy from .backend_set_ip_collection import BackendSetIpCollection +from .build_outputs import BuildOutputs +from .build_pipeline import BuildPipeline +from .build_pipeline_collection import BuildPipelineCollection +from .build_pipeline_parameter import BuildPipelineParameter +from .build_pipeline_parameter_collection import BuildPipelineParameterCollection +from .build_pipeline_stage import BuildPipelineStage +from .build_pipeline_stage_collection import BuildPipelineStageCollection +from .build_pipeline_stage_predecessor import BuildPipelineStagePredecessor +from .build_pipeline_stage_predecessor_collection import BuildPipelineStagePredecessorCollection +from .build_pipeline_stage_run_progress import BuildPipelineStageRunProgress +from .build_pipeline_stage_summary import BuildPipelineStageSummary +from .build_pipeline_summary import BuildPipelineSummary +from .build_run import BuildRun +from .build_run_argument import BuildRunArgument +from .build_run_argument_collection import BuildRunArgumentCollection +from .build_run_progress import BuildRunProgress +from .build_run_progress_summary import BuildRunProgressSummary +from .build_run_source import BuildRunSource +from .build_run_summary import BuildRunSummary +from .build_run_summary_collection import BuildRunSummaryCollection +from .build_source import BuildSource +from .build_source_collection import BuildSourceCollection +from .build_stage import BuildStage +from .build_stage_run_progress import BuildStageRunProgress +from .build_stage_run_step import BuildStageRunStep +from .build_stage_summary import BuildStageSummary +from .cancel_build_run_details import CancelBuildRunDetails from .cancel_deployment_details import CancelDeploymentDetails from .change_project_compartment_details import ChangeProjectCompartmentDetails -from .compute_instance_group_blue_green_deploy_stage_execution_progress import ComputeInstanceGroupBlueGreenDeployStageExecutionProgress -from .compute_instance_group_blue_green_traffic_shift_deploy_stage_execution_progress import ComputeInstanceGroupBlueGreenTrafficShiftDeployStageExecutionProgress +from .commit_info import CommitInfo from .compute_instance_group_by_ids_selector import ComputeInstanceGroupByIdsSelector from .compute_instance_group_by_query_selector import ComputeInstanceGroupByQuerySelector -from .compute_instance_group_canary_approval_deploy_stage_execution_progress import ComputeInstanceGroupCanaryApprovalDeployStageExecutionProgress -from .compute_instance_group_canary_deploy_stage_execution_progress import ComputeInstanceGroupCanaryDeployStageExecutionProgress -from .compute_instance_group_canary_traffic_shift_deploy_stage_execution_progress import ComputeInstanceGroupCanaryTrafficShiftDeployStageExecutionProgress from .compute_instance_group_deploy_environment import ComputeInstanceGroupDeployEnvironment from .compute_instance_group_deploy_environment_summary import ComputeInstanceGroupDeployEnvironmentSummary from .compute_instance_group_deploy_stage import ComputeInstanceGroupDeployStage @@ -33,9 +57,20 @@ from .compute_instance_group_rollout_policy import ComputeInstanceGroupRolloutPolicy from .compute_instance_group_selector import ComputeInstanceGroupSelector from .compute_instance_group_selector_collection import ComputeInstanceGroupSelectorCollection +from .connection import Connection +from .connection_collection import ConnectionCollection +from .connection_summary import ConnectionSummary +from .container_registry_delivered_artifact import ContainerRegistryDeliveredArtifact from .count_based_approval_policy import CountBasedApprovalPolicy +from .create_absolute_wait_criteria_details import CreateAbsoluteWaitCriteriaDetails +from .create_build_pipeline_details import CreateBuildPipelineDetails +from .create_build_pipeline_stage_details import CreateBuildPipelineStageDetails +from .create_build_run_details import CreateBuildRunDetails +from .create_build_stage_details import CreateBuildStageDetails from .create_compute_instance_group_deploy_environment_details import CreateComputeInstanceGroupDeployEnvironmentDetails from .create_compute_instance_group_deploy_stage_details import CreateComputeInstanceGroupDeployStageDetails +from .create_connection_details import CreateConnectionDetails +from .create_deliver_artifact_stage_details import CreateDeliverArtifactStageDetails from .create_deploy_artifact_details import CreateDeployArtifactDetails from .create_deploy_environment_details import CreateDeployEnvironmentDetails from .create_deploy_pipeline_deployment_details import CreateDeployPipelineDeploymentDetails @@ -43,16 +78,33 @@ from .create_deploy_pipeline_redeployment_details import CreateDeployPipelineRedeploymentDetails from .create_deploy_stage_details import CreateDeployStageDetails from .create_deployment_details import CreateDeploymentDetails +from .create_devops_code_repository_trigger_details import CreateDevopsCodeRepositoryTriggerDetails from .create_function_deploy_environment_details import CreateFunctionDeployEnvironmentDetails from .create_function_deploy_stage_details import CreateFunctionDeployStageDetails +from .create_github_access_token_connection_details import CreateGithubAccessTokenConnectionDetails +from .create_github_trigger_details import CreateGithubTriggerDetails +from .create_gitlab_access_token_connection_details import CreateGitlabAccessTokenConnectionDetails +from .create_gitlab_trigger_details import CreateGitlabTriggerDetails from .create_invoke_function_deploy_stage_details import CreateInvokeFunctionDeployStageDetails from .create_load_balancer_traffic_shift_deploy_stage_details import CreateLoadBalancerTrafficShiftDeployStageDetails from .create_manual_approval_deploy_stage_details import CreateManualApprovalDeployStageDetails from .create_oke_cluster_deploy_environment_details import CreateOkeClusterDeployEnvironmentDetails from .create_oke_deploy_stage_details import CreateOkeDeployStageDetails from .create_project_details import CreateProjectDetails +from .create_repository_details import CreateRepositoryDetails from .create_single_deploy_stage_deployment_details import CreateSingleDeployStageDeploymentDetails +from .create_trigger_deployment_stage_details import CreateTriggerDeploymentStageDetails +from .create_trigger_details import CreateTriggerDetails +from .create_wait_criteria_details import CreateWaitCriteriaDetails from .create_wait_deploy_stage_details import CreateWaitDeployStageDetails +from .create_wait_stage_details import CreateWaitStageDetails +from .deliver_artifact import DeliverArtifact +from .deliver_artifact_collection import DeliverArtifactCollection +from .deliver_artifact_stage import DeliverArtifactStage +from .deliver_artifact_stage_run_progress import DeliverArtifactStageRunProgress +from .deliver_artifact_stage_summary import DeliverArtifactStageSummary +from .delivered_artifact import DeliveredArtifact +from .delivered_artifact_collection import DeliveredArtifactCollection from .deploy_artifact import DeployArtifact from .deploy_artifact_collection import DeployArtifactCollection from .deploy_artifact_override_argument import DeployArtifactOverrideArgument @@ -92,12 +144,50 @@ from .deployment_collection import DeploymentCollection from .deployment_execution_progress import DeploymentExecutionProgress from .deployment_summary import DeploymentSummary +from .devops_code_repository_build_run_source import DevopsCodeRepositoryBuildRunSource +from .devops_code_repository_build_source import DevopsCodeRepositoryBuildSource +from .devops_code_repository_filter import DevopsCodeRepositoryFilter +from .devops_code_repository_filter_attributes import DevopsCodeRepositoryFilterAttributes +from .devops_code_repository_trigger import DevopsCodeRepositoryTrigger +from .devops_code_repository_trigger_create_result import DevopsCodeRepositoryTriggerCreateResult +from .devops_code_repository_trigger_summary import DevopsCodeRepositoryTriggerSummary +from .diff_chunk import DiffChunk +from .diff_collection import DiffCollection +from .diff_line_details import DiffLineDetails +from .diff_response import DiffResponse +from .diff_response_entry import DiffResponseEntry +from .diff_section import DiffSection +from .diff_summary import DiffSummary +from .exported_variable import ExportedVariable +from .exported_variable_collection import ExportedVariableCollection +from .file_diff_response import FileDiffResponse +from .file_line_details import FileLineDetails +from .filter import Filter from .function_deploy_environment import FunctionDeployEnvironment from .function_deploy_environment_summary import FunctionDeployEnvironmentSummary from .function_deploy_stage import FunctionDeployStage from .function_deploy_stage_execution_progress import FunctionDeployStageExecutionProgress from .function_deploy_stage_summary import FunctionDeployStageSummary +from .generic_delivered_artifact import GenericDeliveredArtifact from .generic_deploy_artifact_source import GenericDeployArtifactSource +from .github_access_token_connection import GithubAccessTokenConnection +from .github_access_token_connection_summary import GithubAccessTokenConnectionSummary +from .github_build_run_source import GithubBuildRunSource +from .github_build_source import GithubBuildSource +from .github_filter import GithubFilter +from .github_filter_attributes import GithubFilterAttributes +from .github_trigger import GithubTrigger +from .github_trigger_create_result import GithubTriggerCreateResult +from .github_trigger_summary import GithubTriggerSummary +from .gitlab_access_token_connection import GitlabAccessTokenConnection +from .gitlab_access_token_connection_summary import GitlabAccessTokenConnectionSummary +from .gitlab_build_run_source import GitlabBuildRunSource +from .gitlab_build_source import GitlabBuildSource +from .gitlab_filter import GitlabFilter +from .gitlab_filter_attributes import GitlabFilterAttributes +from .gitlab_trigger import GitlabTrigger +from .gitlab_trigger_create_result import GitlabTriggerCreateResult +from .gitlab_trigger_summary import GitlabTriggerSummary from .inline_deploy_artifact_source import InlineDeployArtifactSource from .invoke_function_deploy_stage import InvokeFunctionDeployStage from .invoke_function_deploy_stage_execution_progress import InvokeFunctionDeployStageExecutionProgress @@ -110,6 +200,8 @@ from .manual_approval_deploy_stage import ManualApprovalDeployStage from .manual_approval_deploy_stage_execution_progress import ManualApprovalDeployStageExecutionProgress from .manual_approval_deploy_stage_summary import ManualApprovalDeployStageSummary +from .manual_build_run_source import ManualBuildRunSource +from .mirror_repository_config import MirrorRepositoryConfig from .no_deploy_stage_rollback_policy import NoDeployStageRollbackPolicy from .notification_config import NotificationConfig from .ocir_deploy_artifact_source import OcirDeployArtifactSource @@ -121,12 +213,53 @@ from .project import Project from .project_collection import ProjectCollection from .project_summary import ProjectSummary -from .run_pipeline_deploy_stage_execution_progress import RunPipelineDeployStageExecutionProgress -from .run_validation_test_on_compute_instance_deploy_stage_execution_progress import RunValidationTestOnComputeInstanceDeployStageExecutionProgress +from .put_repository_branch_details import PutRepositoryBranchDetails +from .put_repository_ref_details import PutRepositoryRefDetails +from .put_repository_tag_details import PutRepositoryTagDetails +from .repository import Repository +from .repository_author_collection import RepositoryAuthorCollection +from .repository_author_summary import RepositoryAuthorSummary +from .repository_branch import RepositoryBranch +from .repository_branch_summary import RepositoryBranchSummary +from .repository_collection import RepositoryCollection +from .repository_commit import RepositoryCommit +from .repository_commit_collection import RepositoryCommitCollection +from .repository_commit_summary import RepositoryCommitSummary +from .repository_file_lines import RepositoryFileLines +from .repository_mirror_record import RepositoryMirrorRecord +from .repository_mirror_record_collection import RepositoryMirrorRecordCollection +from .repository_mirror_record_summary import RepositoryMirrorRecordSummary +from .repository_object import RepositoryObject +from .repository_path_collection import RepositoryPathCollection +from .repository_path_summary import RepositoryPathSummary +from .repository_ref import RepositoryRef +from .repository_ref_collection import RepositoryRefCollection +from .repository_ref_summary import RepositoryRefSummary +from .repository_summary import RepositorySummary +from .repository_tag import RepositoryTag +from .repository_tag_summary import RepositoryTagSummary from .single_deploy_stage_deployment import SingleDeployStageDeployment from .single_deploy_stage_deployment_summary import SingleDeployStageDeploymentSummary +from .trigger import Trigger +from .trigger_action import TriggerAction +from .trigger_build_pipeline_action import TriggerBuildPipelineAction +from .trigger_collection import TriggerCollection +from .trigger_create_result import TriggerCreateResult +from .trigger_deployment_pipeline_stage_run_progress import TriggerDeploymentPipelineStageRunProgress +from .trigger_deployment_stage import TriggerDeploymentStage +from .trigger_deployment_stage_summary import TriggerDeploymentStageSummary +from .trigger_info import TriggerInfo +from .trigger_schedule import TriggerSchedule +from .trigger_summary import TriggerSummary +from .update_absolute_wait_criteria_details import UpdateAbsoluteWaitCriteriaDetails +from .update_build_pipeline_details import UpdateBuildPipelineDetails +from .update_build_pipeline_stage_details import UpdateBuildPipelineStageDetails +from .update_build_run_details import UpdateBuildRunDetails +from .update_build_stage_details import UpdateBuildStageDetails from .update_compute_instance_group_deploy_environment_details import UpdateComputeInstanceGroupDeployEnvironmentDetails from .update_compute_instance_group_deploy_stage_details import UpdateComputeInstanceGroupDeployStageDetails +from .update_connection_details import UpdateConnectionDetails +from .update_deliver_artifact_stage_details import UpdateDeliverArtifactStageDetails from .update_deploy_artifact_details import UpdateDeployArtifactDetails from .update_deploy_environment_details import UpdateDeployEnvironmentDetails from .update_deploy_pipeline_deployment_details import UpdateDeployPipelineDeploymentDetails @@ -134,21 +267,34 @@ from .update_deploy_pipeline_redeployment_details import UpdateDeployPipelineRedeploymentDetails from .update_deploy_stage_details import UpdateDeployStageDetails from .update_deployment_details import UpdateDeploymentDetails +from .update_devops_code_repository_trigger_details import UpdateDevopsCodeRepositoryTriggerDetails from .update_function_deploy_environment_details import UpdateFunctionDeployEnvironmentDetails from .update_function_deploy_stage_details import UpdateFunctionDeployStageDetails +from .update_github_access_token_connection_details import UpdateGithubAccessTokenConnectionDetails +from .update_github_trigger_details import UpdateGithubTriggerDetails +from .update_gitlab_access_token_connection_details import UpdateGitlabAccessTokenConnectionDetails +from .update_gitlab_trigger_details import UpdateGitlabTriggerDetails from .update_invoke_function_deploy_stage_details import UpdateInvokeFunctionDeployStageDetails from .update_load_balancer_traffic_shift_deploy_stage_details import UpdateLoadBalancerTrafficShiftDeployStageDetails from .update_manual_approval_deploy_stage_details import UpdateManualApprovalDeployStageDetails from .update_oke_cluster_deploy_environment_details import UpdateOkeClusterDeployEnvironmentDetails from .update_oke_deploy_stage_details import UpdateOkeDeployStageDetails from .update_project_details import UpdateProjectDetails +from .update_repository_details import UpdateRepositoryDetails from .update_single_deploy_stage_deployment_details import UpdateSingleDeployStageDeploymentDetails +from .update_trigger_deployment_stage_details import UpdateTriggerDeploymentStageDetails +from .update_trigger_details import UpdateTriggerDetails +from .update_wait_criteria_details import UpdateWaitCriteriaDetails from .update_wait_deploy_stage_details import UpdateWaitDeployStageDetails +from .update_wait_stage_details import UpdateWaitStageDetails from .wait_criteria import WaitCriteria from .wait_criteria_summary import WaitCriteriaSummary from .wait_deploy_stage import WaitDeployStage from .wait_deploy_stage_execution_progress import WaitDeployStageExecutionProgress from .wait_deploy_stage_summary import WaitDeployStageSummary +from .wait_stage import WaitStage +from .wait_stage_run_progress import WaitStageRunProgress +from .wait_stage_summary import WaitStageSummary from .work_request import WorkRequest from .work_request_collection import WorkRequestCollection from .work_request_error import WorkRequestError @@ -162,20 +308,44 @@ devops_type_mapping = { "AbsoluteWaitCriteria": AbsoluteWaitCriteria, "AbsoluteWaitCriteriaSummary": AbsoluteWaitCriteriaSummary, + "ActualBuildRunnerShapeConfig": ActualBuildRunnerShapeConfig, "ApprovalAction": ApprovalAction, "ApprovalPolicy": ApprovalPolicy, "ApproveDeploymentDetails": ApproveDeploymentDetails, "AutomatedDeployStageRollbackPolicy": AutomatedDeployStageRollbackPolicy, "BackendSetIpCollection": BackendSetIpCollection, + "BuildOutputs": BuildOutputs, + "BuildPipeline": BuildPipeline, + "BuildPipelineCollection": BuildPipelineCollection, + "BuildPipelineParameter": BuildPipelineParameter, + "BuildPipelineParameterCollection": BuildPipelineParameterCollection, + "BuildPipelineStage": BuildPipelineStage, + "BuildPipelineStageCollection": BuildPipelineStageCollection, + "BuildPipelineStagePredecessor": BuildPipelineStagePredecessor, + "BuildPipelineStagePredecessorCollection": BuildPipelineStagePredecessorCollection, + "BuildPipelineStageRunProgress": BuildPipelineStageRunProgress, + "BuildPipelineStageSummary": BuildPipelineStageSummary, + "BuildPipelineSummary": BuildPipelineSummary, + "BuildRun": BuildRun, + "BuildRunArgument": BuildRunArgument, + "BuildRunArgumentCollection": BuildRunArgumentCollection, + "BuildRunProgress": BuildRunProgress, + "BuildRunProgressSummary": BuildRunProgressSummary, + "BuildRunSource": BuildRunSource, + "BuildRunSummary": BuildRunSummary, + "BuildRunSummaryCollection": BuildRunSummaryCollection, + "BuildSource": BuildSource, + "BuildSourceCollection": BuildSourceCollection, + "BuildStage": BuildStage, + "BuildStageRunProgress": BuildStageRunProgress, + "BuildStageRunStep": BuildStageRunStep, + "BuildStageSummary": BuildStageSummary, + "CancelBuildRunDetails": CancelBuildRunDetails, "CancelDeploymentDetails": CancelDeploymentDetails, "ChangeProjectCompartmentDetails": ChangeProjectCompartmentDetails, - "ComputeInstanceGroupBlueGreenDeployStageExecutionProgress": ComputeInstanceGroupBlueGreenDeployStageExecutionProgress, - "ComputeInstanceGroupBlueGreenTrafficShiftDeployStageExecutionProgress": ComputeInstanceGroupBlueGreenTrafficShiftDeployStageExecutionProgress, + "CommitInfo": CommitInfo, "ComputeInstanceGroupByIdsSelector": ComputeInstanceGroupByIdsSelector, "ComputeInstanceGroupByQuerySelector": ComputeInstanceGroupByQuerySelector, - "ComputeInstanceGroupCanaryApprovalDeployStageExecutionProgress": ComputeInstanceGroupCanaryApprovalDeployStageExecutionProgress, - "ComputeInstanceGroupCanaryDeployStageExecutionProgress": ComputeInstanceGroupCanaryDeployStageExecutionProgress, - "ComputeInstanceGroupCanaryTrafficShiftDeployStageExecutionProgress": ComputeInstanceGroupCanaryTrafficShiftDeployStageExecutionProgress, "ComputeInstanceGroupDeployEnvironment": ComputeInstanceGroupDeployEnvironment, "ComputeInstanceGroupDeployEnvironmentSummary": ComputeInstanceGroupDeployEnvironmentSummary, "ComputeInstanceGroupDeployStage": ComputeInstanceGroupDeployStage, @@ -189,9 +359,20 @@ "ComputeInstanceGroupRolloutPolicy": ComputeInstanceGroupRolloutPolicy, "ComputeInstanceGroupSelector": ComputeInstanceGroupSelector, "ComputeInstanceGroupSelectorCollection": ComputeInstanceGroupSelectorCollection, + "Connection": Connection, + "ConnectionCollection": ConnectionCollection, + "ConnectionSummary": ConnectionSummary, + "ContainerRegistryDeliveredArtifact": ContainerRegistryDeliveredArtifact, "CountBasedApprovalPolicy": CountBasedApprovalPolicy, + "CreateAbsoluteWaitCriteriaDetails": CreateAbsoluteWaitCriteriaDetails, + "CreateBuildPipelineDetails": CreateBuildPipelineDetails, + "CreateBuildPipelineStageDetails": CreateBuildPipelineStageDetails, + "CreateBuildRunDetails": CreateBuildRunDetails, + "CreateBuildStageDetails": CreateBuildStageDetails, "CreateComputeInstanceGroupDeployEnvironmentDetails": CreateComputeInstanceGroupDeployEnvironmentDetails, "CreateComputeInstanceGroupDeployStageDetails": CreateComputeInstanceGroupDeployStageDetails, + "CreateConnectionDetails": CreateConnectionDetails, + "CreateDeliverArtifactStageDetails": CreateDeliverArtifactStageDetails, "CreateDeployArtifactDetails": CreateDeployArtifactDetails, "CreateDeployEnvironmentDetails": CreateDeployEnvironmentDetails, "CreateDeployPipelineDeploymentDetails": CreateDeployPipelineDeploymentDetails, @@ -199,16 +380,33 @@ "CreateDeployPipelineRedeploymentDetails": CreateDeployPipelineRedeploymentDetails, "CreateDeployStageDetails": CreateDeployStageDetails, "CreateDeploymentDetails": CreateDeploymentDetails, + "CreateDevopsCodeRepositoryTriggerDetails": CreateDevopsCodeRepositoryTriggerDetails, "CreateFunctionDeployEnvironmentDetails": CreateFunctionDeployEnvironmentDetails, "CreateFunctionDeployStageDetails": CreateFunctionDeployStageDetails, + "CreateGithubAccessTokenConnectionDetails": CreateGithubAccessTokenConnectionDetails, + "CreateGithubTriggerDetails": CreateGithubTriggerDetails, + "CreateGitlabAccessTokenConnectionDetails": CreateGitlabAccessTokenConnectionDetails, + "CreateGitlabTriggerDetails": CreateGitlabTriggerDetails, "CreateInvokeFunctionDeployStageDetails": CreateInvokeFunctionDeployStageDetails, "CreateLoadBalancerTrafficShiftDeployStageDetails": CreateLoadBalancerTrafficShiftDeployStageDetails, "CreateManualApprovalDeployStageDetails": CreateManualApprovalDeployStageDetails, "CreateOkeClusterDeployEnvironmentDetails": CreateOkeClusterDeployEnvironmentDetails, "CreateOkeDeployStageDetails": CreateOkeDeployStageDetails, "CreateProjectDetails": CreateProjectDetails, + "CreateRepositoryDetails": CreateRepositoryDetails, "CreateSingleDeployStageDeploymentDetails": CreateSingleDeployStageDeploymentDetails, + "CreateTriggerDeploymentStageDetails": CreateTriggerDeploymentStageDetails, + "CreateTriggerDetails": CreateTriggerDetails, + "CreateWaitCriteriaDetails": CreateWaitCriteriaDetails, "CreateWaitDeployStageDetails": CreateWaitDeployStageDetails, + "CreateWaitStageDetails": CreateWaitStageDetails, + "DeliverArtifact": DeliverArtifact, + "DeliverArtifactCollection": DeliverArtifactCollection, + "DeliverArtifactStage": DeliverArtifactStage, + "DeliverArtifactStageRunProgress": DeliverArtifactStageRunProgress, + "DeliverArtifactStageSummary": DeliverArtifactStageSummary, + "DeliveredArtifact": DeliveredArtifact, + "DeliveredArtifactCollection": DeliveredArtifactCollection, "DeployArtifact": DeployArtifact, "DeployArtifactCollection": DeployArtifactCollection, "DeployArtifactOverrideArgument": DeployArtifactOverrideArgument, @@ -248,12 +446,50 @@ "DeploymentCollection": DeploymentCollection, "DeploymentExecutionProgress": DeploymentExecutionProgress, "DeploymentSummary": DeploymentSummary, + "DevopsCodeRepositoryBuildRunSource": DevopsCodeRepositoryBuildRunSource, + "DevopsCodeRepositoryBuildSource": DevopsCodeRepositoryBuildSource, + "DevopsCodeRepositoryFilter": DevopsCodeRepositoryFilter, + "DevopsCodeRepositoryFilterAttributes": DevopsCodeRepositoryFilterAttributes, + "DevopsCodeRepositoryTrigger": DevopsCodeRepositoryTrigger, + "DevopsCodeRepositoryTriggerCreateResult": DevopsCodeRepositoryTriggerCreateResult, + "DevopsCodeRepositoryTriggerSummary": DevopsCodeRepositoryTriggerSummary, + "DiffChunk": DiffChunk, + "DiffCollection": DiffCollection, + "DiffLineDetails": DiffLineDetails, + "DiffResponse": DiffResponse, + "DiffResponseEntry": DiffResponseEntry, + "DiffSection": DiffSection, + "DiffSummary": DiffSummary, + "ExportedVariable": ExportedVariable, + "ExportedVariableCollection": ExportedVariableCollection, + "FileDiffResponse": FileDiffResponse, + "FileLineDetails": FileLineDetails, + "Filter": Filter, "FunctionDeployEnvironment": FunctionDeployEnvironment, "FunctionDeployEnvironmentSummary": FunctionDeployEnvironmentSummary, "FunctionDeployStage": FunctionDeployStage, "FunctionDeployStageExecutionProgress": FunctionDeployStageExecutionProgress, "FunctionDeployStageSummary": FunctionDeployStageSummary, + "GenericDeliveredArtifact": GenericDeliveredArtifact, "GenericDeployArtifactSource": GenericDeployArtifactSource, + "GithubAccessTokenConnection": GithubAccessTokenConnection, + "GithubAccessTokenConnectionSummary": GithubAccessTokenConnectionSummary, + "GithubBuildRunSource": GithubBuildRunSource, + "GithubBuildSource": GithubBuildSource, + "GithubFilter": GithubFilter, + "GithubFilterAttributes": GithubFilterAttributes, + "GithubTrigger": GithubTrigger, + "GithubTriggerCreateResult": GithubTriggerCreateResult, + "GithubTriggerSummary": GithubTriggerSummary, + "GitlabAccessTokenConnection": GitlabAccessTokenConnection, + "GitlabAccessTokenConnectionSummary": GitlabAccessTokenConnectionSummary, + "GitlabBuildRunSource": GitlabBuildRunSource, + "GitlabBuildSource": GitlabBuildSource, + "GitlabFilter": GitlabFilter, + "GitlabFilterAttributes": GitlabFilterAttributes, + "GitlabTrigger": GitlabTrigger, + "GitlabTriggerCreateResult": GitlabTriggerCreateResult, + "GitlabTriggerSummary": GitlabTriggerSummary, "InlineDeployArtifactSource": InlineDeployArtifactSource, "InvokeFunctionDeployStage": InvokeFunctionDeployStage, "InvokeFunctionDeployStageExecutionProgress": InvokeFunctionDeployStageExecutionProgress, @@ -266,6 +502,8 @@ "ManualApprovalDeployStage": ManualApprovalDeployStage, "ManualApprovalDeployStageExecutionProgress": ManualApprovalDeployStageExecutionProgress, "ManualApprovalDeployStageSummary": ManualApprovalDeployStageSummary, + "ManualBuildRunSource": ManualBuildRunSource, + "MirrorRepositoryConfig": MirrorRepositoryConfig, "NoDeployStageRollbackPolicy": NoDeployStageRollbackPolicy, "NotificationConfig": NotificationConfig, "OcirDeployArtifactSource": OcirDeployArtifactSource, @@ -277,12 +515,53 @@ "Project": Project, "ProjectCollection": ProjectCollection, "ProjectSummary": ProjectSummary, - "RunPipelineDeployStageExecutionProgress": RunPipelineDeployStageExecutionProgress, - "RunValidationTestOnComputeInstanceDeployStageExecutionProgress": RunValidationTestOnComputeInstanceDeployStageExecutionProgress, + "PutRepositoryBranchDetails": PutRepositoryBranchDetails, + "PutRepositoryRefDetails": PutRepositoryRefDetails, + "PutRepositoryTagDetails": PutRepositoryTagDetails, + "Repository": Repository, + "RepositoryAuthorCollection": RepositoryAuthorCollection, + "RepositoryAuthorSummary": RepositoryAuthorSummary, + "RepositoryBranch": RepositoryBranch, + "RepositoryBranchSummary": RepositoryBranchSummary, + "RepositoryCollection": RepositoryCollection, + "RepositoryCommit": RepositoryCommit, + "RepositoryCommitCollection": RepositoryCommitCollection, + "RepositoryCommitSummary": RepositoryCommitSummary, + "RepositoryFileLines": RepositoryFileLines, + "RepositoryMirrorRecord": RepositoryMirrorRecord, + "RepositoryMirrorRecordCollection": RepositoryMirrorRecordCollection, + "RepositoryMirrorRecordSummary": RepositoryMirrorRecordSummary, + "RepositoryObject": RepositoryObject, + "RepositoryPathCollection": RepositoryPathCollection, + "RepositoryPathSummary": RepositoryPathSummary, + "RepositoryRef": RepositoryRef, + "RepositoryRefCollection": RepositoryRefCollection, + "RepositoryRefSummary": RepositoryRefSummary, + "RepositorySummary": RepositorySummary, + "RepositoryTag": RepositoryTag, + "RepositoryTagSummary": RepositoryTagSummary, "SingleDeployStageDeployment": SingleDeployStageDeployment, "SingleDeployStageDeploymentSummary": SingleDeployStageDeploymentSummary, + "Trigger": Trigger, + "TriggerAction": TriggerAction, + "TriggerBuildPipelineAction": TriggerBuildPipelineAction, + "TriggerCollection": TriggerCollection, + "TriggerCreateResult": TriggerCreateResult, + "TriggerDeploymentPipelineStageRunProgress": TriggerDeploymentPipelineStageRunProgress, + "TriggerDeploymentStage": TriggerDeploymentStage, + "TriggerDeploymentStageSummary": TriggerDeploymentStageSummary, + "TriggerInfo": TriggerInfo, + "TriggerSchedule": TriggerSchedule, + "TriggerSummary": TriggerSummary, + "UpdateAbsoluteWaitCriteriaDetails": UpdateAbsoluteWaitCriteriaDetails, + "UpdateBuildPipelineDetails": UpdateBuildPipelineDetails, + "UpdateBuildPipelineStageDetails": UpdateBuildPipelineStageDetails, + "UpdateBuildRunDetails": UpdateBuildRunDetails, + "UpdateBuildStageDetails": UpdateBuildStageDetails, "UpdateComputeInstanceGroupDeployEnvironmentDetails": UpdateComputeInstanceGroupDeployEnvironmentDetails, "UpdateComputeInstanceGroupDeployStageDetails": UpdateComputeInstanceGroupDeployStageDetails, + "UpdateConnectionDetails": UpdateConnectionDetails, + "UpdateDeliverArtifactStageDetails": UpdateDeliverArtifactStageDetails, "UpdateDeployArtifactDetails": UpdateDeployArtifactDetails, "UpdateDeployEnvironmentDetails": UpdateDeployEnvironmentDetails, "UpdateDeployPipelineDeploymentDetails": UpdateDeployPipelineDeploymentDetails, @@ -290,21 +569,34 @@ "UpdateDeployPipelineRedeploymentDetails": UpdateDeployPipelineRedeploymentDetails, "UpdateDeployStageDetails": UpdateDeployStageDetails, "UpdateDeploymentDetails": UpdateDeploymentDetails, + "UpdateDevopsCodeRepositoryTriggerDetails": UpdateDevopsCodeRepositoryTriggerDetails, "UpdateFunctionDeployEnvironmentDetails": UpdateFunctionDeployEnvironmentDetails, "UpdateFunctionDeployStageDetails": UpdateFunctionDeployStageDetails, + "UpdateGithubAccessTokenConnectionDetails": UpdateGithubAccessTokenConnectionDetails, + "UpdateGithubTriggerDetails": UpdateGithubTriggerDetails, + "UpdateGitlabAccessTokenConnectionDetails": UpdateGitlabAccessTokenConnectionDetails, + "UpdateGitlabTriggerDetails": UpdateGitlabTriggerDetails, "UpdateInvokeFunctionDeployStageDetails": UpdateInvokeFunctionDeployStageDetails, "UpdateLoadBalancerTrafficShiftDeployStageDetails": UpdateLoadBalancerTrafficShiftDeployStageDetails, "UpdateManualApprovalDeployStageDetails": UpdateManualApprovalDeployStageDetails, "UpdateOkeClusterDeployEnvironmentDetails": UpdateOkeClusterDeployEnvironmentDetails, "UpdateOkeDeployStageDetails": UpdateOkeDeployStageDetails, "UpdateProjectDetails": UpdateProjectDetails, + "UpdateRepositoryDetails": UpdateRepositoryDetails, "UpdateSingleDeployStageDeploymentDetails": UpdateSingleDeployStageDeploymentDetails, + "UpdateTriggerDeploymentStageDetails": UpdateTriggerDeploymentStageDetails, + "UpdateTriggerDetails": UpdateTriggerDetails, + "UpdateWaitCriteriaDetails": UpdateWaitCriteriaDetails, "UpdateWaitDeployStageDetails": UpdateWaitDeployStageDetails, + "UpdateWaitStageDetails": UpdateWaitStageDetails, "WaitCriteria": WaitCriteria, "WaitCriteriaSummary": WaitCriteriaSummary, "WaitDeployStage": WaitDeployStage, "WaitDeployStageExecutionProgress": WaitDeployStageExecutionProgress, "WaitDeployStageSummary": WaitDeployStageSummary, + "WaitStage": WaitStage, + "WaitStageRunProgress": WaitStageRunProgress, + "WaitStageSummary": WaitStageSummary, "WorkRequest": WorkRequest, "WorkRequestCollection": WorkRequestCollection, "WorkRequestError": WorkRequestError, diff --git a/src/oci/devops/models/actual_build_runner_shape_config.py b/src/oci/devops/models/actual_build_runner_shape_config.py new file mode 100644 index 0000000000..075b46dc21 --- /dev/null +++ b/src/oci/devops/models/actual_build_runner_shape_config.py @@ -0,0 +1,101 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 ActualBuildRunnerShapeConfig(object): + """ + Build Runner Shape configuration. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ActualBuildRunnerShapeConfig object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param ocpus: + The value to assign to the ocpus property of this ActualBuildRunnerShapeConfig. + :type ocpus: float + + :param memory_in_gbs: + The value to assign to the memory_in_gbs property of this ActualBuildRunnerShapeConfig. + :type memory_in_gbs: float + + """ + self.swagger_types = { + 'ocpus': 'float', + 'memory_in_gbs': 'float' + } + + self.attribute_map = { + 'ocpus': 'ocpus', + 'memory_in_gbs': 'memoryInGBs' + } + + self._ocpus = None + self._memory_in_gbs = None + + @property + def ocpus(self): + """ + **[Required]** Gets the ocpus of this ActualBuildRunnerShapeConfig. + The total number of OCPUs set for the instance. + + + :return: The ocpus of this ActualBuildRunnerShapeConfig. + :rtype: float + """ + return self._ocpus + + @ocpus.setter + def ocpus(self, ocpus): + """ + Sets the ocpus of this ActualBuildRunnerShapeConfig. + The total number of OCPUs set for the instance. + + + :param ocpus: The ocpus of this ActualBuildRunnerShapeConfig. + :type: float + """ + self._ocpus = ocpus + + @property + def memory_in_gbs(self): + """ + **[Required]** Gets the memory_in_gbs of this ActualBuildRunnerShapeConfig. + The total amount of memory set for the instance in gigabytes. + + + :return: The memory_in_gbs of this ActualBuildRunnerShapeConfig. + :rtype: float + """ + return self._memory_in_gbs + + @memory_in_gbs.setter + def memory_in_gbs(self, memory_in_gbs): + """ + Sets the memory_in_gbs of this ActualBuildRunnerShapeConfig. + The total amount of memory set for the instance in gigabytes. + + + :param memory_in_gbs: The memory_in_gbs of this ActualBuildRunnerShapeConfig. + :type: float + """ + 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/devops/models/build_outputs.py b/src/oci/devops/models/build_outputs.py new file mode 100644 index 0000000000..5ccfd04745 --- /dev/null +++ b/src/oci/devops/models/build_outputs.py @@ -0,0 +1,120 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 BuildOutputs(object): + """ + Outputs from the Build + """ + + def __init__(self, **kwargs): + """ + Initializes a new BuildOutputs object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param exported_variables: + The value to assign to the exported_variables property of this BuildOutputs. + :type exported_variables: oci.devops.models.ExportedVariableCollection + + :param delivered_artifacts: + The value to assign to the delivered_artifacts property of this BuildOutputs. + :type delivered_artifacts: oci.devops.models.DeliveredArtifactCollection + + :param artifact_override_parameters: + The value to assign to the artifact_override_parameters property of this BuildOutputs. + :type artifact_override_parameters: oci.devops.models.DeployArtifactOverrideArgumentCollection + + """ + self.swagger_types = { + 'exported_variables': 'ExportedVariableCollection', + 'delivered_artifacts': 'DeliveredArtifactCollection', + 'artifact_override_parameters': 'DeployArtifactOverrideArgumentCollection' + } + + self.attribute_map = { + 'exported_variables': 'exportedVariables', + 'delivered_artifacts': 'deliveredArtifacts', + 'artifact_override_parameters': 'artifactOverrideParameters' + } + + self._exported_variables = None + self._delivered_artifacts = None + self._artifact_override_parameters = None + + @property + def exported_variables(self): + """ + Gets the exported_variables of this BuildOutputs. + + :return: The exported_variables of this BuildOutputs. + :rtype: oci.devops.models.ExportedVariableCollection + """ + return self._exported_variables + + @exported_variables.setter + def exported_variables(self, exported_variables): + """ + Sets the exported_variables of this BuildOutputs. + + :param exported_variables: The exported_variables of this BuildOutputs. + :type: oci.devops.models.ExportedVariableCollection + """ + self._exported_variables = exported_variables + + @property + def delivered_artifacts(self): + """ + Gets the delivered_artifacts of this BuildOutputs. + + :return: The delivered_artifacts of this BuildOutputs. + :rtype: oci.devops.models.DeliveredArtifactCollection + """ + return self._delivered_artifacts + + @delivered_artifacts.setter + def delivered_artifacts(self, delivered_artifacts): + """ + Sets the delivered_artifacts of this BuildOutputs. + + :param delivered_artifacts: The delivered_artifacts of this BuildOutputs. + :type: oci.devops.models.DeliveredArtifactCollection + """ + self._delivered_artifacts = delivered_artifacts + + @property + def artifact_override_parameters(self): + """ + Gets the artifact_override_parameters of this BuildOutputs. + + :return: The artifact_override_parameters of this BuildOutputs. + :rtype: oci.devops.models.DeployArtifactOverrideArgumentCollection + """ + return self._artifact_override_parameters + + @artifact_override_parameters.setter + def artifact_override_parameters(self, artifact_override_parameters): + """ + Sets the artifact_override_parameters of this BuildOutputs. + + :param artifact_override_parameters: The artifact_override_parameters of this BuildOutputs. + :type: oci.devops.models.DeployArtifactOverrideArgumentCollection + """ + self._artifact_override_parameters = artifact_override_parameters + + 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/devops/models/build_pipeline.py b/src/oci/devops/models/build_pipeline.py new file mode 100644 index 0000000000..a19d261a9c --- /dev/null +++ b/src/oci/devops/models/build_pipeline.py @@ -0,0 +1,486 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 BuildPipeline(object): + """ + A set of stages whose predecessor relation forms a directed acyclic graph. + """ + + #: A constant which can be used with the lifecycle_state property of a BuildPipeline. + #: This constant has a value of "CREATING" + LIFECYCLE_STATE_CREATING = "CREATING" + + #: A constant which can be used with the lifecycle_state property of a BuildPipeline. + #: This constant has a value of "UPDATING" + LIFECYCLE_STATE_UPDATING = "UPDATING" + + #: A constant which can be used with the lifecycle_state property of a BuildPipeline. + #: This constant has a value of "ACTIVE" + LIFECYCLE_STATE_ACTIVE = "ACTIVE" + + #: A constant which can be used with the lifecycle_state property of a BuildPipeline. + #: This constant has a value of "INACTIVE" + LIFECYCLE_STATE_INACTIVE = "INACTIVE" + + #: A constant which can be used with the lifecycle_state property of a BuildPipeline. + #: This constant has a value of "DELETING" + LIFECYCLE_STATE_DELETING = "DELETING" + + #: A constant which can be used with the lifecycle_state property of a BuildPipeline. + #: This constant has a value of "DELETED" + LIFECYCLE_STATE_DELETED = "DELETED" + + #: A constant which can be used with the lifecycle_state property of a BuildPipeline. + #: This constant has a value of "FAILED" + LIFECYCLE_STATE_FAILED = "FAILED" + + def __init__(self, **kwargs): + """ + Initializes a new BuildPipeline 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 BuildPipeline. + :type id: str + + :param description: + The value to assign to the description property of this BuildPipeline. + :type description: str + + :param display_name: + The value to assign to the display_name property of this BuildPipeline. + :type display_name: str + + :param compartment_id: + The value to assign to the compartment_id property of this BuildPipeline. + :type compartment_id: str + + :param project_id: + The value to assign to the project_id property of this BuildPipeline. + :type project_id: str + + :param time_created: + The value to assign to the time_created property of this BuildPipeline. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this BuildPipeline. + :type time_updated: datetime + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this BuildPipeline. + Allowed values for this property are: "CREATING", "UPDATING", "ACTIVE", "INACTIVE", "DELETING", "DELETED", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type lifecycle_state: str + + :param lifecycle_details: + The value to assign to the lifecycle_details property of this BuildPipeline. + :type lifecycle_details: str + + :param build_pipeline_parameters: + The value to assign to the build_pipeline_parameters property of this BuildPipeline. + :type build_pipeline_parameters: oci.devops.models.BuildPipelineParameterCollection + + :param freeform_tags: + The value to assign to the freeform_tags property of this BuildPipeline. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this BuildPipeline. + :type defined_tags: dict(str, dict(str, object)) + + :param system_tags: + The value to assign to the system_tags property of this BuildPipeline. + :type system_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'id': 'str', + 'description': 'str', + 'display_name': 'str', + 'compartment_id': 'str', + 'project_id': 'str', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'lifecycle_state': 'str', + 'lifecycle_details': 'str', + 'build_pipeline_parameters': 'BuildPipelineParameterCollection', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'system_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'id': 'id', + 'description': 'description', + 'display_name': 'displayName', + 'compartment_id': 'compartmentId', + 'project_id': 'projectId', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'lifecycle_state': 'lifecycleState', + 'lifecycle_details': 'lifecycleDetails', + 'build_pipeline_parameters': 'buildPipelineParameters', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'system_tags': 'systemTags' + } + + self._id = None + self._description = None + self._display_name = None + self._compartment_id = None + self._project_id = None + self._time_created = None + self._time_updated = None + self._lifecycle_state = None + self._lifecycle_details = None + self._build_pipeline_parameters = None + self._freeform_tags = None + self._defined_tags = None + self._system_tags = None + + @property + def id(self): + """ + **[Required]** Gets the id of this BuildPipeline. + Unique identifier that is immutable on creation + + + :return: The id of this BuildPipeline. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this BuildPipeline. + Unique identifier that is immutable on creation + + + :param id: The id of this BuildPipeline. + :type: str + """ + self._id = id + + @property + def description(self): + """ + Gets the description of this BuildPipeline. + Optional description about the BuildPipeline + + + :return: The description of this BuildPipeline. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this BuildPipeline. + Optional description about the BuildPipeline + + + :param description: The description of this BuildPipeline. + :type: str + """ + self._description = description + + @property + def display_name(self): + """ + Gets the display_name of this BuildPipeline. + BuildPipeline identifier which can be renamed and is not necessarily unique + + + :return: The display_name of this BuildPipeline. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this BuildPipeline. + BuildPipeline identifier which can be renamed and is not necessarily unique + + + :param display_name: The display_name of this BuildPipeline. + :type: str + """ + self._display_name = display_name + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this BuildPipeline. + Compartment Identifier + + + :return: The compartment_id of this BuildPipeline. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this BuildPipeline. + Compartment Identifier + + + :param compartment_id: The compartment_id of this BuildPipeline. + :type: str + """ + self._compartment_id = compartment_id + + @property + def project_id(self): + """ + **[Required]** Gets the project_id of this BuildPipeline. + Project Identifier + + + :return: The project_id of this BuildPipeline. + :rtype: str + """ + return self._project_id + + @project_id.setter + def project_id(self, project_id): + """ + Sets the project_id of this BuildPipeline. + Project Identifier + + + :param project_id: The project_id of this BuildPipeline. + :type: str + """ + self._project_id = project_id + + @property + def time_created(self): + """ + Gets the time_created of this BuildPipeline. + The time the BuildPipeline was created. An RFC3339 formatted datetime string + + + :return: The time_created of this BuildPipeline. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this BuildPipeline. + The time the BuildPipeline was created. An RFC3339 formatted datetime string + + + :param time_created: The time_created of this BuildPipeline. + :type: datetime + """ + self._time_created = time_created + + @property + def time_updated(self): + """ + Gets the time_updated of this BuildPipeline. + The time at which the BuildPipeline was updated. An RFC3339 formatted datetime string + + + :return: The time_updated of this BuildPipeline. + :rtype: datetime + """ + return self._time_updated + + @time_updated.setter + def time_updated(self, time_updated): + """ + Sets the time_updated of this BuildPipeline. + The time at which the BuildPipeline was updated. An RFC3339 formatted datetime string + + + :param time_updated: The time_updated of this BuildPipeline. + :type: datetime + """ + self._time_updated = time_updated + + @property + def lifecycle_state(self): + """ + Gets the lifecycle_state of this BuildPipeline. + The current state of the BuildPipeline. + + Allowed values for this property are: "CREATING", "UPDATING", "ACTIVE", "INACTIVE", "DELETING", "DELETED", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The lifecycle_state of this BuildPipeline. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this BuildPipeline. + The current state of the BuildPipeline. + + + :param lifecycle_state: The lifecycle_state of this BuildPipeline. + :type: str + """ + allowed_values = ["CREATING", "UPDATING", "ACTIVE", "INACTIVE", "DELETING", "DELETED", "FAILED"] + 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 BuildPipeline. + A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + + + :return: The lifecycle_details of this BuildPipeline. + :rtype: str + """ + return self._lifecycle_details + + @lifecycle_details.setter + def lifecycle_details(self, lifecycle_details): + """ + Sets the lifecycle_details of this BuildPipeline. + A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + + + :param lifecycle_details: The lifecycle_details of this BuildPipeline. + :type: str + """ + self._lifecycle_details = lifecycle_details + + @property + def build_pipeline_parameters(self): + """ + Gets the build_pipeline_parameters of this BuildPipeline. + + :return: The build_pipeline_parameters of this BuildPipeline. + :rtype: oci.devops.models.BuildPipelineParameterCollection + """ + return self._build_pipeline_parameters + + @build_pipeline_parameters.setter + def build_pipeline_parameters(self, build_pipeline_parameters): + """ + Sets the build_pipeline_parameters of this BuildPipeline. + + :param build_pipeline_parameters: The build_pipeline_parameters of this BuildPipeline. + :type: oci.devops.models.BuildPipelineParameterCollection + """ + self._build_pipeline_parameters = build_pipeline_parameters + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this BuildPipeline. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See `Resource Tags`__. Example: `{\"bar-key\": \"value\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this BuildPipeline. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this BuildPipeline. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See `Resource Tags`__. Example: `{\"bar-key\": \"value\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this BuildPipeline. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this BuildPipeline. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this BuildPipeline. + :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 BuildPipeline. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this BuildPipeline. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + @property + def system_tags(self): + """ + Gets the system_tags of this BuildPipeline. + Usage of system tag keys. These predefined keys are scoped to namespaces. See `Resource Tags`__. Example: `{\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The system_tags of this BuildPipeline. + :rtype: dict(str, dict(str, object)) + """ + return self._system_tags + + @system_tags.setter + def system_tags(self, system_tags): + """ + Sets the system_tags of this BuildPipeline. + Usage of system tag keys. These predefined keys are scoped to namespaces. See `Resource Tags`__. Example: `{\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param system_tags: The system_tags of this BuildPipeline. + :type: dict(str, dict(str, object)) + """ + self._system_tags = system_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/devops/models/build_pipeline_collection.py b/src/oci/devops/models/build_pipeline_collection.py new file mode 100644 index 0000000000..588038f229 --- /dev/null +++ b/src/oci/devops/models/build_pipeline_collection.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 BuildPipelineCollection(object): + """ + Results of an pipeline search. + """ + + def __init__(self, **kwargs): + """ + Initializes a new BuildPipelineCollection object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param items: + The value to assign to the items property of this BuildPipelineCollection. + :type items: list[oci.devops.models.BuildPipelineSummary] + + """ + self.swagger_types = { + 'items': 'list[BuildPipelineSummary]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this BuildPipelineCollection. + Array of BuildPipelineSummary items. + + + :return: The items of this BuildPipelineCollection. + :rtype: list[oci.devops.models.BuildPipelineSummary] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this BuildPipelineCollection. + Array of BuildPipelineSummary items. + + + :param items: The items of this BuildPipelineCollection. + :type: list[oci.devops.models.BuildPipelineSummary] + """ + self._items = items + + 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/devops/models/build_pipeline_parameter.py b/src/oci/devops/models/build_pipeline_parameter.py new file mode 100644 index 0000000000..6ad009aba3 --- /dev/null +++ b/src/oci/devops/models/build_pipeline_parameter.py @@ -0,0 +1,134 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 BuildPipelineParameter(object): + """ + Parameter name for which the values will be supplied at the time of BuildRun. + """ + + def __init__(self, **kwargs): + """ + Initializes a new BuildPipelineParameter 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 BuildPipelineParameter. + :type name: str + + :param default_value: + The value to assign to the default_value property of this BuildPipelineParameter. + :type default_value: str + + :param description: + The value to assign to the description property of this BuildPipelineParameter. + :type description: str + + """ + self.swagger_types = { + 'name': 'str', + 'default_value': 'str', + 'description': 'str' + } + + self.attribute_map = { + 'name': 'name', + 'default_value': 'defaultValue', + 'description': 'description' + } + + self._name = None + self._default_value = None + self._description = None + + @property + def name(self): + """ + **[Required]** Gets the name of this BuildPipelineParameter. + Name of the parameter (Case-sensitive). + Example: 'Pipeline_param' is not same as 'pipeline_Param' + + + :return: The name of this BuildPipelineParameter. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """ + Sets the name of this BuildPipelineParameter. + Name of the parameter (Case-sensitive). + Example: 'Pipeline_param' is not same as 'pipeline_Param' + + + :param name: The name of this BuildPipelineParameter. + :type: str + """ + self._name = name + + @property + def default_value(self): + """ + Gets the default_value of this BuildPipelineParameter. + Default value of the parameter + + + :return: The default_value of this BuildPipelineParameter. + :rtype: str + """ + return self._default_value + + @default_value.setter + def default_value(self, default_value): + """ + Sets the default_value of this BuildPipelineParameter. + Default value of the parameter + + + :param default_value: The default_value of this BuildPipelineParameter. + :type: str + """ + self._default_value = default_value + + @property + def description(self): + """ + Gets the description of this BuildPipelineParameter. + Description of the parameter + + + :return: The description of this BuildPipelineParameter. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this BuildPipelineParameter. + Description of the parameter + + + :param description: The description of this BuildPipelineParameter. + :type: str + """ + self._description = description + + 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/devops/models/build_pipeline_parameter_collection.py b/src/oci/devops/models/build_pipeline_parameter_collection.py new file mode 100644 index 0000000000..bb66760f5d --- /dev/null +++ b/src/oci/devops/models/build_pipeline_parameter_collection.py @@ -0,0 +1,71 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 BuildPipelineParameterCollection(object): + """ + Specifies list of parameters present in BuildPipeline. + In case of UPDATE operation, replaces existing parameters list. Merging with existing parameters is not supported. + """ + + def __init__(self, **kwargs): + """ + Initializes a new BuildPipelineParameterCollection object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param items: + The value to assign to the items property of this BuildPipelineParameterCollection. + :type items: list[oci.devops.models.BuildPipelineParameter] + + """ + self.swagger_types = { + 'items': 'list[BuildPipelineParameter]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this BuildPipelineParameterCollection. + List of Parameters defined for a BuildPipeline. + + + :return: The items of this BuildPipelineParameterCollection. + :rtype: list[oci.devops.models.BuildPipelineParameter] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this BuildPipelineParameterCollection. + List of Parameters defined for a BuildPipeline. + + + :param items: The items of this BuildPipelineParameterCollection. + :type: list[oci.devops.models.BuildPipelineParameter] + """ + self._items = items + + 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/devops/models/build_pipeline_stage.py b/src/oci/devops/models/build_pipeline_stage.py new file mode 100644 index 0000000000..2ccb4fd182 --- /dev/null +++ b/src/oci/devops/models/build_pipeline_stage.py @@ -0,0 +1,600 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 BuildPipelineStage(object): + """ + A single step in a BuildPipeline. A stage takes a specific designated action. There are + many types of stages. For eg. `Build` stage, `Deliver Artifact` Stage. + """ + + #: A constant which can be used with the build_pipeline_stage_type property of a BuildPipelineStage. + #: This constant has a value of "WAIT" + BUILD_PIPELINE_STAGE_TYPE_WAIT = "WAIT" + + #: A constant which can be used with the build_pipeline_stage_type property of a BuildPipelineStage. + #: This constant has a value of "BUILD" + BUILD_PIPELINE_STAGE_TYPE_BUILD = "BUILD" + + #: A constant which can be used with the build_pipeline_stage_type property of a BuildPipelineStage. + #: This constant has a value of "DELIVER_ARTIFACT" + BUILD_PIPELINE_STAGE_TYPE_DELIVER_ARTIFACT = "DELIVER_ARTIFACT" + + #: A constant which can be used with the build_pipeline_stage_type property of a BuildPipelineStage. + #: This constant has a value of "TRIGGER_DEPLOYMENT_PIPELINE" + BUILD_PIPELINE_STAGE_TYPE_TRIGGER_DEPLOYMENT_PIPELINE = "TRIGGER_DEPLOYMENT_PIPELINE" + + #: A constant which can be used with the lifecycle_state property of a BuildPipelineStage. + #: This constant has a value of "CREATING" + LIFECYCLE_STATE_CREATING = "CREATING" + + #: A constant which can be used with the lifecycle_state property of a BuildPipelineStage. + #: This constant has a value of "UPDATING" + LIFECYCLE_STATE_UPDATING = "UPDATING" + + #: A constant which can be used with the lifecycle_state property of a BuildPipelineStage. + #: This constant has a value of "ACTIVE" + LIFECYCLE_STATE_ACTIVE = "ACTIVE" + + #: A constant which can be used with the lifecycle_state property of a BuildPipelineStage. + #: This constant has a value of "DELETING" + LIFECYCLE_STATE_DELETING = "DELETING" + + #: A constant which can be used with the lifecycle_state property of a BuildPipelineStage. + #: This constant has a value of "DELETED" + LIFECYCLE_STATE_DELETED = "DELETED" + + #: A constant which can be used with the lifecycle_state property of a BuildPipelineStage. + #: This constant has a value of "FAILED" + LIFECYCLE_STATE_FAILED = "FAILED" + + def __init__(self, **kwargs): + """ + Initializes a new BuildPipelineStage object with values from keyword arguments. This class has the following subclasses and if you are using this class as input + to a service operations then you should favor using a subclass over the base class: + + * :class:`~oci.devops.models.DeliverArtifactStage` + * :class:`~oci.devops.models.WaitStage` + * :class:`~oci.devops.models.TriggerDeploymentStage` + * :class:`~oci.devops.models.BuildStage` + + 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 BuildPipelineStage. + :type id: str + + :param display_name: + The value to assign to the display_name property of this BuildPipelineStage. + :type display_name: str + + :param description: + The value to assign to the description property of this BuildPipelineStage. + :type description: str + + :param project_id: + The value to assign to the project_id property of this BuildPipelineStage. + :type project_id: str + + :param build_pipeline_id: + The value to assign to the build_pipeline_id property of this BuildPipelineStage. + :type build_pipeline_id: str + + :param compartment_id: + The value to assign to the compartment_id property of this BuildPipelineStage. + :type compartment_id: str + + :param build_pipeline_stage_type: + The value to assign to the build_pipeline_stage_type property of this BuildPipelineStage. + Allowed values for this property are: "WAIT", "BUILD", "DELIVER_ARTIFACT", "TRIGGER_DEPLOYMENT_PIPELINE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type build_pipeline_stage_type: str + + :param time_created: + The value to assign to the time_created property of this BuildPipelineStage. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this BuildPipelineStage. + :type time_updated: datetime + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this BuildPipelineStage. + Allowed values for this property are: "CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type lifecycle_state: str + + :param lifecycle_details: + The value to assign to the lifecycle_details property of this BuildPipelineStage. + :type lifecycle_details: str + + :param build_pipeline_stage_predecessor_collection: + The value to assign to the build_pipeline_stage_predecessor_collection property of this BuildPipelineStage. + :type build_pipeline_stage_predecessor_collection: oci.devops.models.BuildPipelineStagePredecessorCollection + + :param freeform_tags: + The value to assign to the freeform_tags property of this BuildPipelineStage. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this BuildPipelineStage. + :type defined_tags: dict(str, dict(str, object)) + + :param system_tags: + The value to assign to the system_tags property of this BuildPipelineStage. + :type system_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'id': 'str', + 'display_name': 'str', + 'description': 'str', + 'project_id': 'str', + 'build_pipeline_id': 'str', + 'compartment_id': 'str', + 'build_pipeline_stage_type': 'str', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'lifecycle_state': 'str', + 'lifecycle_details': 'str', + 'build_pipeline_stage_predecessor_collection': 'BuildPipelineStagePredecessorCollection', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'system_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'id': 'id', + 'display_name': 'displayName', + 'description': 'description', + 'project_id': 'projectId', + 'build_pipeline_id': 'buildPipelineId', + 'compartment_id': 'compartmentId', + 'build_pipeline_stage_type': 'buildPipelineStageType', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'lifecycle_state': 'lifecycleState', + 'lifecycle_details': 'lifecycleDetails', + 'build_pipeline_stage_predecessor_collection': 'buildPipelineStagePredecessorCollection', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'system_tags': 'systemTags' + } + + self._id = None + self._display_name = None + self._description = None + self._project_id = None + self._build_pipeline_id = None + self._compartment_id = None + self._build_pipeline_stage_type = None + self._time_created = None + self._time_updated = None + self._lifecycle_state = None + self._lifecycle_details = None + self._build_pipeline_stage_predecessor_collection = None + self._freeform_tags = None + self._defined_tags = None + self._system_tags = None + + @staticmethod + def get_subtype(object_dictionary): + """ + Given the hash representation of a subtype of this class, + use the info in the hash to return the class of the subtype. + """ + type = object_dictionary['buildPipelineStageType'] + + if type == 'DELIVER_ARTIFACT': + return 'DeliverArtifactStage' + + if type == 'WAIT': + return 'WaitStage' + + if type == 'TRIGGER_DEPLOYMENT_PIPELINE': + return 'TriggerDeploymentStage' + + if type == 'BUILD': + return 'BuildStage' + else: + return 'BuildPipelineStage' + + @property + def id(self): + """ + **[Required]** Gets the id of this BuildPipelineStage. + Unique identifier that is immutable on creation + + + :return: The id of this BuildPipelineStage. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this BuildPipelineStage. + Unique identifier that is immutable on creation + + + :param id: The id of this BuildPipelineStage. + :type: str + """ + self._id = id + + @property + def display_name(self): + """ + Gets the display_name of this BuildPipelineStage. + Stage identifier which can be renamed and is not necessarily unique + + + :return: The display_name of this BuildPipelineStage. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this BuildPipelineStage. + Stage identifier which can be renamed and is not necessarily unique + + + :param display_name: The display_name of this BuildPipelineStage. + :type: str + """ + self._display_name = display_name + + @property + def description(self): + """ + Gets the description of this BuildPipelineStage. + Optional description about the BuildStage + + + :return: The description of this BuildPipelineStage. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this BuildPipelineStage. + Optional description about the BuildStage + + + :param description: The description of this BuildPipelineStage. + :type: str + """ + self._description = description + + @property + def project_id(self): + """ + **[Required]** Gets the project_id of this BuildPipelineStage. + Project Identifier + + + :return: The project_id of this BuildPipelineStage. + :rtype: str + """ + return self._project_id + + @project_id.setter + def project_id(self, project_id): + """ + Sets the project_id of this BuildPipelineStage. + Project Identifier + + + :param project_id: The project_id of this BuildPipelineStage. + :type: str + """ + self._project_id = project_id + + @property + def build_pipeline_id(self): + """ + **[Required]** Gets the build_pipeline_id of this BuildPipelineStage. + Build Pipeline Identifier + + + :return: The build_pipeline_id of this BuildPipelineStage. + :rtype: str + """ + return self._build_pipeline_id + + @build_pipeline_id.setter + def build_pipeline_id(self, build_pipeline_id): + """ + Sets the build_pipeline_id of this BuildPipelineStage. + Build Pipeline Identifier + + + :param build_pipeline_id: The build_pipeline_id of this BuildPipelineStage. + :type: str + """ + self._build_pipeline_id = build_pipeline_id + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this BuildPipelineStage. + Compartment Identifier + + + :return: The compartment_id of this BuildPipelineStage. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this BuildPipelineStage. + Compartment Identifier + + + :param compartment_id: The compartment_id of this BuildPipelineStage. + :type: str + """ + self._compartment_id = compartment_id + + @property + def build_pipeline_stage_type(self): + """ + **[Required]** Gets the build_pipeline_stage_type of this BuildPipelineStage. + List of stage types. It includes 'Wait stage', 'Build Stage', 'Deliver Artifact Stage' + and 'Trigger Deployment Stage'. + + Allowed values for this property are: "WAIT", "BUILD", "DELIVER_ARTIFACT", "TRIGGER_DEPLOYMENT_PIPELINE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The build_pipeline_stage_type of this BuildPipelineStage. + :rtype: str + """ + return self._build_pipeline_stage_type + + @build_pipeline_stage_type.setter + def build_pipeline_stage_type(self, build_pipeline_stage_type): + """ + Sets the build_pipeline_stage_type of this BuildPipelineStage. + List of stage types. It includes 'Wait stage', 'Build Stage', 'Deliver Artifact Stage' + and 'Trigger Deployment Stage'. + + + :param build_pipeline_stage_type: The build_pipeline_stage_type of this BuildPipelineStage. + :type: str + """ + allowed_values = ["WAIT", "BUILD", "DELIVER_ARTIFACT", "TRIGGER_DEPLOYMENT_PIPELINE"] + if not value_allowed_none_or_none_sentinel(build_pipeline_stage_type, allowed_values): + build_pipeline_stage_type = 'UNKNOWN_ENUM_VALUE' + self._build_pipeline_stage_type = build_pipeline_stage_type + + @property + def time_created(self): + """ + Gets the time_created of this BuildPipelineStage. + The time at which the Stage was created. An RFC3339 formatted datetime string + + + :return: The time_created of this BuildPipelineStage. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this BuildPipelineStage. + The time at which the Stage was created. An RFC3339 formatted datetime string + + + :param time_created: The time_created of this BuildPipelineStage. + :type: datetime + """ + self._time_created = time_created + + @property + def time_updated(self): + """ + Gets the time_updated of this BuildPipelineStage. + The time at which the Stage was updated. An RFC3339 formatted datetime string + + + :return: The time_updated of this BuildPipelineStage. + :rtype: datetime + """ + return self._time_updated + + @time_updated.setter + def time_updated(self, time_updated): + """ + Sets the time_updated of this BuildPipelineStage. + The time at which the Stage was updated. An RFC3339 formatted datetime string + + + :param time_updated: The time_updated of this BuildPipelineStage. + :type: datetime + """ + self._time_updated = time_updated + + @property + def lifecycle_state(self): + """ + Gets the lifecycle_state of this BuildPipelineStage. + The current state of the Stage. + + Allowed values for this property are: "CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The lifecycle_state of this BuildPipelineStage. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this BuildPipelineStage. + The current state of the Stage. + + + :param lifecycle_state: The lifecycle_state of this BuildPipelineStage. + :type: str + """ + allowed_values = ["CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED"] + 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 BuildPipelineStage. + A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + + + :return: The lifecycle_details of this BuildPipelineStage. + :rtype: str + """ + return self._lifecycle_details + + @lifecycle_details.setter + def lifecycle_details(self, lifecycle_details): + """ + Sets the lifecycle_details of this BuildPipelineStage. + A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + + + :param lifecycle_details: The lifecycle_details of this BuildPipelineStage. + :type: str + """ + self._lifecycle_details = lifecycle_details + + @property + def build_pipeline_stage_predecessor_collection(self): + """ + Gets the build_pipeline_stage_predecessor_collection of this BuildPipelineStage. + + :return: The build_pipeline_stage_predecessor_collection of this BuildPipelineStage. + :rtype: oci.devops.models.BuildPipelineStagePredecessorCollection + """ + return self._build_pipeline_stage_predecessor_collection + + @build_pipeline_stage_predecessor_collection.setter + def build_pipeline_stage_predecessor_collection(self, build_pipeline_stage_predecessor_collection): + """ + Sets the build_pipeline_stage_predecessor_collection of this BuildPipelineStage. + + :param build_pipeline_stage_predecessor_collection: The build_pipeline_stage_predecessor_collection of this BuildPipelineStage. + :type: oci.devops.models.BuildPipelineStagePredecessorCollection + """ + self._build_pipeline_stage_predecessor_collection = build_pipeline_stage_predecessor_collection + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this BuildPipelineStage. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See `Resource Tags`__. Example: `{\"bar-key\": \"value\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this BuildPipelineStage. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this BuildPipelineStage. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See `Resource Tags`__. Example: `{\"bar-key\": \"value\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this BuildPipelineStage. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this BuildPipelineStage. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this BuildPipelineStage. + :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 BuildPipelineStage. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this BuildPipelineStage. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + @property + def system_tags(self): + """ + Gets the system_tags of this BuildPipelineStage. + Usage of system tag keys. These predefined keys are scoped to namespaces. See `Resource Tags`__. Example: `{\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The system_tags of this BuildPipelineStage. + :rtype: dict(str, dict(str, object)) + """ + return self._system_tags + + @system_tags.setter + def system_tags(self, system_tags): + """ + Sets the system_tags of this BuildPipelineStage. + Usage of system tag keys. These predefined keys are scoped to namespaces. See `Resource Tags`__. Example: `{\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param system_tags: The system_tags of this BuildPipelineStage. + :type: dict(str, dict(str, object)) + """ + self._system_tags = system_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/devops/models/build_pipeline_stage_collection.py b/src/oci/devops/models/build_pipeline_stage_collection.py new file mode 100644 index 0000000000..c97427c155 --- /dev/null +++ b/src/oci/devops/models/build_pipeline_stage_collection.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 BuildPipelineStageCollection(object): + """ + Result of a stages search. + """ + + def __init__(self, **kwargs): + """ + Initializes a new BuildPipelineStageCollection object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param items: + The value to assign to the items property of this BuildPipelineStageCollection. + :type items: list[oci.devops.models.BuildPipelineStageSummary] + + """ + self.swagger_types = { + 'items': 'list[BuildPipelineStageSummary]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this BuildPipelineStageCollection. + Summary of list of stages found for the search + + + :return: The items of this BuildPipelineStageCollection. + :rtype: list[oci.devops.models.BuildPipelineStageSummary] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this BuildPipelineStageCollection. + Summary of list of stages found for the search + + + :param items: The items of this BuildPipelineStageCollection. + :type: list[oci.devops.models.BuildPipelineStageSummary] + """ + self._items = items + + 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/devops/models/build_pipeline_stage_predecessor.py b/src/oci/devops/models/build_pipeline_stage_predecessor.py new file mode 100644 index 0000000000..a99a5732ed --- /dev/null +++ b/src/oci/devops/models/build_pipeline_stage_predecessor.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 BuildPipelineStagePredecessor(object): + """ + Metadata for defining a stage's predecessor. + """ + + def __init__(self, **kwargs): + """ + Initializes a new BuildPipelineStagePredecessor 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 BuildPipelineStagePredecessor. + :type id: str + + """ + self.swagger_types = { + 'id': 'str' + } + + self.attribute_map = { + 'id': 'id' + } + + self._id = None + + @property + def id(self): + """ + **[Required]** Gets the id of this BuildPipelineStagePredecessor. + The id of the predecessor stage. If a stages is the first stage in the pipeline, then the id is the pipeline's id. + + + :return: The id of this BuildPipelineStagePredecessor. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this BuildPipelineStagePredecessor. + The id of the predecessor stage. If a stages is the first stage in the pipeline, then the id is the pipeline's id. + + + :param id: The id of this BuildPipelineStagePredecessor. + :type: str + """ + self._id = 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/devops/models/build_pipeline_stage_predecessor_collection.py b/src/oci/devops/models/build_pipeline_stage_predecessor_collection.py new file mode 100644 index 0000000000..32f9b360fd --- /dev/null +++ b/src/oci/devops/models/build_pipeline_stage_predecessor_collection.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 BuildPipelineStagePredecessorCollection(object): + """ + The containing collection for the predecessors of a Stage. + """ + + def __init__(self, **kwargs): + """ + Initializes a new BuildPipelineStagePredecessorCollection object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param items: + The value to assign to the items property of this BuildPipelineStagePredecessorCollection. + :type items: list[oci.devops.models.BuildPipelineStagePredecessor] + + """ + self.swagger_types = { + 'items': 'list[BuildPipelineStagePredecessor]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this BuildPipelineStagePredecessorCollection. + A list of BuildPipelineStagePredecessors for a stage. + + + :return: The items of this BuildPipelineStagePredecessorCollection. + :rtype: list[oci.devops.models.BuildPipelineStagePredecessor] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this BuildPipelineStagePredecessorCollection. + A list of BuildPipelineStagePredecessors for a stage. + + + :param items: The items of this BuildPipelineStagePredecessorCollection. + :type: list[oci.devops.models.BuildPipelineStagePredecessor] + """ + self._items = items + + 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/devops/models/build_pipeline_stage_run_progress.py b/src/oci/devops/models/build_pipeline_stage_run_progress.py new file mode 100644 index 0000000000..dc86cc8cc0 --- /dev/null +++ b/src/oci/devops/models/build_pipeline_stage_run_progress.py @@ -0,0 +1,313 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 BuildPipelineStageRunProgress(object): + """ + The details about the run progress of a Stage in a BuildRun. + """ + + #: A constant which can be used with the status property of a BuildPipelineStageRunProgress. + #: This constant has a value of "ACCEPTED" + STATUS_ACCEPTED = "ACCEPTED" + + #: A constant which can be used with the status property of a BuildPipelineStageRunProgress. + #: 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 BuildPipelineStageRunProgress. + #: This constant has a value of "FAILED" + STATUS_FAILED = "FAILED" + + #: A constant which can be used with the status property of a BuildPipelineStageRunProgress. + #: This constant has a value of "SUCCEEDED" + STATUS_SUCCEEDED = "SUCCEEDED" + + #: A constant which can be used with the status property of a BuildPipelineStageRunProgress. + #: This constant has a value of "CANCELING" + STATUS_CANCELING = "CANCELING" + + #: A constant which can be used with the status property of a BuildPipelineStageRunProgress. + #: This constant has a value of "CANCELED" + STATUS_CANCELED = "CANCELED" + + def __init__(self, **kwargs): + """ + Initializes a new BuildPipelineStageRunProgress object with values from keyword arguments. This class has the following subclasses and if you are using this class as input + to a service operations then you should favor using a subclass over the base class: + + * :class:`~oci.devops.models.DeliverArtifactStageRunProgress` + * :class:`~oci.devops.models.WaitStageRunProgress` + * :class:`~oci.devops.models.TriggerDeploymentPipelineStageRunProgress` + * :class:`~oci.devops.models.BuildStageRunProgress` + + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param stage_display_name: + The value to assign to the stage_display_name property of this BuildPipelineStageRunProgress. + :type stage_display_name: str + + :param build_pipeline_stage_type: + The value to assign to the build_pipeline_stage_type property of this BuildPipelineStageRunProgress. + :type build_pipeline_stage_type: str + + :param build_pipeline_stage_id: + The value to assign to the build_pipeline_stage_id property of this BuildPipelineStageRunProgress. + :type build_pipeline_stage_id: str + + :param time_started: + The value to assign to the time_started property of this BuildPipelineStageRunProgress. + :type time_started: datetime + + :param time_finished: + The value to assign to the time_finished property of this BuildPipelineStageRunProgress. + :type time_finished: datetime + + :param status: + The value to assign to the status property of this BuildPipelineStageRunProgress. + 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 build_pipeline_stage_predecessors: + The value to assign to the build_pipeline_stage_predecessors property of this BuildPipelineStageRunProgress. + :type build_pipeline_stage_predecessors: oci.devops.models.BuildPipelineStagePredecessorCollection + + """ + self.swagger_types = { + 'stage_display_name': 'str', + 'build_pipeline_stage_type': 'str', + 'build_pipeline_stage_id': 'str', + 'time_started': 'datetime', + 'time_finished': 'datetime', + 'status': 'str', + 'build_pipeline_stage_predecessors': 'BuildPipelineStagePredecessorCollection' + } + + self.attribute_map = { + 'stage_display_name': 'stageDisplayName', + 'build_pipeline_stage_type': 'buildPipelineStageType', + 'build_pipeline_stage_id': 'buildPipelineStageId', + 'time_started': 'timeStarted', + 'time_finished': 'timeFinished', + 'status': 'status', + 'build_pipeline_stage_predecessors': 'buildPipelineStagePredecessors' + } + + self._stage_display_name = None + self._build_pipeline_stage_type = None + self._build_pipeline_stage_id = None + self._time_started = None + self._time_finished = None + self._status = None + self._build_pipeline_stage_predecessors = None + + @staticmethod + def get_subtype(object_dictionary): + """ + Given the hash representation of a subtype of this class, + use the info in the hash to return the class of the subtype. + """ + type = object_dictionary['buildPipelineStageType'] + + if type == 'DELIVER_ARTIFACT': + return 'DeliverArtifactStageRunProgress' + + if type == 'WAIT': + return 'WaitStageRunProgress' + + if type == 'TRIGGER_DEPLOYMENT_PIPELINE': + return 'TriggerDeploymentPipelineStageRunProgress' + + if type == 'BUILD': + return 'BuildStageRunProgress' + else: + return 'BuildPipelineStageRunProgress' + + @property + def stage_display_name(self): + """ + Gets the stage_display_name of this BuildPipelineStageRunProgress. + BuildRun identifier which can be renamed and is not necessarily unique + + + :return: The stage_display_name of this BuildPipelineStageRunProgress. + :rtype: str + """ + return self._stage_display_name + + @stage_display_name.setter + def stage_display_name(self, stage_display_name): + """ + Sets the stage_display_name of this BuildPipelineStageRunProgress. + BuildRun identifier which can be renamed and is not necessarily unique + + + :param stage_display_name: The stage_display_name of this BuildPipelineStageRunProgress. + :type: str + """ + self._stage_display_name = stage_display_name + + @property + def build_pipeline_stage_type(self): + """ + Gets the build_pipeline_stage_type of this BuildPipelineStageRunProgress. + Stage sub types. + + + :return: The build_pipeline_stage_type of this BuildPipelineStageRunProgress. + :rtype: str + """ + return self._build_pipeline_stage_type + + @build_pipeline_stage_type.setter + def build_pipeline_stage_type(self, build_pipeline_stage_type): + """ + Sets the build_pipeline_stage_type of this BuildPipelineStageRunProgress. + Stage sub types. + + + :param build_pipeline_stage_type: The build_pipeline_stage_type of this BuildPipelineStageRunProgress. + :type: str + """ + self._build_pipeline_stage_type = build_pipeline_stage_type + + @property + def build_pipeline_stage_id(self): + """ + Gets the build_pipeline_stage_id of this BuildPipelineStageRunProgress. + Stage id + + + :return: The build_pipeline_stage_id of this BuildPipelineStageRunProgress. + :rtype: str + """ + return self._build_pipeline_stage_id + + @build_pipeline_stage_id.setter + def build_pipeline_stage_id(self, build_pipeline_stage_id): + """ + Sets the build_pipeline_stage_id of this BuildPipelineStageRunProgress. + Stage id + + + :param build_pipeline_stage_id: The build_pipeline_stage_id of this BuildPipelineStageRunProgress. + :type: str + """ + self._build_pipeline_stage_id = build_pipeline_stage_id + + @property + def time_started(self): + """ + Gets the time_started of this BuildPipelineStageRunProgress. + The time the Stage was started executing. An RFC3339 formatted datetime string + + + :return: The time_started of this BuildPipelineStageRunProgress. + :rtype: datetime + """ + return self._time_started + + @time_started.setter + def time_started(self, time_started): + """ + Sets the time_started of this BuildPipelineStageRunProgress. + The time the Stage was started executing. An RFC3339 formatted datetime string + + + :param time_started: The time_started of this BuildPipelineStageRunProgress. + :type: datetime + """ + self._time_started = time_started + + @property + def time_finished(self): + """ + Gets the time_finished of this BuildPipelineStageRunProgress. + The time the Stage was finished executing. An RFC3339 formatted datetime string + + + :return: The time_finished of this BuildPipelineStageRunProgress. + :rtype: datetime + """ + return self._time_finished + + @time_finished.setter + def time_finished(self, time_finished): + """ + Sets the time_finished of this BuildPipelineStageRunProgress. + The time the Stage was finished executing. An RFC3339 formatted datetime string + + + :param time_finished: The time_finished of this BuildPipelineStageRunProgress. + :type: datetime + """ + self._time_finished = time_finished + + @property + def status(self): + """ + Gets the status of this BuildPipelineStageRunProgress. + The current status of the Stage. + + 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 BuildPipelineStageRunProgress. + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """ + Sets the status of this BuildPipelineStageRunProgress. + The current status of the Stage. + + + :param status: The status of this BuildPipelineStageRunProgress. + :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 build_pipeline_stage_predecessors(self): + """ + Gets the build_pipeline_stage_predecessors of this BuildPipelineStageRunProgress. + + :return: The build_pipeline_stage_predecessors of this BuildPipelineStageRunProgress. + :rtype: oci.devops.models.BuildPipelineStagePredecessorCollection + """ + return self._build_pipeline_stage_predecessors + + @build_pipeline_stage_predecessors.setter + def build_pipeline_stage_predecessors(self, build_pipeline_stage_predecessors): + """ + Sets the build_pipeline_stage_predecessors of this BuildPipelineStageRunProgress. + + :param build_pipeline_stage_predecessors: The build_pipeline_stage_predecessors of this BuildPipelineStageRunProgress. + :type: oci.devops.models.BuildPipelineStagePredecessorCollection + """ + self._build_pipeline_stage_predecessors = build_pipeline_stage_predecessors + + 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/devops/models/build_pipeline_stage_summary.py b/src/oci/devops/models/build_pipeline_stage_summary.py new file mode 100644 index 0000000000..215eddc7dc --- /dev/null +++ b/src/oci/devops/models/build_pipeline_stage_summary.py @@ -0,0 +1,543 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 BuildPipelineStageSummary(object): + """ + Summary of the Stage. + """ + + def __init__(self, **kwargs): + """ + Initializes a new BuildPipelineStageSummary object with values from keyword arguments. This class has the following subclasses and if you are using this class as input + to a service operations then you should favor using a subclass over the base class: + + * :class:`~oci.devops.models.WaitStageSummary` + * :class:`~oci.devops.models.BuildStageSummary` + * :class:`~oci.devops.models.DeliverArtifactStageSummary` + * :class:`~oci.devops.models.TriggerDeploymentStageSummary` + + 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 BuildPipelineStageSummary. + :type id: str + + :param display_name: + The value to assign to the display_name property of this BuildPipelineStageSummary. + :type display_name: str + + :param project_id: + The value to assign to the project_id property of this BuildPipelineStageSummary. + :type project_id: str + + :param build_pipeline_id: + The value to assign to the build_pipeline_id property of this BuildPipelineStageSummary. + :type build_pipeline_id: str + + :param compartment_id: + The value to assign to the compartment_id property of this BuildPipelineStageSummary. + :type compartment_id: str + + :param build_pipeline_stage_type: + The value to assign to the build_pipeline_stage_type property of this BuildPipelineStageSummary. + :type build_pipeline_stage_type: str + + :param time_created: + The value to assign to the time_created property of this BuildPipelineStageSummary. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this BuildPipelineStageSummary. + :type time_updated: datetime + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this BuildPipelineStageSummary. + :type lifecycle_state: str + + :param lifecycle_details: + The value to assign to the lifecycle_details property of this BuildPipelineStageSummary. + :type lifecycle_details: str + + :param description: + The value to assign to the description property of this BuildPipelineStageSummary. + :type description: str + + :param build_pipeline_stage_predecessor_collection: + The value to assign to the build_pipeline_stage_predecessor_collection property of this BuildPipelineStageSummary. + :type build_pipeline_stage_predecessor_collection: oci.devops.models.BuildPipelineStagePredecessorCollection + + :param freeform_tags: + The value to assign to the freeform_tags property of this BuildPipelineStageSummary. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this BuildPipelineStageSummary. + :type defined_tags: dict(str, dict(str, object)) + + :param system_tags: + The value to assign to the system_tags property of this BuildPipelineStageSummary. + :type system_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'id': 'str', + 'display_name': 'str', + 'project_id': 'str', + 'build_pipeline_id': 'str', + 'compartment_id': 'str', + 'build_pipeline_stage_type': 'str', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'lifecycle_state': 'str', + 'lifecycle_details': 'str', + 'description': 'str', + 'build_pipeline_stage_predecessor_collection': 'BuildPipelineStagePredecessorCollection', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'system_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'id': 'id', + 'display_name': 'displayName', + 'project_id': 'projectId', + 'build_pipeline_id': 'buildPipelineId', + 'compartment_id': 'compartmentId', + 'build_pipeline_stage_type': 'buildPipelineStageType', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'lifecycle_state': 'lifecycleState', + 'lifecycle_details': 'lifecycleDetails', + 'description': 'description', + 'build_pipeline_stage_predecessor_collection': 'buildPipelineStagePredecessorCollection', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'system_tags': 'systemTags' + } + + self._id = None + self._display_name = None + self._project_id = None + self._build_pipeline_id = None + self._compartment_id = None + self._build_pipeline_stage_type = None + self._time_created = None + self._time_updated = None + self._lifecycle_state = None + self._lifecycle_details = None + self._description = None + self._build_pipeline_stage_predecessor_collection = None + self._freeform_tags = None + self._defined_tags = None + self._system_tags = None + + @staticmethod + def get_subtype(object_dictionary): + """ + Given the hash representation of a subtype of this class, + use the info in the hash to return the class of the subtype. + """ + type = object_dictionary['buildPipelineStageType'] + + if type == 'WAIT': + return 'WaitStageSummary' + + if type == 'BUILD': + return 'BuildStageSummary' + + if type == 'DELIVER_ARTIFACT': + return 'DeliverArtifactStageSummary' + + if type == 'TRIGGER_DEPLOYMENT_PIPELINE': + return 'TriggerDeploymentStageSummary' + else: + return 'BuildPipelineStageSummary' + + @property + def id(self): + """ + **[Required]** Gets the id of this BuildPipelineStageSummary. + Unique identifier that is immutable on creation + + + :return: The id of this BuildPipelineStageSummary. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this BuildPipelineStageSummary. + Unique identifier that is immutable on creation + + + :param id: The id of this BuildPipelineStageSummary. + :type: str + """ + self._id = id + + @property + def display_name(self): + """ + Gets the display_name of this BuildPipelineStageSummary. + Stage identifier which can be renamed and is not necessarily unique + + + :return: The display_name of this BuildPipelineStageSummary. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this BuildPipelineStageSummary. + Stage identifier which can be renamed and is not necessarily unique + + + :param display_name: The display_name of this BuildPipelineStageSummary. + :type: str + """ + self._display_name = display_name + + @property + def project_id(self): + """ + **[Required]** Gets the project_id of this BuildPipelineStageSummary. + Build Project Identifier + + + :return: The project_id of this BuildPipelineStageSummary. + :rtype: str + """ + return self._project_id + + @project_id.setter + def project_id(self, project_id): + """ + Sets the project_id of this BuildPipelineStageSummary. + Build Project Identifier + + + :param project_id: The project_id of this BuildPipelineStageSummary. + :type: str + """ + self._project_id = project_id + + @property + def build_pipeline_id(self): + """ + **[Required]** Gets the build_pipeline_id of this BuildPipelineStageSummary. + Build Pipeline Identifier + + + :return: The build_pipeline_id of this BuildPipelineStageSummary. + :rtype: str + """ + return self._build_pipeline_id + + @build_pipeline_id.setter + def build_pipeline_id(self, build_pipeline_id): + """ + Sets the build_pipeline_id of this BuildPipelineStageSummary. + Build Pipeline Identifier + + + :param build_pipeline_id: The build_pipeline_id of this BuildPipelineStageSummary. + :type: str + """ + self._build_pipeline_id = build_pipeline_id + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this BuildPipelineStageSummary. + Compartment Identifier + + + :return: The compartment_id of this BuildPipelineStageSummary. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this BuildPipelineStageSummary. + Compartment Identifier + + + :param compartment_id: The compartment_id of this BuildPipelineStageSummary. + :type: str + """ + self._compartment_id = compartment_id + + @property + def build_pipeline_stage_type(self): + """ + **[Required]** Gets the build_pipeline_stage_type of this BuildPipelineStageSummary. + Stages sub types. It can be either of the following stages - 'Wait Stage', 'Trigger Deployment Stage', + 'Build Stage', 'Deliver Artificat Stage'. + + + :return: The build_pipeline_stage_type of this BuildPipelineStageSummary. + :rtype: str + """ + return self._build_pipeline_stage_type + + @build_pipeline_stage_type.setter + def build_pipeline_stage_type(self, build_pipeline_stage_type): + """ + Sets the build_pipeline_stage_type of this BuildPipelineStageSummary. + Stages sub types. It can be either of the following stages - 'Wait Stage', 'Trigger Deployment Stage', + 'Build Stage', 'Deliver Artificat Stage'. + + + :param build_pipeline_stage_type: The build_pipeline_stage_type of this BuildPipelineStageSummary. + :type: str + """ + self._build_pipeline_stage_type = build_pipeline_stage_type + + @property + def time_created(self): + """ + Gets the time_created of this BuildPipelineStageSummary. + The time at which the Stage was created. An RFC3339 formatted datetime string + + + :return: The time_created of this BuildPipelineStageSummary. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this BuildPipelineStageSummary. + The time at which the Stage was created. An RFC3339 formatted datetime string + + + :param time_created: The time_created of this BuildPipelineStageSummary. + :type: datetime + """ + self._time_created = time_created + + @property + def time_updated(self): + """ + Gets the time_updated of this BuildPipelineStageSummary. + The time at which the Stage was updated. An RFC3339 formatted datetime string + + + :return: The time_updated of this BuildPipelineStageSummary. + :rtype: datetime + """ + return self._time_updated + + @time_updated.setter + def time_updated(self, time_updated): + """ + Sets the time_updated of this BuildPipelineStageSummary. + The time at which the Stage was updated. An RFC3339 formatted datetime string + + + :param time_updated: The time_updated of this BuildPipelineStageSummary. + :type: datetime + """ + self._time_updated = time_updated + + @property + def lifecycle_state(self): + """ + Gets the lifecycle_state of this BuildPipelineStageSummary. + The current state of the Stage. + + + :return: The lifecycle_state of this BuildPipelineStageSummary. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this BuildPipelineStageSummary. + The current state of the Stage. + + + :param lifecycle_state: The lifecycle_state of this BuildPipelineStageSummary. + :type: str + """ + self._lifecycle_state = lifecycle_state + + @property + def lifecycle_details(self): + """ + Gets the lifecycle_details of this BuildPipelineStageSummary. + A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + + + :return: The lifecycle_details of this BuildPipelineStageSummary. + :rtype: str + """ + return self._lifecycle_details + + @lifecycle_details.setter + def lifecycle_details(self, lifecycle_details): + """ + Sets the lifecycle_details of this BuildPipelineStageSummary. + A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + + + :param lifecycle_details: The lifecycle_details of this BuildPipelineStageSummary. + :type: str + """ + self._lifecycle_details = lifecycle_details + + @property + def description(self): + """ + Gets the description of this BuildPipelineStageSummary. + Optional description about the BuildStage + + + :return: The description of this BuildPipelineStageSummary. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this BuildPipelineStageSummary. + Optional description about the BuildStage + + + :param description: The description of this BuildPipelineStageSummary. + :type: str + """ + self._description = description + + @property + def build_pipeline_stage_predecessor_collection(self): + """ + Gets the build_pipeline_stage_predecessor_collection of this BuildPipelineStageSummary. + + :return: The build_pipeline_stage_predecessor_collection of this BuildPipelineStageSummary. + :rtype: oci.devops.models.BuildPipelineStagePredecessorCollection + """ + return self._build_pipeline_stage_predecessor_collection + + @build_pipeline_stage_predecessor_collection.setter + def build_pipeline_stage_predecessor_collection(self, build_pipeline_stage_predecessor_collection): + """ + Sets the build_pipeline_stage_predecessor_collection of this BuildPipelineStageSummary. + + :param build_pipeline_stage_predecessor_collection: The build_pipeline_stage_predecessor_collection of this BuildPipelineStageSummary. + :type: oci.devops.models.BuildPipelineStagePredecessorCollection + """ + self._build_pipeline_stage_predecessor_collection = build_pipeline_stage_predecessor_collection + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this BuildPipelineStageSummary. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See `Resource Tags`__. Example: `{\"bar-key\": \"value\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this BuildPipelineStageSummary. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this BuildPipelineStageSummary. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See `Resource Tags`__. Example: `{\"bar-key\": \"value\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this BuildPipelineStageSummary. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this BuildPipelineStageSummary. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this BuildPipelineStageSummary. + :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 BuildPipelineStageSummary. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this BuildPipelineStageSummary. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + @property + def system_tags(self): + """ + Gets the system_tags of this BuildPipelineStageSummary. + Usage of system tag keys. These predefined keys are scoped to namespaces. See `Resource Tags`__. Example: `{\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The system_tags of this BuildPipelineStageSummary. + :rtype: dict(str, dict(str, object)) + """ + return self._system_tags + + @system_tags.setter + def system_tags(self, system_tags): + """ + Sets the system_tags of this BuildPipelineStageSummary. + Usage of system tag keys. These predefined keys are scoped to namespaces. See `Resource Tags`__. Example: `{\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param system_tags: The system_tags of this BuildPipelineStageSummary. + :type: dict(str, dict(str, object)) + """ + self._system_tags = system_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/devops/models/build_pipeline_summary.py b/src/oci/devops/models/build_pipeline_summary.py new file mode 100644 index 0000000000..169ec38c4a --- /dev/null +++ b/src/oci/devops/models/build_pipeline_summary.py @@ -0,0 +1,419 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 BuildPipelineSummary(object): + """ + Summary of the BuildPipeline. + """ + + def __init__(self, **kwargs): + """ + Initializes a new BuildPipelineSummary 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 BuildPipelineSummary. + :type id: str + + :param description: + The value to assign to the description property of this BuildPipelineSummary. + :type description: str + + :param display_name: + The value to assign to the display_name property of this BuildPipelineSummary. + :type display_name: str + + :param compartment_id: + The value to assign to the compartment_id property of this BuildPipelineSummary. + :type compartment_id: str + + :param project_id: + The value to assign to the project_id property of this BuildPipelineSummary. + :type project_id: str + + :param time_created: + The value to assign to the time_created property of this BuildPipelineSummary. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this BuildPipelineSummary. + :type time_updated: datetime + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this BuildPipelineSummary. + :type lifecycle_state: str + + :param build_pipeline_parameters: + The value to assign to the build_pipeline_parameters property of this BuildPipelineSummary. + :type build_pipeline_parameters: oci.devops.models.BuildPipelineParameterCollection + + :param freeform_tags: + The value to assign to the freeform_tags property of this BuildPipelineSummary. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this BuildPipelineSummary. + :type defined_tags: dict(str, dict(str, object)) + + :param system_tags: + The value to assign to the system_tags property of this BuildPipelineSummary. + :type system_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'id': 'str', + 'description': 'str', + 'display_name': 'str', + 'compartment_id': 'str', + 'project_id': 'str', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'lifecycle_state': 'str', + 'build_pipeline_parameters': 'BuildPipelineParameterCollection', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'system_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'id': 'id', + 'description': 'description', + 'display_name': 'displayName', + 'compartment_id': 'compartmentId', + 'project_id': 'projectId', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'lifecycle_state': 'lifecycleState', + 'build_pipeline_parameters': 'buildPipelineParameters', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'system_tags': 'systemTags' + } + + self._id = None + self._description = None + self._display_name = None + self._compartment_id = None + self._project_id = None + self._time_created = None + self._time_updated = None + self._lifecycle_state = None + self._build_pipeline_parameters = None + self._freeform_tags = None + self._defined_tags = None + self._system_tags = None + + @property + def id(self): + """ + **[Required]** Gets the id of this BuildPipelineSummary. + Unique identifier that is immutable on creation + + + :return: The id of this BuildPipelineSummary. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this BuildPipelineSummary. + Unique identifier that is immutable on creation + + + :param id: The id of this BuildPipelineSummary. + :type: str + """ + self._id = id + + @property + def description(self): + """ + Gets the description of this BuildPipelineSummary. + Optional description about the BuildPipeline + + + :return: The description of this BuildPipelineSummary. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this BuildPipelineSummary. + Optional description about the BuildPipeline + + + :param description: The description of this BuildPipelineSummary. + :type: str + """ + self._description = description + + @property + def display_name(self): + """ + Gets the display_name of this BuildPipelineSummary. + BuildPipeline identifier which can be renamed and is not necessarily unique. + + + :return: The display_name of this BuildPipelineSummary. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this BuildPipelineSummary. + BuildPipeline identifier which can be renamed and is not necessarily unique. + + + :param display_name: The display_name of this BuildPipelineSummary. + :type: str + """ + self._display_name = display_name + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this BuildPipelineSummary. + Compartment Identifier + + + :return: The compartment_id of this BuildPipelineSummary. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this BuildPipelineSummary. + Compartment Identifier + + + :param compartment_id: The compartment_id of this BuildPipelineSummary. + :type: str + """ + self._compartment_id = compartment_id + + @property + def project_id(self): + """ + **[Required]** Gets the project_id of this BuildPipelineSummary. + Project Identifier + + + :return: The project_id of this BuildPipelineSummary. + :rtype: str + """ + return self._project_id + + @project_id.setter + def project_id(self, project_id): + """ + Sets the project_id of this BuildPipelineSummary. + Project Identifier + + + :param project_id: The project_id of this BuildPipelineSummary. + :type: str + """ + self._project_id = project_id + + @property + def time_created(self): + """ + Gets the time_created of this BuildPipelineSummary. + The time the the BuildPipeline was created. An RFC3339 formatted datetime string + + + :return: The time_created of this BuildPipelineSummary. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this BuildPipelineSummary. + The time the the BuildPipeline was created. An RFC3339 formatted datetime string + + + :param time_created: The time_created of this BuildPipelineSummary. + :type: datetime + """ + self._time_created = time_created + + @property + def time_updated(self): + """ + Gets the time_updated of this BuildPipelineSummary. + The time the BuildPipeline was updated. An RFC3339 formatted datetime string + + + :return: The time_updated of this BuildPipelineSummary. + :rtype: datetime + """ + return self._time_updated + + @time_updated.setter + def time_updated(self, time_updated): + """ + Sets the time_updated of this BuildPipelineSummary. + The time the BuildPipeline was updated. An RFC3339 formatted datetime string + + + :param time_updated: The time_updated of this BuildPipelineSummary. + :type: datetime + """ + self._time_updated = time_updated + + @property + def lifecycle_state(self): + """ + Gets the lifecycle_state of this BuildPipelineSummary. + The current state of the BuildPipeline. + + + :return: The lifecycle_state of this BuildPipelineSummary. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this BuildPipelineSummary. + The current state of the BuildPipeline. + + + :param lifecycle_state: The lifecycle_state of this BuildPipelineSummary. + :type: str + """ + self._lifecycle_state = lifecycle_state + + @property + def build_pipeline_parameters(self): + """ + Gets the build_pipeline_parameters of this BuildPipelineSummary. + + :return: The build_pipeline_parameters of this BuildPipelineSummary. + :rtype: oci.devops.models.BuildPipelineParameterCollection + """ + return self._build_pipeline_parameters + + @build_pipeline_parameters.setter + def build_pipeline_parameters(self, build_pipeline_parameters): + """ + Sets the build_pipeline_parameters of this BuildPipelineSummary. + + :param build_pipeline_parameters: The build_pipeline_parameters of this BuildPipelineSummary. + :type: oci.devops.models.BuildPipelineParameterCollection + """ + self._build_pipeline_parameters = build_pipeline_parameters + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this BuildPipelineSummary. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See `Resource Tags`__. Example: `{\"bar-key\": \"value\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this BuildPipelineSummary. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this BuildPipelineSummary. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See `Resource Tags`__. Example: `{\"bar-key\": \"value\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this BuildPipelineSummary. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this BuildPipelineSummary. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this BuildPipelineSummary. + :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 BuildPipelineSummary. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this BuildPipelineSummary. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + @property + def system_tags(self): + """ + Gets the system_tags of this BuildPipelineSummary. + Usage of system tag keys. These predefined keys are scoped to namespaces. See `Resource Tags`__. Example: `{\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The system_tags of this BuildPipelineSummary. + :rtype: dict(str, dict(str, object)) + """ + return self._system_tags + + @system_tags.setter + def system_tags(self, system_tags): + """ + Sets the system_tags of this BuildPipelineSummary. + Usage of system tag keys. These predefined keys are scoped to namespaces. See `Resource Tags`__. Example: `{\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param system_tags: The system_tags of this BuildPipelineSummary. + :type: dict(str, dict(str, object)) + """ + self._system_tags = system_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/devops/models/build_run.py b/src/oci/devops/models/build_run.py new file mode 100644 index 0000000000..bf5d2c46e7 --- /dev/null +++ b/src/oci/devops/models/build_run.py @@ -0,0 +1,590 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 BuildRun(object): + """ + Each time we attempt to run a BuildPipeline we create one BuildRun. A BuildRun may be happening now, or it may be a record of the run that happened in the past. The set of BuildRuns constitutes a BuildPipeline's history. + """ + + #: A constant which can be used with the lifecycle_state property of a BuildRun. + #: This constant has a value of "ACCEPTED" + LIFECYCLE_STATE_ACCEPTED = "ACCEPTED" + + #: A constant which can be used with the lifecycle_state property of a BuildRun. + #: This constant has a value of "IN_PROGRESS" + LIFECYCLE_STATE_IN_PROGRESS = "IN_PROGRESS" + + #: A constant which can be used with the lifecycle_state property of a BuildRun. + #: This constant has a value of "FAILED" + LIFECYCLE_STATE_FAILED = "FAILED" + + #: A constant which can be used with the lifecycle_state property of a BuildRun. + #: This constant has a value of "SUCCEEDED" + LIFECYCLE_STATE_SUCCEEDED = "SUCCEEDED" + + #: A constant which can be used with the lifecycle_state property of a BuildRun. + #: This constant has a value of "CANCELING" + LIFECYCLE_STATE_CANCELING = "CANCELING" + + #: A constant which can be used with the lifecycle_state property of a BuildRun. + #: This constant has a value of "CANCELED" + LIFECYCLE_STATE_CANCELED = "CANCELED" + + def __init__(self, **kwargs): + """ + Initializes a new BuildRun 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 BuildRun. + :type id: str + + :param display_name: + The value to assign to the display_name property of this BuildRun. + :type display_name: str + + :param compartment_id: + The value to assign to the compartment_id property of this BuildRun. + :type compartment_id: str + + :param project_id: + The value to assign to the project_id property of this BuildRun. + :type project_id: str + + :param build_pipeline_id: + The value to assign to the build_pipeline_id property of this BuildRun. + :type build_pipeline_id: str + + :param build_run_source: + The value to assign to the build_run_source property of this BuildRun. + :type build_run_source: oci.devops.models.BuildRunSource + + :param build_run_arguments: + The value to assign to the build_run_arguments property of this BuildRun. + :type build_run_arguments: oci.devops.models.BuildRunArgumentCollection + + :param time_created: + The value to assign to the time_created property of this BuildRun. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this BuildRun. + :type time_updated: datetime + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this BuildRun. + 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 lifecycle_state: str + + :param lifecycle_details: + The value to assign to the lifecycle_details property of this BuildRun. + :type lifecycle_details: str + + :param build_run_progress: + The value to assign to the build_run_progress property of this BuildRun. + :type build_run_progress: oci.devops.models.BuildRunProgress + + :param commit_info: + The value to assign to the commit_info property of this BuildRun. + :type commit_info: oci.devops.models.CommitInfo + + :param build_outputs: + The value to assign to the build_outputs property of this BuildRun. + :type build_outputs: oci.devops.models.BuildOutputs + + :param freeform_tags: + The value to assign to the freeform_tags property of this BuildRun. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this BuildRun. + :type defined_tags: dict(str, dict(str, object)) + + :param system_tags: + The value to assign to the system_tags property of this BuildRun. + :type system_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'id': 'str', + 'display_name': 'str', + 'compartment_id': 'str', + 'project_id': 'str', + 'build_pipeline_id': 'str', + 'build_run_source': 'BuildRunSource', + 'build_run_arguments': 'BuildRunArgumentCollection', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'lifecycle_state': 'str', + 'lifecycle_details': 'str', + 'build_run_progress': 'BuildRunProgress', + 'commit_info': 'CommitInfo', + 'build_outputs': 'BuildOutputs', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'system_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'id': 'id', + 'display_name': 'displayName', + 'compartment_id': 'compartmentId', + 'project_id': 'projectId', + 'build_pipeline_id': 'buildPipelineId', + 'build_run_source': 'buildRunSource', + 'build_run_arguments': 'buildRunArguments', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'lifecycle_state': 'lifecycleState', + 'lifecycle_details': 'lifecycleDetails', + 'build_run_progress': 'buildRunProgress', + 'commit_info': 'commitInfo', + 'build_outputs': 'buildOutputs', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'system_tags': 'systemTags' + } + + self._id = None + self._display_name = None + self._compartment_id = None + self._project_id = None + self._build_pipeline_id = None + self._build_run_source = None + self._build_run_arguments = None + self._time_created = None + self._time_updated = None + self._lifecycle_state = None + self._lifecycle_details = None + self._build_run_progress = None + self._commit_info = None + self._build_outputs = None + self._freeform_tags = None + self._defined_tags = None + self._system_tags = None + + @property + def id(self): + """ + **[Required]** Gets the id of this BuildRun. + Unique identifier that is immutable on creation + + + :return: The id of this BuildRun. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this BuildRun. + Unique identifier that is immutable on creation + + + :param id: The id of this BuildRun. + :type: str + """ + self._id = id + + @property + def display_name(self): + """ + Gets the display_name of this BuildRun. + BuildRun identifier which can be renamed and is not necessarily unique + + + :return: The display_name of this BuildRun. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this BuildRun. + BuildRun identifier which can be renamed and is not necessarily unique + + + :param display_name: The display_name of this BuildRun. + :type: str + """ + self._display_name = display_name + + @property + def compartment_id(self): + """ + Gets the compartment_id of this BuildRun. + Compartment Identifier + + + :return: The compartment_id of this BuildRun. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this BuildRun. + Compartment Identifier + + + :param compartment_id: The compartment_id of this BuildRun. + :type: str + """ + self._compartment_id = compartment_id + + @property + def project_id(self): + """ + Gets the project_id of this BuildRun. + Project Identifier + + + :return: The project_id of this BuildRun. + :rtype: str + """ + return self._project_id + + @project_id.setter + def project_id(self, project_id): + """ + Sets the project_id of this BuildRun. + Project Identifier + + + :param project_id: The project_id of this BuildRun. + :type: str + """ + self._project_id = project_id + + @property + def build_pipeline_id(self): + """ + Gets the build_pipeline_id of this BuildRun. + Pipeline Identifier + + + :return: The build_pipeline_id of this BuildRun. + :rtype: str + """ + return self._build_pipeline_id + + @build_pipeline_id.setter + def build_pipeline_id(self, build_pipeline_id): + """ + Sets the build_pipeline_id of this BuildRun. + Pipeline Identifier + + + :param build_pipeline_id: The build_pipeline_id of this BuildRun. + :type: str + """ + self._build_pipeline_id = build_pipeline_id + + @property + def build_run_source(self): + """ + **[Required]** Gets the build_run_source of this BuildRun. + + :return: The build_run_source of this BuildRun. + :rtype: oci.devops.models.BuildRunSource + """ + return self._build_run_source + + @build_run_source.setter + def build_run_source(self, build_run_source): + """ + Sets the build_run_source of this BuildRun. + + :param build_run_source: The build_run_source of this BuildRun. + :type: oci.devops.models.BuildRunSource + """ + self._build_run_source = build_run_source + + @property + def build_run_arguments(self): + """ + Gets the build_run_arguments of this BuildRun. + + :return: The build_run_arguments of this BuildRun. + :rtype: oci.devops.models.BuildRunArgumentCollection + """ + return self._build_run_arguments + + @build_run_arguments.setter + def build_run_arguments(self, build_run_arguments): + """ + Sets the build_run_arguments of this BuildRun. + + :param build_run_arguments: The build_run_arguments of this BuildRun. + :type: oci.devops.models.BuildRunArgumentCollection + """ + self._build_run_arguments = build_run_arguments + + @property + def time_created(self): + """ + Gets the time_created of this BuildRun. + The time the the BuildRun was created. An RFC3339 formatted datetime string + + + :return: The time_created of this BuildRun. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this BuildRun. + The time the the BuildRun was created. An RFC3339 formatted datetime string + + + :param time_created: The time_created of this BuildRun. + :type: datetime + """ + self._time_created = time_created + + @property + def time_updated(self): + """ + Gets the time_updated of this BuildRun. + The time the BuildRun was updated. An RFC3339 formatted datetime string + + + :return: The time_updated of this BuildRun. + :rtype: datetime + """ + return self._time_updated + + @time_updated.setter + def time_updated(self, time_updated): + """ + Sets the time_updated of this BuildRun. + The time the BuildRun was updated. An RFC3339 formatted datetime string + + + :param time_updated: The time_updated of this BuildRun. + :type: datetime + """ + self._time_updated = time_updated + + @property + def lifecycle_state(self): + """ + Gets the lifecycle_state of this BuildRun. + The current state of the BuildRun. + + 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 lifecycle_state of this BuildRun. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this BuildRun. + The current state of the BuildRun. + + + :param lifecycle_state: The lifecycle_state of this BuildRun. + :type: str + """ + allowed_values = ["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED"] + 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 BuildRun. + A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + + + :return: The lifecycle_details of this BuildRun. + :rtype: str + """ + return self._lifecycle_details + + @lifecycle_details.setter + def lifecycle_details(self, lifecycle_details): + """ + Sets the lifecycle_details of this BuildRun. + A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + + + :param lifecycle_details: The lifecycle_details of this BuildRun. + :type: str + """ + self._lifecycle_details = lifecycle_details + + @property + def build_run_progress(self): + """ + Gets the build_run_progress of this BuildRun. + + :return: The build_run_progress of this BuildRun. + :rtype: oci.devops.models.BuildRunProgress + """ + return self._build_run_progress + + @build_run_progress.setter + def build_run_progress(self, build_run_progress): + """ + Sets the build_run_progress of this BuildRun. + + :param build_run_progress: The build_run_progress of this BuildRun. + :type: oci.devops.models.BuildRunProgress + """ + self._build_run_progress = build_run_progress + + @property + def commit_info(self): + """ + Gets the commit_info of this BuildRun. + + :return: The commit_info of this BuildRun. + :rtype: oci.devops.models.CommitInfo + """ + return self._commit_info + + @commit_info.setter + def commit_info(self, commit_info): + """ + Sets the commit_info of this BuildRun. + + :param commit_info: The commit_info of this BuildRun. + :type: oci.devops.models.CommitInfo + """ + self._commit_info = commit_info + + @property + def build_outputs(self): + """ + Gets the build_outputs of this BuildRun. + + :return: The build_outputs of this BuildRun. + :rtype: oci.devops.models.BuildOutputs + """ + return self._build_outputs + + @build_outputs.setter + def build_outputs(self, build_outputs): + """ + Sets the build_outputs of this BuildRun. + + :param build_outputs: The build_outputs of this BuildRun. + :type: oci.devops.models.BuildOutputs + """ + self._build_outputs = build_outputs + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this BuildRun. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See `Resource Tags`__. Example: `{\"bar-key\": \"value\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this BuildRun. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this BuildRun. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See `Resource Tags`__. Example: `{\"bar-key\": \"value\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this BuildRun. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this BuildRun. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this BuildRun. + :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 BuildRun. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this BuildRun. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + @property + def system_tags(self): + """ + Gets the system_tags of this BuildRun. + Usage of system tag keys. These predefined keys are scoped to namespaces. See `Resource Tags`__. Example: `{\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The system_tags of this BuildRun. + :rtype: dict(str, dict(str, object)) + """ + return self._system_tags + + @system_tags.setter + def system_tags(self, system_tags): + """ + Sets the system_tags of this BuildRun. + Usage of system tag keys. These predefined keys are scoped to namespaces. See `Resource Tags`__. Example: `{\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param system_tags: The system_tags of this BuildRun. + :type: dict(str, dict(str, object)) + """ + self._system_tags = system_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/devops/models/build_run_argument.py b/src/oci/devops/models/build_run_argument.py new file mode 100644 index 0000000000..9499112b55 --- /dev/null +++ b/src/oci/devops/models/build_run_argument.py @@ -0,0 +1,101 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 BuildRunArgument(object): + """ + Values for pipeline parameters to be supplied at the time of run. + """ + + def __init__(self, **kwargs): + """ + Initializes a new BuildRunArgument 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 BuildRunArgument. + :type name: str + + :param value: + The value to assign to the value property of this BuildRunArgument. + :type value: str + + """ + self.swagger_types = { + 'name': 'str', + 'value': 'str' + } + + self.attribute_map = { + 'name': 'name', + 'value': 'value' + } + + self._name = None + self._value = None + + @property + def name(self): + """ + **[Required]** Gets the name of this BuildRunArgument. + Name of the parameter (Case-sensitive). + + + :return: The name of this BuildRunArgument. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """ + Sets the name of this BuildRunArgument. + Name of the parameter (Case-sensitive). + + + :param name: The name of this BuildRunArgument. + :type: str + """ + self._name = name + + @property + def value(self): + """ + **[Required]** Gets the value of this BuildRunArgument. + value of the argument + + + :return: The value of this BuildRunArgument. + :rtype: str + """ + return self._value + + @value.setter + def value(self, value): + """ + Sets the value of this BuildRunArgument. + value of the argument + + + :param value: The value of this BuildRunArgument. + :type: str + """ + self._value = value + + 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/devops/models/build_run_argument_collection.py b/src/oci/devops/models/build_run_argument_collection.py new file mode 100644 index 0000000000..907a7718cd --- /dev/null +++ b/src/oci/devops/models/build_run_argument_collection.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 BuildRunArgumentCollection(object): + """ + Specifies list of arguments passed along with the BuildRun. + """ + + def __init__(self, **kwargs): + """ + Initializes a new BuildRunArgumentCollection object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param items: + The value to assign to the items property of this BuildRunArgumentCollection. + :type items: list[oci.devops.models.BuildRunArgument] + + """ + self.swagger_types = { + 'items': 'list[BuildRunArgument]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this BuildRunArgumentCollection. + List of arguments provided at the time of BuildRun. + + + :return: The items of this BuildRunArgumentCollection. + :rtype: list[oci.devops.models.BuildRunArgument] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this BuildRunArgumentCollection. + List of arguments provided at the time of BuildRun. + + + :param items: The items of this BuildRunArgumentCollection. + :type: list[oci.devops.models.BuildRunArgument] + """ + self._items = items + + 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/devops/models/build_run_progress.py b/src/oci/devops/models/build_run_progress.py new file mode 100644 index 0000000000..e80ab4b16b --- /dev/null +++ b/src/oci/devops/models/build_run_progress.py @@ -0,0 +1,132 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 BuildRunProgress(object): + """ + The run progress details of a BuildRun. + """ + + def __init__(self, **kwargs): + """ + Initializes a new BuildRunProgress object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param time_started: + The value to assign to the time_started property of this BuildRunProgress. + :type time_started: datetime + + :param time_finished: + The value to assign to the time_finished property of this BuildRunProgress. + :type time_finished: datetime + + :param build_pipeline_stage_run_progress: + The value to assign to the build_pipeline_stage_run_progress property of this BuildRunProgress. + :type build_pipeline_stage_run_progress: dict(str, BuildPipelineStageRunProgress) + + """ + self.swagger_types = { + 'time_started': 'datetime', + 'time_finished': 'datetime', + 'build_pipeline_stage_run_progress': 'dict(str, BuildPipelineStageRunProgress)' + } + + self.attribute_map = { + 'time_started': 'timeStarted', + 'time_finished': 'timeFinished', + 'build_pipeline_stage_run_progress': 'buildPipelineStageRunProgress' + } + + self._time_started = None + self._time_finished = None + self._build_pipeline_stage_run_progress = None + + @property + def time_started(self): + """ + Gets the time_started of this BuildRunProgress. + The time the the BuildRun is started. An RFC3339 formatted datetime string + + + :return: The time_started of this BuildRunProgress. + :rtype: datetime + """ + return self._time_started + + @time_started.setter + def time_started(self, time_started): + """ + Sets the time_started of this BuildRunProgress. + The time the the BuildRun is started. An RFC3339 formatted datetime string + + + :param time_started: The time_started of this BuildRunProgress. + :type: datetime + """ + self._time_started = time_started + + @property + def time_finished(self): + """ + Gets the time_finished of this BuildRunProgress. + The time the BuildRun is finished. An RFC3339 formatted datetime string + + + :return: The time_finished of this BuildRunProgress. + :rtype: datetime + """ + return self._time_finished + + @time_finished.setter + def time_finished(self, time_finished): + """ + Sets the time_finished of this BuildRunProgress. + The time the BuildRun is finished. An RFC3339 formatted datetime string + + + :param time_finished: The time_finished of this BuildRunProgress. + :type: datetime + """ + self._time_finished = time_finished + + @property + def build_pipeline_stage_run_progress(self): + """ + Gets the build_pipeline_stage_run_progress of this BuildRunProgress. + Map of stage OCIDs to BuildPipelineStageRunProgress model. + + + :return: The build_pipeline_stage_run_progress of this BuildRunProgress. + :rtype: dict(str, BuildPipelineStageRunProgress) + """ + return self._build_pipeline_stage_run_progress + + @build_pipeline_stage_run_progress.setter + def build_pipeline_stage_run_progress(self, build_pipeline_stage_run_progress): + """ + Sets the build_pipeline_stage_run_progress of this BuildRunProgress. + Map of stage OCIDs to BuildPipelineStageRunProgress model. + + + :param build_pipeline_stage_run_progress: The build_pipeline_stage_run_progress of this BuildRunProgress. + :type: dict(str, BuildPipelineStageRunProgress) + """ + self._build_pipeline_stage_run_progress = build_pipeline_stage_run_progress + + 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/devops/models/build_run_progress_summary.py b/src/oci/devops/models/build_run_progress_summary.py new file mode 100644 index 0000000000..ffb7633e7b --- /dev/null +++ b/src/oci/devops/models/build_run_progress_summary.py @@ -0,0 +1,101 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 BuildRunProgressSummary(object): + """ + The summary run progress details of a BuildRun. + """ + + def __init__(self, **kwargs): + """ + Initializes a new BuildRunProgressSummary object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param time_started: + The value to assign to the time_started property of this BuildRunProgressSummary. + :type time_started: datetime + + :param time_finished: + The value to assign to the time_finished property of this BuildRunProgressSummary. + :type time_finished: datetime + + """ + self.swagger_types = { + 'time_started': 'datetime', + 'time_finished': 'datetime' + } + + self.attribute_map = { + 'time_started': 'timeStarted', + 'time_finished': 'timeFinished' + } + + self._time_started = None + self._time_finished = None + + @property + def time_started(self): + """ + Gets the time_started of this BuildRunProgressSummary. + The time the the BuildRun is started. An RFC3339 formatted datetime string + + + :return: The time_started of this BuildRunProgressSummary. + :rtype: datetime + """ + return self._time_started + + @time_started.setter + def time_started(self, time_started): + """ + Sets the time_started of this BuildRunProgressSummary. + The time the the BuildRun is started. An RFC3339 formatted datetime string + + + :param time_started: The time_started of this BuildRunProgressSummary. + :type: datetime + """ + self._time_started = time_started + + @property + def time_finished(self): + """ + Gets the time_finished of this BuildRunProgressSummary. + The time the BuildRun is finished. An RFC3339 formatted datetime string + + + :return: The time_finished of this BuildRunProgressSummary. + :rtype: datetime + """ + return self._time_finished + + @time_finished.setter + def time_finished(self, time_finished): + """ + Sets the time_finished of this BuildRunProgressSummary. + The time the BuildRun is finished. An RFC3339 formatted datetime string + + + :param time_finished: The time_finished of this BuildRunProgressSummary. + :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/devops/models/build_run_source.py b/src/oci/devops/models/build_run_source.py new file mode 100644 index 0000000000..14d9fcbd27 --- /dev/null +++ b/src/oci/devops/models/build_run_source.py @@ -0,0 +1,123 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 BuildRunSource(object): + """ + The source from which this Build Run was triggered + """ + + #: A constant which can be used with the source_type property of a BuildRunSource. + #: This constant has a value of "MANUAL" + SOURCE_TYPE_MANUAL = "MANUAL" + + #: A constant which can be used with the source_type property of a BuildRunSource. + #: This constant has a value of "GITHUB" + SOURCE_TYPE_GITHUB = "GITHUB" + + #: A constant which can be used with the source_type property of a BuildRunSource. + #: This constant has a value of "GITLAB" + SOURCE_TYPE_GITLAB = "GITLAB" + + #: A constant which can be used with the source_type property of a BuildRunSource. + #: This constant has a value of "DEVOPS_CODE_REPOSITORY" + SOURCE_TYPE_DEVOPS_CODE_REPOSITORY = "DEVOPS_CODE_REPOSITORY" + + def __init__(self, **kwargs): + """ + Initializes a new BuildRunSource object with values from keyword arguments. This class has the following subclasses and if you are using this class as input + to a service operations then you should favor using a subclass over the base class: + + * :class:`~oci.devops.models.GithubBuildRunSource` + * :class:`~oci.devops.models.DevopsCodeRepositoryBuildRunSource` + * :class:`~oci.devops.models.ManualBuildRunSource` + * :class:`~oci.devops.models.GitlabBuildRunSource` + + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param source_type: + The value to assign to the source_type property of this BuildRunSource. + Allowed values for this property are: "MANUAL", "GITHUB", "GITLAB", "DEVOPS_CODE_REPOSITORY", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type source_type: str + + """ + self.swagger_types = { + 'source_type': 'str' + } + + self.attribute_map = { + 'source_type': 'sourceType' + } + + self._source_type = None + + @staticmethod + def get_subtype(object_dictionary): + """ + Given the hash representation of a subtype of this class, + use the info in the hash to return the class of the subtype. + """ + type = object_dictionary['sourceType'] + + if type == 'GITHUB': + return 'GithubBuildRunSource' + + if type == 'DEVOPS_CODE_REPOSITORY': + return 'DevopsCodeRepositoryBuildRunSource' + + if type == 'MANUAL': + return 'ManualBuildRunSource' + + if type == 'GITLAB': + return 'GitlabBuildRunSource' + else: + return 'BuildRunSource' + + @property + def source_type(self): + """ + **[Required]** Gets the source_type of this BuildRunSource. + Source from which this build run was triggered + + Allowed values for this property are: "MANUAL", "GITHUB", "GITLAB", "DEVOPS_CODE_REPOSITORY", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The source_type of this BuildRunSource. + :rtype: str + """ + return self._source_type + + @source_type.setter + def source_type(self, source_type): + """ + Sets the source_type of this BuildRunSource. + Source from which this build run was triggered + + + :param source_type: The source_type of this BuildRunSource. + :type: str + """ + allowed_values = ["MANUAL", "GITHUB", "GITLAB", "DEVOPS_CODE_REPOSITORY"] + if not value_allowed_none_or_none_sentinel(source_type, allowed_values): + source_type = 'UNKNOWN_ENUM_VALUE' + self._source_type = source_type + + 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/devops/models/build_run_summary.py b/src/oci/devops/models/build_run_summary.py new file mode 100644 index 0000000000..7153c5b19b --- /dev/null +++ b/src/oci/devops/models/build_run_summary.py @@ -0,0 +1,531 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 BuildRunSummary(object): + """ + Summary of the BuildRun. + """ + + def __init__(self, **kwargs): + """ + Initializes a new BuildRunSummary 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 BuildRunSummary. + :type id: str + + :param compartment_id: + The value to assign to the compartment_id property of this BuildRunSummary. + :type compartment_id: str + + :param display_name: + The value to assign to the display_name property of this BuildRunSummary. + :type display_name: str + + :param project_id: + The value to assign to the project_id property of this BuildRunSummary. + :type project_id: str + + :param build_pipeline_id: + The value to assign to the build_pipeline_id property of this BuildRunSummary. + :type build_pipeline_id: str + + :param build_run_source: + The value to assign to the build_run_source property of this BuildRunSummary. + :type build_run_source: oci.devops.models.BuildRunSource + + :param build_run_arguments: + The value to assign to the build_run_arguments property of this BuildRunSummary. + :type build_run_arguments: oci.devops.models.BuildRunArgumentCollection + + :param build_run_progress_summary: + The value to assign to the build_run_progress_summary property of this BuildRunSummary. + :type build_run_progress_summary: oci.devops.models.BuildRunProgressSummary + + :param time_created: + The value to assign to the time_created property of this BuildRunSummary. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this BuildRunSummary. + :type time_updated: datetime + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this BuildRunSummary. + :type lifecycle_state: str + + :param lifecycle_details: + The value to assign to the lifecycle_details property of this BuildRunSummary. + :type lifecycle_details: str + + :param commit_info: + The value to assign to the commit_info property of this BuildRunSummary. + :type commit_info: oci.devops.models.CommitInfo + + :param freeform_tags: + The value to assign to the freeform_tags property of this BuildRunSummary. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this BuildRunSummary. + :type defined_tags: dict(str, dict(str, object)) + + :param system_tags: + The value to assign to the system_tags property of this BuildRunSummary. + :type system_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'id': 'str', + 'compartment_id': 'str', + 'display_name': 'str', + 'project_id': 'str', + 'build_pipeline_id': 'str', + 'build_run_source': 'BuildRunSource', + 'build_run_arguments': 'BuildRunArgumentCollection', + 'build_run_progress_summary': 'BuildRunProgressSummary', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'lifecycle_state': 'str', + 'lifecycle_details': 'str', + 'commit_info': 'CommitInfo', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'system_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'id': 'id', + 'compartment_id': 'compartmentId', + 'display_name': 'displayName', + 'project_id': 'projectId', + 'build_pipeline_id': 'buildPipelineId', + 'build_run_source': 'buildRunSource', + 'build_run_arguments': 'buildRunArguments', + 'build_run_progress_summary': 'buildRunProgressSummary', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'lifecycle_state': 'lifecycleState', + 'lifecycle_details': 'lifecycleDetails', + 'commit_info': 'commitInfo', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'system_tags': 'systemTags' + } + + self._id = None + self._compartment_id = None + self._display_name = None + self._project_id = None + self._build_pipeline_id = None + self._build_run_source = None + self._build_run_arguments = None + self._build_run_progress_summary = None + self._time_created = None + self._time_updated = None + self._lifecycle_state = None + self._lifecycle_details = None + self._commit_info = None + self._freeform_tags = None + self._defined_tags = None + self._system_tags = None + + @property + def id(self): + """ + **[Required]** Gets the id of this BuildRunSummary. + Unique identifier that is immutable on creation + + + :return: The id of this BuildRunSummary. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this BuildRunSummary. + Unique identifier that is immutable on creation + + + :param id: The id of this BuildRunSummary. + :type: str + """ + self._id = id + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this BuildRunSummary. + Compartment Identifier + + + :return: The compartment_id of this BuildRunSummary. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this BuildRunSummary. + Compartment Identifier + + + :param compartment_id: The compartment_id of this BuildRunSummary. + :type: str + """ + self._compartment_id = compartment_id + + @property + def display_name(self): + """ + Gets the display_name of this BuildRunSummary. + BuildRun identifier which can be renamed and is not necessarily unique + + + :return: The display_name of this BuildRunSummary. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this BuildRunSummary. + BuildRun identifier which can be renamed and is not necessarily unique + + + :param display_name: The display_name of this BuildRunSummary. + :type: str + """ + self._display_name = display_name + + @property + def project_id(self): + """ + **[Required]** Gets the project_id of this BuildRunSummary. + Project Identifier + + + :return: The project_id of this BuildRunSummary. + :rtype: str + """ + return self._project_id + + @project_id.setter + def project_id(self, project_id): + """ + Sets the project_id of this BuildRunSummary. + Project Identifier + + + :param project_id: The project_id of this BuildRunSummary. + :type: str + """ + self._project_id = project_id + + @property + def build_pipeline_id(self): + """ + **[Required]** Gets the build_pipeline_id of this BuildRunSummary. + Pipeline Identifier + + + :return: The build_pipeline_id of this BuildRunSummary. + :rtype: str + """ + return self._build_pipeline_id + + @build_pipeline_id.setter + def build_pipeline_id(self, build_pipeline_id): + """ + Sets the build_pipeline_id of this BuildRunSummary. + Pipeline Identifier + + + :param build_pipeline_id: The build_pipeline_id of this BuildRunSummary. + :type: str + """ + self._build_pipeline_id = build_pipeline_id + + @property + def build_run_source(self): + """ + **[Required]** Gets the build_run_source of this BuildRunSummary. + + :return: The build_run_source of this BuildRunSummary. + :rtype: oci.devops.models.BuildRunSource + """ + return self._build_run_source + + @build_run_source.setter + def build_run_source(self, build_run_source): + """ + Sets the build_run_source of this BuildRunSummary. + + :param build_run_source: The build_run_source of this BuildRunSummary. + :type: oci.devops.models.BuildRunSource + """ + self._build_run_source = build_run_source + + @property + def build_run_arguments(self): + """ + Gets the build_run_arguments of this BuildRunSummary. + + :return: The build_run_arguments of this BuildRunSummary. + :rtype: oci.devops.models.BuildRunArgumentCollection + """ + return self._build_run_arguments + + @build_run_arguments.setter + def build_run_arguments(self, build_run_arguments): + """ + Sets the build_run_arguments of this BuildRunSummary. + + :param build_run_arguments: The build_run_arguments of this BuildRunSummary. + :type: oci.devops.models.BuildRunArgumentCollection + """ + self._build_run_arguments = build_run_arguments + + @property + def build_run_progress_summary(self): + """ + Gets the build_run_progress_summary of this BuildRunSummary. + + :return: The build_run_progress_summary of this BuildRunSummary. + :rtype: oci.devops.models.BuildRunProgressSummary + """ + return self._build_run_progress_summary + + @build_run_progress_summary.setter + def build_run_progress_summary(self, build_run_progress_summary): + """ + Sets the build_run_progress_summary of this BuildRunSummary. + + :param build_run_progress_summary: The build_run_progress_summary of this BuildRunSummary. + :type: oci.devops.models.BuildRunProgressSummary + """ + self._build_run_progress_summary = build_run_progress_summary + + @property + def time_created(self): + """ + Gets the time_created of this BuildRunSummary. + The time the the BuildRun was created. An RFC3339 formatted datetime string + + + :return: The time_created of this BuildRunSummary. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this BuildRunSummary. + The time the the BuildRun was created. An RFC3339 formatted datetime string + + + :param time_created: The time_created of this BuildRunSummary. + :type: datetime + """ + self._time_created = time_created + + @property + def time_updated(self): + """ + Gets the time_updated of this BuildRunSummary. + The time the BuildRun was updated. An RFC3339 formatted datetime string + + + :return: The time_updated of this BuildRunSummary. + :rtype: datetime + """ + return self._time_updated + + @time_updated.setter + def time_updated(self, time_updated): + """ + Sets the time_updated of this BuildRunSummary. + The time the BuildRun was updated. An RFC3339 formatted datetime string + + + :param time_updated: The time_updated of this BuildRunSummary. + :type: datetime + """ + self._time_updated = time_updated + + @property + def lifecycle_state(self): + """ + Gets the lifecycle_state of this BuildRunSummary. + The current state of the BuildRun. + + + :return: The lifecycle_state of this BuildRunSummary. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this BuildRunSummary. + The current state of the BuildRun. + + + :param lifecycle_state: The lifecycle_state of this BuildRunSummary. + :type: str + """ + self._lifecycle_state = lifecycle_state + + @property + def lifecycle_details(self): + """ + Gets the lifecycle_details of this BuildRunSummary. + A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + + + :return: The lifecycle_details of this BuildRunSummary. + :rtype: str + """ + return self._lifecycle_details + + @lifecycle_details.setter + def lifecycle_details(self, lifecycle_details): + """ + Sets the lifecycle_details of this BuildRunSummary. + A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + + + :param lifecycle_details: The lifecycle_details of this BuildRunSummary. + :type: str + """ + self._lifecycle_details = lifecycle_details + + @property + def commit_info(self): + """ + Gets the commit_info of this BuildRunSummary. + + :return: The commit_info of this BuildRunSummary. + :rtype: oci.devops.models.CommitInfo + """ + return self._commit_info + + @commit_info.setter + def commit_info(self, commit_info): + """ + Sets the commit_info of this BuildRunSummary. + + :param commit_info: The commit_info of this BuildRunSummary. + :type: oci.devops.models.CommitInfo + """ + self._commit_info = commit_info + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this BuildRunSummary. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See `Resource Tags`__. Example: `{\"bar-key\": \"value\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this BuildRunSummary. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this BuildRunSummary. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See `Resource Tags`__. Example: `{\"bar-key\": \"value\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this BuildRunSummary. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this BuildRunSummary. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this BuildRunSummary. + :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 BuildRunSummary. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this BuildRunSummary. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + @property + def system_tags(self): + """ + Gets the system_tags of this BuildRunSummary. + Usage of system tag keys. These predefined keys are scoped to namespaces. See `Resource Tags`__. Example: `{\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The system_tags of this BuildRunSummary. + :rtype: dict(str, dict(str, object)) + """ + return self._system_tags + + @system_tags.setter + def system_tags(self, system_tags): + """ + Sets the system_tags of this BuildRunSummary. + Usage of system tag keys. These predefined keys are scoped to namespaces. See `Resource Tags`__. Example: `{\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param system_tags: The system_tags of this BuildRunSummary. + :type: dict(str, dict(str, object)) + """ + self._system_tags = system_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/devops/models/build_run_summary_collection.py b/src/oci/devops/models/build_run_summary_collection.py new file mode 100644 index 0000000000..7dc32f3b05 --- /dev/null +++ b/src/oci/devops/models/build_run_summary_collection.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 BuildRunSummaryCollection(object): + """ + List of BuildRunSummary. + """ + + def __init__(self, **kwargs): + """ + Initializes a new BuildRunSummaryCollection object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param items: + The value to assign to the items property of this BuildRunSummaryCollection. + :type items: list[oci.devops.models.BuildRunSummary] + + """ + self.swagger_types = { + 'items': 'list[BuildRunSummary]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this BuildRunSummaryCollection. + Array of BuildRunSummary items. + + + :return: The items of this BuildRunSummaryCollection. + :rtype: list[oci.devops.models.BuildRunSummary] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this BuildRunSummaryCollection. + Array of BuildRunSummary items. + + + :param items: The items of this BuildRunSummaryCollection. + :type: list[oci.devops.models.BuildRunSummary] + """ + self._items = items + + 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/devops/models/build_source.py b/src/oci/devops/models/build_source.py new file mode 100644 index 0000000000..e4a8b2bdb0 --- /dev/null +++ b/src/oci/devops/models/build_source.py @@ -0,0 +1,208 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 BuildSource(object): + """ + Build Source required for Build Stage. + """ + + #: A constant which can be used with the connection_type property of a BuildSource. + #: This constant has a value of "GITHUB" + CONNECTION_TYPE_GITHUB = "GITHUB" + + #: A constant which can be used with the connection_type property of a BuildSource. + #: This constant has a value of "GITLAB" + CONNECTION_TYPE_GITLAB = "GITLAB" + + #: A constant which can be used with the connection_type property of a BuildSource. + #: This constant has a value of "DEVOPS_CODE_REPOSITORY" + CONNECTION_TYPE_DEVOPS_CODE_REPOSITORY = "DEVOPS_CODE_REPOSITORY" + + def __init__(self, **kwargs): + """ + Initializes a new BuildSource object with values from keyword arguments. This class has the following subclasses and if you are using this class as input + to a service operations then you should favor using a subclass over the base class: + + * :class:`~oci.devops.models.GithubBuildSource` + * :class:`~oci.devops.models.DevopsCodeRepositoryBuildSource` + * :class:`~oci.devops.models.GitlabBuildSource` + + 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 BuildSource. + :type name: str + + :param connection_type: + The value to assign to the connection_type property of this BuildSource. + Allowed values for this property are: "GITHUB", "GITLAB", "DEVOPS_CODE_REPOSITORY", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type connection_type: str + + :param repository_url: + The value to assign to the repository_url property of this BuildSource. + :type repository_url: str + + :param branch: + The value to assign to the branch property of this BuildSource. + :type branch: str + + """ + self.swagger_types = { + 'name': 'str', + 'connection_type': 'str', + 'repository_url': 'str', + 'branch': 'str' + } + + self.attribute_map = { + 'name': 'name', + 'connection_type': 'connectionType', + 'repository_url': 'repositoryUrl', + 'branch': 'branch' + } + + self._name = None + self._connection_type = None + self._repository_url = None + self._branch = None + + @staticmethod + def get_subtype(object_dictionary): + """ + Given the hash representation of a subtype of this class, + use the info in the hash to return the class of the subtype. + """ + type = object_dictionary['connectionType'] + + if type == 'GITHUB': + return 'GithubBuildSource' + + if type == 'DEVOPS_CODE_REPOSITORY': + return 'DevopsCodeRepositoryBuildSource' + + if type == 'GITLAB': + return 'GitlabBuildSource' + else: + return 'BuildSource' + + @property + def name(self): + """ + **[Required]** Gets the name of this BuildSource. + Name of the Build source. This must be unique within a BuildSourceCollection. The name can be used by customers to locate the working directory pertinent to this repository. + + + :return: The name of this BuildSource. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """ + Sets the name of this BuildSource. + Name of the Build source. This must be unique within a BuildSourceCollection. The name can be used by customers to locate the working directory pertinent to this repository. + + + :param name: The name of this BuildSource. + :type: str + """ + self._name = name + + @property + def connection_type(self): + """ + **[Required]** Gets the connection_type of this BuildSource. + The type of Source Provider. + + Allowed values for this property are: "GITHUB", "GITLAB", "DEVOPS_CODE_REPOSITORY", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The connection_type of this BuildSource. + :rtype: str + """ + return self._connection_type + + @connection_type.setter + def connection_type(self, connection_type): + """ + Sets the connection_type of this BuildSource. + The type of Source Provider. + + + :param connection_type: The connection_type of this BuildSource. + :type: str + """ + allowed_values = ["GITHUB", "GITLAB", "DEVOPS_CODE_REPOSITORY"] + if not value_allowed_none_or_none_sentinel(connection_type, allowed_values): + connection_type = 'UNKNOWN_ENUM_VALUE' + self._connection_type = connection_type + + @property + def repository_url(self): + """ + **[Required]** Gets the repository_url of this BuildSource. + Url for repository + + + :return: The repository_url of this BuildSource. + :rtype: str + """ + return self._repository_url + + @repository_url.setter + def repository_url(self, repository_url): + """ + Sets the repository_url of this BuildSource. + Url for repository + + + :param repository_url: The repository_url of this BuildSource. + :type: str + """ + self._repository_url = repository_url + + @property + def branch(self): + """ + **[Required]** Gets the branch of this BuildSource. + branch name + + + :return: The branch of this BuildSource. + :rtype: str + """ + return self._branch + + @branch.setter + def branch(self, branch): + """ + Sets the branch of this BuildSource. + branch name + + + :param branch: The branch of this BuildSource. + :type: str + """ + self._branch = branch + + 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/devops/models/build_source_collection.py b/src/oci/devops/models/build_source_collection.py new file mode 100644 index 0000000000..465e96c301 --- /dev/null +++ b/src/oci/devops/models/build_source_collection.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 BuildSourceCollection(object): + """ + Collection of Build Sources. + """ + + def __init__(self, **kwargs): + """ + Initializes a new BuildSourceCollection object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param items: + The value to assign to the items property of this BuildSourceCollection. + :type items: list[oci.devops.models.BuildSource] + + """ + self.swagger_types = { + 'items': 'list[BuildSource]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this BuildSourceCollection. + Collection of Build sources. In case of UPDATE operation, replaces existing Build sources list. Merging with existing Build Sources is not supported. + + + :return: The items of this BuildSourceCollection. + :rtype: list[oci.devops.models.BuildSource] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this BuildSourceCollection. + Collection of Build sources. In case of UPDATE operation, replaces existing Build sources list. Merging with existing Build Sources is not supported. + + + :param items: The items of this BuildSourceCollection. + :type: list[oci.devops.models.BuildSource] + """ + self._items = items + + 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/devops/models/build_stage.py b/src/oci/devops/models/build_stage.py new file mode 100644 index 0000000000..8fab9ee6a9 --- /dev/null +++ b/src/oci/devops/models/build_stage.py @@ -0,0 +1,313 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .build_pipeline_stage import BuildPipelineStage +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 BuildStage(BuildPipelineStage): + """ + Specifies the build Stage. + """ + + #: A constant which can be used with the image property of a BuildStage. + #: This constant has a value of "OL7_X86_64_STANDARD_10" + IMAGE_OL7_X86_64_STANDARD_10 = "OL7_X86_64_STANDARD_10" + + def __init__(self, **kwargs): + """ + Initializes a new BuildStage object with values from keyword arguments. The default value of the :py:attr:`~oci.devops.models.BuildStage.build_pipeline_stage_type` attribute + of this class is ``BUILD`` and it should not be changed. + 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 BuildStage. + :type id: str + + :param display_name: + The value to assign to the display_name property of this BuildStage. + :type display_name: str + + :param description: + The value to assign to the description property of this BuildStage. + :type description: str + + :param project_id: + The value to assign to the project_id property of this BuildStage. + :type project_id: str + + :param build_pipeline_id: + The value to assign to the build_pipeline_id property of this BuildStage. + :type build_pipeline_id: str + + :param compartment_id: + The value to assign to the compartment_id property of this BuildStage. + :type compartment_id: str + + :param build_pipeline_stage_type: + The value to assign to the build_pipeline_stage_type property of this BuildStage. + Allowed values for this property are: "WAIT", "BUILD", "DELIVER_ARTIFACT", "TRIGGER_DEPLOYMENT_PIPELINE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type build_pipeline_stage_type: str + + :param time_created: + The value to assign to the time_created property of this BuildStage. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this BuildStage. + :type time_updated: datetime + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this BuildStage. + Allowed values for this property are: "CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type lifecycle_state: str + + :param lifecycle_details: + The value to assign to the lifecycle_details property of this BuildStage. + :type lifecycle_details: str + + :param build_pipeline_stage_predecessor_collection: + The value to assign to the build_pipeline_stage_predecessor_collection property of this BuildStage. + :type build_pipeline_stage_predecessor_collection: oci.devops.models.BuildPipelineStagePredecessorCollection + + :param freeform_tags: + The value to assign to the freeform_tags property of this BuildStage. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this BuildStage. + :type defined_tags: dict(str, dict(str, object)) + + :param system_tags: + The value to assign to the system_tags property of this BuildStage. + :type system_tags: dict(str, dict(str, object)) + + :param image: + The value to assign to the image property of this BuildStage. + Allowed values for this property are: "OL7_X86_64_STANDARD_10", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type image: str + + :param build_spec_file: + The value to assign to the build_spec_file property of this BuildStage. + :type build_spec_file: str + + :param stage_execution_timeout_in_seconds: + The value to assign to the stage_execution_timeout_in_seconds property of this BuildStage. + :type stage_execution_timeout_in_seconds: int + + :param build_source_collection: + The value to assign to the build_source_collection property of this BuildStage. + :type build_source_collection: oci.devops.models.BuildSourceCollection + + :param primary_build_source: + The value to assign to the primary_build_source property of this BuildStage. + :type primary_build_source: str + + """ + self.swagger_types = { + 'id': 'str', + 'display_name': 'str', + 'description': 'str', + 'project_id': 'str', + 'build_pipeline_id': 'str', + 'compartment_id': 'str', + 'build_pipeline_stage_type': 'str', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'lifecycle_state': 'str', + 'lifecycle_details': 'str', + 'build_pipeline_stage_predecessor_collection': 'BuildPipelineStagePredecessorCollection', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'system_tags': 'dict(str, dict(str, object))', + 'image': 'str', + 'build_spec_file': 'str', + 'stage_execution_timeout_in_seconds': 'int', + 'build_source_collection': 'BuildSourceCollection', + 'primary_build_source': 'str' + } + + self.attribute_map = { + 'id': 'id', + 'display_name': 'displayName', + 'description': 'description', + 'project_id': 'projectId', + 'build_pipeline_id': 'buildPipelineId', + 'compartment_id': 'compartmentId', + 'build_pipeline_stage_type': 'buildPipelineStageType', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'lifecycle_state': 'lifecycleState', + 'lifecycle_details': 'lifecycleDetails', + 'build_pipeline_stage_predecessor_collection': 'buildPipelineStagePredecessorCollection', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'system_tags': 'systemTags', + 'image': 'image', + 'build_spec_file': 'buildSpecFile', + 'stage_execution_timeout_in_seconds': 'stageExecutionTimeoutInSeconds', + 'build_source_collection': 'buildSourceCollection', + 'primary_build_source': 'primaryBuildSource' + } + + self._id = None + self._display_name = None + self._description = None + self._project_id = None + self._build_pipeline_id = None + self._compartment_id = None + self._build_pipeline_stage_type = None + self._time_created = None + self._time_updated = None + self._lifecycle_state = None + self._lifecycle_details = None + self._build_pipeline_stage_predecessor_collection = None + self._freeform_tags = None + self._defined_tags = None + self._system_tags = None + self._image = None + self._build_spec_file = None + self._stage_execution_timeout_in_seconds = None + self._build_source_collection = None + self._primary_build_source = None + self._build_pipeline_stage_type = 'BUILD' + + @property + def image(self): + """ + **[Required]** Gets the image of this BuildStage. + Image name for the Build Environment + + Allowed values for this property are: "OL7_X86_64_STANDARD_10", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The image of this BuildStage. + :rtype: str + """ + return self._image + + @image.setter + def image(self, image): + """ + Sets the image of this BuildStage. + Image name for the Build Environment + + + :param image: The image of this BuildStage. + :type: str + """ + allowed_values = ["OL7_X86_64_STANDARD_10"] + if not value_allowed_none_or_none_sentinel(image, allowed_values): + image = 'UNKNOWN_ENUM_VALUE' + self._image = image + + @property + def build_spec_file(self): + """ + Gets the build_spec_file of this BuildStage. + The path to the build specification file for this Environment. The default location if not specified is build_spec.yaml + + + :return: The build_spec_file of this BuildStage. + :rtype: str + """ + return self._build_spec_file + + @build_spec_file.setter + def build_spec_file(self, build_spec_file): + """ + Sets the build_spec_file of this BuildStage. + The path to the build specification file for this Environment. The default location if not specified is build_spec.yaml + + + :param build_spec_file: The build_spec_file of this BuildStage. + :type: str + """ + self._build_spec_file = build_spec_file + + @property + def stage_execution_timeout_in_seconds(self): + """ + Gets the stage_execution_timeout_in_seconds of this BuildStage. + Timeout for the Build Stage Execution. Value in seconds. + + + :return: The stage_execution_timeout_in_seconds of this BuildStage. + :rtype: int + """ + return self._stage_execution_timeout_in_seconds + + @stage_execution_timeout_in_seconds.setter + def stage_execution_timeout_in_seconds(self, stage_execution_timeout_in_seconds): + """ + Sets the stage_execution_timeout_in_seconds of this BuildStage. + Timeout for the Build Stage Execution. Value in seconds. + + + :param stage_execution_timeout_in_seconds: The stage_execution_timeout_in_seconds of this BuildStage. + :type: int + """ + self._stage_execution_timeout_in_seconds = stage_execution_timeout_in_seconds + + @property + def build_source_collection(self): + """ + **[Required]** Gets the build_source_collection of this BuildStage. + + :return: The build_source_collection of this BuildStage. + :rtype: oci.devops.models.BuildSourceCollection + """ + return self._build_source_collection + + @build_source_collection.setter + def build_source_collection(self, build_source_collection): + """ + Sets the build_source_collection of this BuildStage. + + :param build_source_collection: The build_source_collection of this BuildStage. + :type: oci.devops.models.BuildSourceCollection + """ + self._build_source_collection = build_source_collection + + @property + def primary_build_source(self): + """ + Gets the primary_build_source of this BuildStage. + Name of the BuildSource in which the build_spec.yml file need to be located. If not specified, the 1st entry in the BuildSource collection will be chosen as Primary. + + + :return: The primary_build_source of this BuildStage. + :rtype: str + """ + return self._primary_build_source + + @primary_build_source.setter + def primary_build_source(self, primary_build_source): + """ + Sets the primary_build_source of this BuildStage. + Name of the BuildSource in which the build_spec.yml file need to be located. If not specified, the 1st entry in the BuildSource collection will be chosen as Primary. + + + :param primary_build_source: The primary_build_source of this BuildStage. + :type: str + """ + self._primary_build_source = primary_build_source + + 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/devops/models/build_stage_run_progress.py b/src/oci/devops/models/build_stage_run_progress.py new file mode 100644 index 0000000000..da6862a723 --- /dev/null +++ b/src/oci/devops/models/build_stage_run_progress.py @@ -0,0 +1,371 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .build_pipeline_stage_run_progress import BuildPipelineStageRunProgress +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 BuildStageRunProgress(BuildPipelineStageRunProgress): + """ + Specifies the Run details for Build Stage. + """ + + #: A constant which can be used with the image property of a BuildStageRunProgress. + #: This constant has a value of "OL7_X86_64_STANDARD_10" + IMAGE_OL7_X86_64_STANDARD_10 = "OL7_X86_64_STANDARD_10" + + def __init__(self, **kwargs): + """ + Initializes a new BuildStageRunProgress object with values from keyword arguments. The default value of the :py:attr:`~oci.devops.models.BuildStageRunProgress.build_pipeline_stage_type` attribute + of this class is ``BUILD`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param stage_display_name: + The value to assign to the stage_display_name property of this BuildStageRunProgress. + :type stage_display_name: str + + :param build_pipeline_stage_type: + The value to assign to the build_pipeline_stage_type property of this BuildStageRunProgress. + :type build_pipeline_stage_type: str + + :param build_pipeline_stage_id: + The value to assign to the build_pipeline_stage_id property of this BuildStageRunProgress. + :type build_pipeline_stage_id: str + + :param time_started: + The value to assign to the time_started property of this BuildStageRunProgress. + :type time_started: datetime + + :param time_finished: + The value to assign to the time_finished property of this BuildStageRunProgress. + :type time_finished: datetime + + :param status: + The value to assign to the status property of this BuildStageRunProgress. + 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 build_pipeline_stage_predecessors: + The value to assign to the build_pipeline_stage_predecessors property of this BuildStageRunProgress. + :type build_pipeline_stage_predecessors: oci.devops.models.BuildPipelineStagePredecessorCollection + + :param actual_build_runner_shape: + The value to assign to the actual_build_runner_shape property of this BuildStageRunProgress. + :type actual_build_runner_shape: str + + :param actual_build_runner_shape_config: + The value to assign to the actual_build_runner_shape_config property of this BuildStageRunProgress. + :type actual_build_runner_shape_config: oci.devops.models.ActualBuildRunnerShapeConfig + + :param image: + The value to assign to the image property of this BuildStageRunProgress. + Allowed values for this property are: "OL7_X86_64_STANDARD_10", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type image: str + + :param build_spec_file: + The value to assign to the build_spec_file property of this BuildStageRunProgress. + :type build_spec_file: str + + :param stage_execution_timeout_in_seconds: + The value to assign to the stage_execution_timeout_in_seconds property of this BuildStageRunProgress. + :type stage_execution_timeout_in_seconds: int + + :param build_source_collection: + The value to assign to the build_source_collection property of this BuildStageRunProgress. + :type build_source_collection: oci.devops.models.BuildSourceCollection + + :param primary_build_source: + The value to assign to the primary_build_source property of this BuildStageRunProgress. + :type primary_build_source: str + + :param steps: + The value to assign to the steps property of this BuildStageRunProgress. + :type steps: list[oci.devops.models.BuildStageRunStep] + + :param exported_variables: + The value to assign to the exported_variables property of this BuildStageRunProgress. + :type exported_variables: oci.devops.models.ExportedVariableCollection + + """ + self.swagger_types = { + 'stage_display_name': 'str', + 'build_pipeline_stage_type': 'str', + 'build_pipeline_stage_id': 'str', + 'time_started': 'datetime', + 'time_finished': 'datetime', + 'status': 'str', + 'build_pipeline_stage_predecessors': 'BuildPipelineStagePredecessorCollection', + 'actual_build_runner_shape': 'str', + 'actual_build_runner_shape_config': 'ActualBuildRunnerShapeConfig', + 'image': 'str', + 'build_spec_file': 'str', + 'stage_execution_timeout_in_seconds': 'int', + 'build_source_collection': 'BuildSourceCollection', + 'primary_build_source': 'str', + 'steps': 'list[BuildStageRunStep]', + 'exported_variables': 'ExportedVariableCollection' + } + + self.attribute_map = { + 'stage_display_name': 'stageDisplayName', + 'build_pipeline_stage_type': 'buildPipelineStageType', + 'build_pipeline_stage_id': 'buildPipelineStageId', + 'time_started': 'timeStarted', + 'time_finished': 'timeFinished', + 'status': 'status', + 'build_pipeline_stage_predecessors': 'buildPipelineStagePredecessors', + 'actual_build_runner_shape': 'actualBuildRunnerShape', + 'actual_build_runner_shape_config': 'actualBuildRunnerShapeConfig', + 'image': 'image', + 'build_spec_file': 'buildSpecFile', + 'stage_execution_timeout_in_seconds': 'stageExecutionTimeoutInSeconds', + 'build_source_collection': 'buildSourceCollection', + 'primary_build_source': 'primaryBuildSource', + 'steps': 'steps', + 'exported_variables': 'exportedVariables' + } + + self._stage_display_name = None + self._build_pipeline_stage_type = None + self._build_pipeline_stage_id = None + self._time_started = None + self._time_finished = None + self._status = None + self._build_pipeline_stage_predecessors = None + self._actual_build_runner_shape = None + self._actual_build_runner_shape_config = None + self._image = None + self._build_spec_file = None + self._stage_execution_timeout_in_seconds = None + self._build_source_collection = None + self._primary_build_source = None + self._steps = None + self._exported_variables = None + self._build_pipeline_stage_type = 'BUILD' + + @property + def actual_build_runner_shape(self): + """ + Gets the actual_build_runner_shape of this BuildStageRunProgress. + Name of Build Runner shape where this Build Stage is running. + + + :return: The actual_build_runner_shape of this BuildStageRunProgress. + :rtype: str + """ + return self._actual_build_runner_shape + + @actual_build_runner_shape.setter + def actual_build_runner_shape(self, actual_build_runner_shape): + """ + Sets the actual_build_runner_shape of this BuildStageRunProgress. + Name of Build Runner shape where this Build Stage is running. + + + :param actual_build_runner_shape: The actual_build_runner_shape of this BuildStageRunProgress. + :type: str + """ + self._actual_build_runner_shape = actual_build_runner_shape + + @property + def actual_build_runner_shape_config(self): + """ + Gets the actual_build_runner_shape_config of this BuildStageRunProgress. + + :return: The actual_build_runner_shape_config of this BuildStageRunProgress. + :rtype: oci.devops.models.ActualBuildRunnerShapeConfig + """ + return self._actual_build_runner_shape_config + + @actual_build_runner_shape_config.setter + def actual_build_runner_shape_config(self, actual_build_runner_shape_config): + """ + Sets the actual_build_runner_shape_config of this BuildStageRunProgress. + + :param actual_build_runner_shape_config: The actual_build_runner_shape_config of this BuildStageRunProgress. + :type: oci.devops.models.ActualBuildRunnerShapeConfig + """ + self._actual_build_runner_shape_config = actual_build_runner_shape_config + + @property + def image(self): + """ + **[Required]** Gets the image of this BuildStageRunProgress. + Image name for the Build Environment + + Allowed values for this property are: "OL7_X86_64_STANDARD_10", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The image of this BuildStageRunProgress. + :rtype: str + """ + return self._image + + @image.setter + def image(self, image): + """ + Sets the image of this BuildStageRunProgress. + Image name for the Build Environment + + + :param image: The image of this BuildStageRunProgress. + :type: str + """ + allowed_values = ["OL7_X86_64_STANDARD_10"] + if not value_allowed_none_or_none_sentinel(image, allowed_values): + image = 'UNKNOWN_ENUM_VALUE' + self._image = image + + @property + def build_spec_file(self): + """ + Gets the build_spec_file of this BuildStageRunProgress. + The path to the build specification file for this Environment. The default location if not specified is build_spec.yaml + + + :return: The build_spec_file of this BuildStageRunProgress. + :rtype: str + """ + return self._build_spec_file + + @build_spec_file.setter + def build_spec_file(self, build_spec_file): + """ + Sets the build_spec_file of this BuildStageRunProgress. + The path to the build specification file for this Environment. The default location if not specified is build_spec.yaml + + + :param build_spec_file: The build_spec_file of this BuildStageRunProgress. + :type: str + """ + self._build_spec_file = build_spec_file + + @property + def stage_execution_timeout_in_seconds(self): + """ + Gets the stage_execution_timeout_in_seconds of this BuildStageRunProgress. + Timeout for the Build Stage Execution. Value in seconds. + + + :return: The stage_execution_timeout_in_seconds of this BuildStageRunProgress. + :rtype: int + """ + return self._stage_execution_timeout_in_seconds + + @stage_execution_timeout_in_seconds.setter + def stage_execution_timeout_in_seconds(self, stage_execution_timeout_in_seconds): + """ + Sets the stage_execution_timeout_in_seconds of this BuildStageRunProgress. + Timeout for the Build Stage Execution. Value in seconds. + + + :param stage_execution_timeout_in_seconds: The stage_execution_timeout_in_seconds of this BuildStageRunProgress. + :type: int + """ + self._stage_execution_timeout_in_seconds = stage_execution_timeout_in_seconds + + @property + def build_source_collection(self): + """ + **[Required]** Gets the build_source_collection of this BuildStageRunProgress. + + :return: The build_source_collection of this BuildStageRunProgress. + :rtype: oci.devops.models.BuildSourceCollection + """ + return self._build_source_collection + + @build_source_collection.setter + def build_source_collection(self, build_source_collection): + """ + Sets the build_source_collection of this BuildStageRunProgress. + + :param build_source_collection: The build_source_collection of this BuildStageRunProgress. + :type: oci.devops.models.BuildSourceCollection + """ + self._build_source_collection = build_source_collection + + @property + def primary_build_source(self): + """ + Gets the primary_build_source of this BuildStageRunProgress. + Name of the BuildSource in which the build_spec.yml file need to be located. If not specified, the 1st entry in the BuildSource collection will be chosen as Primary. + + + :return: The primary_build_source of this BuildStageRunProgress. + :rtype: str + """ + return self._primary_build_source + + @primary_build_source.setter + def primary_build_source(self, primary_build_source): + """ + Sets the primary_build_source of this BuildStageRunProgress. + Name of the BuildSource in which the build_spec.yml file need to be located. If not specified, the 1st entry in the BuildSource collection will be chosen as Primary. + + + :param primary_build_source: The primary_build_source of this BuildStageRunProgress. + :type: str + """ + self._primary_build_source = primary_build_source + + @property + def steps(self): + """ + Gets the steps of this BuildStageRunProgress. + The details about all the steps in a Build Stage + + + :return: The steps of this BuildStageRunProgress. + :rtype: list[oci.devops.models.BuildStageRunStep] + """ + return self._steps + + @steps.setter + def steps(self, steps): + """ + Sets the steps of this BuildStageRunProgress. + The details about all the steps in a Build Stage + + + :param steps: The steps of this BuildStageRunProgress. + :type: list[oci.devops.models.BuildStageRunStep] + """ + self._steps = steps + + @property + def exported_variables(self): + """ + Gets the exported_variables of this BuildStageRunProgress. + + :return: The exported_variables of this BuildStageRunProgress. + :rtype: oci.devops.models.ExportedVariableCollection + """ + return self._exported_variables + + @exported_variables.setter + def exported_variables(self, exported_variables): + """ + Sets the exported_variables of this BuildStageRunProgress. + + :param exported_variables: The exported_variables of this BuildStageRunProgress. + :type: oci.devops.models.ExportedVariableCollection + """ + self._exported_variables = exported_variables + + 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/devops/models/build_stage_run_step.py b/src/oci/devops/models/build_stage_run_step.py new file mode 100644 index 0000000000..973b9ae968 --- /dev/null +++ b/src/oci/devops/models/build_stage_run_step.py @@ -0,0 +1,187 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 BuildStageRunStep(object): + """ + The details about each step in Build Stage. + """ + + #: A constant which can be used with the state property of a BuildStageRunStep. + #: This constant has a value of "WAITING" + STATE_WAITING = "WAITING" + + #: A constant which can be used with the state property of a BuildStageRunStep. + #: This constant has a value of "IN_PROGRESS" + STATE_IN_PROGRESS = "IN_PROGRESS" + + #: A constant which can be used with the state property of a BuildStageRunStep. + #: This constant has a value of "FAILED" + STATE_FAILED = "FAILED" + + #: A constant which can be used with the state property of a BuildStageRunStep. + #: This constant has a value of "SUCCEEDED" + STATE_SUCCEEDED = "SUCCEEDED" + + def __init__(self, **kwargs): + """ + Initializes a new BuildStageRunStep 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 BuildStageRunStep. + :type name: str + + :param state: + The value to assign to the state property of this BuildStageRunStep. + Allowed values for this property are: "WAITING", "IN_PROGRESS", "FAILED", "SUCCEEDED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type state: str + + :param time_started: + The value to assign to the time_started property of this BuildStageRunStep. + :type time_started: datetime + + :param time_finished: + The value to assign to the time_finished property of this BuildStageRunStep. + :type time_finished: datetime + + """ + self.swagger_types = { + 'name': 'str', + 'state': 'str', + 'time_started': 'datetime', + 'time_finished': 'datetime' + } + + self.attribute_map = { + 'name': 'name', + 'state': 'state', + 'time_started': 'timeStarted', + 'time_finished': 'timeFinished' + } + + self._name = None + self._state = None + self._time_started = None + self._time_finished = None + + @property + def name(self): + """ + Gets the name of this BuildStageRunStep. + Name of the step. + + + :return: The name of this BuildStageRunStep. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """ + Sets the name of this BuildStageRunStep. + Name of the step. + + + :param name: The name of this BuildStageRunStep. + :type: str + """ + self._name = name + + @property + def state(self): + """ + Gets the state of this BuildStageRunStep. + State of the step. + + Allowed values for this property are: "WAITING", "IN_PROGRESS", "FAILED", "SUCCEEDED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The state of this BuildStageRunStep. + :rtype: str + """ + return self._state + + @state.setter + def state(self, state): + """ + Sets the state of this BuildStageRunStep. + State of the step. + + + :param state: The state of this BuildStageRunStep. + :type: str + """ + allowed_values = ["WAITING", "IN_PROGRESS", "FAILED", "SUCCEEDED"] + if not value_allowed_none_or_none_sentinel(state, allowed_values): + state = 'UNKNOWN_ENUM_VALUE' + self._state = state + + @property + def time_started(self): + """ + Gets the time_started of this BuildStageRunStep. + Time when the step started. + + + :return: The time_started of this BuildStageRunStep. + :rtype: datetime + """ + return self._time_started + + @time_started.setter + def time_started(self, time_started): + """ + Sets the time_started of this BuildStageRunStep. + Time when the step started. + + + :param time_started: The time_started of this BuildStageRunStep. + :type: datetime + """ + self._time_started = time_started + + @property + def time_finished(self): + """ + Gets the time_finished of this BuildStageRunStep. + Time when the step finished. + + + :return: The time_finished of this BuildStageRunStep. + :rtype: datetime + """ + return self._time_finished + + @time_finished.setter + def time_finished(self, time_finished): + """ + Sets the time_finished of this BuildStageRunStep. + Time when the step finished. + + + :param time_finished: The time_finished of this BuildStageRunStep. + :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/devops/models/build_stage_summary.py b/src/oci/devops/models/build_stage_summary.py new file mode 100644 index 0000000000..946dc1ac33 --- /dev/null +++ b/src/oci/devops/models/build_stage_summary.py @@ -0,0 +1,297 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .build_pipeline_stage_summary import BuildPipelineStageSummary +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 BuildStageSummary(BuildPipelineStageSummary): + """ + Specifies the Build Stage. + """ + + def __init__(self, **kwargs): + """ + Initializes a new BuildStageSummary object with values from keyword arguments. The default value of the :py:attr:`~oci.devops.models.BuildStageSummary.build_pipeline_stage_type` attribute + of this class is ``BUILD`` and it should not be changed. + 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 BuildStageSummary. + :type id: str + + :param display_name: + The value to assign to the display_name property of this BuildStageSummary. + :type display_name: str + + :param project_id: + The value to assign to the project_id property of this BuildStageSummary. + :type project_id: str + + :param build_pipeline_id: + The value to assign to the build_pipeline_id property of this BuildStageSummary. + :type build_pipeline_id: str + + :param compartment_id: + The value to assign to the compartment_id property of this BuildStageSummary. + :type compartment_id: str + + :param build_pipeline_stage_type: + The value to assign to the build_pipeline_stage_type property of this BuildStageSummary. + :type build_pipeline_stage_type: str + + :param time_created: + The value to assign to the time_created property of this BuildStageSummary. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this BuildStageSummary. + :type time_updated: datetime + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this BuildStageSummary. + :type lifecycle_state: str + + :param lifecycle_details: + The value to assign to the lifecycle_details property of this BuildStageSummary. + :type lifecycle_details: str + + :param description: + The value to assign to the description property of this BuildStageSummary. + :type description: str + + :param build_pipeline_stage_predecessor_collection: + The value to assign to the build_pipeline_stage_predecessor_collection property of this BuildStageSummary. + :type build_pipeline_stage_predecessor_collection: oci.devops.models.BuildPipelineStagePredecessorCollection + + :param freeform_tags: + The value to assign to the freeform_tags property of this BuildStageSummary. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this BuildStageSummary. + :type defined_tags: dict(str, dict(str, object)) + + :param system_tags: + The value to assign to the system_tags property of this BuildStageSummary. + :type system_tags: dict(str, dict(str, object)) + + :param image: + The value to assign to the image property of this BuildStageSummary. + :type image: str + + :param build_spec_file: + The value to assign to the build_spec_file property of this BuildStageSummary. + :type build_spec_file: str + + :param stage_execution_timeout_in_seconds: + The value to assign to the stage_execution_timeout_in_seconds property of this BuildStageSummary. + :type stage_execution_timeout_in_seconds: int + + :param build_source_collection: + The value to assign to the build_source_collection property of this BuildStageSummary. + :type build_source_collection: oci.devops.models.BuildSourceCollection + + :param primary_build_source: + The value to assign to the primary_build_source property of this BuildStageSummary. + :type primary_build_source: str + + """ + self.swagger_types = { + 'id': 'str', + 'display_name': 'str', + 'project_id': 'str', + 'build_pipeline_id': 'str', + 'compartment_id': 'str', + 'build_pipeline_stage_type': 'str', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'lifecycle_state': 'str', + 'lifecycle_details': 'str', + 'description': 'str', + 'build_pipeline_stage_predecessor_collection': 'BuildPipelineStagePredecessorCollection', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'system_tags': 'dict(str, dict(str, object))', + 'image': 'str', + 'build_spec_file': 'str', + 'stage_execution_timeout_in_seconds': 'int', + 'build_source_collection': 'BuildSourceCollection', + 'primary_build_source': 'str' + } + + self.attribute_map = { + 'id': 'id', + 'display_name': 'displayName', + 'project_id': 'projectId', + 'build_pipeline_id': 'buildPipelineId', + 'compartment_id': 'compartmentId', + 'build_pipeline_stage_type': 'buildPipelineStageType', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'lifecycle_state': 'lifecycleState', + 'lifecycle_details': 'lifecycleDetails', + 'description': 'description', + 'build_pipeline_stage_predecessor_collection': 'buildPipelineStagePredecessorCollection', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'system_tags': 'systemTags', + 'image': 'image', + 'build_spec_file': 'buildSpecFile', + 'stage_execution_timeout_in_seconds': 'stageExecutionTimeoutInSeconds', + 'build_source_collection': 'buildSourceCollection', + 'primary_build_source': 'primaryBuildSource' + } + + self._id = None + self._display_name = None + self._project_id = None + self._build_pipeline_id = None + self._compartment_id = None + self._build_pipeline_stage_type = None + self._time_created = None + self._time_updated = None + self._lifecycle_state = None + self._lifecycle_details = None + self._description = None + self._build_pipeline_stage_predecessor_collection = None + self._freeform_tags = None + self._defined_tags = None + self._system_tags = None + self._image = None + self._build_spec_file = None + self._stage_execution_timeout_in_seconds = None + self._build_source_collection = None + self._primary_build_source = None + self._build_pipeline_stage_type = 'BUILD' + + @property + def image(self): + """ + **[Required]** Gets the image of this BuildStageSummary. + Image for the Build Environment + + + :return: The image of this BuildStageSummary. + :rtype: str + """ + return self._image + + @image.setter + def image(self, image): + """ + Sets the image of this BuildStageSummary. + Image for the Build Environment + + + :param image: The image of this BuildStageSummary. + :type: str + """ + self._image = image + + @property + def build_spec_file(self): + """ + Gets the build_spec_file of this BuildStageSummary. + The path to the build specification file for this Environment. The default location if not specified is build_spec.yaml + + + :return: The build_spec_file of this BuildStageSummary. + :rtype: str + """ + return self._build_spec_file + + @build_spec_file.setter + def build_spec_file(self, build_spec_file): + """ + Sets the build_spec_file of this BuildStageSummary. + The path to the build specification file for this Environment. The default location if not specified is build_spec.yaml + + + :param build_spec_file: The build_spec_file of this BuildStageSummary. + :type: str + """ + self._build_spec_file = build_spec_file + + @property + def stage_execution_timeout_in_seconds(self): + """ + Gets the stage_execution_timeout_in_seconds of this BuildStageSummary. + Timeout for the Build Stage Execution. Value in seconds. + + + :return: The stage_execution_timeout_in_seconds of this BuildStageSummary. + :rtype: int + """ + return self._stage_execution_timeout_in_seconds + + @stage_execution_timeout_in_seconds.setter + def stage_execution_timeout_in_seconds(self, stage_execution_timeout_in_seconds): + """ + Sets the stage_execution_timeout_in_seconds of this BuildStageSummary. + Timeout for the Build Stage Execution. Value in seconds. + + + :param stage_execution_timeout_in_seconds: The stage_execution_timeout_in_seconds of this BuildStageSummary. + :type: int + """ + self._stage_execution_timeout_in_seconds = stage_execution_timeout_in_seconds + + @property + def build_source_collection(self): + """ + Gets the build_source_collection of this BuildStageSummary. + + :return: The build_source_collection of this BuildStageSummary. + :rtype: oci.devops.models.BuildSourceCollection + """ + return self._build_source_collection + + @build_source_collection.setter + def build_source_collection(self, build_source_collection): + """ + Sets the build_source_collection of this BuildStageSummary. + + :param build_source_collection: The build_source_collection of this BuildStageSummary. + :type: oci.devops.models.BuildSourceCollection + """ + self._build_source_collection = build_source_collection + + @property + def primary_build_source(self): + """ + Gets the primary_build_source of this BuildStageSummary. + Name of the BuildSource in which the build_spec.yml file need to be located. If not specified, the 1st entry in the BuildSource collection will be chosen as Primary. + + + :return: The primary_build_source of this BuildStageSummary. + :rtype: str + """ + return self._primary_build_source + + @primary_build_source.setter + def primary_build_source(self, primary_build_source): + """ + Sets the primary_build_source of this BuildStageSummary. + Name of the BuildSource in which the build_spec.yml file need to be located. If not specified, the 1st entry in the BuildSource collection will be chosen as Primary. + + + :param primary_build_source: The primary_build_source of this BuildStageSummary. + :type: str + """ + self._primary_build_source = primary_build_source + + 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/devops/models/cancel_build_run_details.py b/src/oci/devops/models/cancel_build_run_details.py new file mode 100644 index 0000000000..196e151dcd --- /dev/null +++ b/src/oci/devops/models/cancel_build_run_details.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 CancelBuildRunDetails(object): + """ + The information about cancel BuildRun. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CancelBuildRunDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param reason: + The value to assign to the reason property of this CancelBuildRunDetails. + :type reason: str + + """ + self.swagger_types = { + 'reason': 'str' + } + + self.attribute_map = { + 'reason': 'reason' + } + + self._reason = None + + @property + def reason(self): + """ + **[Required]** Gets the reason of this CancelBuildRunDetails. + The reason for canceling the run. + + + :return: The reason of this CancelBuildRunDetails. + :rtype: str + """ + return self._reason + + @reason.setter + def reason(self, reason): + """ + Sets the reason of this CancelBuildRunDetails. + The reason for canceling the run. + + + :param reason: The reason of this CancelBuildRunDetails. + :type: str + """ + self._reason = reason + + 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/devops/models/commit_info.py b/src/oci/devops/models/commit_info.py new file mode 100644 index 0000000000..0bb52a9f10 --- /dev/null +++ b/src/oci/devops/models/commit_info.py @@ -0,0 +1,132 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 CommitInfo(object): + """ + Commit details that need to be used for the BuildRun + """ + + def __init__(self, **kwargs): + """ + Initializes a new CommitInfo 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 CommitInfo. + :type repository_url: str + + :param repository_branch: + The value to assign to the repository_branch property of this CommitInfo. + :type repository_branch: str + + :param commit_hash: + The value to assign to the commit_hash property of this CommitInfo. + :type commit_hash: str + + """ + self.swagger_types = { + 'repository_url': 'str', + 'repository_branch': 'str', + 'commit_hash': 'str' + } + + self.attribute_map = { + 'repository_url': 'repositoryUrl', + 'repository_branch': 'repositoryBranch', + 'commit_hash': 'commitHash' + } + + self._repository_url = None + self._repository_branch = None + self._commit_hash = None + + @property + def repository_url(self): + """ + **[Required]** Gets the repository_url of this CommitInfo. + Repository URL + + + :return: The repository_url of this CommitInfo. + :rtype: str + """ + return self._repository_url + + @repository_url.setter + def repository_url(self, repository_url): + """ + Sets the repository_url of this CommitInfo. + Repository URL + + + :param repository_url: The repository_url of this CommitInfo. + :type: str + """ + self._repository_url = repository_url + + @property + def repository_branch(self): + """ + **[Required]** Gets the repository_branch of this CommitInfo. + Name of the repository branch. + + + :return: The repository_branch of this CommitInfo. + :rtype: str + """ + return self._repository_branch + + @repository_branch.setter + def repository_branch(self, repository_branch): + """ + Sets the repository_branch of this CommitInfo. + Name of the repository branch. + + + :param repository_branch: The repository_branch of this CommitInfo. + :type: str + """ + self._repository_branch = repository_branch + + @property + def commit_hash(self): + """ + **[Required]** Gets the commit_hash of this CommitInfo. + Commit Hash pertinent to the repository URL and Branch specified. + + + :return: The commit_hash of this CommitInfo. + :rtype: str + """ + return self._commit_hash + + @commit_hash.setter + def commit_hash(self, commit_hash): + """ + Sets the commit_hash of this CommitInfo. + Commit Hash pertinent to the repository URL and Branch specified. + + + :param commit_hash: The commit_hash of this CommitInfo. + :type: str + """ + self._commit_hash = commit_hash + + 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/devops/models/connection.py b/src/oci/devops/models/connection.py new file mode 100644 index 0000000000..bfce1cf4e8 --- /dev/null +++ b/src/oci/devops/models/connection.py @@ -0,0 +1,472 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 Connection(object): + """ + The properties that define a connection + """ + + #: A constant which can be used with the connection_type property of a Connection. + #: This constant has a value of "GITHUB_ACCESS_TOKEN" + CONNECTION_TYPE_GITHUB_ACCESS_TOKEN = "GITHUB_ACCESS_TOKEN" + + #: A constant which can be used with the connection_type property of a Connection. + #: This constant has a value of "GITLAB_ACCESS_TOKEN" + CONNECTION_TYPE_GITLAB_ACCESS_TOKEN = "GITLAB_ACCESS_TOKEN" + + #: A constant which can be used with the lifecycle_state property of a Connection. + #: This constant has a value of "ACTIVE" + LIFECYCLE_STATE_ACTIVE = "ACTIVE" + + def __init__(self, **kwargs): + """ + Initializes a new Connection object with values from keyword arguments. This class has the following subclasses and if you are using this class as input + to a service operations then you should favor using a subclass over the base class: + + * :class:`~oci.devops.models.GitlabAccessTokenConnection` + * :class:`~oci.devops.models.GithubAccessTokenConnection` + + 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 Connection. + :type id: str + + :param description: + The value to assign to the description property of this Connection. + :type description: str + + :param display_name: + The value to assign to the display_name property of this Connection. + :type display_name: str + + :param compartment_id: + The value to assign to the compartment_id property of this Connection. + :type compartment_id: str + + :param project_id: + The value to assign to the project_id property of this Connection. + :type project_id: str + + :param connection_type: + The value to assign to the connection_type property of this Connection. + Allowed values for this property are: "GITHUB_ACCESS_TOKEN", "GITLAB_ACCESS_TOKEN", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type connection_type: str + + :param time_created: + The value to assign to the time_created property of this Connection. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this Connection. + :type time_updated: datetime + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this Connection. + Allowed values for this property are: "ACTIVE", '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 Connection. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this Connection. + :type defined_tags: dict(str, dict(str, object)) + + :param system_tags: + The value to assign to the system_tags property of this Connection. + :type system_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'id': 'str', + 'description': 'str', + 'display_name': 'str', + 'compartment_id': 'str', + 'project_id': 'str', + 'connection_type': 'str', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'lifecycle_state': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'system_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'id': 'id', + 'description': 'description', + 'display_name': 'displayName', + 'compartment_id': 'compartmentId', + 'project_id': 'projectId', + 'connection_type': 'connectionType', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'lifecycle_state': 'lifecycleState', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'system_tags': 'systemTags' + } + + self._id = None + self._description = None + self._display_name = None + self._compartment_id = None + self._project_id = None + self._connection_type = None + self._time_created = None + self._time_updated = None + self._lifecycle_state = None + self._freeform_tags = None + self._defined_tags = None + self._system_tags = None + + @staticmethod + def get_subtype(object_dictionary): + """ + Given the hash representation of a subtype of this class, + use the info in the hash to return the class of the subtype. + """ + type = object_dictionary['connectionType'] + + if type == 'GITLAB_ACCESS_TOKEN': + return 'GitlabAccessTokenConnection' + + if type == 'GITHUB_ACCESS_TOKEN': + return 'GithubAccessTokenConnection' + else: + return 'Connection' + + @property + def id(self): + """ + **[Required]** Gets the id of this Connection. + Unique identifier that is immutable on creation + + + :return: The id of this Connection. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this Connection. + Unique identifier that is immutable on creation + + + :param id: The id of this Connection. + :type: str + """ + self._id = id + + @property + def description(self): + """ + Gets the description of this Connection. + Optional description about the connection + + + :return: The description of this Connection. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this Connection. + Optional description about the connection + + + :param description: The description of this Connection. + :type: str + """ + self._description = description + + @property + def display_name(self): + """ + Gets the display_name of this Connection. + Connection identifier which can be renamed and is not necessarily unique + + + :return: The display_name of this Connection. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this Connection. + Connection identifier which can be renamed and is not necessarily unique + + + :param display_name: The display_name of this Connection. + :type: str + """ + self._display_name = display_name + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this Connection. + Compartment Identifier + + + :return: The compartment_id of this Connection. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this Connection. + Compartment Identifier + + + :param compartment_id: The compartment_id of this Connection. + :type: str + """ + self._compartment_id = compartment_id + + @property + def project_id(self): + """ + **[Required]** Gets the project_id of this Connection. + Project Identifier + + + :return: The project_id of this Connection. + :rtype: str + """ + return self._project_id + + @project_id.setter + def project_id(self, project_id): + """ + Sets the project_id of this Connection. + Project Identifier + + + :param project_id: The project_id of this Connection. + :type: str + """ + self._project_id = project_id + + @property + def connection_type(self): + """ + **[Required]** Gets the connection_type of this Connection. + The type of connection. + + Allowed values for this property are: "GITHUB_ACCESS_TOKEN", "GITLAB_ACCESS_TOKEN", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The connection_type of this Connection. + :rtype: str + """ + return self._connection_type + + @connection_type.setter + def connection_type(self, connection_type): + """ + Sets the connection_type of this Connection. + The type of connection. + + + :param connection_type: The connection_type of this Connection. + :type: str + """ + allowed_values = ["GITHUB_ACCESS_TOKEN", "GITLAB_ACCESS_TOKEN"] + if not value_allowed_none_or_none_sentinel(connection_type, allowed_values): + connection_type = 'UNKNOWN_ENUM_VALUE' + self._connection_type = connection_type + + @property + def time_created(self): + """ + Gets the time_created of this Connection. + The time the Connection was created. An RFC3339 formatted datetime string + + + :return: The time_created of this Connection. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this Connection. + The time the Connection was created. An RFC3339 formatted datetime string + + + :param time_created: The time_created of this Connection. + :type: datetime + """ + self._time_created = time_created + + @property + def time_updated(self): + """ + Gets the time_updated of this Connection. + The time at which the Connection was updated. An RFC3339 formatted datetime string + + + :return: The time_updated of this Connection. + :rtype: datetime + """ + return self._time_updated + + @time_updated.setter + def time_updated(self, time_updated): + """ + Sets the time_updated of this Connection. + The time at which the Connection was updated. An RFC3339 formatted datetime string + + + :param time_updated: The time_updated of this Connection. + :type: datetime + """ + self._time_updated = time_updated + + @property + def lifecycle_state(self): + """ + Gets the lifecycle_state of this Connection. + The current state of the Connection. + + Allowed values for this property are: "ACTIVE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The lifecycle_state of this Connection. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this Connection. + The current state of the Connection. + + + :param lifecycle_state: The lifecycle_state of this Connection. + :type: str + """ + allowed_values = ["ACTIVE"] + 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 Connection. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See `Resource Tags`__. Example: `{\"bar-key\": \"value\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this Connection. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this Connection. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See `Resource Tags`__. Example: `{\"bar-key\": \"value\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this Connection. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this Connection. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this Connection. + :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 Connection. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this Connection. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + @property + def system_tags(self): + """ + Gets the system_tags of this Connection. + Usage of system tag keys. These predefined keys are scoped to namespaces. See `Resource Tags`__. Example: `{\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The system_tags of this Connection. + :rtype: dict(str, dict(str, object)) + """ + return self._system_tags + + @system_tags.setter + def system_tags(self, system_tags): + """ + Sets the system_tags of this Connection. + Usage of system tag keys. These predefined keys are scoped to namespaces. See `Resource Tags`__. Example: `{\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param system_tags: The system_tags of this Connection. + :type: dict(str, dict(str, object)) + """ + self._system_tags = system_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/devops/models/connection_collection.py b/src/oci/devops/models/connection_collection.py new file mode 100644 index 0000000000..877576ceb4 --- /dev/null +++ b/src/oci/devops/models/connection_collection.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 ConnectionCollection(object): + """ + Collection of connections. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ConnectionCollection object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param items: + The value to assign to the items property of this ConnectionCollection. + :type items: list[oci.devops.models.ConnectionSummary] + + """ + self.swagger_types = { + 'items': 'list[ConnectionSummary]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this ConnectionCollection. + Collection of connections. + + + :return: The items of this ConnectionCollection. + :rtype: list[oci.devops.models.ConnectionSummary] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this ConnectionCollection. + Collection of connections. + + + :param items: The items of this ConnectionCollection. + :type: list[oci.devops.models.ConnectionSummary] + """ + self._items = items + + 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/devops/models/connection_summary.py b/src/oci/devops/models/connection_summary.py new file mode 100644 index 0000000000..7217ca5194 --- /dev/null +++ b/src/oci/devops/models/connection_summary.py @@ -0,0 +1,444 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 ConnectionSummary(object): + """ + Summary information for a connection. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ConnectionSummary object with values from keyword arguments. This class has the following subclasses and if you are using this class as input + to a service operations then you should favor using a subclass over the base class: + + * :class:`~oci.devops.models.GithubAccessTokenConnectionSummary` + * :class:`~oci.devops.models.GitlabAccessTokenConnectionSummary` + + 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 ConnectionSummary. + :type id: str + + :param display_name: + The value to assign to the display_name property of this ConnectionSummary. + :type display_name: str + + :param description: + The value to assign to the description property of this ConnectionSummary. + :type description: str + + :param compartment_id: + The value to assign to the compartment_id property of this ConnectionSummary. + :type compartment_id: str + + :param project_id: + The value to assign to the project_id property of this ConnectionSummary. + :type project_id: str + + :param connection_type: + The value to assign to the connection_type property of this ConnectionSummary. + :type connection_type: str + + :param time_created: + The value to assign to the time_created property of this ConnectionSummary. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this ConnectionSummary. + :type time_updated: datetime + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this ConnectionSummary. + :type lifecycle_state: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this ConnectionSummary. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this ConnectionSummary. + :type defined_tags: dict(str, dict(str, object)) + + :param system_tags: + The value to assign to the system_tags property of this ConnectionSummary. + :type system_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'id': 'str', + 'display_name': 'str', + 'description': 'str', + 'compartment_id': 'str', + 'project_id': 'str', + 'connection_type': 'str', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'lifecycle_state': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'system_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'id': 'id', + 'display_name': 'displayName', + 'description': 'description', + 'compartment_id': 'compartmentId', + 'project_id': 'projectId', + 'connection_type': 'connectionType', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'lifecycle_state': 'lifecycleState', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'system_tags': 'systemTags' + } + + self._id = None + self._display_name = None + self._description = None + self._compartment_id = None + self._project_id = None + self._connection_type = None + self._time_created = None + self._time_updated = None + self._lifecycle_state = None + self._freeform_tags = None + self._defined_tags = None + self._system_tags = None + + @staticmethod + def get_subtype(object_dictionary): + """ + Given the hash representation of a subtype of this class, + use the info in the hash to return the class of the subtype. + """ + type = object_dictionary['connectionType'] + + if type == 'GITHUB_ACCESS_TOKEN': + return 'GithubAccessTokenConnectionSummary' + + if type == 'GITLAB_ACCESS_TOKEN': + return 'GitlabAccessTokenConnectionSummary' + else: + return 'ConnectionSummary' + + @property + def id(self): + """ + **[Required]** Gets the id of this ConnectionSummary. + Unique identifier that is immutable on creation + + + :return: The id of this ConnectionSummary. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this ConnectionSummary. + Unique identifier that is immutable on creation + + + :param id: The id of this ConnectionSummary. + :type: str + """ + self._id = id + + @property + def display_name(self): + """ + Gets the display_name of this ConnectionSummary. + Connection identifier which can be renamed and is not necessarily unique. + + + :return: The display_name of this ConnectionSummary. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this ConnectionSummary. + Connection identifier which can be renamed and is not necessarily unique. + + + :param display_name: The display_name of this ConnectionSummary. + :type: str + """ + self._display_name = display_name + + @property + def description(self): + """ + Gets the description of this ConnectionSummary. + Optional description about the connection + + + :return: The description of this ConnectionSummary. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this ConnectionSummary. + Optional description about the connection + + + :param description: The description of this ConnectionSummary. + :type: str + """ + self._description = description + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this ConnectionSummary. + Compartment Identifier + + + :return: The compartment_id of this ConnectionSummary. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this ConnectionSummary. + Compartment Identifier + + + :param compartment_id: The compartment_id of this ConnectionSummary. + :type: str + """ + self._compartment_id = compartment_id + + @property + def project_id(self): + """ + **[Required]** Gets the project_id of this ConnectionSummary. + Project Identifier + + + :return: The project_id of this ConnectionSummary. + :rtype: str + """ + return self._project_id + + @project_id.setter + def project_id(self, project_id): + """ + Sets the project_id of this ConnectionSummary. + Project Identifier + + + :param project_id: The project_id of this ConnectionSummary. + :type: str + """ + self._project_id = project_id + + @property + def connection_type(self): + """ + **[Required]** Gets the connection_type of this ConnectionSummary. + The type of connection. + + + :return: The connection_type of this ConnectionSummary. + :rtype: str + """ + return self._connection_type + + @connection_type.setter + def connection_type(self, connection_type): + """ + Sets the connection_type of this ConnectionSummary. + The type of connection. + + + :param connection_type: The connection_type of this ConnectionSummary. + :type: str + """ + self._connection_type = connection_type + + @property + def time_created(self): + """ + Gets the time_created of this ConnectionSummary. + The time the the connection was created. An RFC3339 formatted datetime string + + + :return: The time_created of this ConnectionSummary. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this ConnectionSummary. + The time the the connection was created. An RFC3339 formatted datetime string + + + :param time_created: The time_created of this ConnectionSummary. + :type: datetime + """ + self._time_created = time_created + + @property + def time_updated(self): + """ + Gets the time_updated of this ConnectionSummary. + The time the connection was updated. An RFC3339 formatted daservertetime string + + + :return: The time_updated of this ConnectionSummary. + :rtype: datetime + """ + return self._time_updated + + @time_updated.setter + def time_updated(self, time_updated): + """ + Sets the time_updated of this ConnectionSummary. + The time the connection was updated. An RFC3339 formatted daservertetime string + + + :param time_updated: The time_updated of this ConnectionSummary. + :type: datetime + """ + self._time_updated = time_updated + + @property + def lifecycle_state(self): + """ + Gets the lifecycle_state of this ConnectionSummary. + The current state of the connection. + + + :return: The lifecycle_state of this ConnectionSummary. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this ConnectionSummary. + The current state of the connection. + + + :param lifecycle_state: The lifecycle_state of this ConnectionSummary. + :type: str + """ + self._lifecycle_state = lifecycle_state + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this ConnectionSummary. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See `Resource Tags`__. Example: `{\"bar-key\": \"value\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this ConnectionSummary. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this ConnectionSummary. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See `Resource Tags`__. Example: `{\"bar-key\": \"value\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this ConnectionSummary. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this ConnectionSummary. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this ConnectionSummary. + :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 ConnectionSummary. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this ConnectionSummary. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + @property + def system_tags(self): + """ + Gets the system_tags of this ConnectionSummary. + Usage of system tag keys. These predefined keys are scoped to namespaces. See `Resource Tags`__. Example: `{\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The system_tags of this ConnectionSummary. + :rtype: dict(str, dict(str, object)) + """ + return self._system_tags + + @system_tags.setter + def system_tags(self, system_tags): + """ + Sets the system_tags of this ConnectionSummary. + Usage of system tag keys. These predefined keys are scoped to namespaces. See `Resource Tags`__. Example: `{\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param system_tags: The system_tags of this ConnectionSummary. + :type: dict(str, dict(str, object)) + """ + self._system_tags = system_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/devops/models/container_registry_delivered_artifact.py b/src/oci/devops/models/container_registry_delivered_artifact.py new file mode 100644 index 0000000000..59d8270617 --- /dev/null +++ b/src/oci/devops/models/container_registry_delivered_artifact.py @@ -0,0 +1,125 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .delivered_artifact import DeliveredArtifact +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 ContainerRegistryDeliveredArtifact(DeliveredArtifact): + """ + Details of OCIR Artifact delivered via DeliverArtifactStage. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ContainerRegistryDeliveredArtifact object with values from keyword arguments. The default value of the :py:attr:`~oci.devops.models.ContainerRegistryDeliveredArtifact.artifact_type` attribute + of this class is ``OCIR`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param deploy_artifact_id: + The value to assign to the deploy_artifact_id property of this ContainerRegistryDeliveredArtifact. + :type deploy_artifact_id: str + + :param output_artifact_name: + The value to assign to the output_artifact_name property of this ContainerRegistryDeliveredArtifact. + :type output_artifact_name: str + + :param artifact_type: + The value to assign to the artifact_type property of this ContainerRegistryDeliveredArtifact. + Allowed values for this property are: "GENERIC_ARTIFACT", "OCIR" + :type artifact_type: str + + :param delivered_artifact_hash: + The value to assign to the delivered_artifact_hash property of this ContainerRegistryDeliveredArtifact. + :type delivered_artifact_hash: str + + :param image_uri: + The value to assign to the image_uri property of this ContainerRegistryDeliveredArtifact. + :type image_uri: str + + """ + self.swagger_types = { + 'deploy_artifact_id': 'str', + 'output_artifact_name': 'str', + 'artifact_type': 'str', + 'delivered_artifact_hash': 'str', + 'image_uri': 'str' + } + + self.attribute_map = { + 'deploy_artifact_id': 'deployArtifactId', + 'output_artifact_name': 'outputArtifactName', + 'artifact_type': 'artifactType', + 'delivered_artifact_hash': 'deliveredArtifactHash', + 'image_uri': 'imageUri' + } + + self._deploy_artifact_id = None + self._output_artifact_name = None + self._artifact_type = None + self._delivered_artifact_hash = None + self._image_uri = None + self._artifact_type = 'OCIR' + + @property + def delivered_artifact_hash(self): + """ + **[Required]** Gets the delivered_artifact_hash of this ContainerRegistryDeliveredArtifact. + The Hash of the OCIR artifact pushed by the DeliverArtifactStage + + + :return: The delivered_artifact_hash of this ContainerRegistryDeliveredArtifact. + :rtype: str + """ + return self._delivered_artifact_hash + + @delivered_artifact_hash.setter + def delivered_artifact_hash(self, delivered_artifact_hash): + """ + Sets the delivered_artifact_hash of this ContainerRegistryDeliveredArtifact. + The Hash of the OCIR artifact pushed by the DeliverArtifactStage + + + :param delivered_artifact_hash: The delivered_artifact_hash of this ContainerRegistryDeliveredArtifact. + :type: str + """ + self._delivered_artifact_hash = delivered_artifact_hash + + @property + def image_uri(self): + """ + Gets the image_uri of this ContainerRegistryDeliveredArtifact. + The imageUri of the OCIR artifact pushed by the DeliverArtifactStage + + + :return: The image_uri of this ContainerRegistryDeliveredArtifact. + :rtype: str + """ + return self._image_uri + + @image_uri.setter + def image_uri(self, image_uri): + """ + Sets the image_uri of this ContainerRegistryDeliveredArtifact. + The imageUri of the OCIR artifact pushed by the DeliverArtifactStage + + + :param image_uri: The image_uri of this ContainerRegistryDeliveredArtifact. + :type: str + """ + self._image_uri = image_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/devops/models/create_absolute_wait_criteria_details.py b/src/oci/devops/models/create_absolute_wait_criteria_details.py new file mode 100644 index 0000000000..0af51a4624 --- /dev/null +++ b/src/oci/devops/models/create_absolute_wait_criteria_details.py @@ -0,0 +1,84 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .create_wait_criteria_details import CreateWaitCriteriaDetails +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 CreateAbsoluteWaitCriteriaDetails(CreateWaitCriteriaDetails): + """ + Specifies the absolute wait criteria, user can specify fixed length of wait duration. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CreateAbsoluteWaitCriteriaDetails object with values from keyword arguments. The default value of the :py:attr:`~oci.devops.models.CreateAbsoluteWaitCriteriaDetails.wait_type` attribute + of this class is ``ABSOLUTE_WAIT`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param wait_type: + The value to assign to the wait_type property of this CreateAbsoluteWaitCriteriaDetails. + Allowed values for this property are: "ABSOLUTE_WAIT" + :type wait_type: str + + :param wait_duration: + The value to assign to the wait_duration property of this CreateAbsoluteWaitCriteriaDetails. + :type wait_duration: str + + """ + self.swagger_types = { + 'wait_type': 'str', + 'wait_duration': 'str' + } + + self.attribute_map = { + 'wait_type': 'waitType', + 'wait_duration': 'waitDuration' + } + + self._wait_type = None + self._wait_duration = None + self._wait_type = 'ABSOLUTE_WAIT' + + @property + def wait_duration(self): + """ + **[Required]** Gets the wait_duration of this CreateAbsoluteWaitCriteriaDetails. + The absolute wait duration. + Minimum waitDuration should be 5 seconds. + Maximum waitDuration can be up to 2 days. + + + :return: The wait_duration of this CreateAbsoluteWaitCriteriaDetails. + :rtype: str + """ + return self._wait_duration + + @wait_duration.setter + def wait_duration(self, wait_duration): + """ + Sets the wait_duration of this CreateAbsoluteWaitCriteriaDetails. + The absolute wait duration. + Minimum waitDuration should be 5 seconds. + Maximum waitDuration can be up to 2 days. + + + :param wait_duration: The wait_duration of this CreateAbsoluteWaitCriteriaDetails. + :type: str + """ + self._wait_duration = wait_duration + + 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/devops/models/create_build_pipeline_details.py b/src/oci/devops/models/create_build_pipeline_details.py new file mode 100644 index 0000000000..eacce6d745 --- /dev/null +++ b/src/oci/devops/models/create_build_pipeline_details.py @@ -0,0 +1,229 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 CreateBuildPipelineDetails(object): + """ + The information about new BuildPipeline to be created. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CreateBuildPipelineDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param description: + The value to assign to the description property of this CreateBuildPipelineDetails. + :type description: str + + :param display_name: + The value to assign to the display_name property of this CreateBuildPipelineDetails. + :type display_name: str + + :param project_id: + The value to assign to the project_id property of this CreateBuildPipelineDetails. + :type project_id: str + + :param build_pipeline_parameters: + The value to assign to the build_pipeline_parameters property of this CreateBuildPipelineDetails. + :type build_pipeline_parameters: oci.devops.models.BuildPipelineParameterCollection + + :param freeform_tags: + The value to assign to the freeform_tags property of this CreateBuildPipelineDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this CreateBuildPipelineDetails. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'description': 'str', + 'display_name': 'str', + 'project_id': 'str', + 'build_pipeline_parameters': 'BuildPipelineParameterCollection', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'description': 'description', + 'display_name': 'displayName', + 'project_id': 'projectId', + 'build_pipeline_parameters': 'buildPipelineParameters', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._description = None + self._display_name = None + self._project_id = None + self._build_pipeline_parameters = None + self._freeform_tags = None + self._defined_tags = None + + @property + def description(self): + """ + Gets the description of this CreateBuildPipelineDetails. + Optional description about the BuildPipeline + + + :return: The description of this CreateBuildPipelineDetails. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this CreateBuildPipelineDetails. + Optional description about the BuildPipeline + + + :param description: The description of this CreateBuildPipelineDetails. + :type: str + """ + self._description = description + + @property + def display_name(self): + """ + Gets the display_name of this CreateBuildPipelineDetails. + BuildPipeline display name + + + :return: The display_name of this CreateBuildPipelineDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this CreateBuildPipelineDetails. + BuildPipeline display name + + + :param display_name: The display_name of this CreateBuildPipelineDetails. + :type: str + """ + self._display_name = display_name + + @property + def project_id(self): + """ + **[Required]** Gets the project_id of this CreateBuildPipelineDetails. + Project Identifier + + + :return: The project_id of this CreateBuildPipelineDetails. + :rtype: str + """ + return self._project_id + + @project_id.setter + def project_id(self, project_id): + """ + Sets the project_id of this CreateBuildPipelineDetails. + Project Identifier + + + :param project_id: The project_id of this CreateBuildPipelineDetails. + :type: str + """ + self._project_id = project_id + + @property + def build_pipeline_parameters(self): + """ + Gets the build_pipeline_parameters of this CreateBuildPipelineDetails. + + :return: The build_pipeline_parameters of this CreateBuildPipelineDetails. + :rtype: oci.devops.models.BuildPipelineParameterCollection + """ + return self._build_pipeline_parameters + + @build_pipeline_parameters.setter + def build_pipeline_parameters(self, build_pipeline_parameters): + """ + Sets the build_pipeline_parameters of this CreateBuildPipelineDetails. + + :param build_pipeline_parameters: The build_pipeline_parameters of this CreateBuildPipelineDetails. + :type: oci.devops.models.BuildPipelineParameterCollection + """ + self._build_pipeline_parameters = build_pipeline_parameters + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this CreateBuildPipelineDetails. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See `Resource Tags`__. Example: `{\"bar-key\": \"value\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this CreateBuildPipelineDetails. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this CreateBuildPipelineDetails. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See `Resource Tags`__. Example: `{\"bar-key\": \"value\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this CreateBuildPipelineDetails. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this CreateBuildPipelineDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this CreateBuildPipelineDetails. + :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 CreateBuildPipelineDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this CreateBuildPipelineDetails. + :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/devops/models/create_build_pipeline_stage_details.py b/src/oci/devops/models/create_build_pipeline_stage_details.py new file mode 100644 index 0000000000..d25d2b94c6 --- /dev/null +++ b/src/oci/devops/models/create_build_pipeline_stage_details.py @@ -0,0 +1,291 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 CreateBuildPipelineStageDetails(object): + """ + The information about new Stage. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CreateBuildPipelineStageDetails object with values from keyword arguments. This class has the following subclasses and if you are using this class as input + to a service operations then you should favor using a subclass over the base class: + + * :class:`~oci.devops.models.CreateDeliverArtifactStageDetails` + * :class:`~oci.devops.models.CreateTriggerDeploymentStageDetails` + * :class:`~oci.devops.models.CreateWaitStageDetails` + * :class:`~oci.devops.models.CreateBuildStageDetails` + + 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 CreateBuildPipelineStageDetails. + :type display_name: str + + :param description: + The value to assign to the description property of this CreateBuildPipelineStageDetails. + :type description: str + + :param build_pipeline_stage_type: + The value to assign to the build_pipeline_stage_type property of this CreateBuildPipelineStageDetails. + :type build_pipeline_stage_type: str + + :param build_pipeline_id: + The value to assign to the build_pipeline_id property of this CreateBuildPipelineStageDetails. + :type build_pipeline_id: str + + :param build_pipeline_stage_predecessor_collection: + The value to assign to the build_pipeline_stage_predecessor_collection property of this CreateBuildPipelineStageDetails. + :type build_pipeline_stage_predecessor_collection: oci.devops.models.BuildPipelineStagePredecessorCollection + + :param freeform_tags: + The value to assign to the freeform_tags property of this CreateBuildPipelineStageDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this CreateBuildPipelineStageDetails. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'display_name': 'str', + 'description': 'str', + 'build_pipeline_stage_type': 'str', + 'build_pipeline_id': 'str', + 'build_pipeline_stage_predecessor_collection': 'BuildPipelineStagePredecessorCollection', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'display_name': 'displayName', + 'description': 'description', + 'build_pipeline_stage_type': 'buildPipelineStageType', + 'build_pipeline_id': 'buildPipelineId', + 'build_pipeline_stage_predecessor_collection': 'buildPipelineStagePredecessorCollection', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._display_name = None + self._description = None + self._build_pipeline_stage_type = None + self._build_pipeline_id = None + self._build_pipeline_stage_predecessor_collection = None + self._freeform_tags = None + self._defined_tags = None + + @staticmethod + def get_subtype(object_dictionary): + """ + Given the hash representation of a subtype of this class, + use the info in the hash to return the class of the subtype. + """ + type = object_dictionary['buildPipelineStageType'] + + if type == 'DELIVER_ARTIFACT': + return 'CreateDeliverArtifactStageDetails' + + if type == 'TRIGGER_DEPLOYMENT_PIPELINE': + return 'CreateTriggerDeploymentStageDetails' + + if type == 'WAIT': + return 'CreateWaitStageDetails' + + if type == 'BUILD': + return 'CreateBuildStageDetails' + else: + return 'CreateBuildPipelineStageDetails' + + @property + def display_name(self): + """ + Gets the display_name of this CreateBuildPipelineStageDetails. + Stage identifier which can be renamed and is not necessarily unique + + + :return: The display_name of this CreateBuildPipelineStageDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this CreateBuildPipelineStageDetails. + Stage identifier which can be renamed and is not necessarily unique + + + :param display_name: The display_name of this CreateBuildPipelineStageDetails. + :type: str + """ + self._display_name = display_name + + @property + def description(self): + """ + Gets the description of this CreateBuildPipelineStageDetails. + Optional description about the Stage + + + :return: The description of this CreateBuildPipelineStageDetails. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this CreateBuildPipelineStageDetails. + Optional description about the Stage + + + :param description: The description of this CreateBuildPipelineStageDetails. + :type: str + """ + self._description = description + + @property + def build_pipeline_stage_type(self): + """ + **[Required]** Gets the build_pipeline_stage_type of this CreateBuildPipelineStageDetails. + List of stage types. It includes 'Wait stage', 'Build Stage', 'Deliver Artifact Stage' and + 'Trigger Deployment Stage'. + + + :return: The build_pipeline_stage_type of this CreateBuildPipelineStageDetails. + :rtype: str + """ + return self._build_pipeline_stage_type + + @build_pipeline_stage_type.setter + def build_pipeline_stage_type(self, build_pipeline_stage_type): + """ + Sets the build_pipeline_stage_type of this CreateBuildPipelineStageDetails. + List of stage types. It includes 'Wait stage', 'Build Stage', 'Deliver Artifact Stage' and + 'Trigger Deployment Stage'. + + + :param build_pipeline_stage_type: The build_pipeline_stage_type of this CreateBuildPipelineStageDetails. + :type: str + """ + self._build_pipeline_stage_type = build_pipeline_stage_type + + @property + def build_pipeline_id(self): + """ + **[Required]** Gets the build_pipeline_id of this CreateBuildPipelineStageDetails. + buildPipeline Identifier + + + :return: The build_pipeline_id of this CreateBuildPipelineStageDetails. + :rtype: str + """ + return self._build_pipeline_id + + @build_pipeline_id.setter + def build_pipeline_id(self, build_pipeline_id): + """ + Sets the build_pipeline_id of this CreateBuildPipelineStageDetails. + buildPipeline Identifier + + + :param build_pipeline_id: The build_pipeline_id of this CreateBuildPipelineStageDetails. + :type: str + """ + self._build_pipeline_id = build_pipeline_id + + @property + def build_pipeline_stage_predecessor_collection(self): + """ + **[Required]** Gets the build_pipeline_stage_predecessor_collection of this CreateBuildPipelineStageDetails. + + :return: The build_pipeline_stage_predecessor_collection of this CreateBuildPipelineStageDetails. + :rtype: oci.devops.models.BuildPipelineStagePredecessorCollection + """ + return self._build_pipeline_stage_predecessor_collection + + @build_pipeline_stage_predecessor_collection.setter + def build_pipeline_stage_predecessor_collection(self, build_pipeline_stage_predecessor_collection): + """ + Sets the build_pipeline_stage_predecessor_collection of this CreateBuildPipelineStageDetails. + + :param build_pipeline_stage_predecessor_collection: The build_pipeline_stage_predecessor_collection of this CreateBuildPipelineStageDetails. + :type: oci.devops.models.BuildPipelineStagePredecessorCollection + """ + self._build_pipeline_stage_predecessor_collection = build_pipeline_stage_predecessor_collection + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this CreateBuildPipelineStageDetails. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See `Resource Tags`__. Example: `{\"bar-key\": \"value\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this CreateBuildPipelineStageDetails. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this CreateBuildPipelineStageDetails. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See `Resource Tags`__. Example: `{\"bar-key\": \"value\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this CreateBuildPipelineStageDetails. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this CreateBuildPipelineStageDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this CreateBuildPipelineStageDetails. + :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 CreateBuildPipelineStageDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this CreateBuildPipelineStageDetails. + :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/devops/models/create_build_run_details.py b/src/oci/devops/models/create_build_run_details.py new file mode 100644 index 0000000000..985681a3fb --- /dev/null +++ b/src/oci/devops/models/create_build_run_details.py @@ -0,0 +1,225 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 CreateBuildRunDetails(object): + """ + The information about new BuildRun. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CreateBuildRunDetails 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 CreateBuildRunDetails. + :type display_name: str + + :param build_pipeline_id: + The value to assign to the build_pipeline_id property of this CreateBuildRunDetails. + :type build_pipeline_id: str + + :param commit_info: + The value to assign to the commit_info property of this CreateBuildRunDetails. + :type commit_info: oci.devops.models.CommitInfo + + :param build_run_arguments: + The value to assign to the build_run_arguments property of this CreateBuildRunDetails. + :type build_run_arguments: oci.devops.models.BuildRunArgumentCollection + + :param freeform_tags: + The value to assign to the freeform_tags property of this CreateBuildRunDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this CreateBuildRunDetails. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'display_name': 'str', + 'build_pipeline_id': 'str', + 'commit_info': 'CommitInfo', + 'build_run_arguments': 'BuildRunArgumentCollection', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'display_name': 'displayName', + 'build_pipeline_id': 'buildPipelineId', + 'commit_info': 'commitInfo', + 'build_run_arguments': 'buildRunArguments', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._display_name = None + self._build_pipeline_id = None + self._commit_info = None + self._build_run_arguments = None + self._freeform_tags = None + self._defined_tags = None + + @property + def display_name(self): + """ + Gets the display_name of this CreateBuildRunDetails. + BuildRun identifier which can be renamed and is not necessarily unique + + + :return: The display_name of this CreateBuildRunDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this CreateBuildRunDetails. + BuildRun identifier which can be renamed and is not necessarily unique + + + :param display_name: The display_name of this CreateBuildRunDetails. + :type: str + """ + self._display_name = display_name + + @property + def build_pipeline_id(self): + """ + **[Required]** Gets the build_pipeline_id of this CreateBuildRunDetails. + Pipeline Identifier + + + :return: The build_pipeline_id of this CreateBuildRunDetails. + :rtype: str + """ + return self._build_pipeline_id + + @build_pipeline_id.setter + def build_pipeline_id(self, build_pipeline_id): + """ + Sets the build_pipeline_id of this CreateBuildRunDetails. + Pipeline Identifier + + + :param build_pipeline_id: The build_pipeline_id of this CreateBuildRunDetails. + :type: str + """ + self._build_pipeline_id = build_pipeline_id + + @property + def commit_info(self): + """ + Gets the commit_info of this CreateBuildRunDetails. + + :return: The commit_info of this CreateBuildRunDetails. + :rtype: oci.devops.models.CommitInfo + """ + return self._commit_info + + @commit_info.setter + def commit_info(self, commit_info): + """ + Sets the commit_info of this CreateBuildRunDetails. + + :param commit_info: The commit_info of this CreateBuildRunDetails. + :type: oci.devops.models.CommitInfo + """ + self._commit_info = commit_info + + @property + def build_run_arguments(self): + """ + Gets the build_run_arguments of this CreateBuildRunDetails. + + :return: The build_run_arguments of this CreateBuildRunDetails. + :rtype: oci.devops.models.BuildRunArgumentCollection + """ + return self._build_run_arguments + + @build_run_arguments.setter + def build_run_arguments(self, build_run_arguments): + """ + Sets the build_run_arguments of this CreateBuildRunDetails. + + :param build_run_arguments: The build_run_arguments of this CreateBuildRunDetails. + :type: oci.devops.models.BuildRunArgumentCollection + """ + self._build_run_arguments = build_run_arguments + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this CreateBuildRunDetails. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See `Resource Tags`__. Example: `{\"bar-key\": \"value\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this CreateBuildRunDetails. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this CreateBuildRunDetails. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See `Resource Tags`__. Example: `{\"bar-key\": \"value\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this CreateBuildRunDetails. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this CreateBuildRunDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this CreateBuildRunDetails. + :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 CreateBuildRunDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this CreateBuildRunDetails. + :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/devops/models/create_build_stage_details.py b/src/oci/devops/models/create_build_stage_details.py new file mode 100644 index 0000000000..822aa611ff --- /dev/null +++ b/src/oci/devops/models/create_build_stage_details.py @@ -0,0 +1,241 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .create_build_pipeline_stage_details import CreateBuildPipelineStageDetails +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 CreateBuildStageDetails(CreateBuildPipelineStageDetails): + """ + Specifies the Build Stage. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CreateBuildStageDetails object with values from keyword arguments. The default value of the :py:attr:`~oci.devops.models.CreateBuildStageDetails.build_pipeline_stage_type` attribute + of this class is ``BUILD`` and it should not be changed. + 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 CreateBuildStageDetails. + :type display_name: str + + :param description: + The value to assign to the description property of this CreateBuildStageDetails. + :type description: str + + :param build_pipeline_stage_type: + The value to assign to the build_pipeline_stage_type property of this CreateBuildStageDetails. + :type build_pipeline_stage_type: str + + :param build_pipeline_id: + The value to assign to the build_pipeline_id property of this CreateBuildStageDetails. + :type build_pipeline_id: str + + :param build_pipeline_stage_predecessor_collection: + The value to assign to the build_pipeline_stage_predecessor_collection property of this CreateBuildStageDetails. + :type build_pipeline_stage_predecessor_collection: oci.devops.models.BuildPipelineStagePredecessorCollection + + :param freeform_tags: + The value to assign to the freeform_tags property of this CreateBuildStageDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this CreateBuildStageDetails. + :type defined_tags: dict(str, dict(str, object)) + + :param image: + The value to assign to the image property of this CreateBuildStageDetails. + :type image: str + + :param build_spec_file: + The value to assign to the build_spec_file property of this CreateBuildStageDetails. + :type build_spec_file: str + + :param stage_execution_timeout_in_seconds: + The value to assign to the stage_execution_timeout_in_seconds property of this CreateBuildStageDetails. + :type stage_execution_timeout_in_seconds: int + + :param build_source_collection: + The value to assign to the build_source_collection property of this CreateBuildStageDetails. + :type build_source_collection: oci.devops.models.BuildSourceCollection + + :param primary_build_source: + The value to assign to the primary_build_source property of this CreateBuildStageDetails. + :type primary_build_source: str + + """ + self.swagger_types = { + 'display_name': 'str', + 'description': 'str', + 'build_pipeline_stage_type': 'str', + 'build_pipeline_id': 'str', + 'build_pipeline_stage_predecessor_collection': 'BuildPipelineStagePredecessorCollection', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'image': 'str', + 'build_spec_file': 'str', + 'stage_execution_timeout_in_seconds': 'int', + 'build_source_collection': 'BuildSourceCollection', + 'primary_build_source': 'str' + } + + self.attribute_map = { + 'display_name': 'displayName', + 'description': 'description', + 'build_pipeline_stage_type': 'buildPipelineStageType', + 'build_pipeline_id': 'buildPipelineId', + 'build_pipeline_stage_predecessor_collection': 'buildPipelineStagePredecessorCollection', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'image': 'image', + 'build_spec_file': 'buildSpecFile', + 'stage_execution_timeout_in_seconds': 'stageExecutionTimeoutInSeconds', + 'build_source_collection': 'buildSourceCollection', + 'primary_build_source': 'primaryBuildSource' + } + + self._display_name = None + self._description = None + self._build_pipeline_stage_type = None + self._build_pipeline_id = None + self._build_pipeline_stage_predecessor_collection = None + self._freeform_tags = None + self._defined_tags = None + self._image = None + self._build_spec_file = None + self._stage_execution_timeout_in_seconds = None + self._build_source_collection = None + self._primary_build_source = None + self._build_pipeline_stage_type = 'BUILD' + + @property + def image(self): + """ + **[Required]** Gets the image of this CreateBuildStageDetails. + Image name for the Build Environment + + + :return: The image of this CreateBuildStageDetails. + :rtype: str + """ + return self._image + + @image.setter + def image(self, image): + """ + Sets the image of this CreateBuildStageDetails. + Image name for the Build Environment + + + :param image: The image of this CreateBuildStageDetails. + :type: str + """ + self._image = image + + @property + def build_spec_file(self): + """ + Gets the build_spec_file of this CreateBuildStageDetails. + The path to the build specification file for this Environment. The default location if not specified is build_spec.yaml + + + :return: The build_spec_file of this CreateBuildStageDetails. + :rtype: str + """ + return self._build_spec_file + + @build_spec_file.setter + def build_spec_file(self, build_spec_file): + """ + Sets the build_spec_file of this CreateBuildStageDetails. + The path to the build specification file for this Environment. The default location if not specified is build_spec.yaml + + + :param build_spec_file: The build_spec_file of this CreateBuildStageDetails. + :type: str + """ + self._build_spec_file = build_spec_file + + @property + def stage_execution_timeout_in_seconds(self): + """ + Gets the stage_execution_timeout_in_seconds of this CreateBuildStageDetails. + Timeout for the Build Stage Execution. Value in seconds. + + + :return: The stage_execution_timeout_in_seconds of this CreateBuildStageDetails. + :rtype: int + """ + return self._stage_execution_timeout_in_seconds + + @stage_execution_timeout_in_seconds.setter + def stage_execution_timeout_in_seconds(self, stage_execution_timeout_in_seconds): + """ + Sets the stage_execution_timeout_in_seconds of this CreateBuildStageDetails. + Timeout for the Build Stage Execution. Value in seconds. + + + :param stage_execution_timeout_in_seconds: The stage_execution_timeout_in_seconds of this CreateBuildStageDetails. + :type: int + """ + self._stage_execution_timeout_in_seconds = stage_execution_timeout_in_seconds + + @property + def build_source_collection(self): + """ + **[Required]** Gets the build_source_collection of this CreateBuildStageDetails. + + :return: The build_source_collection of this CreateBuildStageDetails. + :rtype: oci.devops.models.BuildSourceCollection + """ + return self._build_source_collection + + @build_source_collection.setter + def build_source_collection(self, build_source_collection): + """ + Sets the build_source_collection of this CreateBuildStageDetails. + + :param build_source_collection: The build_source_collection of this CreateBuildStageDetails. + :type: oci.devops.models.BuildSourceCollection + """ + self._build_source_collection = build_source_collection + + @property + def primary_build_source(self): + """ + Gets the primary_build_source of this CreateBuildStageDetails. + Name of the BuildSource in which the build_spec.yml file need to be located. If not specified, the 1st entry in the BuildSource collection will be chosen as Primary. + + + :return: The primary_build_source of this CreateBuildStageDetails. + :rtype: str + """ + return self._primary_build_source + + @primary_build_source.setter + def primary_build_source(self, primary_build_source): + """ + Sets the primary_build_source of this CreateBuildStageDetails. + Name of the BuildSource in which the build_spec.yml file need to be located. If not specified, the 1st entry in the BuildSource collection will be chosen as Primary. + + + :param primary_build_source: The primary_build_source of this CreateBuildStageDetails. + :type: str + """ + self._primary_build_source = primary_build_source + + 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/devops/models/create_connection_details.py b/src/oci/devops/models/create_connection_details.py new file mode 100644 index 0000000000..5cf7c0c0e7 --- /dev/null +++ b/src/oci/devops/models/create_connection_details.py @@ -0,0 +1,254 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 CreateConnectionDetails(object): + """ + The details for creating a connection. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CreateConnectionDetails object with values from keyword arguments. This class has the following subclasses and if you are using this class as input + to a service operations then you should favor using a subclass over the base class: + + * :class:`~oci.devops.models.CreateGithubAccessTokenConnectionDetails` + * :class:`~oci.devops.models.CreateGitlabAccessTokenConnectionDetails` + + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param description: + The value to assign to the description property of this CreateConnectionDetails. + :type description: str + + :param display_name: + The value to assign to the display_name property of this CreateConnectionDetails. + :type display_name: str + + :param project_id: + The value to assign to the project_id property of this CreateConnectionDetails. + :type project_id: str + + :param connection_type: + The value to assign to the connection_type property of this CreateConnectionDetails. + :type connection_type: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this CreateConnectionDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this CreateConnectionDetails. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'description': 'str', + 'display_name': 'str', + 'project_id': 'str', + 'connection_type': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'description': 'description', + 'display_name': 'displayName', + 'project_id': 'projectId', + 'connection_type': 'connectionType', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._description = None + self._display_name = None + self._project_id = None + self._connection_type = None + self._freeform_tags = None + self._defined_tags = None + + @staticmethod + def get_subtype(object_dictionary): + """ + Given the hash representation of a subtype of this class, + use the info in the hash to return the class of the subtype. + """ + type = object_dictionary['connectionType'] + + if type == 'GITHUB_ACCESS_TOKEN': + return 'CreateGithubAccessTokenConnectionDetails' + + if type == 'GITLAB_ACCESS_TOKEN': + return 'CreateGitlabAccessTokenConnectionDetails' + else: + return 'CreateConnectionDetails' + + @property + def description(self): + """ + Gets the description of this CreateConnectionDetails. + Optional description about the Connection + + + :return: The description of this CreateConnectionDetails. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this CreateConnectionDetails. + Optional description about the Connection + + + :param description: The description of this CreateConnectionDetails. + :type: str + """ + self._description = description + + @property + def display_name(self): + """ + Gets the display_name of this CreateConnectionDetails. + Optional Connection display name + + + :return: The display_name of this CreateConnectionDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this CreateConnectionDetails. + Optional Connection display name + + + :param display_name: The display_name of this CreateConnectionDetails. + :type: str + """ + self._display_name = display_name + + @property + def project_id(self): + """ + **[Required]** Gets the project_id of this CreateConnectionDetails. + Project Identifier + + + :return: The project_id of this CreateConnectionDetails. + :rtype: str + """ + return self._project_id + + @project_id.setter + def project_id(self, project_id): + """ + Sets the project_id of this CreateConnectionDetails. + Project Identifier + + + :param project_id: The project_id of this CreateConnectionDetails. + :type: str + """ + self._project_id = project_id + + @property + def connection_type(self): + """ + **[Required]** Gets the connection_type of this CreateConnectionDetails. + The type of connection. + + + :return: The connection_type of this CreateConnectionDetails. + :rtype: str + """ + return self._connection_type + + @connection_type.setter + def connection_type(self, connection_type): + """ + Sets the connection_type of this CreateConnectionDetails. + The type of connection. + + + :param connection_type: The connection_type of this CreateConnectionDetails. + :type: str + """ + self._connection_type = connection_type + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this CreateConnectionDetails. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See `Resource Tags`__. Example: `{\"bar-key\": \"value\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this CreateConnectionDetails. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this CreateConnectionDetails. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See `Resource Tags`__. Example: `{\"bar-key\": \"value\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this CreateConnectionDetails. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this CreateConnectionDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this CreateConnectionDetails. + :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 CreateConnectionDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this CreateConnectionDetails. + :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/devops/models/create_deliver_artifact_stage_details.py b/src/oci/devops/models/create_deliver_artifact_stage_details.py new file mode 100644 index 0000000000..06cc70c015 --- /dev/null +++ b/src/oci/devops/models/create_deliver_artifact_stage_details.py @@ -0,0 +1,117 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .create_build_pipeline_stage_details import CreateBuildPipelineStageDetails +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 CreateDeliverArtifactStageDetails(CreateBuildPipelineStageDetails): + """ + Specifies the DeliverArtifact Stage. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CreateDeliverArtifactStageDetails object with values from keyword arguments. The default value of the :py:attr:`~oci.devops.models.CreateDeliverArtifactStageDetails.build_pipeline_stage_type` attribute + of this class is ``DELIVER_ARTIFACT`` and it should not be changed. + 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 CreateDeliverArtifactStageDetails. + :type display_name: str + + :param description: + The value to assign to the description property of this CreateDeliverArtifactStageDetails. + :type description: str + + :param build_pipeline_stage_type: + The value to assign to the build_pipeline_stage_type property of this CreateDeliverArtifactStageDetails. + :type build_pipeline_stage_type: str + + :param build_pipeline_id: + The value to assign to the build_pipeline_id property of this CreateDeliverArtifactStageDetails. + :type build_pipeline_id: str + + :param build_pipeline_stage_predecessor_collection: + The value to assign to the build_pipeline_stage_predecessor_collection property of this CreateDeliverArtifactStageDetails. + :type build_pipeline_stage_predecessor_collection: oci.devops.models.BuildPipelineStagePredecessorCollection + + :param freeform_tags: + The value to assign to the freeform_tags property of this CreateDeliverArtifactStageDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this CreateDeliverArtifactStageDetails. + :type defined_tags: dict(str, dict(str, object)) + + :param deliver_artifact_collection: + The value to assign to the deliver_artifact_collection property of this CreateDeliverArtifactStageDetails. + :type deliver_artifact_collection: oci.devops.models.DeliverArtifactCollection + + """ + self.swagger_types = { + 'display_name': 'str', + 'description': 'str', + 'build_pipeline_stage_type': 'str', + 'build_pipeline_id': 'str', + 'build_pipeline_stage_predecessor_collection': 'BuildPipelineStagePredecessorCollection', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'deliver_artifact_collection': 'DeliverArtifactCollection' + } + + self.attribute_map = { + 'display_name': 'displayName', + 'description': 'description', + 'build_pipeline_stage_type': 'buildPipelineStageType', + 'build_pipeline_id': 'buildPipelineId', + 'build_pipeline_stage_predecessor_collection': 'buildPipelineStagePredecessorCollection', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'deliver_artifact_collection': 'deliverArtifactCollection' + } + + self._display_name = None + self._description = None + self._build_pipeline_stage_type = None + self._build_pipeline_id = None + self._build_pipeline_stage_predecessor_collection = None + self._freeform_tags = None + self._defined_tags = None + self._deliver_artifact_collection = None + self._build_pipeline_stage_type = 'DELIVER_ARTIFACT' + + @property + def deliver_artifact_collection(self): + """ + **[Required]** Gets the deliver_artifact_collection of this CreateDeliverArtifactStageDetails. + + :return: The deliver_artifact_collection of this CreateDeliverArtifactStageDetails. + :rtype: oci.devops.models.DeliverArtifactCollection + """ + return self._deliver_artifact_collection + + @deliver_artifact_collection.setter + def deliver_artifact_collection(self, deliver_artifact_collection): + """ + Sets the deliver_artifact_collection of this CreateDeliverArtifactStageDetails. + + :param deliver_artifact_collection: The deliver_artifact_collection of this CreateDeliverArtifactStageDetails. + :type: oci.devops.models.DeliverArtifactCollection + """ + self._deliver_artifact_collection = deliver_artifact_collection + + 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/devops/models/create_devops_code_repository_trigger_details.py b/src/oci/devops/models/create_devops_code_repository_trigger_details.py new file mode 100644 index 0000000000..1c0be16e6b --- /dev/null +++ b/src/oci/devops/models/create_devops_code_repository_trigger_details.py @@ -0,0 +1,121 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .create_trigger_details import CreateTriggerDetails +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 CreateDevopsCodeRepositoryTriggerDetails(CreateTriggerDetails): + """ + The Trigger for Devops-Repository as the caller + """ + + def __init__(self, **kwargs): + """ + Initializes a new CreateDevopsCodeRepositoryTriggerDetails object with values from keyword arguments. The default value of the :py:attr:`~oci.devops.models.CreateDevopsCodeRepositoryTriggerDetails.trigger_source` attribute + of this class is ``DEVOPS_CODE_REPOSITORY`` and it should not be changed. + 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 CreateDevopsCodeRepositoryTriggerDetails. + :type display_name: str + + :param description: + The value to assign to the description property of this CreateDevopsCodeRepositoryTriggerDetails. + :type description: str + + :param project_id: + The value to assign to the project_id property of this CreateDevopsCodeRepositoryTriggerDetails. + :type project_id: str + + :param trigger_source: + The value to assign to the trigger_source property of this CreateDevopsCodeRepositoryTriggerDetails. + :type trigger_source: str + + :param actions: + The value to assign to the actions property of this CreateDevopsCodeRepositoryTriggerDetails. + :type actions: list[oci.devops.models.TriggerAction] + + :param freeform_tags: + The value to assign to the freeform_tags property of this CreateDevopsCodeRepositoryTriggerDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this CreateDevopsCodeRepositoryTriggerDetails. + :type defined_tags: dict(str, dict(str, object)) + + :param repository_id: + The value to assign to the repository_id property of this CreateDevopsCodeRepositoryTriggerDetails. + :type repository_id: str + + """ + self.swagger_types = { + 'display_name': 'str', + 'description': 'str', + 'project_id': 'str', + 'trigger_source': 'str', + 'actions': 'list[TriggerAction]', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'repository_id': 'str' + } + + self.attribute_map = { + 'display_name': 'displayName', + 'description': 'description', + 'project_id': 'projectId', + 'trigger_source': 'triggerSource', + 'actions': 'actions', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'repository_id': 'repositoryId' + } + + self._display_name = None + self._description = None + self._project_id = None + self._trigger_source = None + self._actions = None + self._freeform_tags = None + self._defined_tags = None + self._repository_id = None + self._trigger_source = 'DEVOPS_CODE_REPOSITORY' + + @property + def repository_id(self): + """ + Gets the repository_id of this CreateDevopsCodeRepositoryTriggerDetails. + The Devops Code Repository Id + + + :return: The repository_id of this CreateDevopsCodeRepositoryTriggerDetails. + :rtype: str + """ + return self._repository_id + + @repository_id.setter + def repository_id(self, repository_id): + """ + Sets the repository_id of this CreateDevopsCodeRepositoryTriggerDetails. + The Devops Code Repository Id + + + :param repository_id: The repository_id of this CreateDevopsCodeRepositoryTriggerDetails. + :type: str + """ + self._repository_id = repository_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/devops/models/create_github_access_token_connection_details.py b/src/oci/devops/models/create_github_access_token_connection_details.py new file mode 100644 index 0000000000..115799738b --- /dev/null +++ b/src/oci/devops/models/create_github_access_token_connection_details.py @@ -0,0 +1,115 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .create_connection_details import CreateConnectionDetails +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 CreateGithubAccessTokenConnectionDetails(CreateConnectionDetails): + """ + The details for creating a connection of the type `GITHUB_ACCESS_TOKEN`. + This type corresponds to a connection in GitHub that is authenticated with a personal access token. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CreateGithubAccessTokenConnectionDetails object with values from keyword arguments. The default value of the :py:attr:`~oci.devops.models.CreateGithubAccessTokenConnectionDetails.connection_type` attribute + of this class is ``GITHUB_ACCESS_TOKEN`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param description: + The value to assign to the description property of this CreateGithubAccessTokenConnectionDetails. + :type description: str + + :param display_name: + The value to assign to the display_name property of this CreateGithubAccessTokenConnectionDetails. + :type display_name: str + + :param project_id: + The value to assign to the project_id property of this CreateGithubAccessTokenConnectionDetails. + :type project_id: str + + :param connection_type: + The value to assign to the connection_type property of this CreateGithubAccessTokenConnectionDetails. + :type connection_type: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this CreateGithubAccessTokenConnectionDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this CreateGithubAccessTokenConnectionDetails. + :type defined_tags: dict(str, dict(str, object)) + + :param access_token: + The value to assign to the access_token property of this CreateGithubAccessTokenConnectionDetails. + :type access_token: str + + """ + self.swagger_types = { + 'description': 'str', + 'display_name': 'str', + 'project_id': 'str', + 'connection_type': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'access_token': 'str' + } + + self.attribute_map = { + 'description': 'description', + 'display_name': 'displayName', + 'project_id': 'projectId', + 'connection_type': 'connectionType', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'access_token': 'accessToken' + } + + self._description = None + self._display_name = None + self._project_id = None + self._connection_type = None + self._freeform_tags = None + self._defined_tags = None + self._access_token = None + self._connection_type = 'GITHUB_ACCESS_TOKEN' + + @property + def access_token(self): + """ + **[Required]** Gets the access_token of this CreateGithubAccessTokenConnectionDetails. + OCID of personal access token saved in secret store + + + :return: The access_token of this CreateGithubAccessTokenConnectionDetails. + :rtype: str + """ + return self._access_token + + @access_token.setter + def access_token(self, access_token): + """ + Sets the access_token of this CreateGithubAccessTokenConnectionDetails. + OCID of personal access token saved in secret store + + + :param access_token: The access_token of this CreateGithubAccessTokenConnectionDetails. + :type: str + """ + self._access_token = access_token + + 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/devops/models/create_github_trigger_details.py b/src/oci/devops/models/create_github_trigger_details.py new file mode 100644 index 0000000000..7f42552666 --- /dev/null +++ b/src/oci/devops/models/create_github_trigger_details.py @@ -0,0 +1,90 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .create_trigger_details import CreateTriggerDetails +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 CreateGithubTriggerDetails(CreateTriggerDetails): + """ + The Trigger for Github as the caller + """ + + def __init__(self, **kwargs): + """ + Initializes a new CreateGithubTriggerDetails object with values from keyword arguments. The default value of the :py:attr:`~oci.devops.models.CreateGithubTriggerDetails.trigger_source` attribute + of this class is ``GITHUB`` and it should not be changed. + 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 CreateGithubTriggerDetails. + :type display_name: str + + :param description: + The value to assign to the description property of this CreateGithubTriggerDetails. + :type description: str + + :param project_id: + The value to assign to the project_id property of this CreateGithubTriggerDetails. + :type project_id: str + + :param trigger_source: + The value to assign to the trigger_source property of this CreateGithubTriggerDetails. + :type trigger_source: str + + :param actions: + The value to assign to the actions property of this CreateGithubTriggerDetails. + :type actions: list[oci.devops.models.TriggerAction] + + :param freeform_tags: + The value to assign to the freeform_tags property of this CreateGithubTriggerDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this CreateGithubTriggerDetails. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'display_name': 'str', + 'description': 'str', + 'project_id': 'str', + 'trigger_source': 'str', + 'actions': 'list[TriggerAction]', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'display_name': 'displayName', + 'description': 'description', + 'project_id': 'projectId', + 'trigger_source': 'triggerSource', + 'actions': 'actions', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._display_name = None + self._description = None + self._project_id = None + self._trigger_source = None + self._actions = None + self._freeform_tags = None + self._defined_tags = None + self._trigger_source = 'GITHUB' + + 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/devops/models/create_gitlab_access_token_connection_details.py b/src/oci/devops/models/create_gitlab_access_token_connection_details.py new file mode 100644 index 0000000000..f1fe49bf2a --- /dev/null +++ b/src/oci/devops/models/create_gitlab_access_token_connection_details.py @@ -0,0 +1,115 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .create_connection_details import CreateConnectionDetails +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 CreateGitlabAccessTokenConnectionDetails(CreateConnectionDetails): + """ + The details for creating a connection of the type `GITLAB_ACCESS_TOKEN`. + This type corresponds to a connection in GitLab that is authenticated with a personal access token. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CreateGitlabAccessTokenConnectionDetails object with values from keyword arguments. The default value of the :py:attr:`~oci.devops.models.CreateGitlabAccessTokenConnectionDetails.connection_type` attribute + of this class is ``GITLAB_ACCESS_TOKEN`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param description: + The value to assign to the description property of this CreateGitlabAccessTokenConnectionDetails. + :type description: str + + :param display_name: + The value to assign to the display_name property of this CreateGitlabAccessTokenConnectionDetails. + :type display_name: str + + :param project_id: + The value to assign to the project_id property of this CreateGitlabAccessTokenConnectionDetails. + :type project_id: str + + :param connection_type: + The value to assign to the connection_type property of this CreateGitlabAccessTokenConnectionDetails. + :type connection_type: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this CreateGitlabAccessTokenConnectionDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this CreateGitlabAccessTokenConnectionDetails. + :type defined_tags: dict(str, dict(str, object)) + + :param access_token: + The value to assign to the access_token property of this CreateGitlabAccessTokenConnectionDetails. + :type access_token: str + + """ + self.swagger_types = { + 'description': 'str', + 'display_name': 'str', + 'project_id': 'str', + 'connection_type': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'access_token': 'str' + } + + self.attribute_map = { + 'description': 'description', + 'display_name': 'displayName', + 'project_id': 'projectId', + 'connection_type': 'connectionType', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'access_token': 'accessToken' + } + + self._description = None + self._display_name = None + self._project_id = None + self._connection_type = None + self._freeform_tags = None + self._defined_tags = None + self._access_token = None + self._connection_type = 'GITLAB_ACCESS_TOKEN' + + @property + def access_token(self): + """ + **[Required]** Gets the access_token of this CreateGitlabAccessTokenConnectionDetails. + OCID of personal access token saved in secret store + + + :return: The access_token of this CreateGitlabAccessTokenConnectionDetails. + :rtype: str + """ + return self._access_token + + @access_token.setter + def access_token(self, access_token): + """ + Sets the access_token of this CreateGitlabAccessTokenConnectionDetails. + OCID of personal access token saved in secret store + + + :param access_token: The access_token of this CreateGitlabAccessTokenConnectionDetails. + :type: str + """ + self._access_token = access_token + + 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/devops/models/create_gitlab_trigger_details.py b/src/oci/devops/models/create_gitlab_trigger_details.py new file mode 100644 index 0000000000..dfee54c80b --- /dev/null +++ b/src/oci/devops/models/create_gitlab_trigger_details.py @@ -0,0 +1,90 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .create_trigger_details import CreateTriggerDetails +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 CreateGitlabTriggerDetails(CreateTriggerDetails): + """ + The Trigger for Github as the caller + """ + + def __init__(self, **kwargs): + """ + Initializes a new CreateGitlabTriggerDetails object with values from keyword arguments. The default value of the :py:attr:`~oci.devops.models.CreateGitlabTriggerDetails.trigger_source` attribute + of this class is ``GITLAB`` and it should not be changed. + 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 CreateGitlabTriggerDetails. + :type display_name: str + + :param description: + The value to assign to the description property of this CreateGitlabTriggerDetails. + :type description: str + + :param project_id: + The value to assign to the project_id property of this CreateGitlabTriggerDetails. + :type project_id: str + + :param trigger_source: + The value to assign to the trigger_source property of this CreateGitlabTriggerDetails. + :type trigger_source: str + + :param actions: + The value to assign to the actions property of this CreateGitlabTriggerDetails. + :type actions: list[oci.devops.models.TriggerAction] + + :param freeform_tags: + The value to assign to the freeform_tags property of this CreateGitlabTriggerDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this CreateGitlabTriggerDetails. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'display_name': 'str', + 'description': 'str', + 'project_id': 'str', + 'trigger_source': 'str', + 'actions': 'list[TriggerAction]', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'display_name': 'displayName', + 'description': 'description', + 'project_id': 'projectId', + 'trigger_source': 'triggerSource', + 'actions': 'actions', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._display_name = None + self._description = None + self._project_id = None + self._trigger_source = None + self._actions = None + self._freeform_tags = None + self._defined_tags = None + self._trigger_source = 'GITLAB' + + 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/devops/models/create_repository_details.py b/src/oci/devops/models/create_repository_details.py new file mode 100644 index 0000000000..fcd8b61161 --- /dev/null +++ b/src/oci/devops/models/create_repository_details.py @@ -0,0 +1,291 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 CreateRepositoryDetails(object): + """ + The information about new Repository. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CreateRepositoryDetails 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 CreateRepositoryDetails. + :type name: str + + :param project_id: + The value to assign to the project_id property of this CreateRepositoryDetails. + :type project_id: str + + :param default_branch: + The value to assign to the default_branch property of this CreateRepositoryDetails. + :type default_branch: str + + :param repository_type: + The value to assign to the repository_type property of this CreateRepositoryDetails. + :type repository_type: str + + :param mirror_repository_config: + The value to assign to the mirror_repository_config property of this CreateRepositoryDetails. + :type mirror_repository_config: oci.devops.models.MirrorRepositoryConfig + + :param description: + The value to assign to the description property of this CreateRepositoryDetails. + :type description: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this CreateRepositoryDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this CreateRepositoryDetails. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'name': 'str', + 'project_id': 'str', + 'default_branch': 'str', + 'repository_type': 'str', + 'mirror_repository_config': 'MirrorRepositoryConfig', + 'description': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'name': 'name', + 'project_id': 'projectId', + 'default_branch': 'defaultBranch', + 'repository_type': 'repositoryType', + 'mirror_repository_config': 'mirrorRepositoryConfig', + 'description': 'description', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._name = None + self._project_id = None + self._default_branch = None + self._repository_type = None + self._mirror_repository_config = None + self._description = None + self._freeform_tags = None + self._defined_tags = None + + @property + def name(self): + """ + **[Required]** Gets the name of this CreateRepositoryDetails. + Unique name of a repository. + + + :return: The name of this CreateRepositoryDetails. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """ + Sets the name of this CreateRepositoryDetails. + Unique name of a repository. + + + :param name: The name of this CreateRepositoryDetails. + :type: str + """ + self._name = name + + @property + def project_id(self): + """ + **[Required]** Gets the project_id of this CreateRepositoryDetails. + The OCID of the Project containing the repository. + + + :return: The project_id of this CreateRepositoryDetails. + :rtype: str + """ + return self._project_id + + @project_id.setter + def project_id(self, project_id): + """ + Sets the project_id of this CreateRepositoryDetails. + The OCID of the Project containing the repository. + + + :param project_id: The project_id of this CreateRepositoryDetails. + :type: str + """ + self._project_id = project_id + + @property + def default_branch(self): + """ + Gets the default_branch of this CreateRepositoryDetails. + The default branch of the repository. + + + :return: The default_branch of this CreateRepositoryDetails. + :rtype: str + """ + return self._default_branch + + @default_branch.setter + def default_branch(self, default_branch): + """ + Sets the default_branch of this CreateRepositoryDetails. + The default branch of the repository. + + + :param default_branch: The default_branch of this CreateRepositoryDetails. + :type: str + """ + self._default_branch = default_branch + + @property + def repository_type(self): + """ + Gets the repository_type of this CreateRepositoryDetails. + Type of repository + + + :return: The repository_type of this CreateRepositoryDetails. + :rtype: str + """ + return self._repository_type + + @repository_type.setter + def repository_type(self, repository_type): + """ + Sets the repository_type of this CreateRepositoryDetails. + Type of repository + + + :param repository_type: The repository_type of this CreateRepositoryDetails. + :type: str + """ + self._repository_type = repository_type + + @property + def mirror_repository_config(self): + """ + Gets the mirror_repository_config of this CreateRepositoryDetails. + + :return: The mirror_repository_config of this CreateRepositoryDetails. + :rtype: oci.devops.models.MirrorRepositoryConfig + """ + return self._mirror_repository_config + + @mirror_repository_config.setter + def mirror_repository_config(self, mirror_repository_config): + """ + Sets the mirror_repository_config of this CreateRepositoryDetails. + + :param mirror_repository_config: The mirror_repository_config of this CreateRepositoryDetails. + :type: oci.devops.models.MirrorRepositoryConfig + """ + self._mirror_repository_config = mirror_repository_config + + @property + def description(self): + """ + Gets the description of this CreateRepositoryDetails. + The description of this repository. Avoid entering confidential information + + + :return: The description of this CreateRepositoryDetails. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this CreateRepositoryDetails. + The description of this repository. Avoid entering confidential information + + + :param description: The description of this CreateRepositoryDetails. + :type: str + """ + self._description = description + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this CreateRepositoryDetails. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See `Resource Tags`__. Example: `{\"bar-key\": \"value\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this CreateRepositoryDetails. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this CreateRepositoryDetails. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See `Resource Tags`__. Example: `{\"bar-key\": \"value\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this CreateRepositoryDetails. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this CreateRepositoryDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this CreateRepositoryDetails. + :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 CreateRepositoryDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this CreateRepositoryDetails. + :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/devops/models/create_trigger_deployment_stage_details.py b/src/oci/devops/models/create_trigger_deployment_stage_details.py new file mode 100644 index 0000000000..909bbbeeb5 --- /dev/null +++ b/src/oci/devops/models/create_trigger_deployment_stage_details.py @@ -0,0 +1,152 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .create_build_pipeline_stage_details import CreateBuildPipelineStageDetails +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 CreateTriggerDeploymentStageDetails(CreateBuildPipelineStageDetails): + """ + Specifies Trigger Deployment Pipleline stage which runs another pipeline of the application. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CreateTriggerDeploymentStageDetails object with values from keyword arguments. The default value of the :py:attr:`~oci.devops.models.CreateTriggerDeploymentStageDetails.build_pipeline_stage_type` attribute + of this class is ``TRIGGER_DEPLOYMENT_PIPELINE`` and it should not be changed. + 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 CreateTriggerDeploymentStageDetails. + :type display_name: str + + :param description: + The value to assign to the description property of this CreateTriggerDeploymentStageDetails. + :type description: str + + :param build_pipeline_stage_type: + The value to assign to the build_pipeline_stage_type property of this CreateTriggerDeploymentStageDetails. + :type build_pipeline_stage_type: str + + :param build_pipeline_id: + The value to assign to the build_pipeline_id property of this CreateTriggerDeploymentStageDetails. + :type build_pipeline_id: str + + :param build_pipeline_stage_predecessor_collection: + The value to assign to the build_pipeline_stage_predecessor_collection property of this CreateTriggerDeploymentStageDetails. + :type build_pipeline_stage_predecessor_collection: oci.devops.models.BuildPipelineStagePredecessorCollection + + :param freeform_tags: + The value to assign to the freeform_tags property of this CreateTriggerDeploymentStageDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this CreateTriggerDeploymentStageDetails. + :type defined_tags: dict(str, dict(str, object)) + + :param deploy_pipeline_id: + The value to assign to the deploy_pipeline_id property of this CreateTriggerDeploymentStageDetails. + :type deploy_pipeline_id: str + + :param is_pass_all_parameters_enabled: + The value to assign to the is_pass_all_parameters_enabled property of this CreateTriggerDeploymentStageDetails. + :type is_pass_all_parameters_enabled: bool + + """ + self.swagger_types = { + 'display_name': 'str', + 'description': 'str', + 'build_pipeline_stage_type': 'str', + 'build_pipeline_id': 'str', + 'build_pipeline_stage_predecessor_collection': 'BuildPipelineStagePredecessorCollection', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'deploy_pipeline_id': 'str', + 'is_pass_all_parameters_enabled': 'bool' + } + + self.attribute_map = { + 'display_name': 'displayName', + 'description': 'description', + 'build_pipeline_stage_type': 'buildPipelineStageType', + 'build_pipeline_id': 'buildPipelineId', + 'build_pipeline_stage_predecessor_collection': 'buildPipelineStagePredecessorCollection', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'deploy_pipeline_id': 'deployPipelineId', + 'is_pass_all_parameters_enabled': 'isPassAllParametersEnabled' + } + + self._display_name = None + self._description = None + self._build_pipeline_stage_type = None + self._build_pipeline_id = None + self._build_pipeline_stage_predecessor_collection = None + self._freeform_tags = None + self._defined_tags = None + self._deploy_pipeline_id = None + self._is_pass_all_parameters_enabled = None + self._build_pipeline_stage_type = 'TRIGGER_DEPLOYMENT_PIPELINE' + + @property + def deploy_pipeline_id(self): + """ + **[Required]** Gets the deploy_pipeline_id of this CreateTriggerDeploymentStageDetails. + A target Pipeline ocid that will be run in this stage. + + + :return: The deploy_pipeline_id of this CreateTriggerDeploymentStageDetails. + :rtype: str + """ + return self._deploy_pipeline_id + + @deploy_pipeline_id.setter + def deploy_pipeline_id(self, deploy_pipeline_id): + """ + Sets the deploy_pipeline_id of this CreateTriggerDeploymentStageDetails. + A target Pipeline ocid that will be run in this stage. + + + :param deploy_pipeline_id: The deploy_pipeline_id of this CreateTriggerDeploymentStageDetails. + :type: str + """ + self._deploy_pipeline_id = deploy_pipeline_id + + @property + def is_pass_all_parameters_enabled(self): + """ + **[Required]** Gets the is_pass_all_parameters_enabled of this CreateTriggerDeploymentStageDetails. + A boolean flag specifies whether the parameters should be passed during the deployment trigger. + + + :return: The is_pass_all_parameters_enabled of this CreateTriggerDeploymentStageDetails. + :rtype: bool + """ + return self._is_pass_all_parameters_enabled + + @is_pass_all_parameters_enabled.setter + def is_pass_all_parameters_enabled(self, is_pass_all_parameters_enabled): + """ + Sets the is_pass_all_parameters_enabled of this CreateTriggerDeploymentStageDetails. + A boolean flag specifies whether the parameters should be passed during the deployment trigger. + + + :param is_pass_all_parameters_enabled: The is_pass_all_parameters_enabled of this CreateTriggerDeploymentStageDetails. + :type: bool + """ + self._is_pass_all_parameters_enabled = is_pass_all_parameters_enabled + + 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/devops/models/create_trigger_details.py b/src/oci/devops/models/create_trigger_details.py new file mode 100644 index 0000000000..a5514c7c50 --- /dev/null +++ b/src/oci/devops/models/create_trigger_details.py @@ -0,0 +1,289 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 CreateTriggerDetails(object): + """ + The information about new Trigger. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CreateTriggerDetails object with values from keyword arguments. This class has the following subclasses and if you are using this class as input + to a service operations then you should favor using a subclass over the base class: + + * :class:`~oci.devops.models.CreateGithubTriggerDetails` + * :class:`~oci.devops.models.CreateDevopsCodeRepositoryTriggerDetails` + * :class:`~oci.devops.models.CreateGitlabTriggerDetails` + + 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 CreateTriggerDetails. + :type display_name: str + + :param description: + The value to assign to the description property of this CreateTriggerDetails. + :type description: str + + :param project_id: + The value to assign to the project_id property of this CreateTriggerDetails. + :type project_id: str + + :param trigger_source: + The value to assign to the trigger_source property of this CreateTriggerDetails. + :type trigger_source: str + + :param actions: + The value to assign to the actions property of this CreateTriggerDetails. + :type actions: list[oci.devops.models.TriggerAction] + + :param freeform_tags: + The value to assign to the freeform_tags property of this CreateTriggerDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this CreateTriggerDetails. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'display_name': 'str', + 'description': 'str', + 'project_id': 'str', + 'trigger_source': 'str', + 'actions': 'list[TriggerAction]', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'display_name': 'displayName', + 'description': 'description', + 'project_id': 'projectId', + 'trigger_source': 'triggerSource', + 'actions': 'actions', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._display_name = None + self._description = None + self._project_id = None + self._trigger_source = None + self._actions = None + self._freeform_tags = None + self._defined_tags = None + + @staticmethod + def get_subtype(object_dictionary): + """ + Given the hash representation of a subtype of this class, + use the info in the hash to return the class of the subtype. + """ + type = object_dictionary['triggerSource'] + + if type == 'GITHUB': + return 'CreateGithubTriggerDetails' + + if type == 'DEVOPS_CODE_REPOSITORY': + return 'CreateDevopsCodeRepositoryTriggerDetails' + + if type == 'GITLAB': + return 'CreateGitlabTriggerDetails' + else: + return 'CreateTriggerDetails' + + @property + def display_name(self): + """ + Gets the display_name of this CreateTriggerDetails. + Name of the Trigger + + + :return: The display_name of this CreateTriggerDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this CreateTriggerDetails. + Name of the Trigger + + + :param display_name: The display_name of this CreateTriggerDetails. + :type: str + """ + self._display_name = display_name + + @property + def description(self): + """ + Gets the description of this CreateTriggerDetails. + Optional description about the Trigger + + + :return: The description of this CreateTriggerDetails. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this CreateTriggerDetails. + Optional description about the Trigger + + + :param description: The description of this CreateTriggerDetails. + :type: str + """ + self._description = description + + @property + def project_id(self): + """ + **[Required]** Gets the project_id of this CreateTriggerDetails. + Project to which the Trigger will belong + + + :return: The project_id of this CreateTriggerDetails. + :rtype: str + """ + return self._project_id + + @project_id.setter + def project_id(self, project_id): + """ + Sets the project_id of this CreateTriggerDetails. + Project to which the Trigger will belong + + + :param project_id: The project_id of this CreateTriggerDetails. + :type: str + """ + self._project_id = project_id + + @property + def trigger_source(self): + """ + **[Required]** Gets the trigger_source of this CreateTriggerDetails. + Source of the Trigger (allowed values are - GITHUB, GITLAB) + + + :return: The trigger_source of this CreateTriggerDetails. + :rtype: str + """ + return self._trigger_source + + @trigger_source.setter + def trigger_source(self, trigger_source): + """ + Sets the trigger_source of this CreateTriggerDetails. + Source of the Trigger (allowed values are - GITHUB, GITLAB) + + + :param trigger_source: The trigger_source of this CreateTriggerDetails. + :type: str + """ + self._trigger_source = trigger_source + + @property + def actions(self): + """ + **[Required]** Gets the actions of this CreateTriggerDetails. + The list of actions that are to be performed for this Trigger + + + :return: The actions of this CreateTriggerDetails. + :rtype: list[oci.devops.models.TriggerAction] + """ + return self._actions + + @actions.setter + def actions(self, actions): + """ + Sets the actions of this CreateTriggerDetails. + The list of actions that are to be performed for this Trigger + + + :param actions: The actions of this CreateTriggerDetails. + :type: list[oci.devops.models.TriggerAction] + """ + self._actions = actions + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this CreateTriggerDetails. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See `Resource Tags`__. Example: `{\"bar-key\": \"value\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this CreateTriggerDetails. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this CreateTriggerDetails. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See `Resource Tags`__. Example: `{\"bar-key\": \"value\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this CreateTriggerDetails. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this CreateTriggerDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this CreateTriggerDetails. + :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 CreateTriggerDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this CreateTriggerDetails. + :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/devops/models/create_wait_criteria_details.py b/src/oci/devops/models/create_wait_criteria_details.py new file mode 100644 index 0000000000..96d100309c --- /dev/null +++ b/src/oci/devops/models/create_wait_criteria_details.py @@ -0,0 +1,100 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 CreateWaitCriteriaDetails(object): + """ + Specifies wait criteria for wait stage. + """ + + #: A constant which can be used with the wait_type property of a CreateWaitCriteriaDetails. + #: This constant has a value of "ABSOLUTE_WAIT" + WAIT_TYPE_ABSOLUTE_WAIT = "ABSOLUTE_WAIT" + + def __init__(self, **kwargs): + """ + Initializes a new CreateWaitCriteriaDetails object with values from keyword arguments. This class has the following subclasses and if you are using this class as input + to a service operations then you should favor using a subclass over the base class: + + * :class:`~oci.devops.models.CreateAbsoluteWaitCriteriaDetails` + + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param wait_type: + The value to assign to the wait_type property of this CreateWaitCriteriaDetails. + Allowed values for this property are: "ABSOLUTE_WAIT" + :type wait_type: str + + """ + self.swagger_types = { + 'wait_type': 'str' + } + + self.attribute_map = { + 'wait_type': 'waitType' + } + + self._wait_type = None + + @staticmethod + def get_subtype(object_dictionary): + """ + Given the hash representation of a subtype of this class, + use the info in the hash to return the class of the subtype. + """ + type = object_dictionary['waitType'] + + if type == 'ABSOLUTE_WAIT': + return 'CreateAbsoluteWaitCriteriaDetails' + else: + return 'CreateWaitCriteriaDetails' + + @property + def wait_type(self): + """ + **[Required]** Gets the wait_type of this CreateWaitCriteriaDetails. + wait criteria sub type + + Allowed values for this property are: "ABSOLUTE_WAIT" + + + :return: The wait_type of this CreateWaitCriteriaDetails. + :rtype: str + """ + return self._wait_type + + @wait_type.setter + def wait_type(self, wait_type): + """ + Sets the wait_type of this CreateWaitCriteriaDetails. + wait criteria sub type + + + :param wait_type: The wait_type of this CreateWaitCriteriaDetails. + :type: str + """ + allowed_values = ["ABSOLUTE_WAIT"] + if not value_allowed_none_or_none_sentinel(wait_type, allowed_values): + raise ValueError( + "Invalid value for `wait_type`, must be None or one of {0}" + .format(allowed_values) + ) + self._wait_type = wait_type + + 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/devops/models/create_wait_stage_details.py b/src/oci/devops/models/create_wait_stage_details.py new file mode 100644 index 0000000000..1531c35f35 --- /dev/null +++ b/src/oci/devops/models/create_wait_stage_details.py @@ -0,0 +1,117 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .create_build_pipeline_stage_details import CreateBuildPipelineStageDetails +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 CreateWaitStageDetails(CreateBuildPipelineStageDetails): + """ + Specifies the Wait Stage. User can specify variable wait times or an absolute duration. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CreateWaitStageDetails object with values from keyword arguments. The default value of the :py:attr:`~oci.devops.models.CreateWaitStageDetails.build_pipeline_stage_type` attribute + of this class is ``WAIT`` and it should not be changed. + 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 CreateWaitStageDetails. + :type display_name: str + + :param description: + The value to assign to the description property of this CreateWaitStageDetails. + :type description: str + + :param build_pipeline_stage_type: + The value to assign to the build_pipeline_stage_type property of this CreateWaitStageDetails. + :type build_pipeline_stage_type: str + + :param build_pipeline_id: + The value to assign to the build_pipeline_id property of this CreateWaitStageDetails. + :type build_pipeline_id: str + + :param build_pipeline_stage_predecessor_collection: + The value to assign to the build_pipeline_stage_predecessor_collection property of this CreateWaitStageDetails. + :type build_pipeline_stage_predecessor_collection: oci.devops.models.BuildPipelineStagePredecessorCollection + + :param freeform_tags: + The value to assign to the freeform_tags property of this CreateWaitStageDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this CreateWaitStageDetails. + :type defined_tags: dict(str, dict(str, object)) + + :param wait_criteria: + The value to assign to the wait_criteria property of this CreateWaitStageDetails. + :type wait_criteria: oci.devops.models.CreateWaitCriteriaDetails + + """ + self.swagger_types = { + 'display_name': 'str', + 'description': 'str', + 'build_pipeline_stage_type': 'str', + 'build_pipeline_id': 'str', + 'build_pipeline_stage_predecessor_collection': 'BuildPipelineStagePredecessorCollection', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'wait_criteria': 'CreateWaitCriteriaDetails' + } + + self.attribute_map = { + 'display_name': 'displayName', + 'description': 'description', + 'build_pipeline_stage_type': 'buildPipelineStageType', + 'build_pipeline_id': 'buildPipelineId', + 'build_pipeline_stage_predecessor_collection': 'buildPipelineStagePredecessorCollection', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'wait_criteria': 'waitCriteria' + } + + self._display_name = None + self._description = None + self._build_pipeline_stage_type = None + self._build_pipeline_id = None + self._build_pipeline_stage_predecessor_collection = None + self._freeform_tags = None + self._defined_tags = None + self._wait_criteria = None + self._build_pipeline_stage_type = 'WAIT' + + @property + def wait_criteria(self): + """ + **[Required]** Gets the wait_criteria of this CreateWaitStageDetails. + + :return: The wait_criteria of this CreateWaitStageDetails. + :rtype: oci.devops.models.CreateWaitCriteriaDetails + """ + return self._wait_criteria + + @wait_criteria.setter + def wait_criteria(self, wait_criteria): + """ + Sets the wait_criteria of this CreateWaitStageDetails. + + :param wait_criteria: The wait_criteria of this CreateWaitStageDetails. + :type: oci.devops.models.CreateWaitCriteriaDetails + """ + self._wait_criteria = wait_criteria + + 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/devops/models/deliver_artifact.py b/src/oci/devops/models/deliver_artifact.py new file mode 100644 index 0000000000..6aea657299 --- /dev/null +++ b/src/oci/devops/models/deliver_artifact.py @@ -0,0 +1,101 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 DeliverArtifact(object): + """ + Artifact info that need to be pushed to the artifactory stores. + """ + + def __init__(self, **kwargs): + """ + Initializes a new DeliverArtifact object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param artifact_name: + The value to assign to the artifact_name property of this DeliverArtifact. + :type artifact_name: str + + :param artifact_id: + The value to assign to the artifact_id property of this DeliverArtifact. + :type artifact_id: str + + """ + self.swagger_types = { + 'artifact_name': 'str', + 'artifact_id': 'str' + } + + self.attribute_map = { + 'artifact_name': 'artifactName', + 'artifact_id': 'artifactId' + } + + self._artifact_name = None + self._artifact_id = None + + @property + def artifact_name(self): + """ + **[Required]** Gets the artifact_name of this DeliverArtifact. + Name of the artifact specified in the build_spec.yml file. + + + :return: The artifact_name of this DeliverArtifact. + :rtype: str + """ + return self._artifact_name + + @artifact_name.setter + def artifact_name(self, artifact_name): + """ + Sets the artifact_name of this DeliverArtifact. + Name of the artifact specified in the build_spec.yml file. + + + :param artifact_name: The artifact_name of this DeliverArtifact. + :type: str + """ + self._artifact_name = artifact_name + + @property + def artifact_id(self): + """ + **[Required]** Gets the artifact_id of this DeliverArtifact. + Artifact Identifier which contains the Artifact Definition. + + + :return: The artifact_id of this DeliverArtifact. + :rtype: str + """ + return self._artifact_id + + @artifact_id.setter + def artifact_id(self, artifact_id): + """ + Sets the artifact_id of this DeliverArtifact. + Artifact Identifier which contains the Artifact Definition. + + + :param artifact_id: The artifact_id of this DeliverArtifact. + :type: str + """ + self._artifact_id = artifact_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/devops/models/deliver_artifact_collection.py b/src/oci/devops/models/deliver_artifact_collection.py new file mode 100644 index 0000000000..9c2231400c --- /dev/null +++ b/src/oci/devops/models/deliver_artifact_collection.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 DeliverArtifactCollection(object): + """ + Specifies an array of Artifacts that need to be pushed to the artifactory stores. + """ + + def __init__(self, **kwargs): + """ + Initializes a new DeliverArtifactCollection object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param items: + The value to assign to the items property of this DeliverArtifactCollection. + :type items: list[oci.devops.models.DeliverArtifact] + + """ + self.swagger_types = { + 'items': 'list[DeliverArtifact]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this DeliverArtifactCollection. + Collection of Artifacts that were generated in the Build Stage and need to be pushed to the artifactory stores. In case of UPDATE operation, replaces existing artifacts list. Merging with existing artifacts is not supported. + + + :return: The items of this DeliverArtifactCollection. + :rtype: list[oci.devops.models.DeliverArtifact] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this DeliverArtifactCollection. + Collection of Artifacts that were generated in the Build Stage and need to be pushed to the artifactory stores. In case of UPDATE operation, replaces existing artifacts list. Merging with existing artifacts is not supported. + + + :param items: The items of this DeliverArtifactCollection. + :type: list[oci.devops.models.DeliverArtifact] + """ + self._items = items + + 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/devops/models/deliver_artifact_stage.py b/src/oci/devops/models/deliver_artifact_stage.py new file mode 100644 index 0000000000..681540bdd2 --- /dev/null +++ b/src/oci/devops/models/deliver_artifact_stage.py @@ -0,0 +1,175 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .build_pipeline_stage import BuildPipelineStage +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 DeliverArtifactStage(BuildPipelineStage): + """ + Specifies the DeliverArtifact Stage. + """ + + def __init__(self, **kwargs): + """ + Initializes a new DeliverArtifactStage object with values from keyword arguments. The default value of the :py:attr:`~oci.devops.models.DeliverArtifactStage.build_pipeline_stage_type` attribute + of this class is ``DELIVER_ARTIFACT`` and it should not be changed. + 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 DeliverArtifactStage. + :type id: str + + :param display_name: + The value to assign to the display_name property of this DeliverArtifactStage. + :type display_name: str + + :param description: + The value to assign to the description property of this DeliverArtifactStage. + :type description: str + + :param project_id: + The value to assign to the project_id property of this DeliverArtifactStage. + :type project_id: str + + :param build_pipeline_id: + The value to assign to the build_pipeline_id property of this DeliverArtifactStage. + :type build_pipeline_id: str + + :param compartment_id: + The value to assign to the compartment_id property of this DeliverArtifactStage. + :type compartment_id: str + + :param build_pipeline_stage_type: + The value to assign to the build_pipeline_stage_type property of this DeliverArtifactStage. + Allowed values for this property are: "WAIT", "BUILD", "DELIVER_ARTIFACT", "TRIGGER_DEPLOYMENT_PIPELINE" + :type build_pipeline_stage_type: str + + :param time_created: + The value to assign to the time_created property of this DeliverArtifactStage. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this DeliverArtifactStage. + :type time_updated: datetime + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this DeliverArtifactStage. + Allowed values for this property are: "CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED" + :type lifecycle_state: str + + :param lifecycle_details: + The value to assign to the lifecycle_details property of this DeliverArtifactStage. + :type lifecycle_details: str + + :param build_pipeline_stage_predecessor_collection: + The value to assign to the build_pipeline_stage_predecessor_collection property of this DeliverArtifactStage. + :type build_pipeline_stage_predecessor_collection: oci.devops.models.BuildPipelineStagePredecessorCollection + + :param freeform_tags: + The value to assign to the freeform_tags property of this DeliverArtifactStage. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this DeliverArtifactStage. + :type defined_tags: dict(str, dict(str, object)) + + :param system_tags: + The value to assign to the system_tags property of this DeliverArtifactStage. + :type system_tags: dict(str, dict(str, object)) + + :param deliver_artifact_collection: + The value to assign to the deliver_artifact_collection property of this DeliverArtifactStage. + :type deliver_artifact_collection: oci.devops.models.DeliverArtifactCollection + + """ + self.swagger_types = { + 'id': 'str', + 'display_name': 'str', + 'description': 'str', + 'project_id': 'str', + 'build_pipeline_id': 'str', + 'compartment_id': 'str', + 'build_pipeline_stage_type': 'str', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'lifecycle_state': 'str', + 'lifecycle_details': 'str', + 'build_pipeline_stage_predecessor_collection': 'BuildPipelineStagePredecessorCollection', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'system_tags': 'dict(str, dict(str, object))', + 'deliver_artifact_collection': 'DeliverArtifactCollection' + } + + self.attribute_map = { + 'id': 'id', + 'display_name': 'displayName', + 'description': 'description', + 'project_id': 'projectId', + 'build_pipeline_id': 'buildPipelineId', + 'compartment_id': 'compartmentId', + 'build_pipeline_stage_type': 'buildPipelineStageType', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'lifecycle_state': 'lifecycleState', + 'lifecycle_details': 'lifecycleDetails', + 'build_pipeline_stage_predecessor_collection': 'buildPipelineStagePredecessorCollection', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'system_tags': 'systemTags', + 'deliver_artifact_collection': 'deliverArtifactCollection' + } + + self._id = None + self._display_name = None + self._description = None + self._project_id = None + self._build_pipeline_id = None + self._compartment_id = None + self._build_pipeline_stage_type = None + self._time_created = None + self._time_updated = None + self._lifecycle_state = None + self._lifecycle_details = None + self._build_pipeline_stage_predecessor_collection = None + self._freeform_tags = None + self._defined_tags = None + self._system_tags = None + self._deliver_artifact_collection = None + self._build_pipeline_stage_type = 'DELIVER_ARTIFACT' + + @property + def deliver_artifact_collection(self): + """ + **[Required]** Gets the deliver_artifact_collection of this DeliverArtifactStage. + + :return: The deliver_artifact_collection of this DeliverArtifactStage. + :rtype: oci.devops.models.DeliverArtifactCollection + """ + return self._deliver_artifact_collection + + @deliver_artifact_collection.setter + def deliver_artifact_collection(self, deliver_artifact_collection): + """ + Sets the deliver_artifact_collection of this DeliverArtifactStage. + + :param deliver_artifact_collection: The deliver_artifact_collection of this DeliverArtifactStage. + :type: oci.devops.models.DeliverArtifactCollection + """ + self._deliver_artifact_collection = deliver_artifact_collection + + 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/devops/models/deliver_artifact_stage_run_progress.py b/src/oci/devops/models/deliver_artifact_stage_run_progress.py new file mode 100644 index 0000000000..d713a127f9 --- /dev/null +++ b/src/oci/devops/models/deliver_artifact_stage_run_progress.py @@ -0,0 +1,118 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .build_pipeline_stage_run_progress import BuildPipelineStageRunProgress +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 DeliverArtifactStageRunProgress(BuildPipelineStageRunProgress): + """ + Specifies DeliverArtifact stage specific exeution details. + """ + + def __init__(self, **kwargs): + """ + Initializes a new DeliverArtifactStageRunProgress object with values from keyword arguments. The default value of the :py:attr:`~oci.devops.models.DeliverArtifactStageRunProgress.build_pipeline_stage_type` attribute + of this class is ``DELIVER_ARTIFACT`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param stage_display_name: + The value to assign to the stage_display_name property of this DeliverArtifactStageRunProgress. + :type stage_display_name: str + + :param build_pipeline_stage_type: + The value to assign to the build_pipeline_stage_type property of this DeliverArtifactStageRunProgress. + :type build_pipeline_stage_type: str + + :param build_pipeline_stage_id: + The value to assign to the build_pipeline_stage_id property of this DeliverArtifactStageRunProgress. + :type build_pipeline_stage_id: str + + :param time_started: + The value to assign to the time_started property of this DeliverArtifactStageRunProgress. + :type time_started: datetime + + :param time_finished: + The value to assign to the time_finished property of this DeliverArtifactStageRunProgress. + :type time_finished: datetime + + :param status: + The value to assign to the status property of this DeliverArtifactStageRunProgress. + Allowed values for this property are: "ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED" + :type status: str + + :param build_pipeline_stage_predecessors: + The value to assign to the build_pipeline_stage_predecessors property of this DeliverArtifactStageRunProgress. + :type build_pipeline_stage_predecessors: oci.devops.models.BuildPipelineStagePredecessorCollection + + :param delivered_artifacts: + The value to assign to the delivered_artifacts property of this DeliverArtifactStageRunProgress. + :type delivered_artifacts: oci.devops.models.DeliveredArtifactCollection + + """ + self.swagger_types = { + 'stage_display_name': 'str', + 'build_pipeline_stage_type': 'str', + 'build_pipeline_stage_id': 'str', + 'time_started': 'datetime', + 'time_finished': 'datetime', + 'status': 'str', + 'build_pipeline_stage_predecessors': 'BuildPipelineStagePredecessorCollection', + 'delivered_artifacts': 'DeliveredArtifactCollection' + } + + self.attribute_map = { + 'stage_display_name': 'stageDisplayName', + 'build_pipeline_stage_type': 'buildPipelineStageType', + 'build_pipeline_stage_id': 'buildPipelineStageId', + 'time_started': 'timeStarted', + 'time_finished': 'timeFinished', + 'status': 'status', + 'build_pipeline_stage_predecessors': 'buildPipelineStagePredecessors', + 'delivered_artifacts': 'deliveredArtifacts' + } + + self._stage_display_name = None + self._build_pipeline_stage_type = None + self._build_pipeline_stage_id = None + self._time_started = None + self._time_finished = None + self._status = None + self._build_pipeline_stage_predecessors = None + self._delivered_artifacts = None + self._build_pipeline_stage_type = 'DELIVER_ARTIFACT' + + @property + def delivered_artifacts(self): + """ + Gets the delivered_artifacts of this DeliverArtifactStageRunProgress. + + :return: The delivered_artifacts of this DeliverArtifactStageRunProgress. + :rtype: oci.devops.models.DeliveredArtifactCollection + """ + return self._delivered_artifacts + + @delivered_artifacts.setter + def delivered_artifacts(self, delivered_artifacts): + """ + Sets the delivered_artifacts of this DeliverArtifactStageRunProgress. + + :param delivered_artifacts: The delivered_artifacts of this DeliverArtifactStageRunProgress. + :type: oci.devops.models.DeliveredArtifactCollection + """ + self._delivered_artifacts = delivered_artifacts + + 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/devops/models/deliver_artifact_stage_summary.py b/src/oci/devops/models/deliver_artifact_stage_summary.py new file mode 100644 index 0000000000..5233e06272 --- /dev/null +++ b/src/oci/devops/models/deliver_artifact_stage_summary.py @@ -0,0 +1,173 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .build_pipeline_stage_summary import BuildPipelineStageSummary +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 DeliverArtifactStageSummary(BuildPipelineStageSummary): + """ + Specifies the DeliverArtifact Stage. + """ + + def __init__(self, **kwargs): + """ + Initializes a new DeliverArtifactStageSummary object with values from keyword arguments. The default value of the :py:attr:`~oci.devops.models.DeliverArtifactStageSummary.build_pipeline_stage_type` attribute + of this class is ``DELIVER_ARTIFACT`` and it should not be changed. + 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 DeliverArtifactStageSummary. + :type id: str + + :param display_name: + The value to assign to the display_name property of this DeliverArtifactStageSummary. + :type display_name: str + + :param project_id: + The value to assign to the project_id property of this DeliverArtifactStageSummary. + :type project_id: str + + :param build_pipeline_id: + The value to assign to the build_pipeline_id property of this DeliverArtifactStageSummary. + :type build_pipeline_id: str + + :param compartment_id: + The value to assign to the compartment_id property of this DeliverArtifactStageSummary. + :type compartment_id: str + + :param build_pipeline_stage_type: + The value to assign to the build_pipeline_stage_type property of this DeliverArtifactStageSummary. + :type build_pipeline_stage_type: str + + :param time_created: + The value to assign to the time_created property of this DeliverArtifactStageSummary. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this DeliverArtifactStageSummary. + :type time_updated: datetime + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this DeliverArtifactStageSummary. + :type lifecycle_state: str + + :param lifecycle_details: + The value to assign to the lifecycle_details property of this DeliverArtifactStageSummary. + :type lifecycle_details: str + + :param description: + The value to assign to the description property of this DeliverArtifactStageSummary. + :type description: str + + :param build_pipeline_stage_predecessor_collection: + The value to assign to the build_pipeline_stage_predecessor_collection property of this DeliverArtifactStageSummary. + :type build_pipeline_stage_predecessor_collection: oci.devops.models.BuildPipelineStagePredecessorCollection + + :param freeform_tags: + The value to assign to the freeform_tags property of this DeliverArtifactStageSummary. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this DeliverArtifactStageSummary. + :type defined_tags: dict(str, dict(str, object)) + + :param system_tags: + The value to assign to the system_tags property of this DeliverArtifactStageSummary. + :type system_tags: dict(str, dict(str, object)) + + :param deliver_artifact_collection: + The value to assign to the deliver_artifact_collection property of this DeliverArtifactStageSummary. + :type deliver_artifact_collection: oci.devops.models.DeliverArtifactCollection + + """ + self.swagger_types = { + 'id': 'str', + 'display_name': 'str', + 'project_id': 'str', + 'build_pipeline_id': 'str', + 'compartment_id': 'str', + 'build_pipeline_stage_type': 'str', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'lifecycle_state': 'str', + 'lifecycle_details': 'str', + 'description': 'str', + 'build_pipeline_stage_predecessor_collection': 'BuildPipelineStagePredecessorCollection', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'system_tags': 'dict(str, dict(str, object))', + 'deliver_artifact_collection': 'DeliverArtifactCollection' + } + + self.attribute_map = { + 'id': 'id', + 'display_name': 'displayName', + 'project_id': 'projectId', + 'build_pipeline_id': 'buildPipelineId', + 'compartment_id': 'compartmentId', + 'build_pipeline_stage_type': 'buildPipelineStageType', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'lifecycle_state': 'lifecycleState', + 'lifecycle_details': 'lifecycleDetails', + 'description': 'description', + 'build_pipeline_stage_predecessor_collection': 'buildPipelineStagePredecessorCollection', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'system_tags': 'systemTags', + 'deliver_artifact_collection': 'deliverArtifactCollection' + } + + self._id = None + self._display_name = None + self._project_id = None + self._build_pipeline_id = None + self._compartment_id = None + self._build_pipeline_stage_type = None + self._time_created = None + self._time_updated = None + self._lifecycle_state = None + self._lifecycle_details = None + self._description = None + self._build_pipeline_stage_predecessor_collection = None + self._freeform_tags = None + self._defined_tags = None + self._system_tags = None + self._deliver_artifact_collection = None + self._build_pipeline_stage_type = 'DELIVER_ARTIFACT' + + @property + def deliver_artifact_collection(self): + """ + **[Required]** Gets the deliver_artifact_collection of this DeliverArtifactStageSummary. + + :return: The deliver_artifact_collection of this DeliverArtifactStageSummary. + :rtype: oci.devops.models.DeliverArtifactCollection + """ + return self._deliver_artifact_collection + + @deliver_artifact_collection.setter + def deliver_artifact_collection(self, deliver_artifact_collection): + """ + Sets the deliver_artifact_collection of this DeliverArtifactStageSummary. + + :param deliver_artifact_collection: The deliver_artifact_collection of this DeliverArtifactStageSummary. + :type: oci.devops.models.DeliverArtifactCollection + """ + self._deliver_artifact_collection = deliver_artifact_collection + + 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/devops/models/delivered_artifact.py b/src/oci/devops/models/delivered_artifact.py new file mode 100644 index 0000000000..38bb9fd4e1 --- /dev/null +++ b/src/oci/devops/models/delivered_artifact.py @@ -0,0 +1,169 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 DeliveredArtifact(object): + """ + Details of the Artifact delivered via DeliverArtifactStage. + """ + + #: A constant which can be used with the artifact_type property of a DeliveredArtifact. + #: This constant has a value of "GENERIC_ARTIFACT" + ARTIFACT_TYPE_GENERIC_ARTIFACT = "GENERIC_ARTIFACT" + + #: A constant which can be used with the artifact_type property of a DeliveredArtifact. + #: This constant has a value of "OCIR" + ARTIFACT_TYPE_OCIR = "OCIR" + + def __init__(self, **kwargs): + """ + Initializes a new DeliveredArtifact object with values from keyword arguments. This class has the following subclasses and if you are using this class as input + to a service operations then you should favor using a subclass over the base class: + + * :class:`~oci.devops.models.ContainerRegistryDeliveredArtifact` + * :class:`~oci.devops.models.GenericDeliveredArtifact` + + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param deploy_artifact_id: + The value to assign to the deploy_artifact_id property of this DeliveredArtifact. + :type deploy_artifact_id: str + + :param output_artifact_name: + The value to assign to the output_artifact_name property of this DeliveredArtifact. + :type output_artifact_name: str + + :param artifact_type: + The value to assign to the artifact_type property of this DeliveredArtifact. + Allowed values for this property are: "GENERIC_ARTIFACT", "OCIR", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type artifact_type: str + + """ + self.swagger_types = { + 'deploy_artifact_id': 'str', + 'output_artifact_name': 'str', + 'artifact_type': 'str' + } + + self.attribute_map = { + 'deploy_artifact_id': 'deployArtifactId', + 'output_artifact_name': 'outputArtifactName', + 'artifact_type': 'artifactType' + } + + self._deploy_artifact_id = None + self._output_artifact_name = None + self._artifact_type = None + + @staticmethod + def get_subtype(object_dictionary): + """ + Given the hash representation of a subtype of this class, + use the info in the hash to return the class of the subtype. + """ + type = object_dictionary['artifactType'] + + if type == 'OCIR': + return 'ContainerRegistryDeliveredArtifact' + + if type == 'GENERIC_ARTIFACT': + return 'GenericDeliveredArtifact' + else: + return 'DeliveredArtifact' + + @property + def deploy_artifact_id(self): + """ + **[Required]** Gets the deploy_artifact_id of this DeliveredArtifact. + The OCID of the deploy artifact definition + + + :return: The deploy_artifact_id of this DeliveredArtifact. + :rtype: str + """ + return self._deploy_artifact_id + + @deploy_artifact_id.setter + def deploy_artifact_id(self, deploy_artifact_id): + """ + Sets the deploy_artifact_id of this DeliveredArtifact. + The OCID of the deploy artifact definition + + + :param deploy_artifact_id: The deploy_artifact_id of this DeliveredArtifact. + :type: str + """ + self._deploy_artifact_id = deploy_artifact_id + + @property + def output_artifact_name(self): + """ + **[Required]** Gets the output_artifact_name of this DeliveredArtifact. + Name of the output artifact defined in the build spec + + + :return: The output_artifact_name of this DeliveredArtifact. + :rtype: str + """ + return self._output_artifact_name + + @output_artifact_name.setter + def output_artifact_name(self, output_artifact_name): + """ + Sets the output_artifact_name of this DeliveredArtifact. + Name of the output artifact defined in the build spec + + + :param output_artifact_name: The output_artifact_name of this DeliveredArtifact. + :type: str + """ + self._output_artifact_name = output_artifact_name + + @property + def artifact_type(self): + """ + **[Required]** Gets the artifact_type of this DeliveredArtifact. + Type of Artifact Delivered + + Allowed values for this property are: "GENERIC_ARTIFACT", "OCIR", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The artifact_type of this DeliveredArtifact. + :rtype: str + """ + return self._artifact_type + + @artifact_type.setter + def artifact_type(self, artifact_type): + """ + Sets the artifact_type of this DeliveredArtifact. + Type of Artifact Delivered + + + :param artifact_type: The artifact_type of this DeliveredArtifact. + :type: str + """ + allowed_values = ["GENERIC_ARTIFACT", "OCIR"] + if not value_allowed_none_or_none_sentinel(artifact_type, allowed_values): + artifact_type = 'UNKNOWN_ENUM_VALUE' + self._artifact_type = artifact_type + + 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/devops/models/delivered_artifact_collection.py b/src/oci/devops/models/delivered_artifact_collection.py new file mode 100644 index 0000000000..26db5daec4 --- /dev/null +++ b/src/oci/devops/models/delivered_artifact_collection.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 DeliveredArtifactCollection(object): + """ + Specifies the list of Artifacts delivered via DeliverArtifactStage + """ + + def __init__(self, **kwargs): + """ + Initializes a new DeliveredArtifactCollection object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param items: + The value to assign to the items property of this DeliveredArtifactCollection. + :type items: list[oci.devops.models.DeliveredArtifact] + + """ + self.swagger_types = { + 'items': 'list[DeliveredArtifact]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this DeliveredArtifactCollection. + List of Artifacts delivered via DeliverArtifactStage + + + :return: The items of this DeliveredArtifactCollection. + :rtype: list[oci.devops.models.DeliveredArtifact] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this DeliveredArtifactCollection. + List of Artifacts delivered via DeliverArtifactStage + + + :param items: The items of this DeliveredArtifactCollection. + :type: list[oci.devops.models.DeliveredArtifact] + """ + self._items = items + + 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/devops/models/deploy_stage_execution_progress.py b/src/oci/devops/models/deploy_stage_execution_progress.py index 9675a5abb1..e0f04ccdab 100644 --- a/src/oci/devops/models/deploy_stage_execution_progress.py +++ b/src/oci/devops/models/deploy_stage_execution_progress.py @@ -54,20 +54,13 @@ def __init__(self, **kwargs): Initializes a new DeployStageExecutionProgress object with values from keyword arguments. This class has the following subclasses and if you are using this class as input to a service operations then you should favor using a subclass over the base class: - * :class:`~oci.devops.models.ComputeInstanceGroupBlueGreenTrafficShiftDeployStageExecutionProgress` - * :class:`~oci.devops.models.ComputeInstanceGroupCanaryDeployStageExecutionProgress` - * :class:`~oci.devops.models.ComputeInstanceGroupDeployStageExecutionProgress` - * :class:`~oci.devops.models.LoadBalancerTrafficShiftDeployStageExecutionProgress` - * :class:`~oci.devops.models.WaitDeployStageExecutionProgress` - * :class:`~oci.devops.models.ComputeInstanceGroupCanaryTrafficShiftDeployStageExecutionProgress` - * :class:`~oci.devops.models.RunValidationTestOnComputeInstanceDeployStageExecutionProgress` * :class:`~oci.devops.models.ManualApprovalDeployStageExecutionProgress` - * :class:`~oci.devops.models.RunPipelineDeployStageExecutionProgress` + * :class:`~oci.devops.models.ComputeInstanceGroupDeployStageExecutionProgress` * :class:`~oci.devops.models.OkeDeployStageExecutionProgress` + * :class:`~oci.devops.models.LoadBalancerTrafficShiftDeployStageExecutionProgress` * :class:`~oci.devops.models.FunctionDeployStageExecutionProgress` * :class:`~oci.devops.models.InvokeFunctionDeployStageExecutionProgress` - * :class:`~oci.devops.models.ComputeInstanceGroupCanaryApprovalDeployStageExecutionProgress` - * :class:`~oci.devops.models.ComputeInstanceGroupBlueGreenDeployStageExecutionProgress` + * :class:`~oci.devops.models.WaitDeployStageExecutionProgress` The following keyword arguments are supported (corresponding to the getters/setters of this class): @@ -145,47 +138,26 @@ def get_subtype(object_dictionary): """ type = object_dictionary['deployStageType'] - if type == 'COMPUTE_INSTANCE_GROUP_BLUE_GREEN_TRAFFIC_SHIFT': - return 'ComputeInstanceGroupBlueGreenTrafficShiftDeployStageExecutionProgress' - - if type == 'COMPUTE_INSTANCE_GROUP_CANARY_DEPLOYMENT': - return 'ComputeInstanceGroupCanaryDeployStageExecutionProgress' - - if type == 'COMPUTE_INSTANCE_GROUP_ROLLING_DEPLOYMENT': - return 'ComputeInstanceGroupDeployStageExecutionProgress' - - if type == 'LOAD_BALANCER_TRAFFIC_SHIFT': - return 'LoadBalancerTrafficShiftDeployStageExecutionProgress' - - if type == 'WAIT': - return 'WaitDeployStageExecutionProgress' - - if type == 'COMPUTE_INSTANCE_GROUP_CANARY_TRAFFIC_SHIFT': - return 'ComputeInstanceGroupCanaryTrafficShiftDeployStageExecutionProgress' - - if type == 'RUN_VALIDATION_TEST_ON_COMPUTE_INSTANCE': - return 'RunValidationTestOnComputeInstanceDeployStageExecutionProgress' - if type == 'MANUAL_APPROVAL': return 'ManualApprovalDeployStageExecutionProgress' - if type == 'RUN_DEPLOYMENT_PIPELINE': - return 'RunPipelineDeployStageExecutionProgress' + if type == 'COMPUTE_INSTANCE_GROUP_ROLLING_DEPLOYMENT': + return 'ComputeInstanceGroupDeployStageExecutionProgress' if type == 'OKE_DEPLOYMENT': return 'OkeDeployStageExecutionProgress' + if type == 'LOAD_BALANCER_TRAFFIC_SHIFT': + return 'LoadBalancerTrafficShiftDeployStageExecutionProgress' + if type == 'DEPLOY_FUNCTION': return 'FunctionDeployStageExecutionProgress' if type == 'INVOKE_FUNCTION': return 'InvokeFunctionDeployStageExecutionProgress' - if type == 'COMPUTE_INSTANCE_GROUP_CANARY_APPROVAL': - return 'ComputeInstanceGroupCanaryApprovalDeployStageExecutionProgress' - - if type == 'COMPUTE_INSTANCE_GROUP_BLUE_GREEN_DEPLOYMENT': - return 'ComputeInstanceGroupBlueGreenDeployStageExecutionProgress' + if type == 'WAIT': + return 'WaitDeployStageExecutionProgress' else: return 'DeployStageExecutionProgress' diff --git a/src/oci/devops/models/devops_code_repository_build_run_source.py b/src/oci/devops/models/devops_code_repository_build_run_source.py new file mode 100644 index 0000000000..8d27e3319c --- /dev/null +++ b/src/oci/devops/models/devops_code_repository_build_run_source.py @@ -0,0 +1,138 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .build_run_source import BuildRunSource +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 DevopsCodeRepositoryBuildRunSource(BuildRunSource): + """ + Specifies details of build run through Devops Code Repository. + """ + + def __init__(self, **kwargs): + """ + Initializes a new DevopsCodeRepositoryBuildRunSource object with values from keyword arguments. The default value of the :py:attr:`~oci.devops.models.DevopsCodeRepositoryBuildRunSource.source_type` attribute + of this class is ``DEVOPS_CODE_REPOSITORY`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param source_type: + The value to assign to the source_type property of this DevopsCodeRepositoryBuildRunSource. + Allowed values for this property are: "MANUAL", "GITHUB", "GITLAB", "DEVOPS_CODE_REPOSITORY" + :type source_type: str + + :param trigger_id: + The value to assign to the trigger_id property of this DevopsCodeRepositoryBuildRunSource. + :type trigger_id: str + + :param trigger_info: + The value to assign to the trigger_info property of this DevopsCodeRepositoryBuildRunSource. + :type trigger_info: oci.devops.models.TriggerInfo + + :param repository_id: + The value to assign to the repository_id property of this DevopsCodeRepositoryBuildRunSource. + :type repository_id: str + + """ + self.swagger_types = { + 'source_type': 'str', + 'trigger_id': 'str', + 'trigger_info': 'TriggerInfo', + 'repository_id': 'str' + } + + self.attribute_map = { + 'source_type': 'sourceType', + 'trigger_id': 'triggerId', + 'trigger_info': 'triggerInfo', + 'repository_id': 'repositoryId' + } + + self._source_type = None + self._trigger_id = None + self._trigger_info = None + self._repository_id = None + self._source_type = 'DEVOPS_CODE_REPOSITORY' + + @property + def trigger_id(self): + """ + **[Required]** Gets the trigger_id of this DevopsCodeRepositoryBuildRunSource. + The Trigger that invoked this build run + + + :return: The trigger_id of this DevopsCodeRepositoryBuildRunSource. + :rtype: str + """ + return self._trigger_id + + @trigger_id.setter + def trigger_id(self, trigger_id): + """ + Sets the trigger_id of this DevopsCodeRepositoryBuildRunSource. + The Trigger that invoked this build run + + + :param trigger_id: The trigger_id of this DevopsCodeRepositoryBuildRunSource. + :type: str + """ + self._trigger_id = trigger_id + + @property + def trigger_info(self): + """ + **[Required]** Gets the trigger_info of this DevopsCodeRepositoryBuildRunSource. + + :return: The trigger_info of this DevopsCodeRepositoryBuildRunSource. + :rtype: oci.devops.models.TriggerInfo + """ + return self._trigger_info + + @trigger_info.setter + def trigger_info(self, trigger_info): + """ + Sets the trigger_info of this DevopsCodeRepositoryBuildRunSource. + + :param trigger_info: The trigger_info of this DevopsCodeRepositoryBuildRunSource. + :type: oci.devops.models.TriggerInfo + """ + self._trigger_info = trigger_info + + @property + def repository_id(self): + """ + **[Required]** Gets the repository_id of this DevopsCodeRepositoryBuildRunSource. + The Devops Code Repository RepoId that invoked this build run + + + :return: The repository_id of this DevopsCodeRepositoryBuildRunSource. + :rtype: str + """ + return self._repository_id + + @repository_id.setter + def repository_id(self, repository_id): + """ + Sets the repository_id of this DevopsCodeRepositoryBuildRunSource. + The Devops Code Repository RepoId that invoked this build run + + + :param repository_id: The repository_id of this DevopsCodeRepositoryBuildRunSource. + :type: str + """ + self._repository_id = repository_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/devops/models/devops_code_repository_build_source.py b/src/oci/devops/models/devops_code_repository_build_source.py new file mode 100644 index 0000000000..4e1f6c26e1 --- /dev/null +++ b/src/oci/devops/models/devops_code_repository_build_source.py @@ -0,0 +1,101 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .build_source import BuildSource +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 DevopsCodeRepositoryBuildSource(BuildSource): + """ + Devops Code Repository Build Source for Build Stage + """ + + def __init__(self, **kwargs): + """ + Initializes a new DevopsCodeRepositoryBuildSource object with values from keyword arguments. The default value of the :py:attr:`~oci.devops.models.DevopsCodeRepositoryBuildSource.connection_type` attribute + of this class is ``DEVOPS_CODE_REPOSITORY`` and it should not be changed. + 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 DevopsCodeRepositoryBuildSource. + :type name: str + + :param connection_type: + The value to assign to the connection_type property of this DevopsCodeRepositoryBuildSource. + Allowed values for this property are: "GITHUB", "GITLAB", "DEVOPS_CODE_REPOSITORY" + :type connection_type: str + + :param repository_url: + The value to assign to the repository_url property of this DevopsCodeRepositoryBuildSource. + :type repository_url: str + + :param branch: + The value to assign to the branch property of this DevopsCodeRepositoryBuildSource. + :type branch: str + + :param repository_id: + The value to assign to the repository_id property of this DevopsCodeRepositoryBuildSource. + :type repository_id: str + + """ + self.swagger_types = { + 'name': 'str', + 'connection_type': 'str', + 'repository_url': 'str', + 'branch': 'str', + 'repository_id': 'str' + } + + self.attribute_map = { + 'name': 'name', + 'connection_type': 'connectionType', + 'repository_url': 'repositoryUrl', + 'branch': 'branch', + 'repository_id': 'repositoryId' + } + + self._name = None + self._connection_type = None + self._repository_url = None + self._branch = None + self._repository_id = None + self._connection_type = 'DEVOPS_CODE_REPOSITORY' + + @property + def repository_id(self): + """ + **[Required]** Gets the repository_id of this DevopsCodeRepositoryBuildSource. + The Devops Code Repository Id + + + :return: The repository_id of this DevopsCodeRepositoryBuildSource. + :rtype: str + """ + return self._repository_id + + @repository_id.setter + def repository_id(self, repository_id): + """ + Sets the repository_id of this DevopsCodeRepositoryBuildSource. + The Devops Code Repository Id + + + :param repository_id: The repository_id of this DevopsCodeRepositoryBuildSource. + :type: str + """ + self._repository_id = repository_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/devops/models/devops_code_repository_filter.py b/src/oci/devops/models/devops_code_repository_filter.py new file mode 100644 index 0000000000..6a37d0bf89 --- /dev/null +++ b/src/oci/devops/models/devops_code_repository_filter.py @@ -0,0 +1,118 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .filter import Filter +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 DevopsCodeRepositoryFilter(Filter): + """ + The filter for Gitlab events + """ + + #: A constant which can be used with the events property of a DevopsCodeRepositoryFilter. + #: This constant has a value of "PUSH" + EVENTS_PUSH = "PUSH" + + def __init__(self, **kwargs): + """ + Initializes a new DevopsCodeRepositoryFilter object with values from keyword arguments. The default value of the :py:attr:`~oci.devops.models.DevopsCodeRepositoryFilter.trigger_source` attribute + of this class is ``DEVOPS_CODE_REPOSITORY`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param trigger_source: + The value to assign to the trigger_source property of this DevopsCodeRepositoryFilter. + :type trigger_source: str + + :param events: + The value to assign to the events property of this DevopsCodeRepositoryFilter. + Allowed values for items in this list are: "PUSH", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type events: list[str] + + :param include: + The value to assign to the include property of this DevopsCodeRepositoryFilter. + :type include: oci.devops.models.DevopsCodeRepositoryFilterAttributes + + """ + self.swagger_types = { + 'trigger_source': 'str', + 'events': 'list[str]', + 'include': 'DevopsCodeRepositoryFilterAttributes' + } + + self.attribute_map = { + 'trigger_source': 'triggerSource', + 'events': 'events', + 'include': 'include' + } + + self._trigger_source = None + self._events = None + self._include = None + self._trigger_source = 'DEVOPS_CODE_REPOSITORY' + + @property + def events(self): + """ + Gets the events of this DevopsCodeRepositoryFilter. + The events, only support PUSH at this time + + Allowed values for items in this list are: "PUSH", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The events of this DevopsCodeRepositoryFilter. + :rtype: list[str] + """ + return self._events + + @events.setter + def events(self, events): + """ + Sets the events of this DevopsCodeRepositoryFilter. + The events, only support PUSH at this time + + + :param events: The events of this DevopsCodeRepositoryFilter. + :type: list[str] + """ + allowed_values = ["PUSH"] + if events: + events[:] = ['UNKNOWN_ENUM_VALUE' if not value_allowed_none_or_none_sentinel(x, allowed_values) else x for x in events] + self._events = events + + @property + def include(self): + """ + Gets the include of this DevopsCodeRepositoryFilter. + + :return: The include of this DevopsCodeRepositoryFilter. + :rtype: oci.devops.models.DevopsCodeRepositoryFilterAttributes + """ + return self._include + + @include.setter + def include(self, include): + """ + Sets the include of this DevopsCodeRepositoryFilter. + + :param include: The include of this DevopsCodeRepositoryFilter. + :type: oci.devops.models.DevopsCodeRepositoryFilterAttributes + """ + self._include = include + + 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/devops/models/devops_code_repository_filter_attributes.py b/src/oci/devops/models/devops_code_repository_filter_attributes.py new file mode 100644 index 0000000000..ccbf10d77b --- /dev/null +++ b/src/oci/devops/models/devops_code_repository_filter_attributes.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 DevopsCodeRepositoryFilterAttributes(object): + """ + Attributes to filter Devops Code Repository events + """ + + def __init__(self, **kwargs): + """ + Initializes a new DevopsCodeRepositoryFilterAttributes object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param head_ref: + The value to assign to the head_ref property of this DevopsCodeRepositoryFilterAttributes. + :type head_ref: str + + """ + self.swagger_types = { + 'head_ref': 'str' + } + + self.attribute_map = { + 'head_ref': 'headRef' + } + + self._head_ref = None + + @property + def head_ref(self): + """ + Gets the head_ref of this DevopsCodeRepositoryFilterAttributes. + Branch for push event + + + :return: The head_ref of this DevopsCodeRepositoryFilterAttributes. + :rtype: str + """ + return self._head_ref + + @head_ref.setter + def head_ref(self, head_ref): + """ + Sets the head_ref of this DevopsCodeRepositoryFilterAttributes. + Branch for push event + + + :param head_ref: The head_ref of this DevopsCodeRepositoryFilterAttributes. + :type: str + """ + self._head_ref = head_ref + + 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/devops/models/devops_code_repository_trigger.py b/src/oci/devops/models/devops_code_repository_trigger.py new file mode 100644 index 0000000000..7368754b76 --- /dev/null +++ b/src/oci/devops/models/devops_code_repository_trigger.py @@ -0,0 +1,172 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .trigger import Trigger +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 DevopsCodeRepositoryTrigger(Trigger): + """ + Trigger specific to OCI Devops Repository Service + """ + + def __init__(self, **kwargs): + """ + Initializes a new DevopsCodeRepositoryTrigger object with values from keyword arguments. The default value of the :py:attr:`~oci.devops.models.DevopsCodeRepositoryTrigger.trigger_source` attribute + of this class is ``DEVOPS_CODE_REPOSITORY`` and it should not be changed. + 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 DevopsCodeRepositoryTrigger. + :type id: str + + :param display_name: + The value to assign to the display_name property of this DevopsCodeRepositoryTrigger. + :type display_name: str + + :param description: + The value to assign to the description property of this DevopsCodeRepositoryTrigger. + :type description: str + + :param project_id: + The value to assign to the project_id property of this DevopsCodeRepositoryTrigger. + :type project_id: str + + :param compartment_id: + The value to assign to the compartment_id property of this DevopsCodeRepositoryTrigger. + :type compartment_id: str + + :param trigger_source: + The value to assign to the trigger_source property of this DevopsCodeRepositoryTrigger. + Allowed values for this property are: "GITHUB", "GITLAB", "DEVOPS_CODE_REPOSITORY" + :type trigger_source: str + + :param time_created: + The value to assign to the time_created property of this DevopsCodeRepositoryTrigger. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this DevopsCodeRepositoryTrigger. + :type time_updated: datetime + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this DevopsCodeRepositoryTrigger. + Allowed values for this property are: "ACTIVE" + :type lifecycle_state: str + + :param lifecycle_details: + The value to assign to the lifecycle_details property of this DevopsCodeRepositoryTrigger. + :type lifecycle_details: str + + :param actions: + The value to assign to the actions property of this DevopsCodeRepositoryTrigger. + :type actions: list[oci.devops.models.TriggerAction] + + :param freeform_tags: + The value to assign to the freeform_tags property of this DevopsCodeRepositoryTrigger. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this DevopsCodeRepositoryTrigger. + :type defined_tags: dict(str, dict(str, object)) + + :param system_tags: + The value to assign to the system_tags property of this DevopsCodeRepositoryTrigger. + :type system_tags: dict(str, dict(str, object)) + + :param repository_id: + The value to assign to the repository_id property of this DevopsCodeRepositoryTrigger. + :type repository_id: str + + """ + self.swagger_types = { + 'id': 'str', + 'display_name': 'str', + 'description': 'str', + 'project_id': 'str', + 'compartment_id': 'str', + 'trigger_source': 'str', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'lifecycle_state': 'str', + 'lifecycle_details': 'str', + 'actions': 'list[TriggerAction]', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'system_tags': 'dict(str, dict(str, object))', + 'repository_id': 'str' + } + + self.attribute_map = { + 'id': 'id', + 'display_name': 'displayName', + 'description': 'description', + 'project_id': 'projectId', + 'compartment_id': 'compartmentId', + 'trigger_source': 'triggerSource', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'lifecycle_state': 'lifecycleState', + 'lifecycle_details': 'lifecycleDetails', + 'actions': 'actions', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'system_tags': 'systemTags', + 'repository_id': 'repositoryId' + } + + self._id = None + self._display_name = None + self._description = None + self._project_id = None + self._compartment_id = None + self._trigger_source = None + self._time_created = None + self._time_updated = None + self._lifecycle_state = None + self._lifecycle_details = None + self._actions = None + self._freeform_tags = None + self._defined_tags = None + self._system_tags = None + self._repository_id = None + self._trigger_source = 'DEVOPS_CODE_REPOSITORY' + + @property + def repository_id(self): + """ + **[Required]** Gets the repository_id of this DevopsCodeRepositoryTrigger. + The OCID of OCI Devops Repository + + + :return: The repository_id of this DevopsCodeRepositoryTrigger. + :rtype: str + """ + return self._repository_id + + @repository_id.setter + def repository_id(self, repository_id): + """ + Sets the repository_id of this DevopsCodeRepositoryTrigger. + The OCID of OCI Devops Repository + + + :param repository_id: The repository_id of this DevopsCodeRepositoryTrigger. + :type: str + """ + self._repository_id = repository_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/devops/models/devops_code_repository_trigger_create_result.py b/src/oci/devops/models/devops_code_repository_trigger_create_result.py new file mode 100644 index 0000000000..afdef5f9f1 --- /dev/null +++ b/src/oci/devops/models/devops_code_repository_trigger_create_result.py @@ -0,0 +1,170 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .trigger_create_result import TriggerCreateResult +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 DevopsCodeRepositoryTriggerCreateResult(TriggerCreateResult): + """ + Trigger Create response specific to Gitlab + """ + + def __init__(self, **kwargs): + """ + Initializes a new DevopsCodeRepositoryTriggerCreateResult object with values from keyword arguments. The default value of the :py:attr:`~oci.devops.models.DevopsCodeRepositoryTriggerCreateResult.trigger_source` attribute + of this class is ``DEVOPS_CODE_REPOSITORY`` and it should not be changed. + 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 DevopsCodeRepositoryTriggerCreateResult. + :type id: str + + :param display_name: + The value to assign to the display_name property of this DevopsCodeRepositoryTriggerCreateResult. + :type display_name: str + + :param description: + The value to assign to the description property of this DevopsCodeRepositoryTriggerCreateResult. + :type description: str + + :param project_id: + The value to assign to the project_id property of this DevopsCodeRepositoryTriggerCreateResult. + :type project_id: str + + :param compartment_id: + The value to assign to the compartment_id property of this DevopsCodeRepositoryTriggerCreateResult. + :type compartment_id: str + + :param trigger_source: + The value to assign to the trigger_source property of this DevopsCodeRepositoryTriggerCreateResult. + :type trigger_source: str + + :param time_created: + The value to assign to the time_created property of this DevopsCodeRepositoryTriggerCreateResult. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this DevopsCodeRepositoryTriggerCreateResult. + :type time_updated: datetime + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this DevopsCodeRepositoryTriggerCreateResult. + :type lifecycle_state: str + + :param lifecycle_details: + The value to assign to the lifecycle_details property of this DevopsCodeRepositoryTriggerCreateResult. + :type lifecycle_details: str + + :param actions: + The value to assign to the actions property of this DevopsCodeRepositoryTriggerCreateResult. + :type actions: list[oci.devops.models.TriggerAction] + + :param freeform_tags: + The value to assign to the freeform_tags property of this DevopsCodeRepositoryTriggerCreateResult. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this DevopsCodeRepositoryTriggerCreateResult. + :type defined_tags: dict(str, dict(str, object)) + + :param system_tags: + The value to assign to the system_tags property of this DevopsCodeRepositoryTriggerCreateResult. + :type system_tags: dict(str, dict(str, object)) + + :param repository_id: + The value to assign to the repository_id property of this DevopsCodeRepositoryTriggerCreateResult. + :type repository_id: str + + """ + self.swagger_types = { + 'id': 'str', + 'display_name': 'str', + 'description': 'str', + 'project_id': 'str', + 'compartment_id': 'str', + 'trigger_source': 'str', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'lifecycle_state': 'str', + 'lifecycle_details': 'str', + 'actions': 'list[TriggerAction]', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'system_tags': 'dict(str, dict(str, object))', + 'repository_id': 'str' + } + + self.attribute_map = { + 'id': 'id', + 'display_name': 'displayName', + 'description': 'description', + 'project_id': 'projectId', + 'compartment_id': 'compartmentId', + 'trigger_source': 'triggerSource', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'lifecycle_state': 'lifecycleState', + 'lifecycle_details': 'lifecycleDetails', + 'actions': 'actions', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'system_tags': 'systemTags', + 'repository_id': 'repositoryId' + } + + self._id = None + self._display_name = None + self._description = None + self._project_id = None + self._compartment_id = None + self._trigger_source = None + self._time_created = None + self._time_updated = None + self._lifecycle_state = None + self._lifecycle_details = None + self._actions = None + self._freeform_tags = None + self._defined_tags = None + self._system_tags = None + self._repository_id = None + self._trigger_source = 'DEVOPS_CODE_REPOSITORY' + + @property + def repository_id(self): + """ + **[Required]** Gets the repository_id of this DevopsCodeRepositoryTriggerCreateResult. + The id of the OCI Devops Repository + + + :return: The repository_id of this DevopsCodeRepositoryTriggerCreateResult. + :rtype: str + """ + return self._repository_id + + @repository_id.setter + def repository_id(self, repository_id): + """ + Sets the repository_id of this DevopsCodeRepositoryTriggerCreateResult. + The id of the OCI Devops Repository + + + :param repository_id: The repository_id of this DevopsCodeRepositoryTriggerCreateResult. + :type: str + """ + self._repository_id = repository_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/devops/models/devops_code_repository_trigger_summary.py b/src/oci/devops/models/devops_code_repository_trigger_summary.py new file mode 100644 index 0000000000..f61c3b88e8 --- /dev/null +++ b/src/oci/devops/models/devops_code_repository_trigger_summary.py @@ -0,0 +1,163 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .trigger_summary import TriggerSummary +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 DevopsCodeRepositoryTriggerSummary(TriggerSummary): + """ + Summary of the Devops Code Repository Trigger. + """ + + def __init__(self, **kwargs): + """ + Initializes a new DevopsCodeRepositoryTriggerSummary object with values from keyword arguments. The default value of the :py:attr:`~oci.devops.models.DevopsCodeRepositoryTriggerSummary.trigger_source` attribute + of this class is ``DEVOPS_CODE_REPOSITORY`` and it should not be changed. + 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 DevopsCodeRepositoryTriggerSummary. + :type id: str + + :param display_name: + The value to assign to the display_name property of this DevopsCodeRepositoryTriggerSummary. + :type display_name: str + + :param description: + The value to assign to the description property of this DevopsCodeRepositoryTriggerSummary. + :type description: str + + :param project_id: + The value to assign to the project_id property of this DevopsCodeRepositoryTriggerSummary. + :type project_id: str + + :param compartment_id: + The value to assign to the compartment_id property of this DevopsCodeRepositoryTriggerSummary. + :type compartment_id: str + + :param trigger_source: + The value to assign to the trigger_source property of this DevopsCodeRepositoryTriggerSummary. + :type trigger_source: str + + :param time_created: + The value to assign to the time_created property of this DevopsCodeRepositoryTriggerSummary. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this DevopsCodeRepositoryTriggerSummary. + :type time_updated: datetime + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this DevopsCodeRepositoryTriggerSummary. + :type lifecycle_state: str + + :param lifecycle_details: + The value to assign to the lifecycle_details property of this DevopsCodeRepositoryTriggerSummary. + :type lifecycle_details: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this DevopsCodeRepositoryTriggerSummary. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this DevopsCodeRepositoryTriggerSummary. + :type defined_tags: dict(str, dict(str, object)) + + :param system_tags: + The value to assign to the system_tags property of this DevopsCodeRepositoryTriggerSummary. + :type system_tags: dict(str, dict(str, object)) + + :param repository_id: + The value to assign to the repository_id property of this DevopsCodeRepositoryTriggerSummary. + :type repository_id: str + + """ + self.swagger_types = { + 'id': 'str', + 'display_name': 'str', + 'description': 'str', + 'project_id': 'str', + 'compartment_id': 'str', + 'trigger_source': 'str', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'lifecycle_state': 'str', + 'lifecycle_details': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'system_tags': 'dict(str, dict(str, object))', + 'repository_id': 'str' + } + + self.attribute_map = { + 'id': 'id', + 'display_name': 'displayName', + 'description': 'description', + 'project_id': 'projectId', + 'compartment_id': 'compartmentId', + 'trigger_source': 'triggerSource', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'lifecycle_state': 'lifecycleState', + 'lifecycle_details': 'lifecycleDetails', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'system_tags': 'systemTags', + 'repository_id': 'repositoryId' + } + + self._id = None + self._display_name = None + self._description = None + self._project_id = None + self._compartment_id = None + self._trigger_source = None + self._time_created = None + self._time_updated = None + self._lifecycle_state = None + self._lifecycle_details = None + self._freeform_tags = None + self._defined_tags = None + self._system_tags = None + self._repository_id = None + self._trigger_source = 'DEVOPS_CODE_REPOSITORY' + + @property + def repository_id(self): + """ + **[Required]** Gets the repository_id of this DevopsCodeRepositoryTriggerSummary. + The OCID of OCI Devops Code Repository + + + :return: The repository_id of this DevopsCodeRepositoryTriggerSummary. + :rtype: str + """ + return self._repository_id + + @repository_id.setter + def repository_id(self, repository_id): + """ + Sets the repository_id of this DevopsCodeRepositoryTriggerSummary. + The OCID of OCI Devops Code Repository + + + :param repository_id: The repository_id of this DevopsCodeRepositoryTriggerSummary. + :type: str + """ + self._repository_id = repository_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/devops/models/diff_chunk.py b/src/oci/devops/models/diff_chunk.py new file mode 100644 index 0000000000..a53894da68 --- /dev/null +++ b/src/oci/devops/models/diff_chunk.py @@ -0,0 +1,194 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 DiffChunk(object): + """ + Details about a group of changes. + """ + + def __init__(self, **kwargs): + """ + Initializes a new DiffChunk object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param base_line: + The value to assign to the base_line property of this DiffChunk. + :type base_line: int + + :param base_span: + The value to assign to the base_span property of this DiffChunk. + :type base_span: int + + :param target_line: + The value to assign to the target_line property of this DiffChunk. + :type target_line: int + + :param target_span: + The value to assign to the target_span property of this DiffChunk. + :type target_span: int + + :param diff_sections: + The value to assign to the diff_sections property of this DiffChunk. + :type diff_sections: list[oci.devops.models.DiffSection] + + """ + self.swagger_types = { + 'base_line': 'int', + 'base_span': 'int', + 'target_line': 'int', + 'target_span': 'int', + 'diff_sections': 'list[DiffSection]' + } + + self.attribute_map = { + 'base_line': 'baseLine', + 'base_span': 'baseSpan', + 'target_line': 'targetLine', + 'target_span': 'targetSpan', + 'diff_sections': 'diffSections' + } + + self._base_line = None + self._base_span = None + self._target_line = None + self._target_span = None + self._diff_sections = None + + @property + def base_line(self): + """ + Gets the base_line of this DiffChunk. + Line number in base version where changes begin. + + + :return: The base_line of this DiffChunk. + :rtype: int + """ + return self._base_line + + @base_line.setter + def base_line(self, base_line): + """ + Sets the base_line of this DiffChunk. + Line number in base version where changes begin. + + + :param base_line: The base_line of this DiffChunk. + :type: int + """ + self._base_line = base_line + + @property + def base_span(self): + """ + Gets the base_span of this DiffChunk. + Number of lines chunk spans in base version. + + + :return: The base_span of this DiffChunk. + :rtype: int + """ + return self._base_span + + @base_span.setter + def base_span(self, base_span): + """ + Sets the base_span of this DiffChunk. + Number of lines chunk spans in base version. + + + :param base_span: The base_span of this DiffChunk. + :type: int + """ + self._base_span = base_span + + @property + def target_line(self): + """ + Gets the target_line of this DiffChunk. + Line number in target version where changes begin. + + + :return: The target_line of this DiffChunk. + :rtype: int + """ + return self._target_line + + @target_line.setter + def target_line(self, target_line): + """ + Sets the target_line of this DiffChunk. + Line number in target version where changes begin. + + + :param target_line: The target_line of this DiffChunk. + :type: int + """ + self._target_line = target_line + + @property + def target_span(self): + """ + Gets the target_span of this DiffChunk. + Number of lines chunk spans in target version. + + + :return: The target_span of this DiffChunk. + :rtype: int + """ + return self._target_span + + @target_span.setter + def target_span(self, target_span): + """ + Sets the target_span of this DiffChunk. + Number of lines chunk spans in target version. + + + :param target_span: The target_span of this DiffChunk. + :type: int + """ + self._target_span = target_span + + @property + def diff_sections(self): + """ + Gets the diff_sections of this DiffChunk. + List of DiffSection. + + + :return: The diff_sections of this DiffChunk. + :rtype: list[oci.devops.models.DiffSection] + """ + return self._diff_sections + + @diff_sections.setter + def diff_sections(self, diff_sections): + """ + Sets the diff_sections of this DiffChunk. + List of DiffSection. + + + :param diff_sections: The diff_sections of this DiffChunk. + :type: list[oci.devops.models.DiffSection] + """ + self._diff_sections = diff_sections + + 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/devops/models/diff_collection.py b/src/oci/devops/models/diff_collection.py new file mode 100644 index 0000000000..2b4c9c14aa --- /dev/null +++ b/src/oci/devops/models/diff_collection.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 DiffCollection(object): + """ + Result of a compare diff. + """ + + def __init__(self, **kwargs): + """ + Initializes a new DiffCollection object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param items: + The value to assign to the items property of this DiffCollection. + :type items: list[oci.devops.models.DiffSummary] + + """ + self.swagger_types = { + 'items': 'list[DiffSummary]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this DiffCollection. + List of objects describing diffs for all changed files. + + + :return: The items of this DiffCollection. + :rtype: list[oci.devops.models.DiffSummary] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this DiffCollection. + List of objects describing diffs for all changed files. + + + :param items: The items of this DiffCollection. + :type: list[oci.devops.models.DiffSummary] + """ + self._items = items + + 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/devops/models/diff_line_details.py b/src/oci/devops/models/diff_line_details.py new file mode 100644 index 0000000000..cf47c5d84e --- /dev/null +++ b/src/oci/devops/models/diff_line_details.py @@ -0,0 +1,187 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 DiffLineDetails(object): + """ + Details about a line within the diff. + """ + + #: A constant which can be used with the conflict_marker property of a DiffLineDetails. + #: This constant has a value of "BASE" + CONFLICT_MARKER_BASE = "BASE" + + #: A constant which can be used with the conflict_marker property of a DiffLineDetails. + #: This constant has a value of "TARGET" + CONFLICT_MARKER_TARGET = "TARGET" + + #: A constant which can be used with the conflict_marker property of a DiffLineDetails. + #: This constant has a value of "MARKER" + CONFLICT_MARKER_MARKER = "MARKER" + + #: A constant which can be used with the conflict_marker property of a DiffLineDetails. + #: This constant has a value of "NONE" + CONFLICT_MARKER_NONE = "NONE" + + def __init__(self, **kwargs): + """ + Initializes a new DiffLineDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param base_line: + The value to assign to the base_line property of this DiffLineDetails. + :type base_line: int + + :param target_line: + The value to assign to the target_line property of this DiffLineDetails. + :type target_line: int + + :param line_content: + The value to assign to the line_content property of this DiffLineDetails. + :type line_content: str + + :param conflict_marker: + The value to assign to the conflict_marker property of this DiffLineDetails. + Allowed values for this property are: "BASE", "TARGET", "MARKER", "NONE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type conflict_marker: str + + """ + self.swagger_types = { + 'base_line': 'int', + 'target_line': 'int', + 'line_content': 'str', + 'conflict_marker': 'str' + } + + self.attribute_map = { + 'base_line': 'baseLine', + 'target_line': 'targetLine', + 'line_content': 'lineContent', + 'conflict_marker': 'conflictMarker' + } + + self._base_line = None + self._target_line = None + self._line_content = None + self._conflict_marker = None + + @property + def base_line(self): + """ + Gets the base_line of this DiffLineDetails. + The number of a line in the base version. + + + :return: The base_line of this DiffLineDetails. + :rtype: int + """ + return self._base_line + + @base_line.setter + def base_line(self, base_line): + """ + Sets the base_line of this DiffLineDetails. + The number of a line in the base version. + + + :param base_line: The base_line of this DiffLineDetails. + :type: int + """ + self._base_line = base_line + + @property + def target_line(self): + """ + Gets the target_line of this DiffLineDetails. + The number of a line in the target version. + + + :return: The target_line of this DiffLineDetails. + :rtype: int + """ + return self._target_line + + @target_line.setter + def target_line(self, target_line): + """ + Sets the target_line of this DiffLineDetails. + The number of a line in the target version. + + + :param target_line: The target_line of this DiffLineDetails. + :type: int + """ + self._target_line = target_line + + @property + def line_content(self): + """ + Gets the line_content of this DiffLineDetails. + The contents of a line. + + + :return: The line_content of this DiffLineDetails. + :rtype: str + """ + return self._line_content + + @line_content.setter + def line_content(self, line_content): + """ + Sets the line_content of this DiffLineDetails. + The contents of a line. + + + :param line_content: The line_content of this DiffLineDetails. + :type: str + """ + self._line_content = line_content + + @property + def conflict_marker(self): + """ + Gets the conflict_marker of this DiffLineDetails. + Indicates whether a line in a conflicted section of the diff is from the base version, the target version, or if its just a marker indicating the beginning, middle, or end of a conflicted section. + + Allowed values for this property are: "BASE", "TARGET", "MARKER", "NONE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The conflict_marker of this DiffLineDetails. + :rtype: str + """ + return self._conflict_marker + + @conflict_marker.setter + def conflict_marker(self, conflict_marker): + """ + Sets the conflict_marker of this DiffLineDetails. + Indicates whether a line in a conflicted section of the diff is from the base version, the target version, or if its just a marker indicating the beginning, middle, or end of a conflicted section. + + + :param conflict_marker: The conflict_marker of this DiffLineDetails. + :type: str + """ + allowed_values = ["BASE", "TARGET", "MARKER", "NONE"] + if not value_allowed_none_or_none_sentinel(conflict_marker, allowed_values): + conflict_marker = 'UNKNOWN_ENUM_VALUE' + self._conflict_marker = conflict_marker + + 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/devops/models/diff_response.py b/src/oci/devops/models/diff_response.py new file mode 100644 index 0000000000..e5642f2595 --- /dev/null +++ b/src/oci/devops/models/diff_response.py @@ -0,0 +1,287 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 DiffResponse(object): + """ + Response object for obtaining list of changed files. + """ + + def __init__(self, **kwargs): + """ + Initializes a new DiffResponse object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param are_all_changes_included: + The value to assign to the are_all_changes_included property of this DiffResponse. + :type are_all_changes_included: bool + + :param change_type_count: + The value to assign to the change_type_count property of this DiffResponse. + :type change_type_count: dict(str, int) + + :param common_commit: + The value to assign to the common_commit property of this DiffResponse. + :type common_commit: str + + :param commits_ahead_count: + The value to assign to the commits_ahead_count property of this DiffResponse. + :type commits_ahead_count: int + + :param commits_behind_count: + The value to assign to the commits_behind_count property of this DiffResponse. + :type commits_behind_count: int + + :param added_lines_count: + The value to assign to the added_lines_count property of this DiffResponse. + :type added_lines_count: int + + :param deleted_lines_count: + The value to assign to the deleted_lines_count property of this DiffResponse. + :type deleted_lines_count: int + + :param changes: + The value to assign to the changes property of this DiffResponse. + :type changes: list[oci.devops.models.DiffResponseEntry] + + """ + self.swagger_types = { + 'are_all_changes_included': 'bool', + 'change_type_count': 'dict(str, int)', + 'common_commit': 'str', + 'commits_ahead_count': 'int', + 'commits_behind_count': 'int', + 'added_lines_count': 'int', + 'deleted_lines_count': 'int', + 'changes': 'list[DiffResponseEntry]' + } + + self.attribute_map = { + 'are_all_changes_included': 'areAllChangesIncluded', + 'change_type_count': 'changeTypeCount', + 'common_commit': 'commonCommit', + 'commits_ahead_count': 'commitsAheadCount', + 'commits_behind_count': 'commitsBehindCount', + 'added_lines_count': 'addedLinesCount', + 'deleted_lines_count': 'deletedLinesCount', + 'changes': 'changes' + } + + self._are_all_changes_included = None + self._change_type_count = None + self._common_commit = None + self._commits_ahead_count = None + self._commits_behind_count = None + self._added_lines_count = None + self._deleted_lines_count = None + self._changes = None + + @property + def are_all_changes_included(self): + """ + Gets the are_all_changes_included of this DiffResponse. + Boolean for whether all changes are included in the response. + + + :return: The are_all_changes_included of this DiffResponse. + :rtype: bool + """ + return self._are_all_changes_included + + @are_all_changes_included.setter + def are_all_changes_included(self, are_all_changes_included): + """ + Sets the are_all_changes_included of this DiffResponse. + Boolean for whether all changes are included in the response. + + + :param are_all_changes_included: The are_all_changes_included of this DiffResponse. + :type: bool + """ + self._are_all_changes_included = are_all_changes_included + + @property + def change_type_count(self): + """ + Gets the change_type_count of this DiffResponse. + Count of each type of change in diff. + + + :return: The change_type_count of this DiffResponse. + :rtype: dict(str, int) + """ + return self._change_type_count + + @change_type_count.setter + def change_type_count(self, change_type_count): + """ + Sets the change_type_count of this DiffResponse. + Count of each type of change in diff. + + + :param change_type_count: The change_type_count of this DiffResponse. + :type: dict(str, int) + """ + self._change_type_count = change_type_count + + @property + def common_commit(self): + """ + Gets the common_commit of this DiffResponse. + The ID of the common commit between source and target. + + + :return: The common_commit of this DiffResponse. + :rtype: str + """ + return self._common_commit + + @common_commit.setter + def common_commit(self, common_commit): + """ + Sets the common_commit of this DiffResponse. + The ID of the common commit between source and target. + + + :param common_commit: The common_commit of this DiffResponse. + :type: str + """ + self._common_commit = common_commit + + @property + def commits_ahead_count(self): + """ + Gets the commits_ahead_count of this DiffResponse. + The number of commits source is ahead of target by. + + + :return: The commits_ahead_count of this DiffResponse. + :rtype: int + """ + return self._commits_ahead_count + + @commits_ahead_count.setter + def commits_ahead_count(self, commits_ahead_count): + """ + Sets the commits_ahead_count of this DiffResponse. + The number of commits source is ahead of target by. + + + :param commits_ahead_count: The commits_ahead_count of this DiffResponse. + :type: int + """ + self._commits_ahead_count = commits_ahead_count + + @property + def commits_behind_count(self): + """ + Gets the commits_behind_count of this DiffResponse. + The number of commits source is behind target by. + + + :return: The commits_behind_count of this DiffResponse. + :rtype: int + """ + return self._commits_behind_count + + @commits_behind_count.setter + def commits_behind_count(self, commits_behind_count): + """ + Sets the commits_behind_count of this DiffResponse. + The number of commits source is behind target by. + + + :param commits_behind_count: The commits_behind_count of this DiffResponse. + :type: int + """ + self._commits_behind_count = commits_behind_count + + @property + def added_lines_count(self): + """ + Gets the added_lines_count of this DiffResponse. + The number of lines added in whole diff. + + + :return: The added_lines_count of this DiffResponse. + :rtype: int + """ + return self._added_lines_count + + @added_lines_count.setter + def added_lines_count(self, added_lines_count): + """ + Sets the added_lines_count of this DiffResponse. + The number of lines added in whole diff. + + + :param added_lines_count: The added_lines_count of this DiffResponse. + :type: int + """ + self._added_lines_count = added_lines_count + + @property + def deleted_lines_count(self): + """ + Gets the deleted_lines_count of this DiffResponse. + The number of lines deleted in whole diff. + + + :return: The deleted_lines_count of this DiffResponse. + :rtype: int + """ + return self._deleted_lines_count + + @deleted_lines_count.setter + def deleted_lines_count(self, deleted_lines_count): + """ + Sets the deleted_lines_count of this DiffResponse. + The number of lines deleted in whole diff. + + + :param deleted_lines_count: The deleted_lines_count of this DiffResponse. + :type: int + """ + self._deleted_lines_count = deleted_lines_count + + @property + def changes(self): + """ + **[Required]** Gets the changes of this DiffResponse. + List of changes in the diff. + + + :return: The changes of this DiffResponse. + :rtype: list[oci.devops.models.DiffResponseEntry] + """ + return self._changes + + @changes.setter + def changes(self, changes): + """ + Sets the changes of this DiffResponse. + List of changes in the diff. + + + :param changes: The changes of this DiffResponse. + :type: list[oci.devops.models.DiffResponseEntry] + """ + self._changes = changes + + 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/devops/models/diff_response_entry.py b/src/oci/devops/models/diff_response_entry.py new file mode 100644 index 0000000000..8001fb4645 --- /dev/null +++ b/src/oci/devops/models/diff_response_entry.py @@ -0,0 +1,380 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 DiffResponseEntry(object): + """ + Entry for description of change on a file. + """ + + def __init__(self, **kwargs): + """ + Initializes a new DiffResponseEntry object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param change_type: + The value to assign to the change_type property of this DiffResponseEntry. + :type change_type: str + + :param object_type: + The value to assign to the object_type property of this DiffResponseEntry. + :type object_type: str + + :param commit_id: + The value to assign to the commit_id property of this DiffResponseEntry. + :type commit_id: str + + :param old_path: + The value to assign to the old_path property of this DiffResponseEntry. + :type old_path: str + + :param new_path: + The value to assign to the new_path property of this DiffResponseEntry. + :type new_path: str + + :param old_id: + The value to assign to the old_id property of this DiffResponseEntry. + :type old_id: str + + :param new_id: + The value to assign to the new_id property of this DiffResponseEntry. + :type new_id: str + + :param url: + The value to assign to the url property of this DiffResponseEntry. + :type url: str + + :param added_lines_count: + The value to assign to the added_lines_count property of this DiffResponseEntry. + :type added_lines_count: int + + :param deleted_lines_count: + The value to assign to the deleted_lines_count property of this DiffResponseEntry. + :type deleted_lines_count: int + + :param are_conflicts_in_file: + The value to assign to the are_conflicts_in_file property of this DiffResponseEntry. + :type are_conflicts_in_file: bool + + """ + self.swagger_types = { + 'change_type': 'str', + 'object_type': 'str', + 'commit_id': 'str', + 'old_path': 'str', + 'new_path': 'str', + 'old_id': 'str', + 'new_id': 'str', + 'url': 'str', + 'added_lines_count': 'int', + 'deleted_lines_count': 'int', + 'are_conflicts_in_file': 'bool' + } + + self.attribute_map = { + 'change_type': 'changeType', + 'object_type': 'objectType', + 'commit_id': 'commitId', + 'old_path': 'oldPath', + 'new_path': 'newPath', + 'old_id': 'oldId', + 'new_id': 'newId', + 'url': 'url', + 'added_lines_count': 'addedLinesCount', + 'deleted_lines_count': 'deletedLinesCount', + 'are_conflicts_in_file': 'areConflictsInFile' + } + + self._change_type = None + self._object_type = None + self._commit_id = None + self._old_path = None + self._new_path = None + self._old_id = None + self._new_id = None + self._url = None + self._added_lines_count = None + self._deleted_lines_count = None + self._are_conflicts_in_file = None + + @property + def change_type(self): + """ + **[Required]** Gets the change_type of this DiffResponseEntry. + Type of change made to file. + + + :return: The change_type of this DiffResponseEntry. + :rtype: str + """ + return self._change_type + + @change_type.setter + def change_type(self, change_type): + """ + Sets the change_type of this DiffResponseEntry. + Type of change made to file. + + + :param change_type: The change_type of this DiffResponseEntry. + :type: str + """ + self._change_type = change_type + + @property + def object_type(self): + """ + Gets the object_type of this DiffResponseEntry. + The type of the changed object. + + + :return: The object_type of this DiffResponseEntry. + :rtype: str + """ + return self._object_type + + @object_type.setter + def object_type(self, object_type): + """ + Sets the object_type of this DiffResponseEntry. + The type of the changed object. + + + :param object_type: The object_type of this DiffResponseEntry. + :type: str + """ + self._object_type = object_type + + @property + def commit_id(self): + """ + Gets the commit_id of this DiffResponseEntry. + The ID of the commit where the change is coming from. + + + :return: The commit_id of this DiffResponseEntry. + :rtype: str + """ + return self._commit_id + + @commit_id.setter + def commit_id(self, commit_id): + """ + Sets the commit_id of this DiffResponseEntry. + The ID of the commit where the change is coming from. + + + :param commit_id: The commit_id of this DiffResponseEntry. + :type: str + """ + self._commit_id = commit_id + + @property + def old_path(self): + """ + Gets the old_path of this DiffResponseEntry. + The path on the target to the changed object. + + + :return: The old_path of this DiffResponseEntry. + :rtype: str + """ + return self._old_path + + @old_path.setter + def old_path(self, old_path): + """ + Sets the old_path of this DiffResponseEntry. + The path on the target to the changed object. + + + :param old_path: The old_path of this DiffResponseEntry. + :type: str + """ + self._old_path = old_path + + @property + def new_path(self): + """ + Gets the new_path of this DiffResponseEntry. + The path on the source to the changed object. + + + :return: The new_path of this DiffResponseEntry. + :rtype: str + """ + return self._new_path + + @new_path.setter + def new_path(self, new_path): + """ + Sets the new_path of this DiffResponseEntry. + The path on the source to the changed object. + + + :param new_path: The new_path of this DiffResponseEntry. + :type: str + """ + self._new_path = new_path + + @property + def old_id(self): + """ + Gets the old_id of this DiffResponseEntry. + The ID of the changed object on the target. + + + :return: The old_id of this DiffResponseEntry. + :rtype: str + """ + return self._old_id + + @old_id.setter + def old_id(self, old_id): + """ + Sets the old_id of this DiffResponseEntry. + The ID of the changed object on the target. + + + :param old_id: The old_id of this DiffResponseEntry. + :type: str + """ + self._old_id = old_id + + @property + def new_id(self): + """ + Gets the new_id of this DiffResponseEntry. + The ID of the changed object on the source. + + + :return: The new_id of this DiffResponseEntry. + :rtype: str + """ + return self._new_id + + @new_id.setter + def new_id(self, new_id): + """ + Sets the new_id of this DiffResponseEntry. + The ID of the changed object on the source. + + + :param new_id: The new_id of this DiffResponseEntry. + :type: str + """ + self._new_id = new_id + + @property + def url(self): + """ + Gets the url of this DiffResponseEntry. + The URL of the changed object. + + + :return: The url of this DiffResponseEntry. + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """ + Sets the url of this DiffResponseEntry. + The URL of the changed object. + + + :param url: The url of this DiffResponseEntry. + :type: str + """ + self._url = url + + @property + def added_lines_count(self): + """ + Gets the added_lines_count of this DiffResponseEntry. + The number of lines added in whole diff. + + + :return: The added_lines_count of this DiffResponseEntry. + :rtype: int + """ + return self._added_lines_count + + @added_lines_count.setter + def added_lines_count(self, added_lines_count): + """ + Sets the added_lines_count of this DiffResponseEntry. + The number of lines added in whole diff. + + + :param added_lines_count: The added_lines_count of this DiffResponseEntry. + :type: int + """ + self._added_lines_count = added_lines_count + + @property + def deleted_lines_count(self): + """ + Gets the deleted_lines_count of this DiffResponseEntry. + The number of lines deleted in whole diff. + + + :return: The deleted_lines_count of this DiffResponseEntry. + :rtype: int + """ + return self._deleted_lines_count + + @deleted_lines_count.setter + def deleted_lines_count(self, deleted_lines_count): + """ + Sets the deleted_lines_count of this DiffResponseEntry. + The number of lines deleted in whole diff. + + + :param deleted_lines_count: The deleted_lines_count of this DiffResponseEntry. + :type: int + """ + self._deleted_lines_count = deleted_lines_count + + @property + def are_conflicts_in_file(self): + """ + Gets the are_conflicts_in_file of this DiffResponseEntry. + Indicates whether the changed file contains conflicts. + + + :return: The are_conflicts_in_file of this DiffResponseEntry. + :rtype: bool + """ + return self._are_conflicts_in_file + + @are_conflicts_in_file.setter + def are_conflicts_in_file(self, are_conflicts_in_file): + """ + Sets the are_conflicts_in_file of this DiffResponseEntry. + Indicates whether the changed file contains conflicts. + + + :param are_conflicts_in_file: The are_conflicts_in_file of this DiffResponseEntry. + :type: bool + """ + self._are_conflicts_in_file = are_conflicts_in_file + + 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/devops/models/diff_section.py b/src/oci/devops/models/diff_section.py new file mode 100644 index 0000000000..9394cf14f0 --- /dev/null +++ b/src/oci/devops/models/diff_section.py @@ -0,0 +1,101 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 DiffSection(object): + """ + Details about a section of changes within a DiffChunk. + """ + + def __init__(self, **kwargs): + """ + Initializes a new DiffSection object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param type: + The value to assign to the type property of this DiffSection. + :type type: str + + :param lines: + The value to assign to the lines property of this DiffSection. + :type lines: list[oci.devops.models.DiffLineDetails] + + """ + self.swagger_types = { + 'type': 'str', + 'lines': 'list[DiffLineDetails]' + } + + self.attribute_map = { + 'type': 'type', + 'lines': 'lines' + } + + self._type = None + self._lines = None + + @property + def type(self): + """ + Gets the type of this DiffSection. + Type of change. + + + :return: The type of this DiffSection. + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """ + Sets the type of this DiffSection. + Type of change. + + + :param type: The type of this DiffSection. + :type: str + """ + self._type = type + + @property + def lines(self): + """ + Gets the lines of this DiffSection. + The lines within changed section. + + + :return: The lines of this DiffSection. + :rtype: list[oci.devops.models.DiffLineDetails] + """ + return self._lines + + @lines.setter + def lines(self, lines): + """ + Sets the lines of this DiffSection. + The lines within changed section. + + + :param lines: The lines of this DiffSection. + :type: list[oci.devops.models.DiffLineDetails] + """ + self._lines = lines + + 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/devops/models/diff_summary.py b/src/oci/devops/models/diff_summary.py new file mode 100644 index 0000000000..5a006cc0a0 --- /dev/null +++ b/src/oci/devops/models/diff_summary.py @@ -0,0 +1,357 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 DiffSummary(object): + """ + Response object for showing diffs for a file between two revisions. + """ + + def __init__(self, **kwargs): + """ + Initializes a new DiffSummary object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param old_path: + The value to assign to the old_path property of this DiffSummary. + :type old_path: str + + :param new_path: + The value to assign to the new_path property of this DiffSummary. + :type new_path: str + + :param old_id: + The value to assign to the old_id property of this DiffSummary. + :type old_id: str + + :param new_id: + The value to assign to the new_id property of this DiffSummary. + :type new_id: str + + :param are_conflicts_in_file: + The value to assign to the are_conflicts_in_file property of this DiffSummary. + :type are_conflicts_in_file: bool + + :param is_large: + The value to assign to the is_large property of this DiffSummary. + :type is_large: bool + + :param is_binary: + The value to assign to the is_binary property of this DiffSummary. + :type is_binary: bool + + :param changes: + The value to assign to the changes property of this DiffSummary. + :type changes: list[oci.devops.models.DiffChunk] + + :param freeform_tags: + The value to assign to the freeform_tags property of this DiffSummary. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this DiffSummary. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'old_path': 'str', + 'new_path': 'str', + 'old_id': 'str', + 'new_id': 'str', + 'are_conflicts_in_file': 'bool', + 'is_large': 'bool', + 'is_binary': 'bool', + 'changes': 'list[DiffChunk]', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'old_path': 'oldPath', + 'new_path': 'newPath', + 'old_id': 'oldId', + 'new_id': 'newId', + 'are_conflicts_in_file': 'areConflictsInFile', + 'is_large': 'isLarge', + 'is_binary': 'isBinary', + 'changes': 'changes', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._old_path = None + self._new_path = None + self._old_id = None + self._new_id = None + self._are_conflicts_in_file = None + self._is_large = None + self._is_binary = None + self._changes = None + self._freeform_tags = None + self._defined_tags = None + + @property + def old_path(self): + """ + Gets the old_path of this DiffSummary. + The path on the baseVersion to the changed object. + + + :return: The old_path of this DiffSummary. + :rtype: str + """ + return self._old_path + + @old_path.setter + def old_path(self, old_path): + """ + Sets the old_path of this DiffSummary. + The path on the baseVersion to the changed object. + + + :param old_path: The old_path of this DiffSummary. + :type: str + """ + self._old_path = old_path + + @property + def new_path(self): + """ + Gets the new_path of this DiffSummary. + The path on the targetVersion to the changed object. + + + :return: The new_path of this DiffSummary. + :rtype: str + """ + return self._new_path + + @new_path.setter + def new_path(self, new_path): + """ + Sets the new_path of this DiffSummary. + The path on the targetVersion to the changed object. + + + :param new_path: The new_path of this DiffSummary. + :type: str + """ + self._new_path = new_path + + @property + def old_id(self): + """ + Gets the old_id of this DiffSummary. + The ID of the changed object on the baseVersion. + + + :return: The old_id of this DiffSummary. + :rtype: str + """ + return self._old_id + + @old_id.setter + def old_id(self, old_id): + """ + Sets the old_id of this DiffSummary. + The ID of the changed object on the baseVersion. + + + :param old_id: The old_id of this DiffSummary. + :type: str + """ + self._old_id = old_id + + @property + def new_id(self): + """ + Gets the new_id of this DiffSummary. + The ID of the changed object on the targetVersion. + + + :return: The new_id of this DiffSummary. + :rtype: str + """ + return self._new_id + + @new_id.setter + def new_id(self, new_id): + """ + Sets the new_id of this DiffSummary. + The ID of the changed object on the targetVersion. + + + :param new_id: The new_id of this DiffSummary. + :type: str + """ + self._new_id = new_id + + @property + def are_conflicts_in_file(self): + """ + Gets the are_conflicts_in_file of this DiffSummary. + Indicates whether the changed file contains conflicts. + + + :return: The are_conflicts_in_file of this DiffSummary. + :rtype: bool + """ + return self._are_conflicts_in_file + + @are_conflicts_in_file.setter + def are_conflicts_in_file(self, are_conflicts_in_file): + """ + Sets the are_conflicts_in_file of this DiffSummary. + Indicates whether the changed file contains conflicts. + + + :param are_conflicts_in_file: The are_conflicts_in_file of this DiffSummary. + :type: bool + """ + self._are_conflicts_in_file = are_conflicts_in_file + + @property + def is_large(self): + """ + Gets the is_large of this DiffSummary. + Indicates whether the file is large. + + + :return: The is_large of this DiffSummary. + :rtype: bool + """ + return self._is_large + + @is_large.setter + def is_large(self, is_large): + """ + Sets the is_large of this DiffSummary. + Indicates whether the file is large. + + + :param is_large: The is_large of this DiffSummary. + :type: bool + """ + self._is_large = is_large + + @property + def is_binary(self): + """ + Gets the is_binary of this DiffSummary. + Indicates whether the file is binary. + + + :return: The is_binary of this DiffSummary. + :rtype: bool + """ + return self._is_binary + + @is_binary.setter + def is_binary(self, is_binary): + """ + Sets the is_binary of this DiffSummary. + Indicates whether the file is binary. + + + :param is_binary: The is_binary of this DiffSummary. + :type: bool + """ + self._is_binary = is_binary + + @property + def changes(self): + """ + **[Required]** Gets the changes of this DiffSummary. + List of changed section in the file. + + + :return: The changes of this DiffSummary. + :rtype: list[oci.devops.models.DiffChunk] + """ + return self._changes + + @changes.setter + def changes(self, changes): + """ + Sets the changes of this DiffSummary. + List of changed section in the file. + + + :param changes: The changes of this DiffSummary. + :type: list[oci.devops.models.DiffChunk] + """ + self._changes = changes + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this DiffSummary. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See `Resource Tags`__. Example: `{\"bar-key\": \"value\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this DiffSummary. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this DiffSummary. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See `Resource Tags`__. Example: `{\"bar-key\": \"value\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this DiffSummary. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this DiffSummary. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this DiffSummary. + :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 DiffSummary. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this DiffSummary. + :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/devops/models/exported_variable.py b/src/oci/devops/models/exported_variable.py new file mode 100644 index 0000000000..3498d80a61 --- /dev/null +++ b/src/oci/devops/models/exported_variable.py @@ -0,0 +1,101 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 ExportedVariable(object): + """ + Values for Exported variables. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ExportedVariable 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 ExportedVariable. + :type name: str + + :param value: + The value to assign to the value property of this ExportedVariable. + :type value: str + + """ + self.swagger_types = { + 'name': 'str', + 'value': 'str' + } + + self.attribute_map = { + 'name': 'name', + 'value': 'value' + } + + self._name = None + self._value = None + + @property + def name(self): + """ + **[Required]** Gets the name of this ExportedVariable. + Name of the parameter (Case-sensitive). + + + :return: The name of this ExportedVariable. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """ + Sets the name of this ExportedVariable. + Name of the parameter (Case-sensitive). + + + :param name: The name of this ExportedVariable. + :type: str + """ + self._name = name + + @property + def value(self): + """ + **[Required]** Gets the value of this ExportedVariable. + value of the argument + + + :return: The value of this ExportedVariable. + :rtype: str + """ + return self._value + + @value.setter + def value(self, value): + """ + Sets the value of this ExportedVariable. + value of the argument + + + :param value: The value of this ExportedVariable. + :type: str + """ + self._value = value + + 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/devops/models/exported_variable_collection.py b/src/oci/devops/models/exported_variable_collection.py new file mode 100644 index 0000000000..68f4086c24 --- /dev/null +++ b/src/oci/devops/models/exported_variable_collection.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 ExportedVariableCollection(object): + """ + Specifies list of Exported Variables. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ExportedVariableCollection object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param items: + The value to assign to the items property of this ExportedVariableCollection. + :type items: list[oci.devops.models.ExportedVariable] + + """ + self.swagger_types = { + 'items': 'list[ExportedVariable]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this ExportedVariableCollection. + List of exported variables + + + :return: The items of this ExportedVariableCollection. + :rtype: list[oci.devops.models.ExportedVariable] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this ExportedVariableCollection. + List of exported variables + + + :param items: The items of this ExportedVariableCollection. + :type: list[oci.devops.models.ExportedVariable] + """ + self._items = items + + 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/devops/models/file_diff_response.py b/src/oci/devops/models/file_diff_response.py new file mode 100644 index 0000000000..ffc22cd4fd --- /dev/null +++ b/src/oci/devops/models/file_diff_response.py @@ -0,0 +1,287 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 FileDiffResponse(object): + """ + Response object for showing differences for a file between two commits. + """ + + def __init__(self, **kwargs): + """ + Initializes a new FileDiffResponse object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param old_path: + The value to assign to the old_path property of this FileDiffResponse. + :type old_path: str + + :param new_path: + The value to assign to the new_path property of this FileDiffResponse. + :type new_path: str + + :param old_id: + The value to assign to the old_id property of this FileDiffResponse. + :type old_id: str + + :param new_id: + The value to assign to the new_id property of this FileDiffResponse. + :type new_id: str + + :param are_conflicts_in_file: + The value to assign to the are_conflicts_in_file property of this FileDiffResponse. + :type are_conflicts_in_file: bool + + :param is_large: + The value to assign to the is_large property of this FileDiffResponse. + :type is_large: bool + + :param is_binary: + The value to assign to the is_binary property of this FileDiffResponse. + :type is_binary: bool + + :param changes: + The value to assign to the changes property of this FileDiffResponse. + :type changes: list[oci.devops.models.DiffChunk] + + """ + self.swagger_types = { + 'old_path': 'str', + 'new_path': 'str', + 'old_id': 'str', + 'new_id': 'str', + 'are_conflicts_in_file': 'bool', + 'is_large': 'bool', + 'is_binary': 'bool', + 'changes': 'list[DiffChunk]' + } + + self.attribute_map = { + 'old_path': 'oldPath', + 'new_path': 'newPath', + 'old_id': 'oldId', + 'new_id': 'newId', + 'are_conflicts_in_file': 'areConflictsInFile', + 'is_large': 'isLarge', + 'is_binary': 'isBinary', + 'changes': 'changes' + } + + self._old_path = None + self._new_path = None + self._old_id = None + self._new_id = None + self._are_conflicts_in_file = None + self._is_large = None + self._is_binary = None + self._changes = None + + @property + def old_path(self): + """ + Gets the old_path of this FileDiffResponse. + The path on the baseVersion to the changed object. + + + :return: The old_path of this FileDiffResponse. + :rtype: str + """ + return self._old_path + + @old_path.setter + def old_path(self, old_path): + """ + Sets the old_path of this FileDiffResponse. + The path on the baseVersion to the changed object. + + + :param old_path: The old_path of this FileDiffResponse. + :type: str + """ + self._old_path = old_path + + @property + def new_path(self): + """ + Gets the new_path of this FileDiffResponse. + The path on the targetVersion to the changed object. + + + :return: The new_path of this FileDiffResponse. + :rtype: str + """ + return self._new_path + + @new_path.setter + def new_path(self, new_path): + """ + Sets the new_path of this FileDiffResponse. + The path on the targetVersion to the changed object. + + + :param new_path: The new_path of this FileDiffResponse. + :type: str + """ + self._new_path = new_path + + @property + def old_id(self): + """ + Gets the old_id of this FileDiffResponse. + The ID of the changed object on the baseVersion. + + + :return: The old_id of this FileDiffResponse. + :rtype: str + """ + return self._old_id + + @old_id.setter + def old_id(self, old_id): + """ + Sets the old_id of this FileDiffResponse. + The ID of the changed object on the baseVersion. + + + :param old_id: The old_id of this FileDiffResponse. + :type: str + """ + self._old_id = old_id + + @property + def new_id(self): + """ + Gets the new_id of this FileDiffResponse. + The ID of the changed object on the targetVersion. + + + :return: The new_id of this FileDiffResponse. + :rtype: str + """ + return self._new_id + + @new_id.setter + def new_id(self, new_id): + """ + Sets the new_id of this FileDiffResponse. + The ID of the changed object on the targetVersion. + + + :param new_id: The new_id of this FileDiffResponse. + :type: str + """ + self._new_id = new_id + + @property + def are_conflicts_in_file(self): + """ + Gets the are_conflicts_in_file of this FileDiffResponse. + Indicates whether the changed file contains conflicts. + + + :return: The are_conflicts_in_file of this FileDiffResponse. + :rtype: bool + """ + return self._are_conflicts_in_file + + @are_conflicts_in_file.setter + def are_conflicts_in_file(self, are_conflicts_in_file): + """ + Sets the are_conflicts_in_file of this FileDiffResponse. + Indicates whether the changed file contains conflicts. + + + :param are_conflicts_in_file: The are_conflicts_in_file of this FileDiffResponse. + :type: bool + """ + self._are_conflicts_in_file = are_conflicts_in_file + + @property + def is_large(self): + """ + Gets the is_large of this FileDiffResponse. + Indicates whether the file is large. + + + :return: The is_large of this FileDiffResponse. + :rtype: bool + """ + return self._is_large + + @is_large.setter + def is_large(self, is_large): + """ + Sets the is_large of this FileDiffResponse. + Indicates whether the file is large. + + + :param is_large: The is_large of this FileDiffResponse. + :type: bool + """ + self._is_large = is_large + + @property + def is_binary(self): + """ + Gets the is_binary of this FileDiffResponse. + Indicates whether the file is binary. + + + :return: The is_binary of this FileDiffResponse. + :rtype: bool + """ + return self._is_binary + + @is_binary.setter + def is_binary(self, is_binary): + """ + Sets the is_binary of this FileDiffResponse. + Indicates whether the file is binary. + + + :param is_binary: The is_binary of this FileDiffResponse. + :type: bool + """ + self._is_binary = is_binary + + @property + def changes(self): + """ + **[Required]** Gets the changes of this FileDiffResponse. + List of changed section in the file. + + + :return: The changes of this FileDiffResponse. + :rtype: list[oci.devops.models.DiffChunk] + """ + return self._changes + + @changes.setter + def changes(self, changes): + """ + Sets the changes of this FileDiffResponse. + List of changed section in the file. + + + :param changes: The changes of this FileDiffResponse. + :type: list[oci.devops.models.DiffChunk] + """ + self._changes = changes + + 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/devops/models/file_line_details.py b/src/oci/devops/models/file_line_details.py new file mode 100644 index 0000000000..673505756c --- /dev/null +++ b/src/oci/devops/models/file_line_details.py @@ -0,0 +1,101 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 FileLineDetails(object): + """ + Object containing the details of a line in a file + """ + + def __init__(self, **kwargs): + """ + Initializes a new FileLineDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param line_number: + The value to assign to the line_number property of this FileLineDetails. + :type line_number: int + + :param line_content: + The value to assign to the line_content property of this FileLineDetails. + :type line_content: str + + """ + self.swagger_types = { + 'line_number': 'int', + 'line_content': 'str' + } + + self.attribute_map = { + 'line_number': 'lineNumber', + 'line_content': 'lineContent' + } + + self._line_number = None + self._line_content = None + + @property + def line_number(self): + """ + **[Required]** Gets the line_number of this FileLineDetails. + The line number + + + :return: The line_number of this FileLineDetails. + :rtype: int + """ + return self._line_number + + @line_number.setter + def line_number(self, line_number): + """ + Sets the line_number of this FileLineDetails. + The line number + + + :param line_number: The line_number of this FileLineDetails. + :type: int + """ + self._line_number = line_number + + @property + def line_content(self): + """ + **[Required]** Gets the line_content of this FileLineDetails. + The content of the line + + + :return: The line_content of this FileLineDetails. + :rtype: str + """ + return self._line_content + + @line_content.setter + def line_content(self, line_content): + """ + Sets the line_content of this FileLineDetails. + The content of the line + + + :param line_content: The line_content of this FileLineDetails. + :type: str + """ + self._line_content = line_content + + 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/devops/models/filter.py b/src/oci/devops/models/filter.py new file mode 100644 index 0000000000..d234b7066c --- /dev/null +++ b/src/oci/devops/models/filter.py @@ -0,0 +1,95 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 Filter(object): + """ + The filters for the trigger + """ + + def __init__(self, **kwargs): + """ + Initializes a new Filter object with values from keyword arguments. This class has the following subclasses and if you are using this class as input + to a service operations then you should favor using a subclass over the base class: + + * :class:`~oci.devops.models.DevopsCodeRepositoryFilter` + * :class:`~oci.devops.models.GitlabFilter` + * :class:`~oci.devops.models.GithubFilter` + + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param trigger_source: + The value to assign to the trigger_source property of this Filter. + :type trigger_source: str + + """ + self.swagger_types = { + 'trigger_source': 'str' + } + + self.attribute_map = { + 'trigger_source': 'triggerSource' + } + + self._trigger_source = None + + @staticmethod + def get_subtype(object_dictionary): + """ + Given the hash representation of a subtype of this class, + use the info in the hash to return the class of the subtype. + """ + type = object_dictionary['triggerSource'] + + if type == 'DEVOPS_CODE_REPOSITORY': + return 'DevopsCodeRepositoryFilter' + + if type == 'GITLAB': + return 'GitlabFilter' + + if type == 'GITHUB': + return 'GithubFilter' + else: + return 'Filter' + + @property + def trigger_source(self): + """ + **[Required]** Gets the trigger_source of this Filter. + Source of the Trigger (allowed values are - GITHUB, GITLAB) + + + :return: The trigger_source of this Filter. + :rtype: str + """ + return self._trigger_source + + @trigger_source.setter + def trigger_source(self, trigger_source): + """ + Sets the trigger_source of this Filter. + Source of the Trigger (allowed values are - GITHUB, GITLAB) + + + :param trigger_source: The trigger_source of this Filter. + :type: str + """ + self._trigger_source = trigger_source + + 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/devops/models/generic_delivered_artifact.py b/src/oci/devops/models/generic_delivered_artifact.py new file mode 100644 index 0000000000..ea6d1db7dc --- /dev/null +++ b/src/oci/devops/models/generic_delivered_artifact.py @@ -0,0 +1,187 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .delivered_artifact import DeliveredArtifact +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 GenericDeliveredArtifact(DeliveredArtifact): + """ + Details of UIM Artifact delivered via DeliverArtifactStage. + """ + + def __init__(self, **kwargs): + """ + Initializes a new GenericDeliveredArtifact object with values from keyword arguments. The default value of the :py:attr:`~oci.devops.models.GenericDeliveredArtifact.artifact_type` attribute + of this class is ``GENERIC_ARTIFACT`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param deploy_artifact_id: + The value to assign to the deploy_artifact_id property of this GenericDeliveredArtifact. + :type deploy_artifact_id: str + + :param output_artifact_name: + The value to assign to the output_artifact_name property of this GenericDeliveredArtifact. + :type output_artifact_name: str + + :param artifact_type: + The value to assign to the artifact_type property of this GenericDeliveredArtifact. + Allowed values for this property are: "GENERIC_ARTIFACT", "OCIR" + :type artifact_type: str + + :param artifact_repository_id: + The value to assign to the artifact_repository_id property of this GenericDeliveredArtifact. + :type artifact_repository_id: str + + :param delivered_artifact_id: + The value to assign to the delivered_artifact_id property of this GenericDeliveredArtifact. + :type delivered_artifact_id: str + + :param path: + The value to assign to the path property of this GenericDeliveredArtifact. + :type path: str + + :param version: + The value to assign to the version property of this GenericDeliveredArtifact. + :type version: str + + """ + self.swagger_types = { + 'deploy_artifact_id': 'str', + 'output_artifact_name': 'str', + 'artifact_type': 'str', + 'artifact_repository_id': 'str', + 'delivered_artifact_id': 'str', + 'path': 'str', + 'version': 'str' + } + + self.attribute_map = { + 'deploy_artifact_id': 'deployArtifactId', + 'output_artifact_name': 'outputArtifactName', + 'artifact_type': 'artifactType', + 'artifact_repository_id': 'artifactRepositoryId', + 'delivered_artifact_id': 'deliveredArtifactId', + 'path': 'path', + 'version': 'version' + } + + self._deploy_artifact_id = None + self._output_artifact_name = None + self._artifact_type = None + self._artifact_repository_id = None + self._delivered_artifact_id = None + self._path = None + self._version = None + self._artifact_type = 'GENERIC_ARTIFACT' + + @property + def artifact_repository_id(self): + """ + Gets the artifact_repository_id of this GenericDeliveredArtifact. + The OCID of the artifact registry repository used by the DeliverArtifactStage + + + :return: The artifact_repository_id of this GenericDeliveredArtifact. + :rtype: str + """ + return self._artifact_repository_id + + @artifact_repository_id.setter + def artifact_repository_id(self, artifact_repository_id): + """ + Sets the artifact_repository_id of this GenericDeliveredArtifact. + The OCID of the artifact registry repository used by the DeliverArtifactStage + + + :param artifact_repository_id: The artifact_repository_id of this GenericDeliveredArtifact. + :type: str + """ + self._artifact_repository_id = artifact_repository_id + + @property + def delivered_artifact_id(self): + """ + **[Required]** Gets the delivered_artifact_id of this GenericDeliveredArtifact. + The OCID of the artifact pushed by the DeliverArtifactStage + + + :return: The delivered_artifact_id of this GenericDeliveredArtifact. + :rtype: str + """ + return self._delivered_artifact_id + + @delivered_artifact_id.setter + def delivered_artifact_id(self, delivered_artifact_id): + """ + Sets the delivered_artifact_id of this GenericDeliveredArtifact. + The OCID of the artifact pushed by the DeliverArtifactStage + + + :param delivered_artifact_id: The delivered_artifact_id of this GenericDeliveredArtifact. + :type: str + """ + self._delivered_artifact_id = delivered_artifact_id + + @property + def path(self): + """ + Gets the path of this GenericDeliveredArtifact. + Path of the repository where artifact was pushed + + + :return: The path of this GenericDeliveredArtifact. + :rtype: str + """ + return self._path + + @path.setter + def path(self, path): + """ + Sets the path of this GenericDeliveredArtifact. + Path of the repository where artifact was pushed + + + :param path: The path of this GenericDeliveredArtifact. + :type: str + """ + self._path = path + + @property + def version(self): + """ + Gets the version of this GenericDeliveredArtifact. + Version of the artifact pushed + + + :return: The version of this GenericDeliveredArtifact. + :rtype: str + """ + return self._version + + @version.setter + def version(self, version): + """ + Sets the version of this GenericDeliveredArtifact. + Version of the artifact pushed + + + :param version: The version of this GenericDeliveredArtifact. + :type: str + """ + self._version = version + + 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/devops/models/github_access_token_connection.py b/src/oci/devops/models/github_access_token_connection.py new file mode 100644 index 0000000000..f7e57c9edb --- /dev/null +++ b/src/oci/devops/models/github_access_token_connection.py @@ -0,0 +1,159 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .connection import Connection +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 GithubAccessTokenConnection(Connection): + """ + The properties that define a connection of the type `GITHUB_ACCESS_TOKEN`. + This type corresponds to a connection in GitHub that is authenticated with a personal access token. + """ + + def __init__(self, **kwargs): + """ + Initializes a new GithubAccessTokenConnection object with values from keyword arguments. The default value of the :py:attr:`~oci.devops.models.GithubAccessTokenConnection.connection_type` attribute + of this class is ``GITHUB_ACCESS_TOKEN`` and it should not be changed. + 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 GithubAccessTokenConnection. + :type id: str + + :param description: + The value to assign to the description property of this GithubAccessTokenConnection. + :type description: str + + :param display_name: + The value to assign to the display_name property of this GithubAccessTokenConnection. + :type display_name: str + + :param compartment_id: + The value to assign to the compartment_id property of this GithubAccessTokenConnection. + :type compartment_id: str + + :param project_id: + The value to assign to the project_id property of this GithubAccessTokenConnection. + :type project_id: str + + :param connection_type: + The value to assign to the connection_type property of this GithubAccessTokenConnection. + Allowed values for this property are: "GITHUB_ACCESS_TOKEN", "GITLAB_ACCESS_TOKEN" + :type connection_type: str + + :param time_created: + The value to assign to the time_created property of this GithubAccessTokenConnection. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this GithubAccessTokenConnection. + :type time_updated: datetime + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this GithubAccessTokenConnection. + Allowed values for this property are: "ACTIVE" + :type lifecycle_state: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this GithubAccessTokenConnection. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this GithubAccessTokenConnection. + :type defined_tags: dict(str, dict(str, object)) + + :param system_tags: + The value to assign to the system_tags property of this GithubAccessTokenConnection. + :type system_tags: dict(str, dict(str, object)) + + :param access_token: + The value to assign to the access_token property of this GithubAccessTokenConnection. + :type access_token: str + + """ + self.swagger_types = { + 'id': 'str', + 'description': 'str', + 'display_name': 'str', + 'compartment_id': 'str', + 'project_id': 'str', + 'connection_type': 'str', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'lifecycle_state': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'system_tags': 'dict(str, dict(str, object))', + 'access_token': 'str' + } + + self.attribute_map = { + 'id': 'id', + 'description': 'description', + 'display_name': 'displayName', + 'compartment_id': 'compartmentId', + 'project_id': 'projectId', + 'connection_type': 'connectionType', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'lifecycle_state': 'lifecycleState', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'system_tags': 'systemTags', + 'access_token': 'accessToken' + } + + self._id = None + self._description = None + self._display_name = None + self._compartment_id = None + self._project_id = None + self._connection_type = None + self._time_created = None + self._time_updated = None + self._lifecycle_state = None + self._freeform_tags = None + self._defined_tags = None + self._system_tags = None + self._access_token = None + self._connection_type = 'GITHUB_ACCESS_TOKEN' + + @property + def access_token(self): + """ + **[Required]** Gets the access_token of this GithubAccessTokenConnection. + OCID of personal access token saved in secret store + + + :return: The access_token of this GithubAccessTokenConnection. + :rtype: str + """ + return self._access_token + + @access_token.setter + def access_token(self, access_token): + """ + Sets the access_token of this GithubAccessTokenConnection. + OCID of personal access token saved in secret store + + + :param access_token: The access_token of this GithubAccessTokenConnection. + :type: str + """ + self._access_token = access_token + + 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/devops/models/github_access_token_connection_summary.py b/src/oci/devops/models/github_access_token_connection_summary.py new file mode 100644 index 0000000000..1aa933d75f --- /dev/null +++ b/src/oci/devops/models/github_access_token_connection_summary.py @@ -0,0 +1,157 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .connection_summary import ConnectionSummary +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 GithubAccessTokenConnectionSummary(ConnectionSummary): + """ + Summary information for a connection of the type `GITHUB_ACCESS_TOKEN`. + This type corresponds to a connection in GitHub that is authenticated with a personal access token. + """ + + def __init__(self, **kwargs): + """ + Initializes a new GithubAccessTokenConnectionSummary object with values from keyword arguments. The default value of the :py:attr:`~oci.devops.models.GithubAccessTokenConnectionSummary.connection_type` attribute + of this class is ``GITHUB_ACCESS_TOKEN`` and it should not be changed. + 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 GithubAccessTokenConnectionSummary. + :type id: str + + :param display_name: + The value to assign to the display_name property of this GithubAccessTokenConnectionSummary. + :type display_name: str + + :param description: + The value to assign to the description property of this GithubAccessTokenConnectionSummary. + :type description: str + + :param compartment_id: + The value to assign to the compartment_id property of this GithubAccessTokenConnectionSummary. + :type compartment_id: str + + :param project_id: + The value to assign to the project_id property of this GithubAccessTokenConnectionSummary. + :type project_id: str + + :param connection_type: + The value to assign to the connection_type property of this GithubAccessTokenConnectionSummary. + :type connection_type: str + + :param time_created: + The value to assign to the time_created property of this GithubAccessTokenConnectionSummary. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this GithubAccessTokenConnectionSummary. + :type time_updated: datetime + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this GithubAccessTokenConnectionSummary. + :type lifecycle_state: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this GithubAccessTokenConnectionSummary. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this GithubAccessTokenConnectionSummary. + :type defined_tags: dict(str, dict(str, object)) + + :param system_tags: + The value to assign to the system_tags property of this GithubAccessTokenConnectionSummary. + :type system_tags: dict(str, dict(str, object)) + + :param access_token: + The value to assign to the access_token property of this GithubAccessTokenConnectionSummary. + :type access_token: str + + """ + self.swagger_types = { + 'id': 'str', + 'display_name': 'str', + 'description': 'str', + 'compartment_id': 'str', + 'project_id': 'str', + 'connection_type': 'str', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'lifecycle_state': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'system_tags': 'dict(str, dict(str, object))', + 'access_token': 'str' + } + + self.attribute_map = { + 'id': 'id', + 'display_name': 'displayName', + 'description': 'description', + 'compartment_id': 'compartmentId', + 'project_id': 'projectId', + 'connection_type': 'connectionType', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'lifecycle_state': 'lifecycleState', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'system_tags': 'systemTags', + 'access_token': 'accessToken' + } + + self._id = None + self._display_name = None + self._description = None + self._compartment_id = None + self._project_id = None + self._connection_type = None + self._time_created = None + self._time_updated = None + self._lifecycle_state = None + self._freeform_tags = None + self._defined_tags = None + self._system_tags = None + self._access_token = None + self._connection_type = 'GITHUB_ACCESS_TOKEN' + + @property + def access_token(self): + """ + **[Required]** Gets the access_token of this GithubAccessTokenConnectionSummary. + OCID of personal access token saved in secret store + + + :return: The access_token of this GithubAccessTokenConnectionSummary. + :rtype: str + """ + return self._access_token + + @access_token.setter + def access_token(self, access_token): + """ + Sets the access_token of this GithubAccessTokenConnectionSummary. + OCID of personal access token saved in secret store + + + :param access_token: The access_token of this GithubAccessTokenConnectionSummary. + :type: str + """ + self._access_token = access_token + + 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/devops/models/github_build_run_source.py b/src/oci/devops/models/github_build_run_source.py new file mode 100644 index 0000000000..10c68de41f --- /dev/null +++ b/src/oci/devops/models/github_build_run_source.py @@ -0,0 +1,107 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .build_run_source import BuildRunSource +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 GithubBuildRunSource(BuildRunSource): + """ + Specifies details of build run through Github. + """ + + def __init__(self, **kwargs): + """ + Initializes a new GithubBuildRunSource object with values from keyword arguments. The default value of the :py:attr:`~oci.devops.models.GithubBuildRunSource.source_type` attribute + of this class is ``GITHUB`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param source_type: + The value to assign to the source_type property of this GithubBuildRunSource. + Allowed values for this property are: "MANUAL", "GITHUB", "GITLAB", "DEVOPS_CODE_REPOSITORY" + :type source_type: str + + :param trigger_id: + The value to assign to the trigger_id property of this GithubBuildRunSource. + :type trigger_id: str + + :param trigger_info: + The value to assign to the trigger_info property of this GithubBuildRunSource. + :type trigger_info: oci.devops.models.TriggerInfo + + """ + self.swagger_types = { + 'source_type': 'str', + 'trigger_id': 'str', + 'trigger_info': 'TriggerInfo' + } + + self.attribute_map = { + 'source_type': 'sourceType', + 'trigger_id': 'triggerId', + 'trigger_info': 'triggerInfo' + } + + self._source_type = None + self._trigger_id = None + self._trigger_info = None + self._source_type = 'GITHUB' + + @property + def trigger_id(self): + """ + **[Required]** Gets the trigger_id of this GithubBuildRunSource. + The Trigger that invoked this build run + + + :return: The trigger_id of this GithubBuildRunSource. + :rtype: str + """ + return self._trigger_id + + @trigger_id.setter + def trigger_id(self, trigger_id): + """ + Sets the trigger_id of this GithubBuildRunSource. + The Trigger that invoked this build run + + + :param trigger_id: The trigger_id of this GithubBuildRunSource. + :type: str + """ + self._trigger_id = trigger_id + + @property + def trigger_info(self): + """ + **[Required]** Gets the trigger_info of this GithubBuildRunSource. + + :return: The trigger_info of this GithubBuildRunSource. + :rtype: oci.devops.models.TriggerInfo + """ + return self._trigger_info + + @trigger_info.setter + def trigger_info(self, trigger_info): + """ + Sets the trigger_info of this GithubBuildRunSource. + + :param trigger_info: The trigger_info of this GithubBuildRunSource. + :type: oci.devops.models.TriggerInfo + """ + self._trigger_info = trigger_info + + 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/devops/models/github_build_source.py b/src/oci/devops/models/github_build_source.py new file mode 100644 index 0000000000..9afd1995cf --- /dev/null +++ b/src/oci/devops/models/github_build_source.py @@ -0,0 +1,101 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .build_source import BuildSource +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 GithubBuildSource(BuildSource): + """ + Github Build Source for Build Stage + """ + + def __init__(self, **kwargs): + """ + Initializes a new GithubBuildSource object with values from keyword arguments. The default value of the :py:attr:`~oci.devops.models.GithubBuildSource.connection_type` attribute + of this class is ``GITHUB`` and it should not be changed. + 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 GithubBuildSource. + :type name: str + + :param connection_type: + The value to assign to the connection_type property of this GithubBuildSource. + Allowed values for this property are: "GITHUB", "GITLAB", "DEVOPS_CODE_REPOSITORY" + :type connection_type: str + + :param repository_url: + The value to assign to the repository_url property of this GithubBuildSource. + :type repository_url: str + + :param branch: + The value to assign to the branch property of this GithubBuildSource. + :type branch: str + + :param connection_id: + The value to assign to the connection_id property of this GithubBuildSource. + :type connection_id: str + + """ + self.swagger_types = { + 'name': 'str', + 'connection_type': 'str', + 'repository_url': 'str', + 'branch': 'str', + 'connection_id': 'str' + } + + self.attribute_map = { + 'name': 'name', + 'connection_type': 'connectionType', + 'repository_url': 'repositoryUrl', + 'branch': 'branch', + 'connection_id': 'connectionId' + } + + self._name = None + self._connection_type = None + self._repository_url = None + self._branch = None + self._connection_id = None + self._connection_type = 'GITHUB' + + @property + def connection_id(self): + """ + **[Required]** Gets the connection_id of this GithubBuildSource. + Connection identifier pertinent to GITHUB source provider + + + :return: The connection_id of this GithubBuildSource. + :rtype: str + """ + return self._connection_id + + @connection_id.setter + def connection_id(self, connection_id): + """ + Sets the connection_id of this GithubBuildSource. + Connection identifier pertinent to GITHUB source provider + + + :param connection_id: The connection_id of this GithubBuildSource. + :type: str + """ + self._connection_id = connection_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/devops/models/github_filter.py b/src/oci/devops/models/github_filter.py new file mode 100644 index 0000000000..44add92edb --- /dev/null +++ b/src/oci/devops/models/github_filter.py @@ -0,0 +1,134 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .filter import Filter +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 GithubFilter(Filter): + """ + The filter for Github events + """ + + #: A constant which can be used with the events property of a GithubFilter. + #: This constant has a value of "PUSH" + EVENTS_PUSH = "PUSH" + + #: A constant which can be used with the events property of a GithubFilter. + #: This constant has a value of "PULL_REQUEST_CREATED" + EVENTS_PULL_REQUEST_CREATED = "PULL_REQUEST_CREATED" + + #: A constant which can be used with the events property of a GithubFilter. + #: This constant has a value of "PULL_REQUEST_UPDATED" + EVENTS_PULL_REQUEST_UPDATED = "PULL_REQUEST_UPDATED" + + #: A constant which can be used with the events property of a GithubFilter. + #: This constant has a value of "PULL_REQUEST_REOPENED" + EVENTS_PULL_REQUEST_REOPENED = "PULL_REQUEST_REOPENED" + + #: A constant which can be used with the events property of a GithubFilter. + #: This constant has a value of "PULL_REQUEST_MERGED" + EVENTS_PULL_REQUEST_MERGED = "PULL_REQUEST_MERGED" + + def __init__(self, **kwargs): + """ + Initializes a new GithubFilter object with values from keyword arguments. The default value of the :py:attr:`~oci.devops.models.GithubFilter.trigger_source` attribute + of this class is ``GITHUB`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param trigger_source: + The value to assign to the trigger_source property of this GithubFilter. + :type trigger_source: str + + :param events: + The value to assign to the events property of this GithubFilter. + Allowed values for items in this list are: "PUSH", "PULL_REQUEST_CREATED", "PULL_REQUEST_UPDATED", "PULL_REQUEST_REOPENED", "PULL_REQUEST_MERGED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type events: list[str] + + :param include: + The value to assign to the include property of this GithubFilter. + :type include: oci.devops.models.GithubFilterAttributes + + """ + self.swagger_types = { + 'trigger_source': 'str', + 'events': 'list[str]', + 'include': 'GithubFilterAttributes' + } + + self.attribute_map = { + 'trigger_source': 'triggerSource', + 'events': 'events', + 'include': 'include' + } + + self._trigger_source = None + self._events = None + self._include = None + self._trigger_source = 'GITHUB' + + @property + def events(self): + """ + Gets the events of this GithubFilter. + The events, example PUSH, PULL_REQUEST_MERGE etc. + + Allowed values for items in this list are: "PUSH", "PULL_REQUEST_CREATED", "PULL_REQUEST_UPDATED", "PULL_REQUEST_REOPENED", "PULL_REQUEST_MERGED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The events of this GithubFilter. + :rtype: list[str] + """ + return self._events + + @events.setter + def events(self, events): + """ + Sets the events of this GithubFilter. + The events, example PUSH, PULL_REQUEST_MERGE etc. + + + :param events: The events of this GithubFilter. + :type: list[str] + """ + allowed_values = ["PUSH", "PULL_REQUEST_CREATED", "PULL_REQUEST_UPDATED", "PULL_REQUEST_REOPENED", "PULL_REQUEST_MERGED"] + if events: + events[:] = ['UNKNOWN_ENUM_VALUE' if not value_allowed_none_or_none_sentinel(x, allowed_values) else x for x in events] + self._events = events + + @property + def include(self): + """ + Gets the include of this GithubFilter. + + :return: The include of this GithubFilter. + :rtype: oci.devops.models.GithubFilterAttributes + """ + return self._include + + @include.setter + def include(self, include): + """ + Sets the include of this GithubFilter. + + :param include: The include of this GithubFilter. + :type: oci.devops.models.GithubFilterAttributes + """ + self._include = include + + 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/devops/models/github_filter_attributes.py b/src/oci/devops/models/github_filter_attributes.py new file mode 100644 index 0000000000..3f0a81dfb9 --- /dev/null +++ b/src/oci/devops/models/github_filter_attributes.py @@ -0,0 +1,101 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 GithubFilterAttributes(object): + """ + Attributes to filter Github events + """ + + def __init__(self, **kwargs): + """ + Initializes a new GithubFilterAttributes object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param head_ref: + The value to assign to the head_ref property of this GithubFilterAttributes. + :type head_ref: str + + :param base_ref: + The value to assign to the base_ref property of this GithubFilterAttributes. + :type base_ref: str + + """ + self.swagger_types = { + 'head_ref': 'str', + 'base_ref': 'str' + } + + self.attribute_map = { + 'head_ref': 'headRef', + 'base_ref': 'baseRef' + } + + self._head_ref = None + self._base_ref = None + + @property + def head_ref(self): + """ + Gets the head_ref of this GithubFilterAttributes. + Branch for push event; source branch for pull requests + + + :return: The head_ref of this GithubFilterAttributes. + :rtype: str + """ + return self._head_ref + + @head_ref.setter + def head_ref(self, head_ref): + """ + Sets the head_ref of this GithubFilterAttributes. + Branch for push event; source branch for pull requests + + + :param head_ref: The head_ref of this GithubFilterAttributes. + :type: str + """ + self._head_ref = head_ref + + @property + def base_ref(self): + """ + Gets the base_ref of this GithubFilterAttributes. + The target branch for pull requests; not applicable for push + + + :return: The base_ref of this GithubFilterAttributes. + :rtype: str + """ + return self._base_ref + + @base_ref.setter + def base_ref(self, base_ref): + """ + Sets the base_ref of this GithubFilterAttributes. + The target branch for pull requests; not applicable for push + + + :param base_ref: The base_ref of this GithubFilterAttributes. + :type: str + """ + self._base_ref = base_ref + + 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/devops/models/github_trigger.py b/src/oci/devops/models/github_trigger.py new file mode 100644 index 0000000000..4aa2569512 --- /dev/null +++ b/src/oci/devops/models/github_trigger.py @@ -0,0 +1,172 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .trigger import Trigger +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 GithubTrigger(Trigger): + """ + Trigger specific to Github + """ + + def __init__(self, **kwargs): + """ + Initializes a new GithubTrigger object with values from keyword arguments. The default value of the :py:attr:`~oci.devops.models.GithubTrigger.trigger_source` attribute + of this class is ``GITHUB`` and it should not be changed. + 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 GithubTrigger. + :type id: str + + :param display_name: + The value to assign to the display_name property of this GithubTrigger. + :type display_name: str + + :param description: + The value to assign to the description property of this GithubTrigger. + :type description: str + + :param project_id: + The value to assign to the project_id property of this GithubTrigger. + :type project_id: str + + :param compartment_id: + The value to assign to the compartment_id property of this GithubTrigger. + :type compartment_id: str + + :param trigger_source: + The value to assign to the trigger_source property of this GithubTrigger. + Allowed values for this property are: "GITHUB", "GITLAB", "DEVOPS_CODE_REPOSITORY" + :type trigger_source: str + + :param time_created: + The value to assign to the time_created property of this GithubTrigger. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this GithubTrigger. + :type time_updated: datetime + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this GithubTrigger. + Allowed values for this property are: "ACTIVE" + :type lifecycle_state: str + + :param lifecycle_details: + The value to assign to the lifecycle_details property of this GithubTrigger. + :type lifecycle_details: str + + :param actions: + The value to assign to the actions property of this GithubTrigger. + :type actions: list[oci.devops.models.TriggerAction] + + :param freeform_tags: + The value to assign to the freeform_tags property of this GithubTrigger. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this GithubTrigger. + :type defined_tags: dict(str, dict(str, object)) + + :param system_tags: + The value to assign to the system_tags property of this GithubTrigger. + :type system_tags: dict(str, dict(str, object)) + + :param trigger_url: + The value to assign to the trigger_url property of this GithubTrigger. + :type trigger_url: str + + """ + self.swagger_types = { + 'id': 'str', + 'display_name': 'str', + 'description': 'str', + 'project_id': 'str', + 'compartment_id': 'str', + 'trigger_source': 'str', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'lifecycle_state': 'str', + 'lifecycle_details': 'str', + 'actions': 'list[TriggerAction]', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'system_tags': 'dict(str, dict(str, object))', + 'trigger_url': 'str' + } + + self.attribute_map = { + 'id': 'id', + 'display_name': 'displayName', + 'description': 'description', + 'project_id': 'projectId', + 'compartment_id': 'compartmentId', + 'trigger_source': 'triggerSource', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'lifecycle_state': 'lifecycleState', + 'lifecycle_details': 'lifecycleDetails', + 'actions': 'actions', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'system_tags': 'systemTags', + 'trigger_url': 'triggerUrl' + } + + self._id = None + self._display_name = None + self._description = None + self._project_id = None + self._compartment_id = None + self._trigger_source = None + self._time_created = None + self._time_updated = None + self._lifecycle_state = None + self._lifecycle_details = None + self._actions = None + self._freeform_tags = None + self._defined_tags = None + self._system_tags = None + self._trigger_url = None + self._trigger_source = 'GITHUB' + + @property + def trigger_url(self): + """ + **[Required]** Gets the trigger_url of this GithubTrigger. + The endpoint which listens to Trigger events + + + :return: The trigger_url of this GithubTrigger. + :rtype: str + """ + return self._trigger_url + + @trigger_url.setter + def trigger_url(self, trigger_url): + """ + Sets the trigger_url of this GithubTrigger. + The endpoint which listens to Trigger events + + + :param trigger_url: The trigger_url of this GithubTrigger. + :type: str + """ + self._trigger_url = trigger_url + + 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/devops/models/github_trigger_create_result.py b/src/oci/devops/models/github_trigger_create_result.py new file mode 100644 index 0000000000..e974d770ba --- /dev/null +++ b/src/oci/devops/models/github_trigger_create_result.py @@ -0,0 +1,201 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .trigger_create_result import TriggerCreateResult +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 GithubTriggerCreateResult(TriggerCreateResult): + """ + Trigger Create response specific to Github + """ + + def __init__(self, **kwargs): + """ + Initializes a new GithubTriggerCreateResult object with values from keyword arguments. The default value of the :py:attr:`~oci.devops.models.GithubTriggerCreateResult.trigger_source` attribute + of this class is ``GITHUB`` and it should not be changed. + 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 GithubTriggerCreateResult. + :type id: str + + :param display_name: + The value to assign to the display_name property of this GithubTriggerCreateResult. + :type display_name: str + + :param description: + The value to assign to the description property of this GithubTriggerCreateResult. + :type description: str + + :param project_id: + The value to assign to the project_id property of this GithubTriggerCreateResult. + :type project_id: str + + :param compartment_id: + The value to assign to the compartment_id property of this GithubTriggerCreateResult. + :type compartment_id: str + + :param trigger_source: + The value to assign to the trigger_source property of this GithubTriggerCreateResult. + :type trigger_source: str + + :param time_created: + The value to assign to the time_created property of this GithubTriggerCreateResult. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this GithubTriggerCreateResult. + :type time_updated: datetime + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this GithubTriggerCreateResult. + :type lifecycle_state: str + + :param lifecycle_details: + The value to assign to the lifecycle_details property of this GithubTriggerCreateResult. + :type lifecycle_details: str + + :param actions: + The value to assign to the actions property of this GithubTriggerCreateResult. + :type actions: list[oci.devops.models.TriggerAction] + + :param freeform_tags: + The value to assign to the freeform_tags property of this GithubTriggerCreateResult. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this GithubTriggerCreateResult. + :type defined_tags: dict(str, dict(str, object)) + + :param system_tags: + The value to assign to the system_tags property of this GithubTriggerCreateResult. + :type system_tags: dict(str, dict(str, object)) + + :param secret: + The value to assign to the secret property of this GithubTriggerCreateResult. + :type secret: str + + :param trigger_url: + The value to assign to the trigger_url property of this GithubTriggerCreateResult. + :type trigger_url: str + + """ + self.swagger_types = { + 'id': 'str', + 'display_name': 'str', + 'description': 'str', + 'project_id': 'str', + 'compartment_id': 'str', + 'trigger_source': 'str', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'lifecycle_state': 'str', + 'lifecycle_details': 'str', + 'actions': 'list[TriggerAction]', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'system_tags': 'dict(str, dict(str, object))', + 'secret': 'str', + 'trigger_url': 'str' + } + + self.attribute_map = { + 'id': 'id', + 'display_name': 'displayName', + 'description': 'description', + 'project_id': 'projectId', + 'compartment_id': 'compartmentId', + 'trigger_source': 'triggerSource', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'lifecycle_state': 'lifecycleState', + 'lifecycle_details': 'lifecycleDetails', + 'actions': 'actions', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'system_tags': 'systemTags', + 'secret': 'secret', + 'trigger_url': 'triggerUrl' + } + + self._id = None + self._display_name = None + self._description = None + self._project_id = None + self._compartment_id = None + self._trigger_source = None + self._time_created = None + self._time_updated = None + self._lifecycle_state = None + self._lifecycle_details = None + self._actions = None + self._freeform_tags = None + self._defined_tags = None + self._system_tags = None + self._secret = None + self._trigger_url = None + self._trigger_source = 'GITHUB' + + @property + def secret(self): + """ + **[Required]** Gets the secret of this GithubTriggerCreateResult. + The secret used to validate the incoming Trigger call (this is visible only once after the resource is created) + + + :return: The secret of this GithubTriggerCreateResult. + :rtype: str + """ + return self._secret + + @secret.setter + def secret(self, secret): + """ + Sets the secret of this GithubTriggerCreateResult. + The secret used to validate the incoming Trigger call (this is visible only once after the resource is created) + + + :param secret: The secret of this GithubTriggerCreateResult. + :type: str + """ + self._secret = secret + + @property + def trigger_url(self): + """ + **[Required]** Gets the trigger_url of this GithubTriggerCreateResult. + The endpoint which listens to Trigger events + + + :return: The trigger_url of this GithubTriggerCreateResult. + :rtype: str + """ + return self._trigger_url + + @trigger_url.setter + def trigger_url(self, trigger_url): + """ + Sets the trigger_url of this GithubTriggerCreateResult. + The endpoint which listens to Trigger events + + + :param trigger_url: The trigger_url of this GithubTriggerCreateResult. + :type: str + """ + self._trigger_url = trigger_url + + 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/devops/models/github_trigger_summary.py b/src/oci/devops/models/github_trigger_summary.py new file mode 100644 index 0000000000..7e8f36a8c9 --- /dev/null +++ b/src/oci/devops/models/github_trigger_summary.py @@ -0,0 +1,132 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .trigger_summary import TriggerSummary +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 GithubTriggerSummary(TriggerSummary): + """ + Summary of the Github Trigger. + """ + + def __init__(self, **kwargs): + """ + Initializes a new GithubTriggerSummary object with values from keyword arguments. The default value of the :py:attr:`~oci.devops.models.GithubTriggerSummary.trigger_source` attribute + of this class is ``GITHUB`` and it should not be changed. + 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 GithubTriggerSummary. + :type id: str + + :param display_name: + The value to assign to the display_name property of this GithubTriggerSummary. + :type display_name: str + + :param description: + The value to assign to the description property of this GithubTriggerSummary. + :type description: str + + :param project_id: + The value to assign to the project_id property of this GithubTriggerSummary. + :type project_id: str + + :param compartment_id: + The value to assign to the compartment_id property of this GithubTriggerSummary. + :type compartment_id: str + + :param trigger_source: + The value to assign to the trigger_source property of this GithubTriggerSummary. + :type trigger_source: str + + :param time_created: + The value to assign to the time_created property of this GithubTriggerSummary. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this GithubTriggerSummary. + :type time_updated: datetime + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this GithubTriggerSummary. + :type lifecycle_state: str + + :param lifecycle_details: + The value to assign to the lifecycle_details property of this GithubTriggerSummary. + :type lifecycle_details: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this GithubTriggerSummary. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this GithubTriggerSummary. + :type defined_tags: dict(str, dict(str, object)) + + :param system_tags: + The value to assign to the system_tags property of this GithubTriggerSummary. + :type system_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'id': 'str', + 'display_name': 'str', + 'description': 'str', + 'project_id': 'str', + 'compartment_id': 'str', + 'trigger_source': 'str', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'lifecycle_state': 'str', + 'lifecycle_details': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'system_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'id': 'id', + 'display_name': 'displayName', + 'description': 'description', + 'project_id': 'projectId', + 'compartment_id': 'compartmentId', + 'trigger_source': 'triggerSource', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'lifecycle_state': 'lifecycleState', + 'lifecycle_details': 'lifecycleDetails', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'system_tags': 'systemTags' + } + + self._id = None + self._display_name = None + self._description = None + self._project_id = None + self._compartment_id = None + self._trigger_source = None + self._time_created = None + self._time_updated = None + self._lifecycle_state = None + self._lifecycle_details = None + self._freeform_tags = None + self._defined_tags = None + self._system_tags = None + self._trigger_source = 'GITHUB' + + 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/devops/models/gitlab_access_token_connection.py b/src/oci/devops/models/gitlab_access_token_connection.py new file mode 100644 index 0000000000..4deb459c44 --- /dev/null +++ b/src/oci/devops/models/gitlab_access_token_connection.py @@ -0,0 +1,159 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .connection import Connection +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 GitlabAccessTokenConnection(Connection): + """ + The properties that define a connection of the type `GITLAB_ACCESS_TOKEN`. + This type corresponds to a connection in GitLab that is authenticated with a personal access token. + """ + + def __init__(self, **kwargs): + """ + Initializes a new GitlabAccessTokenConnection object with values from keyword arguments. The default value of the :py:attr:`~oci.devops.models.GitlabAccessTokenConnection.connection_type` attribute + of this class is ``GITLAB_ACCESS_TOKEN`` and it should not be changed. + 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 GitlabAccessTokenConnection. + :type id: str + + :param description: + The value to assign to the description property of this GitlabAccessTokenConnection. + :type description: str + + :param display_name: + The value to assign to the display_name property of this GitlabAccessTokenConnection. + :type display_name: str + + :param compartment_id: + The value to assign to the compartment_id property of this GitlabAccessTokenConnection. + :type compartment_id: str + + :param project_id: + The value to assign to the project_id property of this GitlabAccessTokenConnection. + :type project_id: str + + :param connection_type: + The value to assign to the connection_type property of this GitlabAccessTokenConnection. + Allowed values for this property are: "GITHUB_ACCESS_TOKEN", "GITLAB_ACCESS_TOKEN" + :type connection_type: str + + :param time_created: + The value to assign to the time_created property of this GitlabAccessTokenConnection. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this GitlabAccessTokenConnection. + :type time_updated: datetime + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this GitlabAccessTokenConnection. + Allowed values for this property are: "ACTIVE" + :type lifecycle_state: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this GitlabAccessTokenConnection. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this GitlabAccessTokenConnection. + :type defined_tags: dict(str, dict(str, object)) + + :param system_tags: + The value to assign to the system_tags property of this GitlabAccessTokenConnection. + :type system_tags: dict(str, dict(str, object)) + + :param access_token: + The value to assign to the access_token property of this GitlabAccessTokenConnection. + :type access_token: str + + """ + self.swagger_types = { + 'id': 'str', + 'description': 'str', + 'display_name': 'str', + 'compartment_id': 'str', + 'project_id': 'str', + 'connection_type': 'str', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'lifecycle_state': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'system_tags': 'dict(str, dict(str, object))', + 'access_token': 'str' + } + + self.attribute_map = { + 'id': 'id', + 'description': 'description', + 'display_name': 'displayName', + 'compartment_id': 'compartmentId', + 'project_id': 'projectId', + 'connection_type': 'connectionType', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'lifecycle_state': 'lifecycleState', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'system_tags': 'systemTags', + 'access_token': 'accessToken' + } + + self._id = None + self._description = None + self._display_name = None + self._compartment_id = None + self._project_id = None + self._connection_type = None + self._time_created = None + self._time_updated = None + self._lifecycle_state = None + self._freeform_tags = None + self._defined_tags = None + self._system_tags = None + self._access_token = None + self._connection_type = 'GITLAB_ACCESS_TOKEN' + + @property + def access_token(self): + """ + **[Required]** Gets the access_token of this GitlabAccessTokenConnection. + OCID of personal access token saved in secret store + + + :return: The access_token of this GitlabAccessTokenConnection. + :rtype: str + """ + return self._access_token + + @access_token.setter + def access_token(self, access_token): + """ + Sets the access_token of this GitlabAccessTokenConnection. + OCID of personal access token saved in secret store + + + :param access_token: The access_token of this GitlabAccessTokenConnection. + :type: str + """ + self._access_token = access_token + + 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/devops/models/gitlab_access_token_connection_summary.py b/src/oci/devops/models/gitlab_access_token_connection_summary.py new file mode 100644 index 0000000000..17ca8931b3 --- /dev/null +++ b/src/oci/devops/models/gitlab_access_token_connection_summary.py @@ -0,0 +1,157 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .connection_summary import ConnectionSummary +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 GitlabAccessTokenConnectionSummary(ConnectionSummary): + """ + Summary information for a connection of the type `GITLAB_ACCESS_TOKEN`. + This type corresponds to a connection in GitLab that is authenticated with a personal access token. + """ + + def __init__(self, **kwargs): + """ + Initializes a new GitlabAccessTokenConnectionSummary object with values from keyword arguments. The default value of the :py:attr:`~oci.devops.models.GitlabAccessTokenConnectionSummary.connection_type` attribute + of this class is ``GITLAB_ACCESS_TOKEN`` and it should not be changed. + 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 GitlabAccessTokenConnectionSummary. + :type id: str + + :param display_name: + The value to assign to the display_name property of this GitlabAccessTokenConnectionSummary. + :type display_name: str + + :param description: + The value to assign to the description property of this GitlabAccessTokenConnectionSummary. + :type description: str + + :param compartment_id: + The value to assign to the compartment_id property of this GitlabAccessTokenConnectionSummary. + :type compartment_id: str + + :param project_id: + The value to assign to the project_id property of this GitlabAccessTokenConnectionSummary. + :type project_id: str + + :param connection_type: + The value to assign to the connection_type property of this GitlabAccessTokenConnectionSummary. + :type connection_type: str + + :param time_created: + The value to assign to the time_created property of this GitlabAccessTokenConnectionSummary. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this GitlabAccessTokenConnectionSummary. + :type time_updated: datetime + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this GitlabAccessTokenConnectionSummary. + :type lifecycle_state: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this GitlabAccessTokenConnectionSummary. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this GitlabAccessTokenConnectionSummary. + :type defined_tags: dict(str, dict(str, object)) + + :param system_tags: + The value to assign to the system_tags property of this GitlabAccessTokenConnectionSummary. + :type system_tags: dict(str, dict(str, object)) + + :param access_token: + The value to assign to the access_token property of this GitlabAccessTokenConnectionSummary. + :type access_token: str + + """ + self.swagger_types = { + 'id': 'str', + 'display_name': 'str', + 'description': 'str', + 'compartment_id': 'str', + 'project_id': 'str', + 'connection_type': 'str', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'lifecycle_state': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'system_tags': 'dict(str, dict(str, object))', + 'access_token': 'str' + } + + self.attribute_map = { + 'id': 'id', + 'display_name': 'displayName', + 'description': 'description', + 'compartment_id': 'compartmentId', + 'project_id': 'projectId', + 'connection_type': 'connectionType', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'lifecycle_state': 'lifecycleState', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'system_tags': 'systemTags', + 'access_token': 'accessToken' + } + + self._id = None + self._display_name = None + self._description = None + self._compartment_id = None + self._project_id = None + self._connection_type = None + self._time_created = None + self._time_updated = None + self._lifecycle_state = None + self._freeform_tags = None + self._defined_tags = None + self._system_tags = None + self._access_token = None + self._connection_type = 'GITLAB_ACCESS_TOKEN' + + @property + def access_token(self): + """ + **[Required]** Gets the access_token of this GitlabAccessTokenConnectionSummary. + OCID of personal access token saved in secret store + + + :return: The access_token of this GitlabAccessTokenConnectionSummary. + :rtype: str + """ + return self._access_token + + @access_token.setter + def access_token(self, access_token): + """ + Sets the access_token of this GitlabAccessTokenConnectionSummary. + OCID of personal access token saved in secret store + + + :param access_token: The access_token of this GitlabAccessTokenConnectionSummary. + :type: str + """ + self._access_token = access_token + + 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/devops/models/gitlab_build_run_source.py b/src/oci/devops/models/gitlab_build_run_source.py new file mode 100644 index 0000000000..29fb001b1e --- /dev/null +++ b/src/oci/devops/models/gitlab_build_run_source.py @@ -0,0 +1,107 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .build_run_source import BuildRunSource +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 GitlabBuildRunSource(BuildRunSource): + """ + Specifies details of build run through Gitlab. + """ + + def __init__(self, **kwargs): + """ + Initializes a new GitlabBuildRunSource object with values from keyword arguments. The default value of the :py:attr:`~oci.devops.models.GitlabBuildRunSource.source_type` attribute + of this class is ``GITLAB`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param source_type: + The value to assign to the source_type property of this GitlabBuildRunSource. + Allowed values for this property are: "MANUAL", "GITHUB", "GITLAB", "DEVOPS_CODE_REPOSITORY" + :type source_type: str + + :param trigger_id: + The value to assign to the trigger_id property of this GitlabBuildRunSource. + :type trigger_id: str + + :param trigger_info: + The value to assign to the trigger_info property of this GitlabBuildRunSource. + :type trigger_info: oci.devops.models.TriggerInfo + + """ + self.swagger_types = { + 'source_type': 'str', + 'trigger_id': 'str', + 'trigger_info': 'TriggerInfo' + } + + self.attribute_map = { + 'source_type': 'sourceType', + 'trigger_id': 'triggerId', + 'trigger_info': 'triggerInfo' + } + + self._source_type = None + self._trigger_id = None + self._trigger_info = None + self._source_type = 'GITLAB' + + @property + def trigger_id(self): + """ + **[Required]** Gets the trigger_id of this GitlabBuildRunSource. + The Trigger that invoked this build run + + + :return: The trigger_id of this GitlabBuildRunSource. + :rtype: str + """ + return self._trigger_id + + @trigger_id.setter + def trigger_id(self, trigger_id): + """ + Sets the trigger_id of this GitlabBuildRunSource. + The Trigger that invoked this build run + + + :param trigger_id: The trigger_id of this GitlabBuildRunSource. + :type: str + """ + self._trigger_id = trigger_id + + @property + def trigger_info(self): + """ + **[Required]** Gets the trigger_info of this GitlabBuildRunSource. + + :return: The trigger_info of this GitlabBuildRunSource. + :rtype: oci.devops.models.TriggerInfo + """ + return self._trigger_info + + @trigger_info.setter + def trigger_info(self, trigger_info): + """ + Sets the trigger_info of this GitlabBuildRunSource. + + :param trigger_info: The trigger_info of this GitlabBuildRunSource. + :type: oci.devops.models.TriggerInfo + """ + self._trigger_info = trigger_info + + 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/devops/models/gitlab_build_source.py b/src/oci/devops/models/gitlab_build_source.py new file mode 100644 index 0000000000..ad48275102 --- /dev/null +++ b/src/oci/devops/models/gitlab_build_source.py @@ -0,0 +1,101 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .build_source import BuildSource +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 GitlabBuildSource(BuildSource): + """ + Gitlab Build Source for Build Stage + """ + + def __init__(self, **kwargs): + """ + Initializes a new GitlabBuildSource object with values from keyword arguments. The default value of the :py:attr:`~oci.devops.models.GitlabBuildSource.connection_type` attribute + of this class is ``GITLAB`` and it should not be changed. + 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 GitlabBuildSource. + :type name: str + + :param connection_type: + The value to assign to the connection_type property of this GitlabBuildSource. + Allowed values for this property are: "GITHUB", "GITLAB", "DEVOPS_CODE_REPOSITORY" + :type connection_type: str + + :param repository_url: + The value to assign to the repository_url property of this GitlabBuildSource. + :type repository_url: str + + :param branch: + The value to assign to the branch property of this GitlabBuildSource. + :type branch: str + + :param connection_id: + The value to assign to the connection_id property of this GitlabBuildSource. + :type connection_id: str + + """ + self.swagger_types = { + 'name': 'str', + 'connection_type': 'str', + 'repository_url': 'str', + 'branch': 'str', + 'connection_id': 'str' + } + + self.attribute_map = { + 'name': 'name', + 'connection_type': 'connectionType', + 'repository_url': 'repositoryUrl', + 'branch': 'branch', + 'connection_id': 'connectionId' + } + + self._name = None + self._connection_type = None + self._repository_url = None + self._branch = None + self._connection_id = None + self._connection_type = 'GITLAB' + + @property + def connection_id(self): + """ + **[Required]** Gets the connection_id of this GitlabBuildSource. + Connection identifier pertinent to GITLAB source provider + + + :return: The connection_id of this GitlabBuildSource. + :rtype: str + """ + return self._connection_id + + @connection_id.setter + def connection_id(self, connection_id): + """ + Sets the connection_id of this GitlabBuildSource. + Connection identifier pertinent to GITLAB source provider + + + :param connection_id: The connection_id of this GitlabBuildSource. + :type: str + """ + self._connection_id = connection_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/devops/models/gitlab_filter.py b/src/oci/devops/models/gitlab_filter.py new file mode 100644 index 0000000000..dbb10ead89 --- /dev/null +++ b/src/oci/devops/models/gitlab_filter.py @@ -0,0 +1,134 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .filter import Filter +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 GitlabFilter(Filter): + """ + The filter for Gitlab events + """ + + #: A constant which can be used with the events property of a GitlabFilter. + #: This constant has a value of "PUSH" + EVENTS_PUSH = "PUSH" + + #: A constant which can be used with the events property of a GitlabFilter. + #: This constant has a value of "PULL_REQUEST_CREATED" + EVENTS_PULL_REQUEST_CREATED = "PULL_REQUEST_CREATED" + + #: A constant which can be used with the events property of a GitlabFilter. + #: This constant has a value of "PULL_REQUEST_UPDATED" + EVENTS_PULL_REQUEST_UPDATED = "PULL_REQUEST_UPDATED" + + #: A constant which can be used with the events property of a GitlabFilter. + #: This constant has a value of "PULL_REQUEST_REOPENED" + EVENTS_PULL_REQUEST_REOPENED = "PULL_REQUEST_REOPENED" + + #: A constant which can be used with the events property of a GitlabFilter. + #: This constant has a value of "PULL_REQUEST_MERGED" + EVENTS_PULL_REQUEST_MERGED = "PULL_REQUEST_MERGED" + + def __init__(self, **kwargs): + """ + Initializes a new GitlabFilter object with values from keyword arguments. The default value of the :py:attr:`~oci.devops.models.GitlabFilter.trigger_source` attribute + of this class is ``GITLAB`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param trigger_source: + The value to assign to the trigger_source property of this GitlabFilter. + :type trigger_source: str + + :param events: + The value to assign to the events property of this GitlabFilter. + Allowed values for items in this list are: "PUSH", "PULL_REQUEST_CREATED", "PULL_REQUEST_UPDATED", "PULL_REQUEST_REOPENED", "PULL_REQUEST_MERGED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type events: list[str] + + :param include: + The value to assign to the include property of this GitlabFilter. + :type include: oci.devops.models.GitlabFilterAttributes + + """ + self.swagger_types = { + 'trigger_source': 'str', + 'events': 'list[str]', + 'include': 'GitlabFilterAttributes' + } + + self.attribute_map = { + 'trigger_source': 'triggerSource', + 'events': 'events', + 'include': 'include' + } + + self._trigger_source = None + self._events = None + self._include = None + self._trigger_source = 'GITLAB' + + @property + def events(self): + """ + Gets the events of this GitlabFilter. + The events, example PUSH, PULL_REQUEST_MERGE etc. + + Allowed values for items in this list are: "PUSH", "PULL_REQUEST_CREATED", "PULL_REQUEST_UPDATED", "PULL_REQUEST_REOPENED", "PULL_REQUEST_MERGED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The events of this GitlabFilter. + :rtype: list[str] + """ + return self._events + + @events.setter + def events(self, events): + """ + Sets the events of this GitlabFilter. + The events, example PUSH, PULL_REQUEST_MERGE etc. + + + :param events: The events of this GitlabFilter. + :type: list[str] + """ + allowed_values = ["PUSH", "PULL_REQUEST_CREATED", "PULL_REQUEST_UPDATED", "PULL_REQUEST_REOPENED", "PULL_REQUEST_MERGED"] + if events: + events[:] = ['UNKNOWN_ENUM_VALUE' if not value_allowed_none_or_none_sentinel(x, allowed_values) else x for x in events] + self._events = events + + @property + def include(self): + """ + Gets the include of this GitlabFilter. + + :return: The include of this GitlabFilter. + :rtype: oci.devops.models.GitlabFilterAttributes + """ + return self._include + + @include.setter + def include(self, include): + """ + Sets the include of this GitlabFilter. + + :param include: The include of this GitlabFilter. + :type: oci.devops.models.GitlabFilterAttributes + """ + self._include = include + + 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/devops/models/gitlab_filter_attributes.py b/src/oci/devops/models/gitlab_filter_attributes.py new file mode 100644 index 0000000000..2d65defe26 --- /dev/null +++ b/src/oci/devops/models/gitlab_filter_attributes.py @@ -0,0 +1,101 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 GitlabFilterAttributes(object): + """ + Attributes to filter Gitlab events + """ + + def __init__(self, **kwargs): + """ + Initializes a new GitlabFilterAttributes object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param head_ref: + The value to assign to the head_ref property of this GitlabFilterAttributes. + :type head_ref: str + + :param base_ref: + The value to assign to the base_ref property of this GitlabFilterAttributes. + :type base_ref: str + + """ + self.swagger_types = { + 'head_ref': 'str', + 'base_ref': 'str' + } + + self.attribute_map = { + 'head_ref': 'headRef', + 'base_ref': 'baseRef' + } + + self._head_ref = None + self._base_ref = None + + @property + def head_ref(self): + """ + Gets the head_ref of this GitlabFilterAttributes. + Branch for push event; source branch for pull requests + + + :return: The head_ref of this GitlabFilterAttributes. + :rtype: str + """ + return self._head_ref + + @head_ref.setter + def head_ref(self, head_ref): + """ + Sets the head_ref of this GitlabFilterAttributes. + Branch for push event; source branch for pull requests + + + :param head_ref: The head_ref of this GitlabFilterAttributes. + :type: str + """ + self._head_ref = head_ref + + @property + def base_ref(self): + """ + Gets the base_ref of this GitlabFilterAttributes. + The target branch for pull requests; not applicable for push + + + :return: The base_ref of this GitlabFilterAttributes. + :rtype: str + """ + return self._base_ref + + @base_ref.setter + def base_ref(self, base_ref): + """ + Sets the base_ref of this GitlabFilterAttributes. + The target branch for pull requests; not applicable for push + + + :param base_ref: The base_ref of this GitlabFilterAttributes. + :type: str + """ + self._base_ref = base_ref + + 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/devops/models/gitlab_trigger.py b/src/oci/devops/models/gitlab_trigger.py new file mode 100644 index 0000000000..9362023fb2 --- /dev/null +++ b/src/oci/devops/models/gitlab_trigger.py @@ -0,0 +1,172 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .trigger import Trigger +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 GitlabTrigger(Trigger): + """ + Trigger specific to Gitlab + """ + + def __init__(self, **kwargs): + """ + Initializes a new GitlabTrigger object with values from keyword arguments. The default value of the :py:attr:`~oci.devops.models.GitlabTrigger.trigger_source` attribute + of this class is ``GITLAB`` and it should not be changed. + 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 GitlabTrigger. + :type id: str + + :param display_name: + The value to assign to the display_name property of this GitlabTrigger. + :type display_name: str + + :param description: + The value to assign to the description property of this GitlabTrigger. + :type description: str + + :param project_id: + The value to assign to the project_id property of this GitlabTrigger. + :type project_id: str + + :param compartment_id: + The value to assign to the compartment_id property of this GitlabTrigger. + :type compartment_id: str + + :param trigger_source: + The value to assign to the trigger_source property of this GitlabTrigger. + Allowed values for this property are: "GITHUB", "GITLAB", "DEVOPS_CODE_REPOSITORY" + :type trigger_source: str + + :param time_created: + The value to assign to the time_created property of this GitlabTrigger. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this GitlabTrigger. + :type time_updated: datetime + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this GitlabTrigger. + Allowed values for this property are: "ACTIVE" + :type lifecycle_state: str + + :param lifecycle_details: + The value to assign to the lifecycle_details property of this GitlabTrigger. + :type lifecycle_details: str + + :param actions: + The value to assign to the actions property of this GitlabTrigger. + :type actions: list[oci.devops.models.TriggerAction] + + :param freeform_tags: + The value to assign to the freeform_tags property of this GitlabTrigger. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this GitlabTrigger. + :type defined_tags: dict(str, dict(str, object)) + + :param system_tags: + The value to assign to the system_tags property of this GitlabTrigger. + :type system_tags: dict(str, dict(str, object)) + + :param trigger_url: + The value to assign to the trigger_url property of this GitlabTrigger. + :type trigger_url: str + + """ + self.swagger_types = { + 'id': 'str', + 'display_name': 'str', + 'description': 'str', + 'project_id': 'str', + 'compartment_id': 'str', + 'trigger_source': 'str', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'lifecycle_state': 'str', + 'lifecycle_details': 'str', + 'actions': 'list[TriggerAction]', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'system_tags': 'dict(str, dict(str, object))', + 'trigger_url': 'str' + } + + self.attribute_map = { + 'id': 'id', + 'display_name': 'displayName', + 'description': 'description', + 'project_id': 'projectId', + 'compartment_id': 'compartmentId', + 'trigger_source': 'triggerSource', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'lifecycle_state': 'lifecycleState', + 'lifecycle_details': 'lifecycleDetails', + 'actions': 'actions', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'system_tags': 'systemTags', + 'trigger_url': 'triggerUrl' + } + + self._id = None + self._display_name = None + self._description = None + self._project_id = None + self._compartment_id = None + self._trigger_source = None + self._time_created = None + self._time_updated = None + self._lifecycle_state = None + self._lifecycle_details = None + self._actions = None + self._freeform_tags = None + self._defined_tags = None + self._system_tags = None + self._trigger_url = None + self._trigger_source = 'GITLAB' + + @property + def trigger_url(self): + """ + **[Required]** Gets the trigger_url of this GitlabTrigger. + The endpoint which listens to Trigger events + + + :return: The trigger_url of this GitlabTrigger. + :rtype: str + """ + return self._trigger_url + + @trigger_url.setter + def trigger_url(self, trigger_url): + """ + Sets the trigger_url of this GitlabTrigger. + The endpoint which listens to Trigger events + + + :param trigger_url: The trigger_url of this GitlabTrigger. + :type: str + """ + self._trigger_url = trigger_url + + 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/devops/models/gitlab_trigger_create_result.py b/src/oci/devops/models/gitlab_trigger_create_result.py new file mode 100644 index 0000000000..f129b2e031 --- /dev/null +++ b/src/oci/devops/models/gitlab_trigger_create_result.py @@ -0,0 +1,201 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .trigger_create_result import TriggerCreateResult +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 GitlabTriggerCreateResult(TriggerCreateResult): + """ + Trigger Create response specific to Gitlab + """ + + def __init__(self, **kwargs): + """ + Initializes a new GitlabTriggerCreateResult object with values from keyword arguments. The default value of the :py:attr:`~oci.devops.models.GitlabTriggerCreateResult.trigger_source` attribute + of this class is ``GITLAB`` and it should not be changed. + 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 GitlabTriggerCreateResult. + :type id: str + + :param display_name: + The value to assign to the display_name property of this GitlabTriggerCreateResult. + :type display_name: str + + :param description: + The value to assign to the description property of this GitlabTriggerCreateResult. + :type description: str + + :param project_id: + The value to assign to the project_id property of this GitlabTriggerCreateResult. + :type project_id: str + + :param compartment_id: + The value to assign to the compartment_id property of this GitlabTriggerCreateResult. + :type compartment_id: str + + :param trigger_source: + The value to assign to the trigger_source property of this GitlabTriggerCreateResult. + :type trigger_source: str + + :param time_created: + The value to assign to the time_created property of this GitlabTriggerCreateResult. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this GitlabTriggerCreateResult. + :type time_updated: datetime + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this GitlabTriggerCreateResult. + :type lifecycle_state: str + + :param lifecycle_details: + The value to assign to the lifecycle_details property of this GitlabTriggerCreateResult. + :type lifecycle_details: str + + :param actions: + The value to assign to the actions property of this GitlabTriggerCreateResult. + :type actions: list[oci.devops.models.TriggerAction] + + :param freeform_tags: + The value to assign to the freeform_tags property of this GitlabTriggerCreateResult. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this GitlabTriggerCreateResult. + :type defined_tags: dict(str, dict(str, object)) + + :param system_tags: + The value to assign to the system_tags property of this GitlabTriggerCreateResult. + :type system_tags: dict(str, dict(str, object)) + + :param secret: + The value to assign to the secret property of this GitlabTriggerCreateResult. + :type secret: str + + :param trigger_url: + The value to assign to the trigger_url property of this GitlabTriggerCreateResult. + :type trigger_url: str + + """ + self.swagger_types = { + 'id': 'str', + 'display_name': 'str', + 'description': 'str', + 'project_id': 'str', + 'compartment_id': 'str', + 'trigger_source': 'str', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'lifecycle_state': 'str', + 'lifecycle_details': 'str', + 'actions': 'list[TriggerAction]', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'system_tags': 'dict(str, dict(str, object))', + 'secret': 'str', + 'trigger_url': 'str' + } + + self.attribute_map = { + 'id': 'id', + 'display_name': 'displayName', + 'description': 'description', + 'project_id': 'projectId', + 'compartment_id': 'compartmentId', + 'trigger_source': 'triggerSource', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'lifecycle_state': 'lifecycleState', + 'lifecycle_details': 'lifecycleDetails', + 'actions': 'actions', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'system_tags': 'systemTags', + 'secret': 'secret', + 'trigger_url': 'triggerUrl' + } + + self._id = None + self._display_name = None + self._description = None + self._project_id = None + self._compartment_id = None + self._trigger_source = None + self._time_created = None + self._time_updated = None + self._lifecycle_state = None + self._lifecycle_details = None + self._actions = None + self._freeform_tags = None + self._defined_tags = None + self._system_tags = None + self._secret = None + self._trigger_url = None + self._trigger_source = 'GITLAB' + + @property + def secret(self): + """ + **[Required]** Gets the secret of this GitlabTriggerCreateResult. + The secret used to validate the incoming Trigger call (this is visible only once after the resource is created) + + + :return: The secret of this GitlabTriggerCreateResult. + :rtype: str + """ + return self._secret + + @secret.setter + def secret(self, secret): + """ + Sets the secret of this GitlabTriggerCreateResult. + The secret used to validate the incoming Trigger call (this is visible only once after the resource is created) + + + :param secret: The secret of this GitlabTriggerCreateResult. + :type: str + """ + self._secret = secret + + @property + def trigger_url(self): + """ + **[Required]** Gets the trigger_url of this GitlabTriggerCreateResult. + The endpoint which listens to Trigger events + + + :return: The trigger_url of this GitlabTriggerCreateResult. + :rtype: str + """ + return self._trigger_url + + @trigger_url.setter + def trigger_url(self, trigger_url): + """ + Sets the trigger_url of this GitlabTriggerCreateResult. + The endpoint which listens to Trigger events + + + :param trigger_url: The trigger_url of this GitlabTriggerCreateResult. + :type: str + """ + self._trigger_url = trigger_url + + 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/devops/models/gitlab_trigger_summary.py b/src/oci/devops/models/gitlab_trigger_summary.py new file mode 100644 index 0000000000..50dc8fde29 --- /dev/null +++ b/src/oci/devops/models/gitlab_trigger_summary.py @@ -0,0 +1,132 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .trigger_summary import TriggerSummary +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 GitlabTriggerSummary(TriggerSummary): + """ + Summary of the Gitlab Trigger. + """ + + def __init__(self, **kwargs): + """ + Initializes a new GitlabTriggerSummary object with values from keyword arguments. The default value of the :py:attr:`~oci.devops.models.GitlabTriggerSummary.trigger_source` attribute + of this class is ``GITLAB`` and it should not be changed. + 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 GitlabTriggerSummary. + :type id: str + + :param display_name: + The value to assign to the display_name property of this GitlabTriggerSummary. + :type display_name: str + + :param description: + The value to assign to the description property of this GitlabTriggerSummary. + :type description: str + + :param project_id: + The value to assign to the project_id property of this GitlabTriggerSummary. + :type project_id: str + + :param compartment_id: + The value to assign to the compartment_id property of this GitlabTriggerSummary. + :type compartment_id: str + + :param trigger_source: + The value to assign to the trigger_source property of this GitlabTriggerSummary. + :type trigger_source: str + + :param time_created: + The value to assign to the time_created property of this GitlabTriggerSummary. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this GitlabTriggerSummary. + :type time_updated: datetime + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this GitlabTriggerSummary. + :type lifecycle_state: str + + :param lifecycle_details: + The value to assign to the lifecycle_details property of this GitlabTriggerSummary. + :type lifecycle_details: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this GitlabTriggerSummary. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this GitlabTriggerSummary. + :type defined_tags: dict(str, dict(str, object)) + + :param system_tags: + The value to assign to the system_tags property of this GitlabTriggerSummary. + :type system_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'id': 'str', + 'display_name': 'str', + 'description': 'str', + 'project_id': 'str', + 'compartment_id': 'str', + 'trigger_source': 'str', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'lifecycle_state': 'str', + 'lifecycle_details': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'system_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'id': 'id', + 'display_name': 'displayName', + 'description': 'description', + 'project_id': 'projectId', + 'compartment_id': 'compartmentId', + 'trigger_source': 'triggerSource', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'lifecycle_state': 'lifecycleState', + 'lifecycle_details': 'lifecycleDetails', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'system_tags': 'systemTags' + } + + self._id = None + self._display_name = None + self._description = None + self._project_id = None + self._compartment_id = None + self._trigger_source = None + self._time_created = None + self._time_updated = None + self._lifecycle_state = None + self._lifecycle_details = None + self._freeform_tags = None + self._defined_tags = None + self._system_tags = None + self._trigger_source = 'GITLAB' + + 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/devops/models/manual_build_run_source.py b/src/oci/devops/models/manual_build_run_source.py new file mode 100644 index 0000000000..e5169225a4 --- /dev/null +++ b/src/oci/devops/models/manual_build_run_source.py @@ -0,0 +1,49 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .build_run_source import BuildRunSource +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 ManualBuildRunSource(BuildRunSource): + """ + Specifies details of build runs triggered manually through API. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ManualBuildRunSource object with values from keyword arguments. The default value of the :py:attr:`~oci.devops.models.ManualBuildRunSource.source_type` attribute + of this class is ``MANUAL`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param source_type: + The value to assign to the source_type property of this ManualBuildRunSource. + Allowed values for this property are: "MANUAL", "GITHUB", "GITLAB", "DEVOPS_CODE_REPOSITORY" + :type source_type: str + + """ + self.swagger_types = { + 'source_type': 'str' + } + + self.attribute_map = { + 'source_type': 'sourceType' + } + + self._source_type = None + self._source_type = 'MANUAL' + + 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/devops/models/mirror_repository_config.py b/src/oci/devops/models/mirror_repository_config.py new file mode 100644 index 0000000000..e1e5022684 --- /dev/null +++ b/src/oci/devops/models/mirror_repository_config.py @@ -0,0 +1,128 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 MirrorRepositoryConfig(object): + """ + Configuration information for mirroring the repository. + """ + + def __init__(self, **kwargs): + """ + Initializes a new MirrorRepositoryConfig object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param connector_id: + The value to assign to the connector_id property of this MirrorRepositoryConfig. + :type connector_id: str + + :param repository_url: + The value to assign to the repository_url property of this MirrorRepositoryConfig. + :type repository_url: str + + :param trigger_schedule: + The value to assign to the trigger_schedule property of this MirrorRepositoryConfig. + :type trigger_schedule: oci.devops.models.TriggerSchedule + + """ + self.swagger_types = { + 'connector_id': 'str', + 'repository_url': 'str', + 'trigger_schedule': 'TriggerSchedule' + } + + self.attribute_map = { + 'connector_id': 'connectorId', + 'repository_url': 'repositoryUrl', + 'trigger_schedule': 'triggerSchedule' + } + + self._connector_id = None + self._repository_url = None + self._trigger_schedule = None + + @property + def connector_id(self): + """ + Gets the connector_id of this MirrorRepositoryConfig. + Upstream git repository connection identifer. + + + :return: The connector_id of this MirrorRepositoryConfig. + :rtype: str + """ + return self._connector_id + + @connector_id.setter + def connector_id(self, connector_id): + """ + Sets the connector_id of this MirrorRepositoryConfig. + Upstream git repository connection identifer. + + + :param connector_id: The connector_id of this MirrorRepositoryConfig. + :type: str + """ + self._connector_id = connector_id + + @property + def repository_url(self): + """ + Gets the repository_url of this MirrorRepositoryConfig. + Url of external repository we'd like to mirror + + + :return: The repository_url of this MirrorRepositoryConfig. + :rtype: str + """ + return self._repository_url + + @repository_url.setter + def repository_url(self, repository_url): + """ + Sets the repository_url of this MirrorRepositoryConfig. + Url of external repository we'd like to mirror + + + :param repository_url: The repository_url of this MirrorRepositoryConfig. + :type: str + """ + self._repository_url = repository_url + + @property + def trigger_schedule(self): + """ + Gets the trigger_schedule of this MirrorRepositoryConfig. + + :return: The trigger_schedule of this MirrorRepositoryConfig. + :rtype: oci.devops.models.TriggerSchedule + """ + return self._trigger_schedule + + @trigger_schedule.setter + def trigger_schedule(self, trigger_schedule): + """ + Sets the trigger_schedule of this MirrorRepositoryConfig. + + :param trigger_schedule: The trigger_schedule of this MirrorRepositoryConfig. + :type: oci.devops.models.TriggerSchedule + """ + self._trigger_schedule = trigger_schedule + + 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/devops/models/put_repository_branch_details.py b/src/oci/devops/models/put_repository_branch_details.py new file mode 100644 index 0000000000..3d0fd98515 --- /dev/null +++ b/src/oci/devops/models/put_repository_branch_details.py @@ -0,0 +1,80 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .put_repository_ref_details import PutRepositoryRefDetails +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 PutRepositoryBranchDetails(PutRepositoryRefDetails): + """ + The information needed to create a branch + """ + + def __init__(self, **kwargs): + """ + Initializes a new PutRepositoryBranchDetails object with values from keyword arguments. The default value of the :py:attr:`~oci.devops.models.PutRepositoryBranchDetails.ref_type` attribute + of this class is ``BRANCH`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param ref_type: + The value to assign to the ref_type property of this PutRepositoryBranchDetails. + Allowed values for this property are: "BRANCH", "TAG" + :type ref_type: str + + :param commit_id: + The value to assign to the commit_id property of this PutRepositoryBranchDetails. + :type commit_id: str + + """ + self.swagger_types = { + 'ref_type': 'str', + 'commit_id': 'str' + } + + self.attribute_map = { + 'ref_type': 'refType', + 'commit_id': 'commitId' + } + + self._ref_type = None + self._commit_id = None + self._ref_type = 'BRANCH' + + @property + def commit_id(self): + """ + **[Required]** Gets the commit_id of this PutRepositoryBranchDetails. + Commit ID pointed to by the new branch. + + + :return: The commit_id of this PutRepositoryBranchDetails. + :rtype: str + """ + return self._commit_id + + @commit_id.setter + def commit_id(self, commit_id): + """ + Sets the commit_id of this PutRepositoryBranchDetails. + Commit ID pointed to by the new branch. + + + :param commit_id: The commit_id of this PutRepositoryBranchDetails. + :type: str + """ + self._commit_id = commit_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/devops/models/put_repository_ref_details.py b/src/oci/devops/models/put_repository_ref_details.py new file mode 100644 index 0000000000..8ca24fab99 --- /dev/null +++ b/src/oci/devops/models/put_repository_ref_details.py @@ -0,0 +1,108 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 PutRepositoryRefDetails(object): + """ + The information needed to create a ref. If the ref already exists, it can be used to update it. + """ + + #: A constant which can be used with the ref_type property of a PutRepositoryRefDetails. + #: This constant has a value of "BRANCH" + REF_TYPE_BRANCH = "BRANCH" + + #: A constant which can be used with the ref_type property of a PutRepositoryRefDetails. + #: This constant has a value of "TAG" + REF_TYPE_TAG = "TAG" + + def __init__(self, **kwargs): + """ + Initializes a new PutRepositoryRefDetails object with values from keyword arguments. This class has the following subclasses and if you are using this class as input + to a service operations then you should favor using a subclass over the base class: + + * :class:`~oci.devops.models.PutRepositoryTagDetails` + * :class:`~oci.devops.models.PutRepositoryBranchDetails` + + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param ref_type: + The value to assign to the ref_type property of this PutRepositoryRefDetails. + Allowed values for this property are: "BRANCH", "TAG" + :type ref_type: str + + """ + self.swagger_types = { + 'ref_type': 'str' + } + + self.attribute_map = { + 'ref_type': 'refType' + } + + self._ref_type = None + + @staticmethod + def get_subtype(object_dictionary): + """ + Given the hash representation of a subtype of this class, + use the info in the hash to return the class of the subtype. + """ + type = object_dictionary['refType'] + + if type == 'TAG': + return 'PutRepositoryTagDetails' + + if type == 'BRANCH': + return 'PutRepositoryBranchDetails' + else: + return 'PutRepositoryRefDetails' + + @property + def ref_type(self): + """ + **[Required]** Gets the ref_type of this PutRepositoryRefDetails. + The type of Ref (Branch or Tag) + + Allowed values for this property are: "BRANCH", "TAG" + + + :return: The ref_type of this PutRepositoryRefDetails. + :rtype: str + """ + return self._ref_type + + @ref_type.setter + def ref_type(self, ref_type): + """ + Sets the ref_type of this PutRepositoryRefDetails. + The type of Ref (Branch or Tag) + + + :param ref_type: The ref_type of this PutRepositoryRefDetails. + :type: str + """ + allowed_values = ["BRANCH", "TAG"] + if not value_allowed_none_or_none_sentinel(ref_type, allowed_values): + raise ValueError( + "Invalid value for `ref_type`, must be None or one of {0}" + .format(allowed_values) + ) + self._ref_type = ref_type + + 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/devops/models/put_repository_tag_details.py b/src/oci/devops/models/put_repository_tag_details.py new file mode 100644 index 0000000000..bc22624fbf --- /dev/null +++ b/src/oci/devops/models/put_repository_tag_details.py @@ -0,0 +1,80 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .put_repository_ref_details import PutRepositoryRefDetails +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 PutRepositoryTagDetails(PutRepositoryRefDetails): + """ + The information needed to create a lightweight Tag + """ + + def __init__(self, **kwargs): + """ + Initializes a new PutRepositoryTagDetails object with values from keyword arguments. The default value of the :py:attr:`~oci.devops.models.PutRepositoryTagDetails.ref_type` attribute + of this class is ``TAG`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param ref_type: + The value to assign to the ref_type property of this PutRepositoryTagDetails. + Allowed values for this property are: "BRANCH", "TAG" + :type ref_type: str + + :param object_id: + The value to assign to the object_id property of this PutRepositoryTagDetails. + :type object_id: str + + """ + self.swagger_types = { + 'ref_type': 'str', + 'object_id': 'str' + } + + self.attribute_map = { + 'ref_type': 'refType', + 'object_id': 'objectId' + } + + self._ref_type = None + self._object_id = None + self._ref_type = 'TAG' + + @property + def object_id(self): + """ + **[Required]** Gets the object_id of this PutRepositoryTagDetails. + SHA-1 hash value of the object pointed to by the tag. + + + :return: The object_id of this PutRepositoryTagDetails. + :rtype: str + """ + return self._object_id + + @object_id.setter + def object_id(self, object_id): + """ + Sets the object_id of this PutRepositoryTagDetails. + SHA-1 hash value of the object pointed to by the tag. + + + :param object_id: The object_id of this PutRepositoryTagDetails. + :type: str + """ + self._object_id = object_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/devops/models/repository.py b/src/oci/devops/models/repository.py new file mode 100644 index 0000000000..1c97f33b6e --- /dev/null +++ b/src/oci/devops/models/repository.py @@ -0,0 +1,820 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 Repository(object): + """ + Description of Repository. + """ + + #: A constant which can be used with the repository_type property of a Repository. + #: This constant has a value of "MIRRORED" + REPOSITORY_TYPE_MIRRORED = "MIRRORED" + + #: A constant which can be used with the repository_type property of a Repository. + #: This constant has a value of "HOSTED" + REPOSITORY_TYPE_HOSTED = "HOSTED" + + #: A constant which can be used with the lifecycle_state property of a Repository. + #: This constant has a value of "ACTIVE" + LIFECYCLE_STATE_ACTIVE = "ACTIVE" + + #: A constant which can be used with the lifecycle_state property of a Repository. + #: This constant has a value of "CREATING" + LIFECYCLE_STATE_CREATING = "CREATING" + + #: A constant which can be used with the lifecycle_state property of a Repository. + #: This constant has a value of "DELETED" + LIFECYCLE_STATE_DELETED = "DELETED" + + #: A constant which can be used with the trigger_build_events property of a Repository. + #: This constant has a value of "PUSH" + TRIGGER_BUILD_EVENTS_PUSH = "PUSH" + + #: A constant which can be used with the trigger_build_events property of a Repository. + #: This constant has a value of "COMMIT_UPDATES" + TRIGGER_BUILD_EVENTS_COMMIT_UPDATES = "COMMIT_UPDATES" + + def __init__(self, **kwargs): + """ + Initializes a new Repository 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 Repository. + :type id: str + + :param name: + The value to assign to the name property of this Repository. + :type name: str + + :param compartment_id: + The value to assign to the compartment_id property of this Repository. + :type compartment_id: str + + :param namespace: + The value to assign to the namespace property of this Repository. + :type namespace: str + + :param project_id: + The value to assign to the project_id property of this Repository. + :type project_id: str + + :param project_name: + The value to assign to the project_name property of this Repository. + :type project_name: str + + :param ssh_url: + The value to assign to the ssh_url property of this Repository. + :type ssh_url: str + + :param http_url: + The value to assign to the http_url property of this Repository. + :type http_url: str + + :param description: + The value to assign to the description property of this Repository. + :type description: str + + :param default_branch: + The value to assign to the default_branch property of this Repository. + :type default_branch: str + + :param repository_type: + The value to assign to the repository_type property of this Repository. + Allowed values for this property are: "MIRRORED", "HOSTED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type repository_type: str + + :param mirror_repository_config: + The value to assign to the mirror_repository_config property of this Repository. + :type mirror_repository_config: oci.devops.models.MirrorRepositoryConfig + + :param time_created: + The value to assign to the time_created property of this Repository. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this Repository. + :type time_updated: datetime + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this Repository. + Allowed values for this property are: "ACTIVE", "CREATING", "DELETED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type lifecycle_state: str + + :param lifecyle_details: + The value to assign to the lifecyle_details property of this Repository. + :type lifecyle_details: str + + :param branch_count: + The value to assign to the branch_count property of this Repository. + :type branch_count: int + + :param commit_count: + The value to assign to the commit_count property of this Repository. + :type commit_count: int + + :param size_in_bytes: + The value to assign to the size_in_bytes property of this Repository. + :type size_in_bytes: int + + :param trigger_build_events: + The value to assign to the trigger_build_events property of this Repository. + Allowed values for items in this list are: "PUSH", "COMMIT_UPDATES", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type trigger_build_events: list[str] + + :param freeform_tags: + The value to assign to the freeform_tags property of this Repository. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this Repository. + :type defined_tags: dict(str, dict(str, object)) + + :param system_tags: + The value to assign to the system_tags property of this Repository. + :type system_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'id': 'str', + 'name': 'str', + 'compartment_id': 'str', + 'namespace': 'str', + 'project_id': 'str', + 'project_name': 'str', + 'ssh_url': 'str', + 'http_url': 'str', + 'description': 'str', + 'default_branch': 'str', + 'repository_type': 'str', + 'mirror_repository_config': 'MirrorRepositoryConfig', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'lifecycle_state': 'str', + 'lifecyle_details': 'str', + 'branch_count': 'int', + 'commit_count': 'int', + 'size_in_bytes': 'int', + 'trigger_build_events': 'list[str]', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'system_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'id': 'id', + 'name': 'name', + 'compartment_id': 'compartmentId', + 'namespace': 'namespace', + 'project_id': 'projectId', + 'project_name': 'projectName', + 'ssh_url': 'sshUrl', + 'http_url': 'httpUrl', + 'description': 'description', + 'default_branch': 'defaultBranch', + 'repository_type': 'repositoryType', + 'mirror_repository_config': 'mirrorRepositoryConfig', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'lifecycle_state': 'lifecycleState', + 'lifecyle_details': 'lifecyleDetails', + 'branch_count': 'branchCount', + 'commit_count': 'commitCount', + 'size_in_bytes': 'sizeInBytes', + 'trigger_build_events': 'triggerBuildEvents', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'system_tags': 'systemTags' + } + + self._id = None + self._name = None + self._compartment_id = None + self._namespace = None + self._project_id = None + self._project_name = None + self._ssh_url = None + self._http_url = None + self._description = None + self._default_branch = None + self._repository_type = None + self._mirror_repository_config = None + self._time_created = None + self._time_updated = None + self._lifecycle_state = None + self._lifecyle_details = None + self._branch_count = None + self._commit_count = None + self._size_in_bytes = None + self._trigger_build_events = None + self._freeform_tags = None + self._defined_tags = None + self._system_tags = None + + @property + def id(self): + """ + **[Required]** Gets the id of this Repository. + The OCID of the repository. This value is unique and immutable. + + + :return: The id of this Repository. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this Repository. + The OCID of the repository. This value is unique and immutable. + + + :param id: The id of this Repository. + :type: str + """ + self._id = id + + @property + def name(self): + """ + Gets the name of this Repository. + Unique name of a repository. This value is mutable. + + + :return: The name of this Repository. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """ + Sets the name of this Repository. + Unique name of a repository. This value is mutable. + + + :param name: The name of this Repository. + :type: str + """ + self._name = name + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this Repository. + The OCID of the repository's Compartment. + + + :return: The compartment_id of this Repository. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this Repository. + The OCID of the repository's Compartment. + + + :param compartment_id: The compartment_id of this Repository. + :type: str + """ + self._compartment_id = compartment_id + + @property + def namespace(self): + """ + Gets the namespace of this Repository. + Tenancy unique namespace + + + :return: The namespace of this Repository. + :rtype: str + """ + return self._namespace + + @namespace.setter + def namespace(self, namespace): + """ + Sets the namespace of this Repository. + Tenancy unique namespace + + + :param namespace: The namespace of this Repository. + :type: str + """ + self._namespace = namespace + + @property + def project_id(self): + """ + **[Required]** Gets the project_id of this Repository. + The OCID of the Project containing the repository. + + + :return: The project_id of this Repository. + :rtype: str + """ + return self._project_id + + @project_id.setter + def project_id(self, project_id): + """ + Sets the project_id of this Repository. + The OCID of the Project containing the repository. + + + :param project_id: The project_id of this Repository. + :type: str + """ + self._project_id = project_id + + @property + def project_name(self): + """ + Gets the project_name of this Repository. + Project unique Name under namespace + + + :return: The project_name of this Repository. + :rtype: str + """ + return self._project_name + + @project_name.setter + def project_name(self, project_name): + """ + Sets the project_name of this Repository. + Project unique Name under namespace + + + :param project_name: The project_name of this Repository. + :type: str + """ + self._project_name = project_name + + @property + def ssh_url(self): + """ + Gets the ssh_url of this Repository. + ssh url user utilized to git clone, pull and push + + + :return: The ssh_url of this Repository. + :rtype: str + """ + return self._ssh_url + + @ssh_url.setter + def ssh_url(self, ssh_url): + """ + Sets the ssh_url of this Repository. + ssh url user utilized to git clone, pull and push + + + :param ssh_url: The ssh_url of this Repository. + :type: str + """ + self._ssh_url = ssh_url + + @property + def http_url(self): + """ + Gets the http_url of this Repository. + http url user utilized to git clone, pull and push + + + :return: The http_url of this Repository. + :rtype: str + """ + return self._http_url + + @http_url.setter + def http_url(self, http_url): + """ + Sets the http_url of this Repository. + http url user utilized to git clone, pull and push + + + :param http_url: The http_url of this Repository. + :type: str + """ + self._http_url = http_url + + @property + def description(self): + """ + Gets the description of this Repository. + The description of this repository. Avoid entering confidential information + + + :return: The description of this Repository. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this Repository. + The description of this repository. Avoid entering confidential information + + + :param description: The description of this Repository. + :type: str + """ + self._description = description + + @property + def default_branch(self): + """ + Gets the default_branch of this Repository. + The default branch of the repository + + + :return: The default_branch of this Repository. + :rtype: str + """ + return self._default_branch + + @default_branch.setter + def default_branch(self, default_branch): + """ + Sets the default_branch of this Repository. + The default branch of the repository + + + :param default_branch: The default_branch of this Repository. + :type: str + """ + self._default_branch = default_branch + + @property + def repository_type(self): + """ + Gets the repository_type of this Repository. + Type of repository + MIRRORED - Repository was created by mirroring an existing repository. + HOSTED - Repository was created and hosted using OCI Devops Code Repository. + + Allowed values for this property are: "MIRRORED", "HOSTED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The repository_type of this Repository. + :rtype: str + """ + return self._repository_type + + @repository_type.setter + def repository_type(self, repository_type): + """ + Sets the repository_type of this Repository. + Type of repository + MIRRORED - Repository was created by mirroring an existing repository. + HOSTED - Repository was created and hosted using OCI Devops Code Repository. + + + :param repository_type: The repository_type of this Repository. + :type: str + """ + allowed_values = ["MIRRORED", "HOSTED"] + if not value_allowed_none_or_none_sentinel(repository_type, allowed_values): + repository_type = 'UNKNOWN_ENUM_VALUE' + self._repository_type = repository_type + + @property + def mirror_repository_config(self): + """ + Gets the mirror_repository_config of this Repository. + + :return: The mirror_repository_config of this Repository. + :rtype: oci.devops.models.MirrorRepositoryConfig + """ + return self._mirror_repository_config + + @mirror_repository_config.setter + def mirror_repository_config(self, mirror_repository_config): + """ + Sets the mirror_repository_config of this Repository. + + :param mirror_repository_config: The mirror_repository_config of this Repository. + :type: oci.devops.models.MirrorRepositoryConfig + """ + self._mirror_repository_config = mirror_repository_config + + @property + def time_created(self): + """ + Gets the time_created of this Repository. + The time the the Repository was created. An RFC3339 formatted datetime string + + + :return: The time_created of this Repository. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this Repository. + The time the the Repository was created. An RFC3339 formatted datetime string + + + :param time_created: The time_created of this Repository. + :type: datetime + """ + self._time_created = time_created + + @property + def time_updated(self): + """ + Gets the time_updated of this Repository. + The time the Repository was updated. An RFC3339 formatted datetime string + + + :return: The time_updated of this Repository. + :rtype: datetime + """ + return self._time_updated + + @time_updated.setter + def time_updated(self, time_updated): + """ + Sets the time_updated of this Repository. + The time the Repository was updated. An RFC3339 formatted datetime string + + + :param time_updated: The time_updated of this Repository. + :type: datetime + """ + self._time_updated = time_updated + + @property + def lifecycle_state(self): + """ + Gets the lifecycle_state of this Repository. + The current state of the Repository. + + Allowed values for this property are: "ACTIVE", "CREATING", "DELETED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The lifecycle_state of this Repository. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this Repository. + The current state of the Repository. + + + :param lifecycle_state: The lifecycle_state of this Repository. + :type: str + """ + allowed_values = ["ACTIVE", "CREATING", "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 lifecyle_details(self): + """ + Gets the lifecyle_details of this Repository. + A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + + + :return: The lifecyle_details of this Repository. + :rtype: str + """ + return self._lifecyle_details + + @lifecyle_details.setter + def lifecyle_details(self, lifecyle_details): + """ + Sets the lifecyle_details of this Repository. + A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + + + :param lifecyle_details: The lifecyle_details of this Repository. + :type: str + """ + self._lifecyle_details = lifecyle_details + + @property + def branch_count(self): + """ + Gets the branch_count of this Repository. + The count of the branches present in the repository. + + + :return: The branch_count of this Repository. + :rtype: int + """ + return self._branch_count + + @branch_count.setter + def branch_count(self, branch_count): + """ + Sets the branch_count of this Repository. + The count of the branches present in the repository. + + + :param branch_count: The branch_count of this Repository. + :type: int + """ + self._branch_count = branch_count + + @property + def commit_count(self): + """ + Gets the commit_count of this Repository. + The count of the commits present in the repository. + + + :return: The commit_count of this Repository. + :rtype: int + """ + return self._commit_count + + @commit_count.setter + def commit_count(self, commit_count): + """ + Sets the commit_count of this Repository. + The count of the commits present in the repository. + + + :param commit_count: The commit_count of this Repository. + :type: int + """ + self._commit_count = commit_count + + @property + def size_in_bytes(self): + """ + Gets the size_in_bytes of this Repository. + The size of the repository in bytes. + + + :return: The size_in_bytes of this Repository. + :rtype: int + """ + return self._size_in_bytes + + @size_in_bytes.setter + def size_in_bytes(self, size_in_bytes): + """ + Sets the size_in_bytes of this Repository. + The size of the repository in bytes. + + + :param size_in_bytes: The size_in_bytes of this Repository. + :type: int + """ + self._size_in_bytes = size_in_bytes + + @property + def trigger_build_events(self): + """ + Gets the trigger_build_events of this Repository. + Trigger Build Events supported for this repository + PUSH - Build is triggered when a push event occurs + COMMIT_UPDATES - Build is triggered when new commits are mirrored into repository + + Allowed values for items in this list are: "PUSH", "COMMIT_UPDATES", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The trigger_build_events of this Repository. + :rtype: list[str] + """ + return self._trigger_build_events + + @trigger_build_events.setter + def trigger_build_events(self, trigger_build_events): + """ + Sets the trigger_build_events of this Repository. + Trigger Build Events supported for this repository + PUSH - Build is triggered when a push event occurs + COMMIT_UPDATES - Build is triggered when new commits are mirrored into repository + + + :param trigger_build_events: The trigger_build_events of this Repository. + :type: list[str] + """ + allowed_values = ["PUSH", "COMMIT_UPDATES"] + if trigger_build_events: + trigger_build_events[:] = ['UNKNOWN_ENUM_VALUE' if not value_allowed_none_or_none_sentinel(x, allowed_values) else x for x in trigger_build_events] + self._trigger_build_events = trigger_build_events + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this Repository. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See `Resource Tags`__. Example: `{\"bar-key\": \"value\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this Repository. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this Repository. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See `Resource Tags`__. Example: `{\"bar-key\": \"value\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this Repository. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this Repository. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this Repository. + :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 Repository. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this Repository. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + @property + def system_tags(self): + """ + Gets the system_tags of this Repository. + Usage of system tag keys. These predefined keys are scoped to namespaces. See `Resource Tags`__. Example: `{\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The system_tags of this Repository. + :rtype: dict(str, dict(str, object)) + """ + return self._system_tags + + @system_tags.setter + def system_tags(self, system_tags): + """ + Sets the system_tags of this Repository. + Usage of system tag keys. These predefined keys are scoped to namespaces. See `Resource Tags`__. Example: `{\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param system_tags: The system_tags of this Repository. + :type: dict(str, dict(str, object)) + """ + self._system_tags = system_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/devops/models/repository_author_collection.py b/src/oci/devops/models/repository_author_collection.py new file mode 100644 index 0000000000..14c595e20f --- /dev/null +++ b/src/oci/devops/models/repository_author_collection.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 RepositoryAuthorCollection(object): + """ + Result of List Authors. + """ + + def __init__(self, **kwargs): + """ + Initializes a new RepositoryAuthorCollection object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param items: + The value to assign to the items property of this RepositoryAuthorCollection. + :type items: list[oci.devops.models.RepositoryAuthorSummary] + + """ + self.swagger_types = { + 'items': 'list[RepositoryAuthorSummary]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this RepositoryAuthorCollection. + List of author objects. + + + :return: The items of this RepositoryAuthorCollection. + :rtype: list[oci.devops.models.RepositoryAuthorSummary] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this RepositoryAuthorCollection. + List of author objects. + + + :param items: The items of this RepositoryAuthorCollection. + :type: list[oci.devops.models.RepositoryAuthorSummary] + """ + self._items = items + + 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/devops/models/repository_author_summary.py b/src/oci/devops/models/repository_author_summary.py new file mode 100644 index 0000000000..98993d4a6c --- /dev/null +++ b/src/oci/devops/models/repository_author_summary.py @@ -0,0 +1,140 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 RepositoryAuthorSummary(object): + """ + Object containing summary of authors in a repository + """ + + def __init__(self, **kwargs): + """ + Initializes a new RepositoryAuthorSummary object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param author_name: + The value to assign to the author_name property of this RepositoryAuthorSummary. + :type author_name: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this RepositoryAuthorSummary. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this RepositoryAuthorSummary. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'author_name': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'author_name': 'authorName', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._author_name = None + self._freeform_tags = None + self._defined_tags = None + + @property + def author_name(self): + """ + **[Required]** Gets the author_name of this RepositoryAuthorSummary. + Author name + + + :return: The author_name of this RepositoryAuthorSummary. + :rtype: str + """ + return self._author_name + + @author_name.setter + def author_name(self, author_name): + """ + Sets the author_name of this RepositoryAuthorSummary. + Author name + + + :param author_name: The author_name of this RepositoryAuthorSummary. + :type: str + """ + self._author_name = author_name + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this RepositoryAuthorSummary. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See `Resource Tags`__. Example: `{\"bar-key\": \"value\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this RepositoryAuthorSummary. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this RepositoryAuthorSummary. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See `Resource Tags`__. Example: `{\"bar-key\": \"value\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this RepositoryAuthorSummary. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this RepositoryAuthorSummary. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this RepositoryAuthorSummary. + :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 RepositoryAuthorSummary. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this RepositoryAuthorSummary. + :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/devops/models/repository_branch.py b/src/oci/devops/models/repository_branch.py new file mode 100644 index 0000000000..40e8a9d06e --- /dev/null +++ b/src/oci/devops/models/repository_branch.py @@ -0,0 +1,101 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .repository_ref import RepositoryRef +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 RepositoryBranch(RepositoryRef): + """ + Branch related information + """ + + def __init__(self, **kwargs): + """ + Initializes a new RepositoryBranch object with values from keyword arguments. The default value of the :py:attr:`~oci.devops.models.RepositoryBranch.ref_type` attribute + of this class is ``BRANCH`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param ref_name: + The value to assign to the ref_name property of this RepositoryBranch. + :type ref_name: str + + :param ref_type: + The value to assign to the ref_type property of this RepositoryBranch. + Allowed values for this property are: "BRANCH", "TAG" + :type ref_type: str + + :param full_ref_name: + The value to assign to the full_ref_name property of this RepositoryBranch. + :type full_ref_name: str + + :param repository_id: + The value to assign to the repository_id property of this RepositoryBranch. + :type repository_id: str + + :param commit_id: + The value to assign to the commit_id property of this RepositoryBranch. + :type commit_id: str + + """ + self.swagger_types = { + 'ref_name': 'str', + 'ref_type': 'str', + 'full_ref_name': 'str', + 'repository_id': 'str', + 'commit_id': 'str' + } + + self.attribute_map = { + 'ref_name': 'refName', + 'ref_type': 'refType', + 'full_ref_name': 'fullRefName', + 'repository_id': 'repositoryId', + 'commit_id': 'commitId' + } + + self._ref_name = None + self._ref_type = None + self._full_ref_name = None + self._repository_id = None + self._commit_id = None + self._ref_type = 'BRANCH' + + @property + def commit_id(self): + """ + **[Required]** Gets the commit_id of this RepositoryBranch. + Commit ID pointed to by the new branch. + + + :return: The commit_id of this RepositoryBranch. + :rtype: str + """ + return self._commit_id + + @commit_id.setter + def commit_id(self, commit_id): + """ + Sets the commit_id of this RepositoryBranch. + Commit ID pointed to by the new branch. + + + :param commit_id: The commit_id of this RepositoryBranch. + :type: str + """ + self._commit_id = commit_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/devops/models/repository_branch_summary.py b/src/oci/devops/models/repository_branch_summary.py new file mode 100644 index 0000000000..0211eaabfd --- /dev/null +++ b/src/oci/devops/models/repository_branch_summary.py @@ -0,0 +1,114 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .repository_ref_summary import RepositoryRefSummary +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 RepositoryBranchSummary(RepositoryRefSummary): + """ + Branch related information + """ + + def __init__(self, **kwargs): + """ + Initializes a new RepositoryBranchSummary object with values from keyword arguments. The default value of the :py:attr:`~oci.devops.models.RepositoryBranchSummary.ref_type` attribute + of this class is ``BRANCH`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param ref_name: + The value to assign to the ref_name property of this RepositoryBranchSummary. + :type ref_name: str + + :param ref_type: + The value to assign to the ref_type property of this RepositoryBranchSummary. + :type ref_type: str + + :param full_ref_name: + The value to assign to the full_ref_name property of this RepositoryBranchSummary. + :type full_ref_name: str + + :param repository_id: + The value to assign to the repository_id property of this RepositoryBranchSummary. + :type repository_id: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this RepositoryBranchSummary. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this RepositoryBranchSummary. + :type defined_tags: dict(str, dict(str, object)) + + :param commit_id: + The value to assign to the commit_id property of this RepositoryBranchSummary. + :type commit_id: str + + """ + self.swagger_types = { + 'ref_name': 'str', + 'ref_type': 'str', + 'full_ref_name': 'str', + 'repository_id': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'commit_id': 'str' + } + + self.attribute_map = { + 'ref_name': 'refName', + 'ref_type': 'refType', + 'full_ref_name': 'fullRefName', + 'repository_id': 'repositoryId', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'commit_id': 'commitId' + } + + self._ref_name = None + self._ref_type = None + self._full_ref_name = None + self._repository_id = None + self._freeform_tags = None + self._defined_tags = None + self._commit_id = None + self._ref_type = 'BRANCH' + + @property + def commit_id(self): + """ + **[Required]** Gets the commit_id of this RepositoryBranchSummary. + Commit ID pointed to by the new branch. + + + :return: The commit_id of this RepositoryBranchSummary. + :rtype: str + """ + return self._commit_id + + @commit_id.setter + def commit_id(self, commit_id): + """ + Sets the commit_id of this RepositoryBranchSummary. + Commit ID pointed to by the new branch. + + + :param commit_id: The commit_id of this RepositoryBranchSummary. + :type: str + """ + self._commit_id = commit_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/devops/models/repository_collection.py b/src/oci/devops/models/repository_collection.py new file mode 100644 index 0000000000..e58976ecad --- /dev/null +++ b/src/oci/devops/models/repository_collection.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 RepositoryCollection(object): + """ + Results of a repository search. Contains RepositorySummary items and other information, such as metadata. + """ + + def __init__(self, **kwargs): + """ + Initializes a new RepositoryCollection object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param items: + The value to assign to the items property of this RepositoryCollection. + :type items: list[oci.devops.models.RepositorySummary] + + """ + self.swagger_types = { + 'items': 'list[RepositorySummary]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this RepositoryCollection. + List of repositories. + + + :return: The items of this RepositoryCollection. + :rtype: list[oci.devops.models.RepositorySummary] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this RepositoryCollection. + List of repositories. + + + :param items: The items of this RepositoryCollection. + :type: list[oci.devops.models.RepositorySummary] + """ + self._items = items + + 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/devops/models/repository_commit.py b/src/oci/devops/models/repository_commit.py new file mode 100644 index 0000000000..59fe676f61 --- /dev/null +++ b/src/oci/devops/models/repository_commit.py @@ -0,0 +1,318 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 RepositoryCommit(object): + """ + Commit object with commit information + """ + + def __init__(self, **kwargs): + """ + Initializes a new RepositoryCommit object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param commit_id: + The value to assign to the commit_id property of this RepositoryCommit. + :type commit_id: str + + :param commit_message: + The value to assign to the commit_message property of this RepositoryCommit. + :type commit_message: str + + :param author_name: + The value to assign to the author_name property of this RepositoryCommit. + :type author_name: str + + :param author_email: + The value to assign to the author_email property of this RepositoryCommit. + :type author_email: str + + :param committer_name: + The value to assign to the committer_name property of this RepositoryCommit. + :type committer_name: str + + :param committer_email: + The value to assign to the committer_email property of this RepositoryCommit. + :type committer_email: str + + :param parent_commit_ids: + The value to assign to the parent_commit_ids property of this RepositoryCommit. + :type parent_commit_ids: list[str] + + :param time_created: + The value to assign to the time_created property of this RepositoryCommit. + :type time_created: datetime + + :param tree_id: + The value to assign to the tree_id property of this RepositoryCommit. + :type tree_id: str + + """ + self.swagger_types = { + 'commit_id': 'str', + 'commit_message': 'str', + 'author_name': 'str', + 'author_email': 'str', + 'committer_name': 'str', + 'committer_email': 'str', + 'parent_commit_ids': 'list[str]', + 'time_created': 'datetime', + 'tree_id': 'str' + } + + self.attribute_map = { + 'commit_id': 'commitId', + 'commit_message': 'commitMessage', + 'author_name': 'authorName', + 'author_email': 'authorEmail', + 'committer_name': 'committerName', + 'committer_email': 'committerEmail', + 'parent_commit_ids': 'parentCommitIds', + 'time_created': 'timeCreated', + 'tree_id': 'treeId' + } + + self._commit_id = None + self._commit_message = None + self._author_name = None + self._author_email = None + self._committer_name = None + self._committer_email = None + self._parent_commit_ids = None + self._time_created = None + self._tree_id = None + + @property + def commit_id(self): + """ + **[Required]** Gets the commit_id of this RepositoryCommit. + Commit hash pointed to by Ref name + + + :return: The commit_id of this RepositoryCommit. + :rtype: str + """ + return self._commit_id + + @commit_id.setter + def commit_id(self, commit_id): + """ + Sets the commit_id of this RepositoryCommit. + Commit hash pointed to by Ref name + + + :param commit_id: The commit_id of this RepositoryCommit. + :type: str + """ + self._commit_id = commit_id + + @property + def commit_message(self): + """ + **[Required]** Gets the commit_message of this RepositoryCommit. + The commit message. + + + :return: The commit_message of this RepositoryCommit. + :rtype: str + """ + return self._commit_message + + @commit_message.setter + def commit_message(self, commit_message): + """ + Sets the commit_message of this RepositoryCommit. + The commit message. + + + :param commit_message: The commit_message of this RepositoryCommit. + :type: str + """ + self._commit_message = commit_message + + @property + def author_name(self): + """ + Gets the author_name of this RepositoryCommit. + The name of the author of the repository. + + + :return: The author_name of this RepositoryCommit. + :rtype: str + """ + return self._author_name + + @author_name.setter + def author_name(self, author_name): + """ + Sets the author_name of this RepositoryCommit. + The name of the author of the repository. + + + :param author_name: The author_name of this RepositoryCommit. + :type: str + """ + self._author_name = author_name + + @property + def author_email(self): + """ + Gets the author_email of this RepositoryCommit. + The email of the author of the repository. + + + :return: The author_email of this RepositoryCommit. + :rtype: str + """ + return self._author_email + + @author_email.setter + def author_email(self, author_email): + """ + Sets the author_email of this RepositoryCommit. + The email of the author of the repository. + + + :param author_email: The author_email of this RepositoryCommit. + :type: str + """ + self._author_email = author_email + + @property + def committer_name(self): + """ + Gets the committer_name of this RepositoryCommit. + The name of who create the commit. + + + :return: The committer_name of this RepositoryCommit. + :rtype: str + """ + return self._committer_name + + @committer_name.setter + def committer_name(self, committer_name): + """ + Sets the committer_name of this RepositoryCommit. + The name of who create the commit. + + + :param committer_name: The committer_name of this RepositoryCommit. + :type: str + """ + self._committer_name = committer_name + + @property + def committer_email(self): + """ + Gets the committer_email of this RepositoryCommit. + The email of who create the commit. + + + :return: The committer_email of this RepositoryCommit. + :rtype: str + """ + return self._committer_email + + @committer_email.setter + def committer_email(self, committer_email): + """ + Sets the committer_email of this RepositoryCommit. + The email of who create the commit. + + + :param committer_email: The committer_email of this RepositoryCommit. + :type: str + """ + self._committer_email = committer_email + + @property + def parent_commit_ids(self): + """ + Gets the parent_commit_ids of this RepositoryCommit. + An array of parent commit ids of created commit. + + + :return: The parent_commit_ids of this RepositoryCommit. + :rtype: list[str] + """ + return self._parent_commit_ids + + @parent_commit_ids.setter + def parent_commit_ids(self, parent_commit_ids): + """ + Sets the parent_commit_ids of this RepositoryCommit. + An array of parent commit ids of created commit. + + + :param parent_commit_ids: The parent_commit_ids of this RepositoryCommit. + :type: list[str] + """ + self._parent_commit_ids = parent_commit_ids + + @property + def time_created(self): + """ + Gets the time_created of this RepositoryCommit. + The time at which commit was created. + + + :return: The time_created of this RepositoryCommit. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this RepositoryCommit. + The time at which commit was created. + + + :param time_created: The time_created of this RepositoryCommit. + :type: datetime + """ + self._time_created = time_created + + @property + def tree_id(self): + """ + Gets the tree_id of this RepositoryCommit. + Tree information for the specified commit + + + :return: The tree_id of this RepositoryCommit. + :rtype: str + """ + return self._tree_id + + @tree_id.setter + def tree_id(self, tree_id): + """ + Sets the tree_id of this RepositoryCommit. + Tree information for the specified commit + + + :param tree_id: The tree_id of this RepositoryCommit. + :type: str + """ + self._tree_id = tree_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/devops/models/repository_commit_collection.py b/src/oci/devops/models/repository_commit_collection.py new file mode 100644 index 0000000000..792f5113e5 --- /dev/null +++ b/src/oci/devops/models/repository_commit_collection.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 RepositoryCommitCollection(object): + """ + Result of a Commit search. + """ + + def __init__(self, **kwargs): + """ + Initializes a new RepositoryCommitCollection object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param items: + The value to assign to the items property of this RepositoryCommitCollection. + :type items: list[oci.devops.models.RepositoryCommitSummary] + + """ + self.swagger_types = { + 'items': 'list[RepositoryCommitSummary]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this RepositoryCommitCollection. + List of commit objects. + + + :return: The items of this RepositoryCommitCollection. + :rtype: list[oci.devops.models.RepositoryCommitSummary] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this RepositoryCommitCollection. + List of commit objects. + + + :param items: The items of this RepositoryCommitCollection. + :type: list[oci.devops.models.RepositoryCommitSummary] + """ + self._items = items + + 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/devops/models/repository_commit_summary.py b/src/oci/devops/models/repository_commit_summary.py new file mode 100644 index 0000000000..487b47cf38 --- /dev/null +++ b/src/oci/devops/models/repository_commit_summary.py @@ -0,0 +1,388 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 RepositoryCommitSummary(object): + """ + Commit summary with commit information + """ + + def __init__(self, **kwargs): + """ + Initializes a new RepositoryCommitSummary object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param commit_id: + The value to assign to the commit_id property of this RepositoryCommitSummary. + :type commit_id: str + + :param commit_message: + The value to assign to the commit_message property of this RepositoryCommitSummary. + :type commit_message: str + + :param author_name: + The value to assign to the author_name property of this RepositoryCommitSummary. + :type author_name: str + + :param author_email: + The value to assign to the author_email property of this RepositoryCommitSummary. + :type author_email: str + + :param committer_name: + The value to assign to the committer_name property of this RepositoryCommitSummary. + :type committer_name: str + + :param committer_email: + The value to assign to the committer_email property of this RepositoryCommitSummary. + :type committer_email: str + + :param parent_commit_ids: + The value to assign to the parent_commit_ids property of this RepositoryCommitSummary. + :type parent_commit_ids: list[str] + + :param time_created: + The value to assign to the time_created property of this RepositoryCommitSummary. + :type time_created: datetime + + :param tree_id: + The value to assign to the tree_id property of this RepositoryCommitSummary. + :type tree_id: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this RepositoryCommitSummary. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this RepositoryCommitSummary. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'commit_id': 'str', + 'commit_message': 'str', + 'author_name': 'str', + 'author_email': 'str', + 'committer_name': 'str', + 'committer_email': 'str', + 'parent_commit_ids': 'list[str]', + 'time_created': 'datetime', + 'tree_id': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'commit_id': 'commitId', + 'commit_message': 'commitMessage', + 'author_name': 'authorName', + 'author_email': 'authorEmail', + 'committer_name': 'committerName', + 'committer_email': 'committerEmail', + 'parent_commit_ids': 'parentCommitIds', + 'time_created': 'timeCreated', + 'tree_id': 'treeId', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._commit_id = None + self._commit_message = None + self._author_name = None + self._author_email = None + self._committer_name = None + self._committer_email = None + self._parent_commit_ids = None + self._time_created = None + self._tree_id = None + self._freeform_tags = None + self._defined_tags = None + + @property + def commit_id(self): + """ + **[Required]** Gets the commit_id of this RepositoryCommitSummary. + Commit hash pointed to by Ref name + + + :return: The commit_id of this RepositoryCommitSummary. + :rtype: str + """ + return self._commit_id + + @commit_id.setter + def commit_id(self, commit_id): + """ + Sets the commit_id of this RepositoryCommitSummary. + Commit hash pointed to by Ref name + + + :param commit_id: The commit_id of this RepositoryCommitSummary. + :type: str + """ + self._commit_id = commit_id + + @property + def commit_message(self): + """ + **[Required]** Gets the commit_message of this RepositoryCommitSummary. + The commit message. + + + :return: The commit_message of this RepositoryCommitSummary. + :rtype: str + """ + return self._commit_message + + @commit_message.setter + def commit_message(self, commit_message): + """ + Sets the commit_message of this RepositoryCommitSummary. + The commit message. + + + :param commit_message: The commit_message of this RepositoryCommitSummary. + :type: str + """ + self._commit_message = commit_message + + @property + def author_name(self): + """ + **[Required]** Gets the author_name of this RepositoryCommitSummary. + The name of the author of the repository. + + + :return: The author_name of this RepositoryCommitSummary. + :rtype: str + """ + return self._author_name + + @author_name.setter + def author_name(self, author_name): + """ + Sets the author_name of this RepositoryCommitSummary. + The name of the author of the repository. + + + :param author_name: The author_name of this RepositoryCommitSummary. + :type: str + """ + self._author_name = author_name + + @property + def author_email(self): + """ + **[Required]** Gets the author_email of this RepositoryCommitSummary. + The email of the author of the repository. + + + :return: The author_email of this RepositoryCommitSummary. + :rtype: str + """ + return self._author_email + + @author_email.setter + def author_email(self, author_email): + """ + Sets the author_email of this RepositoryCommitSummary. + The email of the author of the repository. + + + :param author_email: The author_email of this RepositoryCommitSummary. + :type: str + """ + self._author_email = author_email + + @property + def committer_name(self): + """ + **[Required]** Gets the committer_name of this RepositoryCommitSummary. + The name of who create the commit. + + + :return: The committer_name of this RepositoryCommitSummary. + :rtype: str + """ + return self._committer_name + + @committer_name.setter + def committer_name(self, committer_name): + """ + Sets the committer_name of this RepositoryCommitSummary. + The name of who create the commit. + + + :param committer_name: The committer_name of this RepositoryCommitSummary. + :type: str + """ + self._committer_name = committer_name + + @property + def committer_email(self): + """ + **[Required]** Gets the committer_email of this RepositoryCommitSummary. + The email of who create the commit. + + + :return: The committer_email of this RepositoryCommitSummary. + :rtype: str + """ + return self._committer_email + + @committer_email.setter + def committer_email(self, committer_email): + """ + Sets the committer_email of this RepositoryCommitSummary. + The email of who create the commit. + + + :param committer_email: The committer_email of this RepositoryCommitSummary. + :type: str + """ + self._committer_email = committer_email + + @property + def parent_commit_ids(self): + """ + **[Required]** Gets the parent_commit_ids of this RepositoryCommitSummary. + An array of parent commit ids of created commit. + + + :return: The parent_commit_ids of this RepositoryCommitSummary. + :rtype: list[str] + """ + return self._parent_commit_ids + + @parent_commit_ids.setter + def parent_commit_ids(self, parent_commit_ids): + """ + Sets the parent_commit_ids of this RepositoryCommitSummary. + An array of parent commit ids of created commit. + + + :param parent_commit_ids: The parent_commit_ids of this RepositoryCommitSummary. + :type: list[str] + """ + self._parent_commit_ids = parent_commit_ids + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this RepositoryCommitSummary. + The time to create the commit. + + + :return: The time_created of this RepositoryCommitSummary. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this RepositoryCommitSummary. + The time to create the commit. + + + :param time_created: The time_created of this RepositoryCommitSummary. + :type: datetime + """ + self._time_created = time_created + + @property + def tree_id(self): + """ + **[Required]** Gets the tree_id of this RepositoryCommitSummary. + Tree information for the specified commit + + + :return: The tree_id of this RepositoryCommitSummary. + :rtype: str + """ + return self._tree_id + + @tree_id.setter + def tree_id(self, tree_id): + """ + Sets the tree_id of this RepositoryCommitSummary. + Tree information for the specified commit + + + :param tree_id: The tree_id of this RepositoryCommitSummary. + :type: str + """ + self._tree_id = tree_id + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this RepositoryCommitSummary. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See `Resource Tags`__. Example: `{\"bar-key\": \"value\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this RepositoryCommitSummary. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this RepositoryCommitSummary. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See `Resource Tags`__. Example: `{\"bar-key\": \"value\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this RepositoryCommitSummary. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this RepositoryCommitSummary. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this RepositoryCommitSummary. + :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 RepositoryCommitSummary. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this RepositoryCommitSummary. + :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/devops/models/repository_file_lines.py b/src/oci/devops/models/repository_file_lines.py new file mode 100644 index 0000000000..fa06e2bbf0 --- /dev/null +++ b/src/oci/devops/models/repository_file_lines.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 RepositoryFileLines(object): + """ + Object containing the lines of a file in a repository + """ + + def __init__(self, **kwargs): + """ + Initializes a new RepositoryFileLines object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param lines: + The value to assign to the lines property of this RepositoryFileLines. + :type lines: list[oci.devops.models.FileLineDetails] + + """ + self.swagger_types = { + 'lines': 'list[FileLineDetails]' + } + + self.attribute_map = { + 'lines': 'lines' + } + + self._lines = None + + @property + def lines(self): + """ + **[Required]** Gets the lines of this RepositoryFileLines. + The list of lines in the file + + + :return: The lines of this RepositoryFileLines. + :rtype: list[oci.devops.models.FileLineDetails] + """ + return self._lines + + @lines.setter + def lines(self, lines): + """ + Sets the lines of this RepositoryFileLines. + The list of lines in the file + + + :param lines: The lines of this RepositoryFileLines. + :type: list[oci.devops.models.FileLineDetails] + """ + self._lines = lines + + 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/devops/models/repository_mirror_record.py b/src/oci/devops/models/repository_mirror_record.py new file mode 100644 index 0000000000..123be750c0 --- /dev/null +++ b/src/oci/devops/models/repository_mirror_record.py @@ -0,0 +1,230 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 RepositoryMirrorRecord(object): + """ + Object containing information about a mirror record + """ + + #: A constant which can be used with the mirror_status property of a RepositoryMirrorRecord. + #: This constant has a value of "NONE" + MIRROR_STATUS_NONE = "NONE" + + #: A constant which can be used with the mirror_status property of a RepositoryMirrorRecord. + #: This constant has a value of "QUEUED" + MIRROR_STATUS_QUEUED = "QUEUED" + + #: A constant which can be used with the mirror_status property of a RepositoryMirrorRecord. + #: This constant has a value of "RUNNING" + MIRROR_STATUS_RUNNING = "RUNNING" + + #: A constant which can be used with the mirror_status property of a RepositoryMirrorRecord. + #: This constant has a value of "PASSED" + MIRROR_STATUS_PASSED = "PASSED" + + #: A constant which can be used with the mirror_status property of a RepositoryMirrorRecord. + #: This constant has a value of "FAILED" + MIRROR_STATUS_FAILED = "FAILED" + + def __init__(self, **kwargs): + """ + Initializes a new RepositoryMirrorRecord object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param mirror_status: + The value to assign to the mirror_status property of this RepositoryMirrorRecord. + Allowed values for this property are: "NONE", "QUEUED", "RUNNING", "PASSED", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type mirror_status: str + + :param work_request_id: + The value to assign to the work_request_id property of this RepositoryMirrorRecord. + :type work_request_id: str + + :param time_enqueued: + The value to assign to the time_enqueued property of this RepositoryMirrorRecord. + :type time_enqueued: datetime + + :param time_started: + The value to assign to the time_started property of this RepositoryMirrorRecord. + :type time_started: datetime + + :param time_ended: + The value to assign to the time_ended property of this RepositoryMirrorRecord. + :type time_ended: datetime + + """ + self.swagger_types = { + 'mirror_status': 'str', + 'work_request_id': 'str', + 'time_enqueued': 'datetime', + 'time_started': 'datetime', + 'time_ended': 'datetime' + } + + self.attribute_map = { + 'mirror_status': 'mirrorStatus', + 'work_request_id': 'workRequestId', + 'time_enqueued': 'timeEnqueued', + 'time_started': 'timeStarted', + 'time_ended': 'timeEnded' + } + + self._mirror_status = None + self._work_request_id = None + self._time_enqueued = None + self._time_started = None + self._time_ended = None + + @property + def mirror_status(self): + """ + **[Required]** Gets the mirror_status of this RepositoryMirrorRecord. + Mirror status of current mirror entry. + QUEUED - Mirroring Queued + RUNNING - Mirroring is Running + PASSED - Mirroring Passed + FAILED - Mirroring Failed + + Allowed values for this property are: "NONE", "QUEUED", "RUNNING", "PASSED", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The mirror_status of this RepositoryMirrorRecord. + :rtype: str + """ + return self._mirror_status + + @mirror_status.setter + def mirror_status(self, mirror_status): + """ + Sets the mirror_status of this RepositoryMirrorRecord. + Mirror status of current mirror entry. + QUEUED - Mirroring Queued + RUNNING - Mirroring is Running + PASSED - Mirroring Passed + FAILED - Mirroring Failed + + + :param mirror_status: The mirror_status of this RepositoryMirrorRecord. + :type: str + """ + allowed_values = ["NONE", "QUEUED", "RUNNING", "PASSED", "FAILED"] + if not value_allowed_none_or_none_sentinel(mirror_status, allowed_values): + mirror_status = 'UNKNOWN_ENUM_VALUE' + self._mirror_status = mirror_status + + @property + def work_request_id(self): + """ + Gets the work_request_id of this RepositoryMirrorRecord. + Workrequest Id to track current mirror operation + + + :return: The work_request_id of this RepositoryMirrorRecord. + :rtype: str + """ + return self._work_request_id + + @work_request_id.setter + def work_request_id(self, work_request_id): + """ + Sets the work_request_id of this RepositoryMirrorRecord. + Workrequest Id to track current mirror operation + + + :param work_request_id: The work_request_id of this RepositoryMirrorRecord. + :type: str + """ + self._work_request_id = work_request_id + + @property + def time_enqueued(self): + """ + Gets the time_enqueued of this RepositoryMirrorRecord. + The time to enqueue a mirror operation. + + + :return: The time_enqueued of this RepositoryMirrorRecord. + :rtype: datetime + """ + return self._time_enqueued + + @time_enqueued.setter + def time_enqueued(self, time_enqueued): + """ + Sets the time_enqueued of this RepositoryMirrorRecord. + The time to enqueue a mirror operation. + + + :param time_enqueued: The time_enqueued of this RepositoryMirrorRecord. + :type: datetime + """ + self._time_enqueued = time_enqueued + + @property + def time_started(self): + """ + Gets the time_started of this RepositoryMirrorRecord. + The time to start a mirror operation. + + + :return: The time_started of this RepositoryMirrorRecord. + :rtype: datetime + """ + return self._time_started + + @time_started.setter + def time_started(self, time_started): + """ + Sets the time_started of this RepositoryMirrorRecord. + The time to start a mirror operation. + + + :param time_started: The time_started of this RepositoryMirrorRecord. + :type: datetime + """ + self._time_started = time_started + + @property + def time_ended(self): + """ + Gets the time_ended of this RepositoryMirrorRecord. + Time that the mirror operation ended or null if it hasn't yet ended. + + + :return: The time_ended of this RepositoryMirrorRecord. + :rtype: datetime + """ + return self._time_ended + + @time_ended.setter + def time_ended(self, time_ended): + """ + Sets the time_ended of this RepositoryMirrorRecord. + Time that the mirror operation ended or null if it hasn't yet ended. + + + :param time_ended: The time_ended of this RepositoryMirrorRecord. + :type: datetime + """ + self._time_ended = time_ended + + 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/devops/models/repository_mirror_record_collection.py b/src/oci/devops/models/repository_mirror_record_collection.py new file mode 100644 index 0000000000..9565d81b41 --- /dev/null +++ b/src/oci/devops/models/repository_mirror_record_collection.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 RepositoryMirrorRecordCollection(object): + """ + The collection of mirror entry. + """ + + def __init__(self, **kwargs): + """ + Initializes a new RepositoryMirrorRecordCollection object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param items: + The value to assign to the items property of this RepositoryMirrorRecordCollection. + :type items: list[oci.devops.models.RepositoryMirrorRecordSummary] + + """ + self.swagger_types = { + 'items': 'list[RepositoryMirrorRecordSummary]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this RepositoryMirrorRecordCollection. + List of mirror entry objects. + + + :return: The items of this RepositoryMirrorRecordCollection. + :rtype: list[oci.devops.models.RepositoryMirrorRecordSummary] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this RepositoryMirrorRecordCollection. + List of mirror entry objects. + + + :param items: The items of this RepositoryMirrorRecordCollection. + :type: list[oci.devops.models.RepositoryMirrorRecordSummary] + """ + self._items = items + + 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/devops/models/repository_mirror_record_summary.py b/src/oci/devops/models/repository_mirror_record_summary.py new file mode 100644 index 0000000000..bd1b3ababd --- /dev/null +++ b/src/oci/devops/models/repository_mirror_record_summary.py @@ -0,0 +1,300 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 RepositoryMirrorRecordSummary(object): + """ + Object containing information about a mirror record + """ + + #: A constant which can be used with the mirror_status property of a RepositoryMirrorRecordSummary. + #: This constant has a value of "NONE" + MIRROR_STATUS_NONE = "NONE" + + #: A constant which can be used with the mirror_status property of a RepositoryMirrorRecordSummary. + #: This constant has a value of "QUEUED" + MIRROR_STATUS_QUEUED = "QUEUED" + + #: A constant which can be used with the mirror_status property of a RepositoryMirrorRecordSummary. + #: This constant has a value of "RUNNING" + MIRROR_STATUS_RUNNING = "RUNNING" + + #: A constant which can be used with the mirror_status property of a RepositoryMirrorRecordSummary. + #: This constant has a value of "PASSED" + MIRROR_STATUS_PASSED = "PASSED" + + #: A constant which can be used with the mirror_status property of a RepositoryMirrorRecordSummary. + #: This constant has a value of "FAILED" + MIRROR_STATUS_FAILED = "FAILED" + + def __init__(self, **kwargs): + """ + Initializes a new RepositoryMirrorRecordSummary object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param mirror_status: + The value to assign to the mirror_status property of this RepositoryMirrorRecordSummary. + Allowed values for this property are: "NONE", "QUEUED", "RUNNING", "PASSED", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type mirror_status: str + + :param work_request_id: + The value to assign to the work_request_id property of this RepositoryMirrorRecordSummary. + :type work_request_id: str + + :param time_enqueued: + The value to assign to the time_enqueued property of this RepositoryMirrorRecordSummary. + :type time_enqueued: datetime + + :param time_started: + The value to assign to the time_started property of this RepositoryMirrorRecordSummary. + :type time_started: datetime + + :param time_completed: + The value to assign to the time_completed property of this RepositoryMirrorRecordSummary. + :type time_completed: datetime + + :param freeform_tags: + The value to assign to the freeform_tags property of this RepositoryMirrorRecordSummary. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this RepositoryMirrorRecordSummary. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'mirror_status': 'str', + 'work_request_id': 'str', + 'time_enqueued': 'datetime', + 'time_started': 'datetime', + 'time_completed': 'datetime', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'mirror_status': 'mirrorStatus', + 'work_request_id': 'workRequestId', + 'time_enqueued': 'timeEnqueued', + 'time_started': 'timeStarted', + 'time_completed': 'timeCompleted', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._mirror_status = None + self._work_request_id = None + self._time_enqueued = None + self._time_started = None + self._time_completed = None + self._freeform_tags = None + self._defined_tags = None + + @property + def mirror_status(self): + """ + **[Required]** Gets the mirror_status of this RepositoryMirrorRecordSummary. + Mirror status of current mirror entry. + QUEUED - Mirroring Queued + RUNNING - Mirroring is Running + PASSED - Mirroring Passed + FAILED - Mirroring Failed + + Allowed values for this property are: "NONE", "QUEUED", "RUNNING", "PASSED", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The mirror_status of this RepositoryMirrorRecordSummary. + :rtype: str + """ + return self._mirror_status + + @mirror_status.setter + def mirror_status(self, mirror_status): + """ + Sets the mirror_status of this RepositoryMirrorRecordSummary. + Mirror status of current mirror entry. + QUEUED - Mirroring Queued + RUNNING - Mirroring is Running + PASSED - Mirroring Passed + FAILED - Mirroring Failed + + + :param mirror_status: The mirror_status of this RepositoryMirrorRecordSummary. + :type: str + """ + allowed_values = ["NONE", "QUEUED", "RUNNING", "PASSED", "FAILED"] + if not value_allowed_none_or_none_sentinel(mirror_status, allowed_values): + mirror_status = 'UNKNOWN_ENUM_VALUE' + self._mirror_status = mirror_status + + @property + def work_request_id(self): + """ + Gets the work_request_id of this RepositoryMirrorRecordSummary. + Workrequest Id to track current mirror operation + + + :return: The work_request_id of this RepositoryMirrorRecordSummary. + :rtype: str + """ + return self._work_request_id + + @work_request_id.setter + def work_request_id(self, work_request_id): + """ + Sets the work_request_id of this RepositoryMirrorRecordSummary. + Workrequest Id to track current mirror operation + + + :param work_request_id: The work_request_id of this RepositoryMirrorRecordSummary. + :type: str + """ + self._work_request_id = work_request_id + + @property + def time_enqueued(self): + """ + Gets the time_enqueued of this RepositoryMirrorRecordSummary. + The time to enqueue a mirror operation. + + + :return: The time_enqueued of this RepositoryMirrorRecordSummary. + :rtype: datetime + """ + return self._time_enqueued + + @time_enqueued.setter + def time_enqueued(self, time_enqueued): + """ + Sets the time_enqueued of this RepositoryMirrorRecordSummary. + The time to enqueue a mirror operation. + + + :param time_enqueued: The time_enqueued of this RepositoryMirrorRecordSummary. + :type: datetime + """ + self._time_enqueued = time_enqueued + + @property + def time_started(self): + """ + Gets the time_started of this RepositoryMirrorRecordSummary. + The time to start a mirror operation. + + + :return: The time_started of this RepositoryMirrorRecordSummary. + :rtype: datetime + """ + return self._time_started + + @time_started.setter + def time_started(self, time_started): + """ + Sets the time_started of this RepositoryMirrorRecordSummary. + The time to start a mirror operation. + + + :param time_started: The time_started of this RepositoryMirrorRecordSummary. + :type: datetime + """ + self._time_started = time_started + + @property + def time_completed(self): + """ + Gets the time_completed of this RepositoryMirrorRecordSummary. + The time complete a mirror operation. + + + :return: The time_completed of this RepositoryMirrorRecordSummary. + :rtype: datetime + """ + return self._time_completed + + @time_completed.setter + def time_completed(self, time_completed): + """ + Sets the time_completed of this RepositoryMirrorRecordSummary. + The time complete a mirror operation. + + + :param time_completed: The time_completed of this RepositoryMirrorRecordSummary. + :type: datetime + """ + self._time_completed = time_completed + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this RepositoryMirrorRecordSummary. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See `Resource Tags`__. Example: `{\"bar-key\": \"value\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this RepositoryMirrorRecordSummary. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this RepositoryMirrorRecordSummary. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See `Resource Tags`__. Example: `{\"bar-key\": \"value\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this RepositoryMirrorRecordSummary. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this RepositoryMirrorRecordSummary. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this RepositoryMirrorRecordSummary. + :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 RepositoryMirrorRecordSummary. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this RepositoryMirrorRecordSummary. + :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/devops/models/repository_object.py b/src/oci/devops/models/repository_object.py new file mode 100644 index 0000000000..8fdf4e8ac7 --- /dev/null +++ b/src/oci/devops/models/repository_object.py @@ -0,0 +1,183 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 RepositoryObject(object): + """ + Object containing information about files and directories in a repository + """ + + #: A constant which can be used with the type property of a RepositoryObject. + #: This constant has a value of "BLOB" + TYPE_BLOB = "BLOB" + + #: A constant which can be used with the type property of a RepositoryObject. + #: This constant has a value of "TREE" + TYPE_TREE = "TREE" + + #: A constant which can be used with the type property of a RepositoryObject. + #: This constant has a value of "COMMIT" + TYPE_COMMIT = "COMMIT" + + def __init__(self, **kwargs): + """ + Initializes a new RepositoryObject object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param type: + The value to assign to the type property of this RepositoryObject. + Allowed values for this property are: "BLOB", "TREE", "COMMIT", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type type: str + + :param size_in_bytes: + The value to assign to the size_in_bytes property of this RepositoryObject. + :type size_in_bytes: int + + :param sha: + The value to assign to the sha property of this RepositoryObject. + :type sha: str + + :param is_binary: + The value to assign to the is_binary property of this RepositoryObject. + :type is_binary: bool + + """ + self.swagger_types = { + 'type': 'str', + 'size_in_bytes': 'int', + 'sha': 'str', + 'is_binary': 'bool' + } + + self.attribute_map = { + 'type': 'type', + 'size_in_bytes': 'sizeInBytes', + 'sha': 'sha', + 'is_binary': 'isBinary' + } + + self._type = None + self._size_in_bytes = None + self._sha = None + self._is_binary = None + + @property + def type(self): + """ + **[Required]** Gets the type of this RepositoryObject. + The type of git object. + + Allowed values for this property are: "BLOB", "TREE", "COMMIT", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The type of this RepositoryObject. + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """ + Sets the type of this RepositoryObject. + The type of git object. + + + :param type: The type of this RepositoryObject. + :type: str + """ + allowed_values = ["BLOB", "TREE", "COMMIT"] + if not value_allowed_none_or_none_sentinel(type, allowed_values): + type = 'UNKNOWN_ENUM_VALUE' + self._type = type + + @property + def size_in_bytes(self): + """ + **[Required]** Gets the size_in_bytes of this RepositoryObject. + Size in Bytes + + + :return: The size_in_bytes of this RepositoryObject. + :rtype: int + """ + return self._size_in_bytes + + @size_in_bytes.setter + def size_in_bytes(self, size_in_bytes): + """ + Sets the size_in_bytes of this RepositoryObject. + Size in Bytes + + + :param size_in_bytes: The size_in_bytes of this RepositoryObject. + :type: int + """ + self._size_in_bytes = size_in_bytes + + @property + def sha(self): + """ + **[Required]** Gets the sha of this RepositoryObject. + SHA-1 hash of git object + + + :return: The sha of this RepositoryObject. + :rtype: str + """ + return self._sha + + @sha.setter + def sha(self, sha): + """ + Sets the sha of this RepositoryObject. + SHA-1 hash of git object + + + :param sha: The sha of this RepositoryObject. + :type: str + """ + self._sha = sha + + @property + def is_binary(self): + """ + Gets the is_binary of this RepositoryObject. + flag to determine is the object contains binary file content or not. + + + :return: The is_binary of this RepositoryObject. + :rtype: bool + """ + return self._is_binary + + @is_binary.setter + def is_binary(self, is_binary): + """ + Sets the is_binary of this RepositoryObject. + flag to determine is the object contains binary file content or not. + + + :param is_binary: The is_binary of this RepositoryObject. + :type: bool + """ + self._is_binary = is_binary + + 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/devops/models/repository_path_collection.py b/src/oci/devops/models/repository_path_collection.py new file mode 100644 index 0000000000..5ce853912c --- /dev/null +++ b/src/oci/devops/models/repository_path_collection.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 RepositoryPathCollection(object): + """ + Result of a List Paths in a repository + """ + + def __init__(self, **kwargs): + """ + Initializes a new RepositoryPathCollection object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param items: + The value to assign to the items property of this RepositoryPathCollection. + :type items: list[oci.devops.models.RepositoryPathSummary] + + """ + self.swagger_types = { + 'items': 'list[RepositoryPathSummary]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this RepositoryPathCollection. + List of objects describings files or directories in a repository. + + + :return: The items of this RepositoryPathCollection. + :rtype: list[oci.devops.models.RepositoryPathSummary] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this RepositoryPathCollection. + List of objects describings files or directories in a repository. + + + :param items: The items of this RepositoryPathCollection. + :type: list[oci.devops.models.RepositoryPathSummary] + """ + self._items = items + + 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/devops/models/repository_path_summary.py b/src/oci/devops/models/repository_path_summary.py new file mode 100644 index 0000000000..1db2500e83 --- /dev/null +++ b/src/oci/devops/models/repository_path_summary.py @@ -0,0 +1,295 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 RepositoryPathSummary(object): + """ + Object containing information about files and directories in a repository + """ + + def __init__(self, **kwargs): + """ + Initializes a new RepositoryPathSummary object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param type: + The value to assign to the type property of this RepositoryPathSummary. + :type type: str + + :param size_in_bytes: + The value to assign to the size_in_bytes property of this RepositoryPathSummary. + :type size_in_bytes: int + + :param name: + The value to assign to the name property of this RepositoryPathSummary. + :type name: str + + :param path: + The value to assign to the path property of this RepositoryPathSummary. + :type path: str + + :param sha: + The value to assign to the sha property of this RepositoryPathSummary. + :type sha: str + + :param submodule_git_url: + The value to assign to the submodule_git_url property of this RepositoryPathSummary. + :type submodule_git_url: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this RepositoryPathSummary. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this RepositoryPathSummary. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'type': 'str', + 'size_in_bytes': 'int', + 'name': 'str', + 'path': 'str', + 'sha': 'str', + 'submodule_git_url': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'type': 'type', + 'size_in_bytes': 'sizeInBytes', + 'name': 'name', + 'path': 'path', + 'sha': 'sha', + 'submodule_git_url': 'submoduleGitUrl', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._type = None + self._size_in_bytes = None + self._name = None + self._path = None + self._sha = None + self._submodule_git_url = None + self._freeform_tags = None + self._defined_tags = None + + @property + def type(self): + """ + Gets the type of this RepositoryPathSummary. + File or Directory + + + :return: The type of this RepositoryPathSummary. + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """ + Sets the type of this RepositoryPathSummary. + File or Directory + + + :param type: The type of this RepositoryPathSummary. + :type: str + """ + self._type = type + + @property + def size_in_bytes(self): + """ + Gets the size_in_bytes of this RepositoryPathSummary. + Size of file or directory + + + :return: The size_in_bytes of this RepositoryPathSummary. + :rtype: int + """ + return self._size_in_bytes + + @size_in_bytes.setter + def size_in_bytes(self, size_in_bytes): + """ + Sets the size_in_bytes of this RepositoryPathSummary. + Size of file or directory + + + :param size_in_bytes: The size_in_bytes of this RepositoryPathSummary. + :type: int + """ + self._size_in_bytes = size_in_bytes + + @property + def name(self): + """ + Gets the name of this RepositoryPathSummary. + Name of file or directory + + + :return: The name of this RepositoryPathSummary. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """ + Sets the name of this RepositoryPathSummary. + Name of file or directory + + + :param name: The name of this RepositoryPathSummary. + :type: str + """ + self._name = name + + @property + def path(self): + """ + Gets the path of this RepositoryPathSummary. + Path to file or directory in a repository + + + :return: The path of this RepositoryPathSummary. + :rtype: str + """ + return self._path + + @path.setter + def path(self, path): + """ + Sets the path of this RepositoryPathSummary. + Path to file or directory in a repository + + + :param path: The path of this RepositoryPathSummary. + :type: str + """ + self._path = path + + @property + def sha(self): + """ + Gets the sha of this RepositoryPathSummary. + SHA-1 checksum of blob or tree + + + :return: The sha of this RepositoryPathSummary. + :rtype: str + """ + return self._sha + + @sha.setter + def sha(self, sha): + """ + Sets the sha of this RepositoryPathSummary. + SHA-1 checksum of blob or tree + + + :param sha: The sha of this RepositoryPathSummary. + :type: str + """ + self._sha = sha + + @property + def submodule_git_url(self): + """ + Gets the submodule_git_url of this RepositoryPathSummary. + The giturl of the submodule + + + :return: The submodule_git_url of this RepositoryPathSummary. + :rtype: str + """ + return self._submodule_git_url + + @submodule_git_url.setter + def submodule_git_url(self, submodule_git_url): + """ + Sets the submodule_git_url of this RepositoryPathSummary. + The giturl of the submodule + + + :param submodule_git_url: The submodule_git_url of this RepositoryPathSummary. + :type: str + """ + self._submodule_git_url = submodule_git_url + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this RepositoryPathSummary. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See `Resource Tags`__. Example: `{\"bar-key\": \"value\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this RepositoryPathSummary. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this RepositoryPathSummary. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See `Resource Tags`__. Example: `{\"bar-key\": \"value\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this RepositoryPathSummary. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this RepositoryPathSummary. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this RepositoryPathSummary. + :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 RepositoryPathSummary. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this RepositoryPathSummary. + :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/devops/models/repository_ref.py b/src/oci/devops/models/repository_ref.py new file mode 100644 index 0000000000..3d803f3ea8 --- /dev/null +++ b/src/oci/devops/models/repository_ref.py @@ -0,0 +1,200 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 RepositoryRef(object): + """ + Ref object with name and commitId + """ + + #: A constant which can be used with the ref_type property of a RepositoryRef. + #: This constant has a value of "BRANCH" + REF_TYPE_BRANCH = "BRANCH" + + #: A constant which can be used with the ref_type property of a RepositoryRef. + #: This constant has a value of "TAG" + REF_TYPE_TAG = "TAG" + + def __init__(self, **kwargs): + """ + Initializes a new RepositoryRef object with values from keyword arguments. This class has the following subclasses and if you are using this class as input + to a service operations then you should favor using a subclass over the base class: + + * :class:`~oci.devops.models.RepositoryBranch` + * :class:`~oci.devops.models.RepositoryTag` + + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param ref_name: + The value to assign to the ref_name property of this RepositoryRef. + :type ref_name: str + + :param ref_type: + The value to assign to the ref_type property of this RepositoryRef. + Allowed values for this property are: "BRANCH", "TAG", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type ref_type: str + + :param full_ref_name: + The value to assign to the full_ref_name property of this RepositoryRef. + :type full_ref_name: str + + :param repository_id: + The value to assign to the repository_id property of this RepositoryRef. + :type repository_id: str + + """ + self.swagger_types = { + 'ref_name': 'str', + 'ref_type': 'str', + 'full_ref_name': 'str', + 'repository_id': 'str' + } + + self.attribute_map = { + 'ref_name': 'refName', + 'ref_type': 'refType', + 'full_ref_name': 'fullRefName', + 'repository_id': 'repositoryId' + } + + self._ref_name = None + self._ref_type = None + self._full_ref_name = None + self._repository_id = None + + @staticmethod + def get_subtype(object_dictionary): + """ + Given the hash representation of a subtype of this class, + use the info in the hash to return the class of the subtype. + """ + type = object_dictionary['refType'] + + if type == 'BRANCH': + return 'RepositoryBranch' + + if type == 'TAG': + return 'RepositoryTag' + else: + return 'RepositoryRef' + + @property + def ref_name(self): + """ + **[Required]** Gets the ref_name of this RepositoryRef. + Unique Ref name inside a repository + + + :return: The ref_name of this RepositoryRef. + :rtype: str + """ + return self._ref_name + + @ref_name.setter + def ref_name(self, ref_name): + """ + Sets the ref_name of this RepositoryRef. + Unique Ref name inside a repository + + + :param ref_name: The ref_name of this RepositoryRef. + :type: str + """ + self._ref_name = ref_name + + @property + def ref_type(self): + """ + **[Required]** Gets the ref_type of this RepositoryRef. + The type of Ref (Branch or Tag) + + Allowed values for this property are: "BRANCH", "TAG", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The ref_type of this RepositoryRef. + :rtype: str + """ + return self._ref_type + + @ref_type.setter + def ref_type(self, ref_type): + """ + Sets the ref_type of this RepositoryRef. + The type of Ref (Branch or Tag) + + + :param ref_type: The ref_type of this RepositoryRef. + :type: str + """ + allowed_values = ["BRANCH", "TAG"] + if not value_allowed_none_or_none_sentinel(ref_type, allowed_values): + ref_type = 'UNKNOWN_ENUM_VALUE' + self._ref_type = ref_type + + @property + def full_ref_name(self): + """ + **[Required]** Gets the full_ref_name of this RepositoryRef. + Unique full ref name inside a repository + + + :return: The full_ref_name of this RepositoryRef. + :rtype: str + """ + return self._full_ref_name + + @full_ref_name.setter + def full_ref_name(self, full_ref_name): + """ + Sets the full_ref_name of this RepositoryRef. + Unique full ref name inside a repository + + + :param full_ref_name: The full_ref_name of this RepositoryRef. + :type: str + """ + self._full_ref_name = full_ref_name + + @property + def repository_id(self): + """ + **[Required]** Gets the repository_id of this RepositoryRef. + The OCID of the repository containing the ref. + + + :return: The repository_id of this RepositoryRef. + :rtype: str + """ + return self._repository_id + + @repository_id.setter + def repository_id(self, repository_id): + """ + Sets the repository_id of this RepositoryRef. + The OCID of the repository containing the ref. + + + :param repository_id: The repository_id of this RepositoryRef. + :type: str + """ + self._repository_id = repository_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/devops/models/repository_ref_collection.py b/src/oci/devops/models/repository_ref_collection.py new file mode 100644 index 0000000000..6de21448b3 --- /dev/null +++ b/src/oci/devops/models/repository_ref_collection.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 RepositoryRefCollection(object): + """ + Result of a Ref search. + """ + + def __init__(self, **kwargs): + """ + Initializes a new RepositoryRefCollection object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param items: + The value to assign to the items property of this RepositoryRefCollection. + :type items: list[oci.devops.models.RepositoryRefSummary] + + """ + self.swagger_types = { + 'items': 'list[RepositoryRefSummary]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this RepositoryRefCollection. + List of Refs. + + + :return: The items of this RepositoryRefCollection. + :rtype: list[oci.devops.models.RepositoryRefSummary] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this RepositoryRefCollection. + List of Refs. + + + :param items: The items of this RepositoryRefCollection. + :type: list[oci.devops.models.RepositoryRefSummary] + """ + self._items = items + + 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/devops/models/repository_ref_summary.py b/src/oci/devops/models/repository_ref_summary.py new file mode 100644 index 0000000000..0acef2fb8c --- /dev/null +++ b/src/oci/devops/models/repository_ref_summary.py @@ -0,0 +1,254 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 RepositoryRefSummary(object): + """ + Summary of a Ref + """ + + def __init__(self, **kwargs): + """ + Initializes a new RepositoryRefSummary object with values from keyword arguments. This class has the following subclasses and if you are using this class as input + to a service operations then you should favor using a subclass over the base class: + + * :class:`~oci.devops.models.RepositoryBranchSummary` + * :class:`~oci.devops.models.RepositoryTagSummary` + + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param ref_name: + The value to assign to the ref_name property of this RepositoryRefSummary. + :type ref_name: str + + :param ref_type: + The value to assign to the ref_type property of this RepositoryRefSummary. + :type ref_type: str + + :param full_ref_name: + The value to assign to the full_ref_name property of this RepositoryRefSummary. + :type full_ref_name: str + + :param repository_id: + The value to assign to the repository_id property of this RepositoryRefSummary. + :type repository_id: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this RepositoryRefSummary. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this RepositoryRefSummary. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'ref_name': 'str', + 'ref_type': 'str', + 'full_ref_name': 'str', + 'repository_id': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'ref_name': 'refName', + 'ref_type': 'refType', + 'full_ref_name': 'fullRefName', + 'repository_id': 'repositoryId', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._ref_name = None + self._ref_type = None + self._full_ref_name = None + self._repository_id = None + self._freeform_tags = None + self._defined_tags = None + + @staticmethod + def get_subtype(object_dictionary): + """ + Given the hash representation of a subtype of this class, + use the info in the hash to return the class of the subtype. + """ + type = object_dictionary['refType'] + + if type == 'BRANCH': + return 'RepositoryBranchSummary' + + if type == 'TAG': + return 'RepositoryTagSummary' + else: + return 'RepositoryRefSummary' + + @property + def ref_name(self): + """ + **[Required]** Gets the ref_name of this RepositoryRefSummary. + Ref name inside a repository + + + :return: The ref_name of this RepositoryRefSummary. + :rtype: str + """ + return self._ref_name + + @ref_name.setter + def ref_name(self, ref_name): + """ + Sets the ref_name of this RepositoryRefSummary. + Ref name inside a repository + + + :param ref_name: The ref_name of this RepositoryRefSummary. + :type: str + """ + self._ref_name = ref_name + + @property + def ref_type(self): + """ + **[Required]** Gets the ref_type of this RepositoryRefSummary. + Type of Ref. Branch or Tag. + + + :return: The ref_type of this RepositoryRefSummary. + :rtype: str + """ + return self._ref_type + + @ref_type.setter + def ref_type(self, ref_type): + """ + Sets the ref_type of this RepositoryRefSummary. + Type of Ref. Branch or Tag. + + + :param ref_type: The ref_type of this RepositoryRefSummary. + :type: str + """ + self._ref_type = ref_type + + @property + def full_ref_name(self): + """ + **[Required]** Gets the full_ref_name of this RepositoryRefSummary. + Unique full ref name inside a repository + + + :return: The full_ref_name of this RepositoryRefSummary. + :rtype: str + """ + return self._full_ref_name + + @full_ref_name.setter + def full_ref_name(self, full_ref_name): + """ + Sets the full_ref_name of this RepositoryRefSummary. + Unique full ref name inside a repository + + + :param full_ref_name: The full_ref_name of this RepositoryRefSummary. + :type: str + """ + self._full_ref_name = full_ref_name + + @property + def repository_id(self): + """ + **[Required]** Gets the repository_id of this RepositoryRefSummary. + The OCID of the repository containing the ref. + + + :return: The repository_id of this RepositoryRefSummary. + :rtype: str + """ + return self._repository_id + + @repository_id.setter + def repository_id(self, repository_id): + """ + Sets the repository_id of this RepositoryRefSummary. + The OCID of the repository containing the ref. + + + :param repository_id: The repository_id of this RepositoryRefSummary. + :type: str + """ + self._repository_id = repository_id + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this RepositoryRefSummary. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See `Resource Tags`__. Example: `{\"bar-key\": \"value\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this RepositoryRefSummary. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this RepositoryRefSummary. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See `Resource Tags`__. Example: `{\"bar-key\": \"value\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this RepositoryRefSummary. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this RepositoryRefSummary. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this RepositoryRefSummary. + :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 RepositoryRefSummary. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this RepositoryRefSummary. + :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/devops/models/repository_summary.py b/src/oci/devops/models/repository_summary.py new file mode 100644 index 0000000000..ce5559114a --- /dev/null +++ b/src/oci/devops/models/repository_summary.py @@ -0,0 +1,636 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 RepositorySummary(object): + """ + Summary of the Repository. + """ + + def __init__(self, **kwargs): + """ + Initializes a new RepositorySummary 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 RepositorySummary. + :type id: str + + :param name: + The value to assign to the name property of this RepositorySummary. + :type name: str + + :param compartment_id: + The value to assign to the compartment_id property of this RepositorySummary. + :type compartment_id: str + + :param project_id: + The value to assign to the project_id property of this RepositorySummary. + :type project_id: str + + :param namespace: + The value to assign to the namespace property of this RepositorySummary. + :type namespace: str + + :param project_name: + The value to assign to the project_name property of this RepositorySummary. + :type project_name: str + + :param description: + The value to assign to the description property of this RepositorySummary. + :type description: str + + :param default_branch: + The value to assign to the default_branch property of this RepositorySummary. + :type default_branch: str + + :param repository_type: + The value to assign to the repository_type property of this RepositorySummary. + :type repository_type: str + + :param ssh_url: + The value to assign to the ssh_url property of this RepositorySummary. + :type ssh_url: str + + :param http_url: + The value to assign to the http_url property of this RepositorySummary. + :type http_url: str + + :param mirror_repository_config: + The value to assign to the mirror_repository_config property of this RepositorySummary. + :type mirror_repository_config: oci.devops.models.MirrorRepositoryConfig + + :param time_created: + The value to assign to the time_created property of this RepositorySummary. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this RepositorySummary. + :type time_updated: datetime + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this RepositorySummary. + :type lifecycle_state: str + + :param lifecycle_details: + The value to assign to the lifecycle_details property of this RepositorySummary. + :type lifecycle_details: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this RepositorySummary. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this RepositorySummary. + :type defined_tags: dict(str, dict(str, object)) + + :param system_tags: + The value to assign to the system_tags property of this RepositorySummary. + :type system_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'id': 'str', + 'name': 'str', + 'compartment_id': 'str', + 'project_id': 'str', + 'namespace': 'str', + 'project_name': 'str', + 'description': 'str', + 'default_branch': 'str', + 'repository_type': 'str', + 'ssh_url': 'str', + 'http_url': 'str', + 'mirror_repository_config': 'MirrorRepositoryConfig', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'lifecycle_state': 'str', + 'lifecycle_details': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'system_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'id': 'id', + 'name': 'name', + 'compartment_id': 'compartmentId', + 'project_id': 'projectId', + 'namespace': 'namespace', + 'project_name': 'projectName', + 'description': 'description', + 'default_branch': 'defaultBranch', + 'repository_type': 'repositoryType', + 'ssh_url': 'sshUrl', + 'http_url': 'httpUrl', + 'mirror_repository_config': 'mirrorRepositoryConfig', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'lifecycle_state': 'lifecycleState', + 'lifecycle_details': 'lifecycleDetails', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'system_tags': 'systemTags' + } + + self._id = None + self._name = None + self._compartment_id = None + self._project_id = None + self._namespace = None + self._project_name = None + self._description = None + self._default_branch = None + self._repository_type = None + self._ssh_url = None + self._http_url = None + self._mirror_repository_config = None + self._time_created = None + self._time_updated = None + self._lifecycle_state = None + self._lifecycle_details = None + self._freeform_tags = None + self._defined_tags = None + self._system_tags = None + + @property + def id(self): + """ + **[Required]** Gets the id of this RepositorySummary. + The OCID of the repository. This value is unique and immutable. + + + :return: The id of this RepositorySummary. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this RepositorySummary. + The OCID of the repository. This value is unique and immutable. + + + :param id: The id of this RepositorySummary. + :type: str + """ + self._id = id + + @property + def name(self): + """ + Gets the name of this RepositorySummary. + Unique name of a repository. This value is mutable. + + + :return: The name of this RepositorySummary. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """ + Sets the name of this RepositorySummary. + Unique name of a repository. This value is mutable. + + + :param name: The name of this RepositorySummary. + :type: str + """ + self._name = name + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this RepositorySummary. + The OCID of the repository's Compartment. + + + :return: The compartment_id of this RepositorySummary. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this RepositorySummary. + The OCID of the repository's Compartment. + + + :param compartment_id: The compartment_id of this RepositorySummary. + :type: str + """ + self._compartment_id = compartment_id + + @property + def project_id(self): + """ + **[Required]** Gets the project_id of this RepositorySummary. + The OCID of the Project containing the repository. + + + :return: The project_id of this RepositorySummary. + :rtype: str + """ + return self._project_id + + @project_id.setter + def project_id(self, project_id): + """ + Sets the project_id of this RepositorySummary. + The OCID of the Project containing the repository. + + + :param project_id: The project_id of this RepositorySummary. + :type: str + """ + self._project_id = project_id + + @property + def namespace(self): + """ + Gets the namespace of this RepositorySummary. + Tenancy unique namespace. This value is fetched from Project Service + + + :return: The namespace of this RepositorySummary. + :rtype: str + """ + return self._namespace + + @namespace.setter + def namespace(self, namespace): + """ + Sets the namespace of this RepositorySummary. + Tenancy unique namespace. This value is fetched from Project Service + + + :param namespace: The namespace of this RepositorySummary. + :type: str + """ + self._namespace = namespace + + @property + def project_name(self): + """ + Gets the project_name of this RepositorySummary. + Unique name of a project in a namespace. This value is fetched from Project Service + + + :return: The project_name of this RepositorySummary. + :rtype: str + """ + return self._project_name + + @project_name.setter + def project_name(self, project_name): + """ + Sets the project_name of this RepositorySummary. + Unique name of a project in a namespace. This value is fetched from Project Service + + + :param project_name: The project_name of this RepositorySummary. + :type: str + """ + self._project_name = project_name + + @property + def description(self): + """ + Gets the description of this RepositorySummary. + The description of this repository. Avoid entering confidential information + + + :return: The description of this RepositorySummary. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this RepositorySummary. + The description of this repository. Avoid entering confidential information + + + :param description: The description of this RepositorySummary. + :type: str + """ + self._description = description + + @property + def default_branch(self): + """ + Gets the default_branch of this RepositorySummary. + The default branch of the repository + + + :return: The default_branch of this RepositorySummary. + :rtype: str + """ + return self._default_branch + + @default_branch.setter + def default_branch(self, default_branch): + """ + Sets the default_branch of this RepositorySummary. + The default branch of the repository + + + :param default_branch: The default_branch of this RepositorySummary. + :type: str + """ + self._default_branch = default_branch + + @property + def repository_type(self): + """ + Gets the repository_type of this RepositorySummary. + Type of repository + + + :return: The repository_type of this RepositorySummary. + :rtype: str + """ + return self._repository_type + + @repository_type.setter + def repository_type(self, repository_type): + """ + Sets the repository_type of this RepositorySummary. + Type of repository + + + :param repository_type: The repository_type of this RepositorySummary. + :type: str + """ + self._repository_type = repository_type + + @property + def ssh_url(self): + """ + Gets the ssh_url of this RepositorySummary. + ssh url user utilized to git clone, pull and push + + + :return: The ssh_url of this RepositorySummary. + :rtype: str + """ + return self._ssh_url + + @ssh_url.setter + def ssh_url(self, ssh_url): + """ + Sets the ssh_url of this RepositorySummary. + ssh url user utilized to git clone, pull and push + + + :param ssh_url: The ssh_url of this RepositorySummary. + :type: str + """ + self._ssh_url = ssh_url + + @property + def http_url(self): + """ + Gets the http_url of this RepositorySummary. + http url user utilized to git clone, pull and push + + + :return: The http_url of this RepositorySummary. + :rtype: str + """ + return self._http_url + + @http_url.setter + def http_url(self, http_url): + """ + Sets the http_url of this RepositorySummary. + http url user utilized to git clone, pull and push + + + :param http_url: The http_url of this RepositorySummary. + :type: str + """ + self._http_url = http_url + + @property + def mirror_repository_config(self): + """ + Gets the mirror_repository_config of this RepositorySummary. + + :return: The mirror_repository_config of this RepositorySummary. + :rtype: oci.devops.models.MirrorRepositoryConfig + """ + return self._mirror_repository_config + + @mirror_repository_config.setter + def mirror_repository_config(self, mirror_repository_config): + """ + Sets the mirror_repository_config of this RepositorySummary. + + :param mirror_repository_config: The mirror_repository_config of this RepositorySummary. + :type: oci.devops.models.MirrorRepositoryConfig + """ + self._mirror_repository_config = mirror_repository_config + + @property + def time_created(self): + """ + Gets the time_created of this RepositorySummary. + The time the the Repository was created. An RFC3339 formatted datetime string + + + :return: The time_created of this RepositorySummary. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this RepositorySummary. + The time the the Repository was created. An RFC3339 formatted datetime string + + + :param time_created: The time_created of this RepositorySummary. + :type: datetime + """ + self._time_created = time_created + + @property + def time_updated(self): + """ + Gets the time_updated of this RepositorySummary. + The time the Repository was updated. An RFC3339 formatted datetime string + + + :return: The time_updated of this RepositorySummary. + :rtype: datetime + """ + return self._time_updated + + @time_updated.setter + def time_updated(self, time_updated): + """ + Sets the time_updated of this RepositorySummary. + The time the Repository was updated. An RFC3339 formatted datetime string + + + :param time_updated: The time_updated of this RepositorySummary. + :type: datetime + """ + self._time_updated = time_updated + + @property + def lifecycle_state(self): + """ + Gets the lifecycle_state of this RepositorySummary. + The current state of the Repository. + + + :return: The lifecycle_state of this RepositorySummary. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this RepositorySummary. + The current state of the Repository. + + + :param lifecycle_state: The lifecycle_state of this RepositorySummary. + :type: str + """ + self._lifecycle_state = lifecycle_state + + @property + def lifecycle_details(self): + """ + Gets the lifecycle_details of this RepositorySummary. + A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + + + :return: The lifecycle_details of this RepositorySummary. + :rtype: str + """ + return self._lifecycle_details + + @lifecycle_details.setter + def lifecycle_details(self, lifecycle_details): + """ + Sets the lifecycle_details of this RepositorySummary. + A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + + + :param lifecycle_details: The lifecycle_details of this RepositorySummary. + :type: str + """ + self._lifecycle_details = lifecycle_details + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this RepositorySummary. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See `Resource Tags`__. Example: `{\"bar-key\": \"value\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this RepositorySummary. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this RepositorySummary. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See `Resource Tags`__. Example: `{\"bar-key\": \"value\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this RepositorySummary. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this RepositorySummary. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this RepositorySummary. + :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 RepositorySummary. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this RepositorySummary. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + @property + def system_tags(self): + """ + Gets the system_tags of this RepositorySummary. + Usage of system tag keys. These predefined keys are scoped to namespaces. See `Resource Tags`__. Example: `{\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The system_tags of this RepositorySummary. + :rtype: dict(str, dict(str, object)) + """ + return self._system_tags + + @system_tags.setter + def system_tags(self, system_tags): + """ + Sets the system_tags of this RepositorySummary. + Usage of system tag keys. These predefined keys are scoped to namespaces. See `Resource Tags`__. Example: `{\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param system_tags: The system_tags of this RepositorySummary. + :type: dict(str, dict(str, object)) + """ + self._system_tags = system_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/devops/models/repository_tag.py b/src/oci/devops/models/repository_tag.py new file mode 100644 index 0000000000..9c6f025284 --- /dev/null +++ b/src/oci/devops/models/repository_tag.py @@ -0,0 +1,101 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .repository_ref import RepositoryRef +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 RepositoryTag(RepositoryRef): + """ + The information needed to create a lightweight Tag + """ + + def __init__(self, **kwargs): + """ + Initializes a new RepositoryTag object with values from keyword arguments. The default value of the :py:attr:`~oci.devops.models.RepositoryTag.ref_type` attribute + of this class is ``TAG`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param ref_name: + The value to assign to the ref_name property of this RepositoryTag. + :type ref_name: str + + :param ref_type: + The value to assign to the ref_type property of this RepositoryTag. + Allowed values for this property are: "BRANCH", "TAG" + :type ref_type: str + + :param full_ref_name: + The value to assign to the full_ref_name property of this RepositoryTag. + :type full_ref_name: str + + :param repository_id: + The value to assign to the repository_id property of this RepositoryTag. + :type repository_id: str + + :param object_id: + The value to assign to the object_id property of this RepositoryTag. + :type object_id: str + + """ + self.swagger_types = { + 'ref_name': 'str', + 'ref_type': 'str', + 'full_ref_name': 'str', + 'repository_id': 'str', + 'object_id': 'str' + } + + self.attribute_map = { + 'ref_name': 'refName', + 'ref_type': 'refType', + 'full_ref_name': 'fullRefName', + 'repository_id': 'repositoryId', + 'object_id': 'objectId' + } + + self._ref_name = None + self._ref_type = None + self._full_ref_name = None + self._repository_id = None + self._object_id = None + self._ref_type = 'TAG' + + @property + def object_id(self): + """ + **[Required]** Gets the object_id of this RepositoryTag. + SHA-1 hash value of the object pointed to by the tag. + + + :return: The object_id of this RepositoryTag. + :rtype: str + """ + return self._object_id + + @object_id.setter + def object_id(self, object_id): + """ + Sets the object_id of this RepositoryTag. + SHA-1 hash value of the object pointed to by the tag. + + + :param object_id: The object_id of this RepositoryTag. + :type: str + """ + self._object_id = object_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/devops/models/repository_tag_summary.py b/src/oci/devops/models/repository_tag_summary.py new file mode 100644 index 0000000000..1661b52ab3 --- /dev/null +++ b/src/oci/devops/models/repository_tag_summary.py @@ -0,0 +1,114 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .repository_ref_summary import RepositoryRefSummary +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 RepositoryTagSummary(RepositoryRefSummary): + """ + The information needed to create a lightweight Tag + """ + + def __init__(self, **kwargs): + """ + Initializes a new RepositoryTagSummary object with values from keyword arguments. The default value of the :py:attr:`~oci.devops.models.RepositoryTagSummary.ref_type` attribute + of this class is ``TAG`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param ref_name: + The value to assign to the ref_name property of this RepositoryTagSummary. + :type ref_name: str + + :param ref_type: + The value to assign to the ref_type property of this RepositoryTagSummary. + :type ref_type: str + + :param full_ref_name: + The value to assign to the full_ref_name property of this RepositoryTagSummary. + :type full_ref_name: str + + :param repository_id: + The value to assign to the repository_id property of this RepositoryTagSummary. + :type repository_id: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this RepositoryTagSummary. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this RepositoryTagSummary. + :type defined_tags: dict(str, dict(str, object)) + + :param object_id: + The value to assign to the object_id property of this RepositoryTagSummary. + :type object_id: str + + """ + self.swagger_types = { + 'ref_name': 'str', + 'ref_type': 'str', + 'full_ref_name': 'str', + 'repository_id': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'object_id': 'str' + } + + self.attribute_map = { + 'ref_name': 'refName', + 'ref_type': 'refType', + 'full_ref_name': 'fullRefName', + 'repository_id': 'repositoryId', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'object_id': 'objectId' + } + + self._ref_name = None + self._ref_type = None + self._full_ref_name = None + self._repository_id = None + self._freeform_tags = None + self._defined_tags = None + self._object_id = None + self._ref_type = 'TAG' + + @property + def object_id(self): + """ + **[Required]** Gets the object_id of this RepositoryTagSummary. + SHA-1 hash value of the object pointed to by the tag. + + + :return: The object_id of this RepositoryTagSummary. + :rtype: str + """ + return self._object_id + + @object_id.setter + def object_id(self, object_id): + """ + Sets the object_id of this RepositoryTagSummary. + SHA-1 hash value of the object pointed to by the tag. + + + :param object_id: The object_id of this RepositoryTagSummary. + :type: str + """ + self._object_id = object_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/devops/models/trigger.py b/src/oci/devops/models/trigger.py new file mode 100644 index 0000000000..c4f98d2315 --- /dev/null +++ b/src/oci/devops/models/trigger.py @@ -0,0 +1,542 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 Trigger(object): + """ + Description of Trigger. + """ + + #: A constant which can be used with the trigger_source property of a Trigger. + #: This constant has a value of "GITHUB" + TRIGGER_SOURCE_GITHUB = "GITHUB" + + #: A constant which can be used with the trigger_source property of a Trigger. + #: This constant has a value of "GITLAB" + TRIGGER_SOURCE_GITLAB = "GITLAB" + + #: A constant which can be used with the trigger_source property of a Trigger. + #: This constant has a value of "DEVOPS_CODE_REPOSITORY" + TRIGGER_SOURCE_DEVOPS_CODE_REPOSITORY = "DEVOPS_CODE_REPOSITORY" + + #: A constant which can be used with the lifecycle_state property of a Trigger. + #: This constant has a value of "ACTIVE" + LIFECYCLE_STATE_ACTIVE = "ACTIVE" + + def __init__(self, **kwargs): + """ + Initializes a new Trigger object with values from keyword arguments. This class has the following subclasses and if you are using this class as input + to a service operations then you should favor using a subclass over the base class: + + * :class:`~oci.devops.models.GitlabTrigger` + * :class:`~oci.devops.models.GithubTrigger` + * :class:`~oci.devops.models.DevopsCodeRepositoryTrigger` + + 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 Trigger. + :type id: str + + :param display_name: + The value to assign to the display_name property of this Trigger. + :type display_name: str + + :param description: + The value to assign to the description property of this Trigger. + :type description: str + + :param project_id: + The value to assign to the project_id property of this Trigger. + :type project_id: str + + :param compartment_id: + The value to assign to the compartment_id property of this Trigger. + :type compartment_id: str + + :param trigger_source: + The value to assign to the trigger_source property of this Trigger. + Allowed values for this property are: "GITHUB", "GITLAB", "DEVOPS_CODE_REPOSITORY", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type trigger_source: str + + :param time_created: + The value to assign to the time_created property of this Trigger. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this Trigger. + :type time_updated: datetime + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this Trigger. + Allowed values for this property are: "ACTIVE", '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 Trigger. + :type lifecycle_details: str + + :param actions: + The value to assign to the actions property of this Trigger. + :type actions: list[oci.devops.models.TriggerAction] + + :param freeform_tags: + The value to assign to the freeform_tags property of this Trigger. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this Trigger. + :type defined_tags: dict(str, dict(str, object)) + + :param system_tags: + The value to assign to the system_tags property of this Trigger. + :type system_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'id': 'str', + 'display_name': 'str', + 'description': 'str', + 'project_id': 'str', + 'compartment_id': 'str', + 'trigger_source': 'str', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'lifecycle_state': 'str', + 'lifecycle_details': 'str', + 'actions': 'list[TriggerAction]', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'system_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'id': 'id', + 'display_name': 'displayName', + 'description': 'description', + 'project_id': 'projectId', + 'compartment_id': 'compartmentId', + 'trigger_source': 'triggerSource', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'lifecycle_state': 'lifecycleState', + 'lifecycle_details': 'lifecycleDetails', + 'actions': 'actions', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'system_tags': 'systemTags' + } + + self._id = None + self._display_name = None + self._description = None + self._project_id = None + self._compartment_id = None + self._trigger_source = None + self._time_created = None + self._time_updated = None + self._lifecycle_state = None + self._lifecycle_details = None + self._actions = None + self._freeform_tags = None + self._defined_tags = None + self._system_tags = None + + @staticmethod + def get_subtype(object_dictionary): + """ + Given the hash representation of a subtype of this class, + use the info in the hash to return the class of the subtype. + """ + type = object_dictionary['triggerSource'] + + if type == 'GITLAB': + return 'GitlabTrigger' + + if type == 'GITHUB': + return 'GithubTrigger' + + if type == 'DEVOPS_CODE_REPOSITORY': + return 'DevopsCodeRepositoryTrigger' + else: + return 'Trigger' + + @property + def id(self): + """ + **[Required]** Gets the id of this Trigger. + Unique identifier that is immutable on creation + + + :return: The id of this Trigger. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this Trigger. + Unique identifier that is immutable on creation + + + :param id: The id of this Trigger. + :type: str + """ + self._id = id + + @property + def display_name(self): + """ + Gets the display_name of this Trigger. + Name for Trigger. + + + :return: The display_name of this Trigger. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this Trigger. + Name for Trigger. + + + :param display_name: The display_name of this Trigger. + :type: str + """ + self._display_name = display_name + + @property + def description(self): + """ + Gets the description of this Trigger. + Description about the Trigger + + + :return: The description of this Trigger. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this Trigger. + Description about the Trigger + + + :param description: The description of this Trigger. + :type: str + """ + self._description = description + + @property + def project_id(self): + """ + **[Required]** Gets the project_id of this Trigger. + Project to which the Trigger belongs + + + :return: The project_id of this Trigger. + :rtype: str + """ + return self._project_id + + @project_id.setter + def project_id(self, project_id): + """ + Sets the project_id of this Trigger. + Project to which the Trigger belongs + + + :param project_id: The project_id of this Trigger. + :type: str + """ + self._project_id = project_id + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this Trigger. + Compartment to which the Trigger belongs + + + :return: The compartment_id of this Trigger. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this Trigger. + Compartment to which the Trigger belongs + + + :param compartment_id: The compartment_id of this Trigger. + :type: str + """ + self._compartment_id = compartment_id + + @property + def trigger_source(self): + """ + **[Required]** Gets the trigger_source of this Trigger. + Source of the Trigger (allowed values are - GITHUB, GITLAB) + + Allowed values for this property are: "GITHUB", "GITLAB", "DEVOPS_CODE_REPOSITORY", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The trigger_source of this Trigger. + :rtype: str + """ + return self._trigger_source + + @trigger_source.setter + def trigger_source(self, trigger_source): + """ + Sets the trigger_source of this Trigger. + Source of the Trigger (allowed values are - GITHUB, GITLAB) + + + :param trigger_source: The trigger_source of this Trigger. + :type: str + """ + allowed_values = ["GITHUB", "GITLAB", "DEVOPS_CODE_REPOSITORY"] + if not value_allowed_none_or_none_sentinel(trigger_source, allowed_values): + trigger_source = 'UNKNOWN_ENUM_VALUE' + self._trigger_source = trigger_source + + @property + def time_created(self): + """ + Gets the time_created of this Trigger. + The time the the Trigger was created. An RFC3339 formatted datetime string + + + :return: The time_created of this Trigger. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this Trigger. + The time the the Trigger was created. An RFC3339 formatted datetime string + + + :param time_created: The time_created of this Trigger. + :type: datetime + """ + self._time_created = time_created + + @property + def time_updated(self): + """ + Gets the time_updated of this Trigger. + The time the Trigger was updated. An RFC3339 formatted datetime string + + + :return: The time_updated of this Trigger. + :rtype: datetime + """ + return self._time_updated + + @time_updated.setter + def time_updated(self, time_updated): + """ + Sets the time_updated of this Trigger. + The time the Trigger was updated. An RFC3339 formatted datetime string + + + :param time_updated: The time_updated of this Trigger. + :type: datetime + """ + self._time_updated = time_updated + + @property + def lifecycle_state(self): + """ + Gets the lifecycle_state of this Trigger. + The current state of the Trigger. + + Allowed values for this property are: "ACTIVE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The lifecycle_state of this Trigger. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this Trigger. + The current state of the Trigger. + + + :param lifecycle_state: The lifecycle_state of this Trigger. + :type: str + """ + allowed_values = ["ACTIVE"] + 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 Trigger. + A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + + + :return: The lifecycle_details of this Trigger. + :rtype: str + """ + return self._lifecycle_details + + @lifecycle_details.setter + def lifecycle_details(self, lifecycle_details): + """ + Sets the lifecycle_details of this Trigger. + A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + + + :param lifecycle_details: The lifecycle_details of this Trigger. + :type: str + """ + self._lifecycle_details = lifecycle_details + + @property + def actions(self): + """ + **[Required]** Gets the actions of this Trigger. + The list of actions that are to be performed for this Trigger + + + :return: The actions of this Trigger. + :rtype: list[oci.devops.models.TriggerAction] + """ + return self._actions + + @actions.setter + def actions(self, actions): + """ + Sets the actions of this Trigger. + The list of actions that are to be performed for this Trigger + + + :param actions: The actions of this Trigger. + :type: list[oci.devops.models.TriggerAction] + """ + self._actions = actions + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this Trigger. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See `Resource Tags`__. Example: `{\"bar-key\": \"value\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this Trigger. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this Trigger. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See `Resource Tags`__. Example: `{\"bar-key\": \"value\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this Trigger. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this Trigger. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this Trigger. + :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 Trigger. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this Trigger. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + @property + def system_tags(self): + """ + Gets the system_tags of this Trigger. + Usage of system tag keys. These predefined keys are scoped to namespaces. See `Resource Tags`__. Example: `{\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The system_tags of this Trigger. + :rtype: dict(str, dict(str, object)) + """ + return self._system_tags + + @system_tags.setter + def system_tags(self, system_tags): + """ + Sets the system_tags of this Trigger. + Usage of system tag keys. These predefined keys are scoped to namespaces. See `Resource Tags`__. Example: `{\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param system_tags: The system_tags of this Trigger. + :type: dict(str, dict(str, object)) + """ + self._system_tags = system_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/devops/models/trigger_action.py b/src/oci/devops/models/trigger_action.py new file mode 100644 index 0000000000..9a6134a0b7 --- /dev/null +++ b/src/oci/devops/models/trigger_action.py @@ -0,0 +1,126 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 TriggerAction(object): + """ + The action to be performed + """ + + #: A constant which can be used with the type property of a TriggerAction. + #: This constant has a value of "TRIGGER_BUILD_PIPELINE" + TYPE_TRIGGER_BUILD_PIPELINE = "TRIGGER_BUILD_PIPELINE" + + def __init__(self, **kwargs): + """ + Initializes a new TriggerAction object with values from keyword arguments. This class has the following subclasses and if you are using this class as input + to a service operations then you should favor using a subclass over the base class: + + * :class:`~oci.devops.models.TriggerBuildPipelineAction` + + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param type: + The value to assign to the type property of this TriggerAction. + Allowed values for this property are: "TRIGGER_BUILD_PIPELINE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type type: str + + :param filter: + The value to assign to the filter property of this TriggerAction. + :type filter: oci.devops.models.Filter + + """ + self.swagger_types = { + 'type': 'str', + 'filter': 'Filter' + } + + self.attribute_map = { + 'type': 'type', + 'filter': 'filter' + } + + self._type = None + self._filter = None + + @staticmethod + def get_subtype(object_dictionary): + """ + Given the hash representation of a subtype of this class, + use the info in the hash to return the class of the subtype. + """ + type = object_dictionary['type'] + + if type == 'TRIGGER_BUILD_PIPELINE': + return 'TriggerBuildPipelineAction' + else: + return 'TriggerAction' + + @property + def type(self): + """ + **[Required]** Gets the type of this TriggerAction. + The type of action that will be taken (allowed value - TRIGGER_BUILD_PIPELINE) + + Allowed values for this property are: "TRIGGER_BUILD_PIPELINE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The type of this TriggerAction. + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """ + Sets the type of this TriggerAction. + The type of action that will be taken (allowed value - TRIGGER_BUILD_PIPELINE) + + + :param type: The type of this TriggerAction. + :type: str + """ + allowed_values = ["TRIGGER_BUILD_PIPELINE"] + if not value_allowed_none_or_none_sentinel(type, allowed_values): + type = 'UNKNOWN_ENUM_VALUE' + self._type = type + + @property + def filter(self): + """ + Gets the filter of this TriggerAction. + + :return: The filter of this TriggerAction. + :rtype: oci.devops.models.Filter + """ + return self._filter + + @filter.setter + def filter(self, filter): + """ + Sets the filter of this TriggerAction. + + :param filter: The filter of this TriggerAction. + :type: oci.devops.models.Filter + """ + self._filter = filter + + 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/devops/models/trigger_build_pipeline_action.py b/src/oci/devops/models/trigger_build_pipeline_action.py new file mode 100644 index 0000000000..b171f880c1 --- /dev/null +++ b/src/oci/devops/models/trigger_build_pipeline_action.py @@ -0,0 +1,87 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .trigger_action import TriggerAction +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 TriggerBuildPipelineAction(TriggerAction): + """ + The action to trigger a build pipeline + """ + + def __init__(self, **kwargs): + """ + Initializes a new TriggerBuildPipelineAction object with values from keyword arguments. The default value of the :py:attr:`~oci.devops.models.TriggerBuildPipelineAction.type` attribute + of this class is ``TRIGGER_BUILD_PIPELINE`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param type: + The value to assign to the type property of this TriggerBuildPipelineAction. + Allowed values for this property are: "TRIGGER_BUILD_PIPELINE" + :type type: str + + :param filter: + The value to assign to the filter property of this TriggerBuildPipelineAction. + :type filter: oci.devops.models.Filter + + :param build_pipeline_id: + The value to assign to the build_pipeline_id property of this TriggerBuildPipelineAction. + :type build_pipeline_id: str + + """ + self.swagger_types = { + 'type': 'str', + 'filter': 'Filter', + 'build_pipeline_id': 'str' + } + + self.attribute_map = { + 'type': 'type', + 'filter': 'filter', + 'build_pipeline_id': 'buildPipelineId' + } + + self._type = None + self._filter = None + self._build_pipeline_id = None + self._type = 'TRIGGER_BUILD_PIPELINE' + + @property + def build_pipeline_id(self): + """ + **[Required]** Gets the build_pipeline_id of this TriggerBuildPipelineAction. + The id of the build pipeline to be triggered + + + :return: The build_pipeline_id of this TriggerBuildPipelineAction. + :rtype: str + """ + return self._build_pipeline_id + + @build_pipeline_id.setter + def build_pipeline_id(self, build_pipeline_id): + """ + Sets the build_pipeline_id of this TriggerBuildPipelineAction. + The id of the build pipeline to be triggered + + + :param build_pipeline_id: The build_pipeline_id of this TriggerBuildPipelineAction. + :type: str + """ + self._build_pipeline_id = build_pipeline_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/devops/models/trigger_collection.py b/src/oci/devops/models/trigger_collection.py new file mode 100644 index 0000000000..04c3636c59 --- /dev/null +++ b/src/oci/devops/models/trigger_collection.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 TriggerCollection(object): + """ + Results of a trigger search. Contains boh TriggerSummary items and other information, such as metadata. + """ + + def __init__(self, **kwargs): + """ + Initializes a new TriggerCollection object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param items: + The value to assign to the items property of this TriggerCollection. + :type items: list[oci.devops.models.TriggerSummary] + + """ + self.swagger_types = { + 'items': 'list[TriggerSummary]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this TriggerCollection. + List of triggers. + + + :return: The items of this TriggerCollection. + :rtype: list[oci.devops.models.TriggerSummary] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this TriggerCollection. + List of triggers. + + + :param items: The items of this TriggerCollection. + :type: list[oci.devops.models.TriggerSummary] + """ + self._items = items + + 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/devops/models/trigger_create_result.py b/src/oci/devops/models/trigger_create_result.py new file mode 100644 index 0000000000..449d5989cd --- /dev/null +++ b/src/oci/devops/models/trigger_create_result.py @@ -0,0 +1,510 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 TriggerCreateResult(object): + """ + Description of Trigger Create response. + """ + + def __init__(self, **kwargs): + """ + Initializes a new TriggerCreateResult object with values from keyword arguments. This class has the following subclasses and if you are using this class as input + to a service operations then you should favor using a subclass over the base class: + + * :class:`~oci.devops.models.GithubTriggerCreateResult` + * :class:`~oci.devops.models.GitlabTriggerCreateResult` + * :class:`~oci.devops.models.DevopsCodeRepositoryTriggerCreateResult` + + 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 TriggerCreateResult. + :type id: str + + :param display_name: + The value to assign to the display_name property of this TriggerCreateResult. + :type display_name: str + + :param description: + The value to assign to the description property of this TriggerCreateResult. + :type description: str + + :param project_id: + The value to assign to the project_id property of this TriggerCreateResult. + :type project_id: str + + :param compartment_id: + The value to assign to the compartment_id property of this TriggerCreateResult. + :type compartment_id: str + + :param trigger_source: + The value to assign to the trigger_source property of this TriggerCreateResult. + :type trigger_source: str + + :param time_created: + The value to assign to the time_created property of this TriggerCreateResult. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this TriggerCreateResult. + :type time_updated: datetime + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this TriggerCreateResult. + :type lifecycle_state: str + + :param lifecycle_details: + The value to assign to the lifecycle_details property of this TriggerCreateResult. + :type lifecycle_details: str + + :param actions: + The value to assign to the actions property of this TriggerCreateResult. + :type actions: list[oci.devops.models.TriggerAction] + + :param freeform_tags: + The value to assign to the freeform_tags property of this TriggerCreateResult. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this TriggerCreateResult. + :type defined_tags: dict(str, dict(str, object)) + + :param system_tags: + The value to assign to the system_tags property of this TriggerCreateResult. + :type system_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'id': 'str', + 'display_name': 'str', + 'description': 'str', + 'project_id': 'str', + 'compartment_id': 'str', + 'trigger_source': 'str', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'lifecycle_state': 'str', + 'lifecycle_details': 'str', + 'actions': 'list[TriggerAction]', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'system_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'id': 'id', + 'display_name': 'displayName', + 'description': 'description', + 'project_id': 'projectId', + 'compartment_id': 'compartmentId', + 'trigger_source': 'triggerSource', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'lifecycle_state': 'lifecycleState', + 'lifecycle_details': 'lifecycleDetails', + 'actions': 'actions', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'system_tags': 'systemTags' + } + + self._id = None + self._display_name = None + self._description = None + self._project_id = None + self._compartment_id = None + self._trigger_source = None + self._time_created = None + self._time_updated = None + self._lifecycle_state = None + self._lifecycle_details = None + self._actions = None + self._freeform_tags = None + self._defined_tags = None + self._system_tags = None + + @staticmethod + def get_subtype(object_dictionary): + """ + Given the hash representation of a subtype of this class, + use the info in the hash to return the class of the subtype. + """ + type = object_dictionary['triggerSource'] + + if type == 'GITHUB': + return 'GithubTriggerCreateResult' + + if type == 'GITLAB': + return 'GitlabTriggerCreateResult' + + if type == 'DEVOPS_CODE_REPOSITORY': + return 'DevopsCodeRepositoryTriggerCreateResult' + else: + return 'TriggerCreateResult' + + @property + def id(self): + """ + **[Required]** Gets the id of this TriggerCreateResult. + Unique identifier that is immutable on creation + + + :return: The id of this TriggerCreateResult. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this TriggerCreateResult. + Unique identifier that is immutable on creation + + + :param id: The id of this TriggerCreateResult. + :type: str + """ + self._id = id + + @property + def display_name(self): + """ + Gets the display_name of this TriggerCreateResult. + Name for Trigger. + + + :return: The display_name of this TriggerCreateResult. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this TriggerCreateResult. + Name for Trigger. + + + :param display_name: The display_name of this TriggerCreateResult. + :type: str + """ + self._display_name = display_name + + @property + def description(self): + """ + Gets the description of this TriggerCreateResult. + Description about the Trigger + + + :return: The description of this TriggerCreateResult. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this TriggerCreateResult. + Description about the Trigger + + + :param description: The description of this TriggerCreateResult. + :type: str + """ + self._description = description + + @property + def project_id(self): + """ + **[Required]** Gets the project_id of this TriggerCreateResult. + Project to which the Trigger belongs + + + :return: The project_id of this TriggerCreateResult. + :rtype: str + """ + return self._project_id + + @project_id.setter + def project_id(self, project_id): + """ + Sets the project_id of this TriggerCreateResult. + Project to which the Trigger belongs + + + :param project_id: The project_id of this TriggerCreateResult. + :type: str + """ + self._project_id = project_id + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this TriggerCreateResult. + Compartment to which the Trigger belongs + + + :return: The compartment_id of this TriggerCreateResult. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this TriggerCreateResult. + Compartment to which the Trigger belongs + + + :param compartment_id: The compartment_id of this TriggerCreateResult. + :type: str + """ + self._compartment_id = compartment_id + + @property + def trigger_source(self): + """ + **[Required]** Gets the trigger_source of this TriggerCreateResult. + Source of the Trigger (allowed values are - GITHUB, GITLAB) + + + :return: The trigger_source of this TriggerCreateResult. + :rtype: str + """ + return self._trigger_source + + @trigger_source.setter + def trigger_source(self, trigger_source): + """ + Sets the trigger_source of this TriggerCreateResult. + Source of the Trigger (allowed values are - GITHUB, GITLAB) + + + :param trigger_source: The trigger_source of this TriggerCreateResult. + :type: str + """ + self._trigger_source = trigger_source + + @property + def time_created(self): + """ + Gets the time_created of this TriggerCreateResult. + The time the the Trigger was created. An RFC3339 formatted datetime string + + + :return: The time_created of this TriggerCreateResult. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this TriggerCreateResult. + The time the the Trigger was created. An RFC3339 formatted datetime string + + + :param time_created: The time_created of this TriggerCreateResult. + :type: datetime + """ + self._time_created = time_created + + @property + def time_updated(self): + """ + Gets the time_updated of this TriggerCreateResult. + The time the Trigger was updated. An RFC3339 formatted datetime string + + + :return: The time_updated of this TriggerCreateResult. + :rtype: datetime + """ + return self._time_updated + + @time_updated.setter + def time_updated(self, time_updated): + """ + Sets the time_updated of this TriggerCreateResult. + The time the Trigger was updated. An RFC3339 formatted datetime string + + + :param time_updated: The time_updated of this TriggerCreateResult. + :type: datetime + """ + self._time_updated = time_updated + + @property + def lifecycle_state(self): + """ + Gets the lifecycle_state of this TriggerCreateResult. + The current state of the Trigger. + + + :return: The lifecycle_state of this TriggerCreateResult. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this TriggerCreateResult. + The current state of the Trigger. + + + :param lifecycle_state: The lifecycle_state of this TriggerCreateResult. + :type: str + """ + self._lifecycle_state = lifecycle_state + + @property + def lifecycle_details(self): + """ + Gets the lifecycle_details of this TriggerCreateResult. + A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + + + :return: The lifecycle_details of this TriggerCreateResult. + :rtype: str + """ + return self._lifecycle_details + + @lifecycle_details.setter + def lifecycle_details(self, lifecycle_details): + """ + Sets the lifecycle_details of this TriggerCreateResult. + A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + + + :param lifecycle_details: The lifecycle_details of this TriggerCreateResult. + :type: str + """ + self._lifecycle_details = lifecycle_details + + @property + def actions(self): + """ + **[Required]** Gets the actions of this TriggerCreateResult. + The list of actions that are to be performed for this Trigger + + + :return: The actions of this TriggerCreateResult. + :rtype: list[oci.devops.models.TriggerAction] + """ + return self._actions + + @actions.setter + def actions(self, actions): + """ + Sets the actions of this TriggerCreateResult. + The list of actions that are to be performed for this Trigger + + + :param actions: The actions of this TriggerCreateResult. + :type: list[oci.devops.models.TriggerAction] + """ + self._actions = actions + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this TriggerCreateResult. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See `Resource Tags`__. Example: `{\"bar-key\": \"value\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this TriggerCreateResult. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this TriggerCreateResult. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See `Resource Tags`__. Example: `{\"bar-key\": \"value\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this TriggerCreateResult. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this TriggerCreateResult. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this TriggerCreateResult. + :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 TriggerCreateResult. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this TriggerCreateResult. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + @property + def system_tags(self): + """ + Gets the system_tags of this TriggerCreateResult. + Usage of system tag keys. These predefined keys are scoped to namespaces. See `Resource Tags`__. Example: `{\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The system_tags of this TriggerCreateResult. + :rtype: dict(str, dict(str, object)) + """ + return self._system_tags + + @system_tags.setter + def system_tags(self, system_tags): + """ + Sets the system_tags of this TriggerCreateResult. + Usage of system tag keys. These predefined keys are scoped to namespaces. See `Resource Tags`__. Example: `{\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param system_tags: The system_tags of this TriggerCreateResult. + :type: dict(str, dict(str, object)) + """ + self._system_tags = system_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/devops/models/trigger_deployment_pipeline_stage_run_progress.py b/src/oci/devops/models/trigger_deployment_pipeline_stage_run_progress.py new file mode 100644 index 0000000000..5ad233da0c --- /dev/null +++ b/src/oci/devops/models/trigger_deployment_pipeline_stage_run_progress.py @@ -0,0 +1,176 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .build_pipeline_stage_run_progress import BuildPipelineStageRunProgress +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 TriggerDeploymentPipelineStageRunProgress(BuildPipelineStageRunProgress): + """ + Specifies Trigger Deployment Pipleline stage specific exeution details. + """ + + def __init__(self, **kwargs): + """ + Initializes a new TriggerDeploymentPipelineStageRunProgress object with values from keyword arguments. The default value of the :py:attr:`~oci.devops.models.TriggerDeploymentPipelineStageRunProgress.build_pipeline_stage_type` attribute + of this class is ``TRIGGER_DEPLOYMENT_PIPELINE`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param stage_display_name: + The value to assign to the stage_display_name property of this TriggerDeploymentPipelineStageRunProgress. + :type stage_display_name: str + + :param build_pipeline_stage_type: + The value to assign to the build_pipeline_stage_type property of this TriggerDeploymentPipelineStageRunProgress. + :type build_pipeline_stage_type: str + + :param build_pipeline_stage_id: + The value to assign to the build_pipeline_stage_id property of this TriggerDeploymentPipelineStageRunProgress. + :type build_pipeline_stage_id: str + + :param time_started: + The value to assign to the time_started property of this TriggerDeploymentPipelineStageRunProgress. + :type time_started: datetime + + :param time_finished: + The value to assign to the time_finished property of this TriggerDeploymentPipelineStageRunProgress. + :type time_finished: datetime + + :param status: + The value to assign to the status property of this TriggerDeploymentPipelineStageRunProgress. + Allowed values for this property are: "ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED" + :type status: str + + :param build_pipeline_stage_predecessors: + The value to assign to the build_pipeline_stage_predecessors property of this TriggerDeploymentPipelineStageRunProgress. + :type build_pipeline_stage_predecessors: oci.devops.models.BuildPipelineStagePredecessorCollection + + :param exported_variables: + The value to assign to the exported_variables property of this TriggerDeploymentPipelineStageRunProgress. + :type exported_variables: oci.devops.models.ExportedVariableCollection + + :param artifact_override_parameters: + The value to assign to the artifact_override_parameters property of this TriggerDeploymentPipelineStageRunProgress. + :type artifact_override_parameters: oci.devops.models.DeployArtifactOverrideArgumentCollection + + :param deployment_id: + The value to assign to the deployment_id property of this TriggerDeploymentPipelineStageRunProgress. + :type deployment_id: str + + """ + self.swagger_types = { + 'stage_display_name': 'str', + 'build_pipeline_stage_type': 'str', + 'build_pipeline_stage_id': 'str', + 'time_started': 'datetime', + 'time_finished': 'datetime', + 'status': 'str', + 'build_pipeline_stage_predecessors': 'BuildPipelineStagePredecessorCollection', + 'exported_variables': 'ExportedVariableCollection', + 'artifact_override_parameters': 'DeployArtifactOverrideArgumentCollection', + 'deployment_id': 'str' + } + + self.attribute_map = { + 'stage_display_name': 'stageDisplayName', + 'build_pipeline_stage_type': 'buildPipelineStageType', + 'build_pipeline_stage_id': 'buildPipelineStageId', + 'time_started': 'timeStarted', + 'time_finished': 'timeFinished', + 'status': 'status', + 'build_pipeline_stage_predecessors': 'buildPipelineStagePredecessors', + 'exported_variables': 'exportedVariables', + 'artifact_override_parameters': 'artifactOverrideParameters', + 'deployment_id': 'deploymentId' + } + + self._stage_display_name = None + self._build_pipeline_stage_type = None + self._build_pipeline_stage_id = None + self._time_started = None + self._time_finished = None + self._status = None + self._build_pipeline_stage_predecessors = None + self._exported_variables = None + self._artifact_override_parameters = None + self._deployment_id = None + self._build_pipeline_stage_type = 'TRIGGER_DEPLOYMENT_PIPELINE' + + @property + def exported_variables(self): + """ + Gets the exported_variables of this TriggerDeploymentPipelineStageRunProgress. + + :return: The exported_variables of this TriggerDeploymentPipelineStageRunProgress. + :rtype: oci.devops.models.ExportedVariableCollection + """ + return self._exported_variables + + @exported_variables.setter + def exported_variables(self, exported_variables): + """ + Sets the exported_variables of this TriggerDeploymentPipelineStageRunProgress. + + :param exported_variables: The exported_variables of this TriggerDeploymentPipelineStageRunProgress. + :type: oci.devops.models.ExportedVariableCollection + """ + self._exported_variables = exported_variables + + @property + def artifact_override_parameters(self): + """ + Gets the artifact_override_parameters of this TriggerDeploymentPipelineStageRunProgress. + + :return: The artifact_override_parameters of this TriggerDeploymentPipelineStageRunProgress. + :rtype: oci.devops.models.DeployArtifactOverrideArgumentCollection + """ + return self._artifact_override_parameters + + @artifact_override_parameters.setter + def artifact_override_parameters(self, artifact_override_parameters): + """ + Sets the artifact_override_parameters of this TriggerDeploymentPipelineStageRunProgress. + + :param artifact_override_parameters: The artifact_override_parameters of this TriggerDeploymentPipelineStageRunProgress. + :type: oci.devops.models.DeployArtifactOverrideArgumentCollection + """ + self._artifact_override_parameters = artifact_override_parameters + + @property + def deployment_id(self): + """ + Gets the deployment_id of this TriggerDeploymentPipelineStageRunProgress. + Identifier of the Deployment Trigerred. + + + :return: The deployment_id of this TriggerDeploymentPipelineStageRunProgress. + :rtype: str + """ + return self._deployment_id + + @deployment_id.setter + def deployment_id(self, deployment_id): + """ + Sets the deployment_id of this TriggerDeploymentPipelineStageRunProgress. + Identifier of the Deployment Trigerred. + + + :param deployment_id: The deployment_id of this TriggerDeploymentPipelineStageRunProgress. + :type: str + """ + self._deployment_id = deployment_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/devops/models/trigger_deployment_stage.py b/src/oci/devops/models/trigger_deployment_stage.py new file mode 100644 index 0000000000..dc970ce351 --- /dev/null +++ b/src/oci/devops/models/trigger_deployment_stage.py @@ -0,0 +1,210 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .build_pipeline_stage import BuildPipelineStage +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 TriggerDeploymentStage(BuildPipelineStage): + """ + Specifies Trigger Deployment Pipleline stage which runs another pipeline of the application. + """ + + def __init__(self, **kwargs): + """ + Initializes a new TriggerDeploymentStage object with values from keyword arguments. The default value of the :py:attr:`~oci.devops.models.TriggerDeploymentStage.build_pipeline_stage_type` attribute + of this class is ``TRIGGER_DEPLOYMENT_PIPELINE`` and it should not be changed. + 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 TriggerDeploymentStage. + :type id: str + + :param display_name: + The value to assign to the display_name property of this TriggerDeploymentStage. + :type display_name: str + + :param description: + The value to assign to the description property of this TriggerDeploymentStage. + :type description: str + + :param project_id: + The value to assign to the project_id property of this TriggerDeploymentStage. + :type project_id: str + + :param build_pipeline_id: + The value to assign to the build_pipeline_id property of this TriggerDeploymentStage. + :type build_pipeline_id: str + + :param compartment_id: + The value to assign to the compartment_id property of this TriggerDeploymentStage. + :type compartment_id: str + + :param build_pipeline_stage_type: + The value to assign to the build_pipeline_stage_type property of this TriggerDeploymentStage. + Allowed values for this property are: "WAIT", "BUILD", "DELIVER_ARTIFACT", "TRIGGER_DEPLOYMENT_PIPELINE" + :type build_pipeline_stage_type: str + + :param time_created: + The value to assign to the time_created property of this TriggerDeploymentStage. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this TriggerDeploymentStage. + :type time_updated: datetime + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this TriggerDeploymentStage. + Allowed values for this property are: "CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED" + :type lifecycle_state: str + + :param lifecycle_details: + The value to assign to the lifecycle_details property of this TriggerDeploymentStage. + :type lifecycle_details: str + + :param build_pipeline_stage_predecessor_collection: + The value to assign to the build_pipeline_stage_predecessor_collection property of this TriggerDeploymentStage. + :type build_pipeline_stage_predecessor_collection: oci.devops.models.BuildPipelineStagePredecessorCollection + + :param freeform_tags: + The value to assign to the freeform_tags property of this TriggerDeploymentStage. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this TriggerDeploymentStage. + :type defined_tags: dict(str, dict(str, object)) + + :param system_tags: + The value to assign to the system_tags property of this TriggerDeploymentStage. + :type system_tags: dict(str, dict(str, object)) + + :param deploy_pipeline_id: + The value to assign to the deploy_pipeline_id property of this TriggerDeploymentStage. + :type deploy_pipeline_id: str + + :param is_pass_all_parameters_enabled: + The value to assign to the is_pass_all_parameters_enabled property of this TriggerDeploymentStage. + :type is_pass_all_parameters_enabled: bool + + """ + self.swagger_types = { + 'id': 'str', + 'display_name': 'str', + 'description': 'str', + 'project_id': 'str', + 'build_pipeline_id': 'str', + 'compartment_id': 'str', + 'build_pipeline_stage_type': 'str', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'lifecycle_state': 'str', + 'lifecycle_details': 'str', + 'build_pipeline_stage_predecessor_collection': 'BuildPipelineStagePredecessorCollection', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'system_tags': 'dict(str, dict(str, object))', + 'deploy_pipeline_id': 'str', + 'is_pass_all_parameters_enabled': 'bool' + } + + self.attribute_map = { + 'id': 'id', + 'display_name': 'displayName', + 'description': 'description', + 'project_id': 'projectId', + 'build_pipeline_id': 'buildPipelineId', + 'compartment_id': 'compartmentId', + 'build_pipeline_stage_type': 'buildPipelineStageType', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'lifecycle_state': 'lifecycleState', + 'lifecycle_details': 'lifecycleDetails', + 'build_pipeline_stage_predecessor_collection': 'buildPipelineStagePredecessorCollection', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'system_tags': 'systemTags', + 'deploy_pipeline_id': 'deployPipelineId', + 'is_pass_all_parameters_enabled': 'isPassAllParametersEnabled' + } + + self._id = None + self._display_name = None + self._description = None + self._project_id = None + self._build_pipeline_id = None + self._compartment_id = None + self._build_pipeline_stage_type = None + self._time_created = None + self._time_updated = None + self._lifecycle_state = None + self._lifecycle_details = None + self._build_pipeline_stage_predecessor_collection = None + self._freeform_tags = None + self._defined_tags = None + self._system_tags = None + self._deploy_pipeline_id = None + self._is_pass_all_parameters_enabled = None + self._build_pipeline_stage_type = 'TRIGGER_DEPLOYMENT_PIPELINE' + + @property + def deploy_pipeline_id(self): + """ + **[Required]** Gets the deploy_pipeline_id of this TriggerDeploymentStage. + A target Pipeline ocid that will be run in this stage. + + + :return: The deploy_pipeline_id of this TriggerDeploymentStage. + :rtype: str + """ + return self._deploy_pipeline_id + + @deploy_pipeline_id.setter + def deploy_pipeline_id(self, deploy_pipeline_id): + """ + Sets the deploy_pipeline_id of this TriggerDeploymentStage. + A target Pipeline ocid that will be run in this stage. + + + :param deploy_pipeline_id: The deploy_pipeline_id of this TriggerDeploymentStage. + :type: str + """ + self._deploy_pipeline_id = deploy_pipeline_id + + @property + def is_pass_all_parameters_enabled(self): + """ + **[Required]** Gets the is_pass_all_parameters_enabled of this TriggerDeploymentStage. + A boolean flag specifies whether the parameters should be passed during the deployment trigger. + + + :return: The is_pass_all_parameters_enabled of this TriggerDeploymentStage. + :rtype: bool + """ + return self._is_pass_all_parameters_enabled + + @is_pass_all_parameters_enabled.setter + def is_pass_all_parameters_enabled(self, is_pass_all_parameters_enabled): + """ + Sets the is_pass_all_parameters_enabled of this TriggerDeploymentStage. + A boolean flag specifies whether the parameters should be passed during the deployment trigger. + + + :param is_pass_all_parameters_enabled: The is_pass_all_parameters_enabled of this TriggerDeploymentStage. + :type: bool + """ + self._is_pass_all_parameters_enabled = is_pass_all_parameters_enabled + + 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/devops/models/trigger_deployment_stage_summary.py b/src/oci/devops/models/trigger_deployment_stage_summary.py new file mode 100644 index 0000000000..1ad84d0319 --- /dev/null +++ b/src/oci/devops/models/trigger_deployment_stage_summary.py @@ -0,0 +1,208 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .build_pipeline_stage_summary import BuildPipelineStageSummary +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 TriggerDeploymentStageSummary(BuildPipelineStageSummary): + """ + Specifies Trigger Deployment Pipleline stage which runs another pipeline of the application. + """ + + def __init__(self, **kwargs): + """ + Initializes a new TriggerDeploymentStageSummary object with values from keyword arguments. The default value of the :py:attr:`~oci.devops.models.TriggerDeploymentStageSummary.build_pipeline_stage_type` attribute + of this class is ``TRIGGER_DEPLOYMENT_PIPELINE`` and it should not be changed. + 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 TriggerDeploymentStageSummary. + :type id: str + + :param display_name: + The value to assign to the display_name property of this TriggerDeploymentStageSummary. + :type display_name: str + + :param project_id: + The value to assign to the project_id property of this TriggerDeploymentStageSummary. + :type project_id: str + + :param build_pipeline_id: + The value to assign to the build_pipeline_id property of this TriggerDeploymentStageSummary. + :type build_pipeline_id: str + + :param compartment_id: + The value to assign to the compartment_id property of this TriggerDeploymentStageSummary. + :type compartment_id: str + + :param build_pipeline_stage_type: + The value to assign to the build_pipeline_stage_type property of this TriggerDeploymentStageSummary. + :type build_pipeline_stage_type: str + + :param time_created: + The value to assign to the time_created property of this TriggerDeploymentStageSummary. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this TriggerDeploymentStageSummary. + :type time_updated: datetime + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this TriggerDeploymentStageSummary. + :type lifecycle_state: str + + :param lifecycle_details: + The value to assign to the lifecycle_details property of this TriggerDeploymentStageSummary. + :type lifecycle_details: str + + :param description: + The value to assign to the description property of this TriggerDeploymentStageSummary. + :type description: str + + :param build_pipeline_stage_predecessor_collection: + The value to assign to the build_pipeline_stage_predecessor_collection property of this TriggerDeploymentStageSummary. + :type build_pipeline_stage_predecessor_collection: oci.devops.models.BuildPipelineStagePredecessorCollection + + :param freeform_tags: + The value to assign to the freeform_tags property of this TriggerDeploymentStageSummary. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this TriggerDeploymentStageSummary. + :type defined_tags: dict(str, dict(str, object)) + + :param system_tags: + The value to assign to the system_tags property of this TriggerDeploymentStageSummary. + :type system_tags: dict(str, dict(str, object)) + + :param deploy_pipeline_id: + The value to assign to the deploy_pipeline_id property of this TriggerDeploymentStageSummary. + :type deploy_pipeline_id: str + + :param is_pass_all_parameters_enabled: + The value to assign to the is_pass_all_parameters_enabled property of this TriggerDeploymentStageSummary. + :type is_pass_all_parameters_enabled: bool + + """ + self.swagger_types = { + 'id': 'str', + 'display_name': 'str', + 'project_id': 'str', + 'build_pipeline_id': 'str', + 'compartment_id': 'str', + 'build_pipeline_stage_type': 'str', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'lifecycle_state': 'str', + 'lifecycle_details': 'str', + 'description': 'str', + 'build_pipeline_stage_predecessor_collection': 'BuildPipelineStagePredecessorCollection', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'system_tags': 'dict(str, dict(str, object))', + 'deploy_pipeline_id': 'str', + 'is_pass_all_parameters_enabled': 'bool' + } + + self.attribute_map = { + 'id': 'id', + 'display_name': 'displayName', + 'project_id': 'projectId', + 'build_pipeline_id': 'buildPipelineId', + 'compartment_id': 'compartmentId', + 'build_pipeline_stage_type': 'buildPipelineStageType', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'lifecycle_state': 'lifecycleState', + 'lifecycle_details': 'lifecycleDetails', + 'description': 'description', + 'build_pipeline_stage_predecessor_collection': 'buildPipelineStagePredecessorCollection', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'system_tags': 'systemTags', + 'deploy_pipeline_id': 'deployPipelineId', + 'is_pass_all_parameters_enabled': 'isPassAllParametersEnabled' + } + + self._id = None + self._display_name = None + self._project_id = None + self._build_pipeline_id = None + self._compartment_id = None + self._build_pipeline_stage_type = None + self._time_created = None + self._time_updated = None + self._lifecycle_state = None + self._lifecycle_details = None + self._description = None + self._build_pipeline_stage_predecessor_collection = None + self._freeform_tags = None + self._defined_tags = None + self._system_tags = None + self._deploy_pipeline_id = None + self._is_pass_all_parameters_enabled = None + self._build_pipeline_stage_type = 'TRIGGER_DEPLOYMENT_PIPELINE' + + @property + def deploy_pipeline_id(self): + """ + **[Required]** Gets the deploy_pipeline_id of this TriggerDeploymentStageSummary. + A target deploy Pipeline ocid that will be run in this stage. + + + :return: The deploy_pipeline_id of this TriggerDeploymentStageSummary. + :rtype: str + """ + return self._deploy_pipeline_id + + @deploy_pipeline_id.setter + def deploy_pipeline_id(self, deploy_pipeline_id): + """ + Sets the deploy_pipeline_id of this TriggerDeploymentStageSummary. + A target deploy Pipeline ocid that will be run in this stage. + + + :param deploy_pipeline_id: The deploy_pipeline_id of this TriggerDeploymentStageSummary. + :type: str + """ + self._deploy_pipeline_id = deploy_pipeline_id + + @property + def is_pass_all_parameters_enabled(self): + """ + **[Required]** Gets the is_pass_all_parameters_enabled of this TriggerDeploymentStageSummary. + A boolean flag specifies whether the parameters should be passed during the deployment trigger. + + + :return: The is_pass_all_parameters_enabled of this TriggerDeploymentStageSummary. + :rtype: bool + """ + return self._is_pass_all_parameters_enabled + + @is_pass_all_parameters_enabled.setter + def is_pass_all_parameters_enabled(self, is_pass_all_parameters_enabled): + """ + Sets the is_pass_all_parameters_enabled of this TriggerDeploymentStageSummary. + A boolean flag specifies whether the parameters should be passed during the deployment trigger. + + + :param is_pass_all_parameters_enabled: The is_pass_all_parameters_enabled of this TriggerDeploymentStageSummary. + :type: bool + """ + self._is_pass_all_parameters_enabled = is_pass_all_parameters_enabled + + 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/devops/models/trigger_info.py b/src/oci/devops/models/trigger_info.py new file mode 100644 index 0000000000..2613c5727e --- /dev/null +++ b/src/oci/devops/models/trigger_info.py @@ -0,0 +1,101 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 TriggerInfo(object): + """ + Trigger details that need to be used for the BuildRun + """ + + def __init__(self, **kwargs): + """ + Initializes a new TriggerInfo 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 TriggerInfo. + :type display_name: str + + :param actions: + The value to assign to the actions property of this TriggerInfo. + :type actions: list[oci.devops.models.TriggerAction] + + """ + self.swagger_types = { + 'display_name': 'str', + 'actions': 'list[TriggerAction]' + } + + self.attribute_map = { + 'display_name': 'displayName', + 'actions': 'actions' + } + + self._display_name = None + self._actions = None + + @property + def display_name(self): + """ + Gets the display_name of this TriggerInfo. + Name for Trigger. + + + :return: The display_name of this TriggerInfo. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this TriggerInfo. + Name for Trigger. + + + :param display_name: The display_name of this TriggerInfo. + :type: str + """ + self._display_name = display_name + + @property + def actions(self): + """ + **[Required]** Gets the actions of this TriggerInfo. + The list of actions that are to be performed for this Trigger + + + :return: The actions of this TriggerInfo. + :rtype: list[oci.devops.models.TriggerAction] + """ + return self._actions + + @actions.setter + def actions(self, actions): + """ + Sets the actions of this TriggerInfo. + The list of actions that are to be performed for this Trigger + + + :param actions: The actions of this TriggerInfo. + :type: list[oci.devops.models.TriggerAction] + """ + self._actions = actions + + 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/devops/models/trigger_schedule.py b/src/oci/devops/models/trigger_schedule.py new file mode 100644 index 0000000000..a8776ba3d2 --- /dev/null +++ b/src/oci/devops/models/trigger_schedule.py @@ -0,0 +1,131 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 TriggerSchedule(object): + """ + Specifies a trigger schedule. Timing information for when to initiate automated syncs. + """ + + #: A constant which can be used with the schedule_type property of a TriggerSchedule. + #: This constant has a value of "NONE" + SCHEDULE_TYPE_NONE = "NONE" + + #: A constant which can be used with the schedule_type property of a TriggerSchedule. + #: This constant has a value of "DEFAULT" + SCHEDULE_TYPE_DEFAULT = "DEFAULT" + + #: A constant which can be used with the schedule_type property of a TriggerSchedule. + #: This constant has a value of "CUSTOM" + SCHEDULE_TYPE_CUSTOM = "CUSTOM" + + def __init__(self, **kwargs): + """ + Initializes a new TriggerSchedule object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param schedule_type: + The value to assign to the schedule_type property of this TriggerSchedule. + Allowed values for this property are: "NONE", "DEFAULT", "CUSTOM", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type schedule_type: str + + :param custom_schedule: + The value to assign to the custom_schedule property of this TriggerSchedule. + :type custom_schedule: str + + """ + self.swagger_types = { + 'schedule_type': 'str', + 'custom_schedule': 'str' + } + + self.attribute_map = { + 'schedule_type': 'scheduleType', + 'custom_schedule': 'customSchedule' + } + + self._schedule_type = None + self._custom_schedule = None + + @property + def schedule_type(self): + """ + **[Required]** Gets the schedule_type of this TriggerSchedule. + Different types to trigger schedule + - NONE - No automated sync schedule. + - DEFAULT - Trigger Schedule will be every 30 minutes. + - CUSTOM - Custom triggering schedule. + + Allowed values for this property are: "NONE", "DEFAULT", "CUSTOM", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The schedule_type of this TriggerSchedule. + :rtype: str + """ + return self._schedule_type + + @schedule_type.setter + def schedule_type(self, schedule_type): + """ + Sets the schedule_type of this TriggerSchedule. + Different types to trigger schedule + - NONE - No automated sync schedule. + - DEFAULT - Trigger Schedule will be every 30 minutes. + - CUSTOM - Custom triggering schedule. + + + :param schedule_type: The schedule_type of this TriggerSchedule. + :type: str + """ + allowed_values = ["NONE", "DEFAULT", "CUSTOM"] + if not value_allowed_none_or_none_sentinel(schedule_type, allowed_values): + schedule_type = 'UNKNOWN_ENUM_VALUE' + self._schedule_type = schedule_type + + @property + def custom_schedule(self): + """ + Gets the custom_schedule of this TriggerSchedule. + Valid if type is CUSTOM. Following RFC 5545 recurrence rules, we can specify starting time, occurrence frequency, and interval size. + Example for frequency could be DAILY/WEEKLY/HOURLY or any RFC 5545 supported frequency, which is followed by start time of this window, we can + control the start time with BYHOUR, BYMINUTE and BYSECONDS. It is followed by the interval size. + + + :return: The custom_schedule of this TriggerSchedule. + :rtype: str + """ + return self._custom_schedule + + @custom_schedule.setter + def custom_schedule(self, custom_schedule): + """ + Sets the custom_schedule of this TriggerSchedule. + Valid if type is CUSTOM. Following RFC 5545 recurrence rules, we can specify starting time, occurrence frequency, and interval size. + Example for frequency could be DAILY/WEEKLY/HOURLY or any RFC 5545 supported frequency, which is followed by start time of this window, we can + control the start time with BYHOUR, BYMINUTE and BYSECONDS. It is followed by the interval size. + + + :param custom_schedule: The custom_schedule of this TriggerSchedule. + :type: str + """ + self._custom_schedule = custom_schedule + + 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/devops/models/trigger_summary.py b/src/oci/devops/models/trigger_summary.py new file mode 100644 index 0000000000..9c4ac113c8 --- /dev/null +++ b/src/oci/devops/models/trigger_summary.py @@ -0,0 +1,479 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 TriggerSummary(object): + """ + Summary of the Trigger. + """ + + def __init__(self, **kwargs): + """ + Initializes a new TriggerSummary object with values from keyword arguments. This class has the following subclasses and if you are using this class as input + to a service operations then you should favor using a subclass over the base class: + + * :class:`~oci.devops.models.GitlabTriggerSummary` + * :class:`~oci.devops.models.GithubTriggerSummary` + * :class:`~oci.devops.models.DevopsCodeRepositoryTriggerSummary` + + 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 TriggerSummary. + :type id: str + + :param display_name: + The value to assign to the display_name property of this TriggerSummary. + :type display_name: str + + :param description: + The value to assign to the description property of this TriggerSummary. + :type description: str + + :param project_id: + The value to assign to the project_id property of this TriggerSummary. + :type project_id: str + + :param compartment_id: + The value to assign to the compartment_id property of this TriggerSummary. + :type compartment_id: str + + :param trigger_source: + The value to assign to the trigger_source property of this TriggerSummary. + :type trigger_source: str + + :param time_created: + The value to assign to the time_created property of this TriggerSummary. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this TriggerSummary. + :type time_updated: datetime + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this TriggerSummary. + :type lifecycle_state: str + + :param lifecycle_details: + The value to assign to the lifecycle_details property of this TriggerSummary. + :type lifecycle_details: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this TriggerSummary. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this TriggerSummary. + :type defined_tags: dict(str, dict(str, object)) + + :param system_tags: + The value to assign to the system_tags property of this TriggerSummary. + :type system_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'id': 'str', + 'display_name': 'str', + 'description': 'str', + 'project_id': 'str', + 'compartment_id': 'str', + 'trigger_source': 'str', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'lifecycle_state': 'str', + 'lifecycle_details': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'system_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'id': 'id', + 'display_name': 'displayName', + 'description': 'description', + 'project_id': 'projectId', + 'compartment_id': 'compartmentId', + 'trigger_source': 'triggerSource', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'lifecycle_state': 'lifecycleState', + 'lifecycle_details': 'lifecycleDetails', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'system_tags': 'systemTags' + } + + self._id = None + self._display_name = None + self._description = None + self._project_id = None + self._compartment_id = None + self._trigger_source = None + self._time_created = None + self._time_updated = None + self._lifecycle_state = None + self._lifecycle_details = None + self._freeform_tags = None + self._defined_tags = None + self._system_tags = None + + @staticmethod + def get_subtype(object_dictionary): + """ + Given the hash representation of a subtype of this class, + use the info in the hash to return the class of the subtype. + """ + type = object_dictionary['triggerSource'] + + if type == 'GITLAB': + return 'GitlabTriggerSummary' + + if type == 'GITHUB': + return 'GithubTriggerSummary' + + if type == 'DEVOPS_CODE_REPOSITORY': + return 'DevopsCodeRepositoryTriggerSummary' + else: + return 'TriggerSummary' + + @property + def id(self): + """ + **[Required]** Gets the id of this TriggerSummary. + Unique identifier that is immutable on creation + + + :return: The id of this TriggerSummary. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this TriggerSummary. + Unique identifier that is immutable on creation + + + :param id: The id of this TriggerSummary. + :type: str + """ + self._id = id + + @property + def display_name(self): + """ + Gets the display_name of this TriggerSummary. + Name for Trigger. + + + :return: The display_name of this TriggerSummary. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this TriggerSummary. + Name for Trigger. + + + :param display_name: The display_name of this TriggerSummary. + :type: str + """ + self._display_name = display_name + + @property + def description(self): + """ + Gets the description of this TriggerSummary. + Description about the Trigger + + + :return: The description of this TriggerSummary. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this TriggerSummary. + Description about the Trigger + + + :param description: The description of this TriggerSummary. + :type: str + """ + self._description = description + + @property + def project_id(self): + """ + **[Required]** Gets the project_id of this TriggerSummary. + Project to which the Trigger belongs + + + :return: The project_id of this TriggerSummary. + :rtype: str + """ + return self._project_id + + @project_id.setter + def project_id(self, project_id): + """ + Sets the project_id of this TriggerSummary. + Project to which the Trigger belongs + + + :param project_id: The project_id of this TriggerSummary. + :type: str + """ + self._project_id = project_id + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this TriggerSummary. + Compartment to which the Trigger belongs + + + :return: The compartment_id of this TriggerSummary. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this TriggerSummary. + Compartment to which the Trigger belongs + + + :param compartment_id: The compartment_id of this TriggerSummary. + :type: str + """ + self._compartment_id = compartment_id + + @property + def trigger_source(self): + """ + **[Required]** Gets the trigger_source of this TriggerSummary. + Source of the Trigger (allowed values are - GITHUB, GITLAB) + + + :return: The trigger_source of this TriggerSummary. + :rtype: str + """ + return self._trigger_source + + @trigger_source.setter + def trigger_source(self, trigger_source): + """ + Sets the trigger_source of this TriggerSummary. + Source of the Trigger (allowed values are - GITHUB, GITLAB) + + + :param trigger_source: The trigger_source of this TriggerSummary. + :type: str + """ + self._trigger_source = trigger_source + + @property + def time_created(self): + """ + Gets the time_created of this TriggerSummary. + The time the the Trigger was created. An RFC3339 formatted datetime string + + + :return: The time_created of this TriggerSummary. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this TriggerSummary. + The time the the Trigger was created. An RFC3339 formatted datetime string + + + :param time_created: The time_created of this TriggerSummary. + :type: datetime + """ + self._time_created = time_created + + @property + def time_updated(self): + """ + Gets the time_updated of this TriggerSummary. + The time the Trigger was updated. An RFC3339 formatted datetime string + + + :return: The time_updated of this TriggerSummary. + :rtype: datetime + """ + return self._time_updated + + @time_updated.setter + def time_updated(self, time_updated): + """ + Sets the time_updated of this TriggerSummary. + The time the Trigger was updated. An RFC3339 formatted datetime string + + + :param time_updated: The time_updated of this TriggerSummary. + :type: datetime + """ + self._time_updated = time_updated + + @property + def lifecycle_state(self): + """ + Gets the lifecycle_state of this TriggerSummary. + The current state of the Trigger. + + + :return: The lifecycle_state of this TriggerSummary. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this TriggerSummary. + The current state of the Trigger. + + + :param lifecycle_state: The lifecycle_state of this TriggerSummary. + :type: str + """ + self._lifecycle_state = lifecycle_state + + @property + def lifecycle_details(self): + """ + Gets the lifecycle_details of this TriggerSummary. + A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + + + :return: The lifecycle_details of this TriggerSummary. + :rtype: str + """ + return self._lifecycle_details + + @lifecycle_details.setter + def lifecycle_details(self, lifecycle_details): + """ + Sets the lifecycle_details of this TriggerSummary. + A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + + + :param lifecycle_details: The lifecycle_details of this TriggerSummary. + :type: str + """ + self._lifecycle_details = lifecycle_details + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this TriggerSummary. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See `Resource Tags`__. Example: `{\"bar-key\": \"value\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this TriggerSummary. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this TriggerSummary. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See `Resource Tags`__. Example: `{\"bar-key\": \"value\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this TriggerSummary. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this TriggerSummary. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this TriggerSummary. + :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 TriggerSummary. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this TriggerSummary. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + @property + def system_tags(self): + """ + Gets the system_tags of this TriggerSummary. + Usage of system tag keys. These predefined keys are scoped to namespaces. See `Resource Tags`__. Example: `{\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The system_tags of this TriggerSummary. + :rtype: dict(str, dict(str, object)) + """ + return self._system_tags + + @system_tags.setter + def system_tags(self, system_tags): + """ + Sets the system_tags of this TriggerSummary. + Usage of system tag keys. These predefined keys are scoped to namespaces. See `Resource Tags`__. Example: `{\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param system_tags: The system_tags of this TriggerSummary. + :type: dict(str, dict(str, object)) + """ + self._system_tags = system_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/devops/models/update_absolute_wait_criteria_details.py b/src/oci/devops/models/update_absolute_wait_criteria_details.py new file mode 100644 index 0000000000..db12c03abc --- /dev/null +++ b/src/oci/devops/models/update_absolute_wait_criteria_details.py @@ -0,0 +1,84 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .update_wait_criteria_details import UpdateWaitCriteriaDetails +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 UpdateAbsoluteWaitCriteriaDetails(UpdateWaitCriteriaDetails): + """ + Specifies the absolute wait criteria, user can specify fixed length of wait duration. + """ + + def __init__(self, **kwargs): + """ + Initializes a new UpdateAbsoluteWaitCriteriaDetails object with values from keyword arguments. The default value of the :py:attr:`~oci.devops.models.UpdateAbsoluteWaitCriteriaDetails.wait_type` attribute + of this class is ``ABSOLUTE_WAIT`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param wait_type: + The value to assign to the wait_type property of this UpdateAbsoluteWaitCriteriaDetails. + Allowed values for this property are: "ABSOLUTE_WAIT" + :type wait_type: str + + :param wait_duration: + The value to assign to the wait_duration property of this UpdateAbsoluteWaitCriteriaDetails. + :type wait_duration: str + + """ + self.swagger_types = { + 'wait_type': 'str', + 'wait_duration': 'str' + } + + self.attribute_map = { + 'wait_type': 'waitType', + 'wait_duration': 'waitDuration' + } + + self._wait_type = None + self._wait_duration = None + self._wait_type = 'ABSOLUTE_WAIT' + + @property + def wait_duration(self): + """ + Gets the wait_duration of this UpdateAbsoluteWaitCriteriaDetails. + The absolute wait duration. + Minimum waitDuration should be 5 seconds. + Maximum waitDuration can be up to 2 days. + + + :return: The wait_duration of this UpdateAbsoluteWaitCriteriaDetails. + :rtype: str + """ + return self._wait_duration + + @wait_duration.setter + def wait_duration(self, wait_duration): + """ + Sets the wait_duration of this UpdateAbsoluteWaitCriteriaDetails. + The absolute wait duration. + Minimum waitDuration should be 5 seconds. + Maximum waitDuration can be up to 2 days. + + + :param wait_duration: The wait_duration of this UpdateAbsoluteWaitCriteriaDetails. + :type: str + """ + self._wait_duration = wait_duration + + 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/devops/models/update_build_pipeline_details.py b/src/oci/devops/models/update_build_pipeline_details.py new file mode 100644 index 0000000000..1440b644b4 --- /dev/null +++ b/src/oci/devops/models/update_build_pipeline_details.py @@ -0,0 +1,198 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 UpdateBuildPipelineDetails(object): + """ + The information to be updated for the given BuildPipeline. + """ + + def __init__(self, **kwargs): + """ + Initializes a new UpdateBuildPipelineDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param description: + The value to assign to the description property of this UpdateBuildPipelineDetails. + :type description: str + + :param display_name: + The value to assign to the display_name property of this UpdateBuildPipelineDetails. + :type display_name: str + + :param build_pipeline_parameters: + The value to assign to the build_pipeline_parameters property of this UpdateBuildPipelineDetails. + :type build_pipeline_parameters: oci.devops.models.BuildPipelineParameterCollection + + :param freeform_tags: + The value to assign to the freeform_tags property of this UpdateBuildPipelineDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this UpdateBuildPipelineDetails. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'description': 'str', + 'display_name': 'str', + 'build_pipeline_parameters': 'BuildPipelineParameterCollection', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'description': 'description', + 'display_name': 'displayName', + 'build_pipeline_parameters': 'buildPipelineParameters', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._description = None + self._display_name = None + self._build_pipeline_parameters = None + self._freeform_tags = None + self._defined_tags = None + + @property + def description(self): + """ + Gets the description of this UpdateBuildPipelineDetails. + Optional description about the BuildPipeline + + + :return: The description of this UpdateBuildPipelineDetails. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this UpdateBuildPipelineDetails. + Optional description about the BuildPipeline + + + :param description: The description of this UpdateBuildPipelineDetails. + :type: str + """ + self._description = description + + @property + def display_name(self): + """ + Gets the display_name of this UpdateBuildPipelineDetails. + BuildPipeline display name + + + :return: The display_name of this UpdateBuildPipelineDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this UpdateBuildPipelineDetails. + BuildPipeline display name + + + :param display_name: The display_name of this UpdateBuildPipelineDetails. + :type: str + """ + self._display_name = display_name + + @property + def build_pipeline_parameters(self): + """ + Gets the build_pipeline_parameters of this UpdateBuildPipelineDetails. + + :return: The build_pipeline_parameters of this UpdateBuildPipelineDetails. + :rtype: oci.devops.models.BuildPipelineParameterCollection + """ + return self._build_pipeline_parameters + + @build_pipeline_parameters.setter + def build_pipeline_parameters(self, build_pipeline_parameters): + """ + Sets the build_pipeline_parameters of this UpdateBuildPipelineDetails. + + :param build_pipeline_parameters: The build_pipeline_parameters of this UpdateBuildPipelineDetails. + :type: oci.devops.models.BuildPipelineParameterCollection + """ + self._build_pipeline_parameters = build_pipeline_parameters + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this UpdateBuildPipelineDetails. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See `Resource Tags`__. Example: `{\"bar-key\": \"value\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this UpdateBuildPipelineDetails. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this UpdateBuildPipelineDetails. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See `Resource Tags`__. Example: `{\"bar-key\": \"value\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this UpdateBuildPipelineDetails. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this UpdateBuildPipelineDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this UpdateBuildPipelineDetails. + :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 UpdateBuildPipelineDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this UpdateBuildPipelineDetails. + :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/devops/models/update_build_pipeline_stage_details.py b/src/oci/devops/models/update_build_pipeline_stage_details.py new file mode 100644 index 0000000000..d8c1e458a0 --- /dev/null +++ b/src/oci/devops/models/update_build_pipeline_stage_details.py @@ -0,0 +1,258 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 UpdateBuildPipelineStageDetails(object): + """ + The information to be updated. + """ + + def __init__(self, **kwargs): + """ + Initializes a new UpdateBuildPipelineStageDetails object with values from keyword arguments. This class has the following subclasses and if you are using this class as input + to a service operations then you should favor using a subclass over the base class: + + * :class:`~oci.devops.models.UpdateWaitStageDetails` + * :class:`~oci.devops.models.UpdateBuildStageDetails` + * :class:`~oci.devops.models.UpdateTriggerDeploymentStageDetails` + * :class:`~oci.devops.models.UpdateDeliverArtifactStageDetails` + + 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 UpdateBuildPipelineStageDetails. + :type display_name: str + + :param description: + The value to assign to the description property of this UpdateBuildPipelineStageDetails. + :type description: str + + :param build_pipeline_stage_type: + The value to assign to the build_pipeline_stage_type property of this UpdateBuildPipelineStageDetails. + :type build_pipeline_stage_type: str + + :param build_pipeline_stage_predecessor_collection: + The value to assign to the build_pipeline_stage_predecessor_collection property of this UpdateBuildPipelineStageDetails. + :type build_pipeline_stage_predecessor_collection: oci.devops.models.BuildPipelineStagePredecessorCollection + + :param freeform_tags: + The value to assign to the freeform_tags property of this UpdateBuildPipelineStageDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this UpdateBuildPipelineStageDetails. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'display_name': 'str', + 'description': 'str', + 'build_pipeline_stage_type': 'str', + 'build_pipeline_stage_predecessor_collection': 'BuildPipelineStagePredecessorCollection', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'display_name': 'displayName', + 'description': 'description', + 'build_pipeline_stage_type': 'buildPipelineStageType', + 'build_pipeline_stage_predecessor_collection': 'buildPipelineStagePredecessorCollection', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._display_name = None + self._description = None + self._build_pipeline_stage_type = None + self._build_pipeline_stage_predecessor_collection = None + self._freeform_tags = None + self._defined_tags = None + + @staticmethod + def get_subtype(object_dictionary): + """ + Given the hash representation of a subtype of this class, + use the info in the hash to return the class of the subtype. + """ + type = object_dictionary['buildPipelineStageType'] + + if type == 'WAIT': + return 'UpdateWaitStageDetails' + + if type == 'BUILD': + return 'UpdateBuildStageDetails' + + if type == 'TRIGGER_DEPLOYMENT_PIPELINE': + return 'UpdateTriggerDeploymentStageDetails' + + if type == 'DELIVER_ARTIFACT': + return 'UpdateDeliverArtifactStageDetails' + else: + return 'UpdateBuildPipelineStageDetails' + + @property + def display_name(self): + """ + Gets the display_name of this UpdateBuildPipelineStageDetails. + Stage identifier which can be renamed and is not necessarily unique + + + :return: The display_name of this UpdateBuildPipelineStageDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this UpdateBuildPipelineStageDetails. + Stage identifier which can be renamed and is not necessarily unique + + + :param display_name: The display_name of this UpdateBuildPipelineStageDetails. + :type: str + """ + self._display_name = display_name + + @property + def description(self): + """ + Gets the description of this UpdateBuildPipelineStageDetails. + Optional description about the BuildStage + + + :return: The description of this UpdateBuildPipelineStageDetails. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this UpdateBuildPipelineStageDetails. + Optional description about the BuildStage + + + :param description: The description of this UpdateBuildPipelineStageDetails. + :type: str + """ + self._description = description + + @property + def build_pipeline_stage_type(self): + """ + **[Required]** Gets the build_pipeline_stage_type of this UpdateBuildPipelineStageDetails. + Stage sub types. + + + :return: The build_pipeline_stage_type of this UpdateBuildPipelineStageDetails. + :rtype: str + """ + return self._build_pipeline_stage_type + + @build_pipeline_stage_type.setter + def build_pipeline_stage_type(self, build_pipeline_stage_type): + """ + Sets the build_pipeline_stage_type of this UpdateBuildPipelineStageDetails. + Stage sub types. + + + :param build_pipeline_stage_type: The build_pipeline_stage_type of this UpdateBuildPipelineStageDetails. + :type: str + """ + self._build_pipeline_stage_type = build_pipeline_stage_type + + @property + def build_pipeline_stage_predecessor_collection(self): + """ + Gets the build_pipeline_stage_predecessor_collection of this UpdateBuildPipelineStageDetails. + + :return: The build_pipeline_stage_predecessor_collection of this UpdateBuildPipelineStageDetails. + :rtype: oci.devops.models.BuildPipelineStagePredecessorCollection + """ + return self._build_pipeline_stage_predecessor_collection + + @build_pipeline_stage_predecessor_collection.setter + def build_pipeline_stage_predecessor_collection(self, build_pipeline_stage_predecessor_collection): + """ + Sets the build_pipeline_stage_predecessor_collection of this UpdateBuildPipelineStageDetails. + + :param build_pipeline_stage_predecessor_collection: The build_pipeline_stage_predecessor_collection of this UpdateBuildPipelineStageDetails. + :type: oci.devops.models.BuildPipelineStagePredecessorCollection + """ + self._build_pipeline_stage_predecessor_collection = build_pipeline_stage_predecessor_collection + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this UpdateBuildPipelineStageDetails. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See `Resource Tags`__. Example: `{\"bar-key\": \"value\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this UpdateBuildPipelineStageDetails. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this UpdateBuildPipelineStageDetails. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See `Resource Tags`__. Example: `{\"bar-key\": \"value\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this UpdateBuildPipelineStageDetails. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this UpdateBuildPipelineStageDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this UpdateBuildPipelineStageDetails. + :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 UpdateBuildPipelineStageDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this UpdateBuildPipelineStageDetails. + :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/devops/models/update_build_run_details.py b/src/oci/devops/models/update_build_run_details.py new file mode 100644 index 0000000000..bd3525c676 --- /dev/null +++ b/src/oci/devops/models/update_build_run_details.py @@ -0,0 +1,140 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 UpdateBuildRunDetails(object): + """ + The build Run information to be updated. + """ + + def __init__(self, **kwargs): + """ + Initializes a new UpdateBuildRunDetails 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 UpdateBuildRunDetails. + :type display_name: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this UpdateBuildRunDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this UpdateBuildRunDetails. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'display_name': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'display_name': 'displayName', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._display_name = None + self._freeform_tags = None + self._defined_tags = None + + @property + def display_name(self): + """ + Gets the display_name of this UpdateBuildRunDetails. + BuildRun display name + + + :return: The display_name of this UpdateBuildRunDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this UpdateBuildRunDetails. + BuildRun display name + + + :param display_name: The display_name of this UpdateBuildRunDetails. + :type: str + """ + self._display_name = display_name + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this UpdateBuildRunDetails. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See `Resource Tags`__. Example: `{\"bar-key\": \"value\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this UpdateBuildRunDetails. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this UpdateBuildRunDetails. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See `Resource Tags`__. Example: `{\"bar-key\": \"value\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this UpdateBuildRunDetails. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this UpdateBuildRunDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this UpdateBuildRunDetails. + :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 UpdateBuildRunDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this UpdateBuildRunDetails. + :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/devops/models/update_build_stage_details.py b/src/oci/devops/models/update_build_stage_details.py new file mode 100644 index 0000000000..2d14ceca5f --- /dev/null +++ b/src/oci/devops/models/update_build_stage_details.py @@ -0,0 +1,234 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .update_build_pipeline_stage_details import UpdateBuildPipelineStageDetails +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 UpdateBuildStageDetails(UpdateBuildPipelineStageDetails): + """ + Specifies the Build Stage. + """ + + def __init__(self, **kwargs): + """ + Initializes a new UpdateBuildStageDetails object with values from keyword arguments. The default value of the :py:attr:`~oci.devops.models.UpdateBuildStageDetails.build_pipeline_stage_type` attribute + of this class is ``BUILD`` and it should not be changed. + 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 UpdateBuildStageDetails. + :type display_name: str + + :param description: + The value to assign to the description property of this UpdateBuildStageDetails. + :type description: str + + :param build_pipeline_stage_type: + The value to assign to the build_pipeline_stage_type property of this UpdateBuildStageDetails. + :type build_pipeline_stage_type: str + + :param build_pipeline_stage_predecessor_collection: + The value to assign to the build_pipeline_stage_predecessor_collection property of this UpdateBuildStageDetails. + :type build_pipeline_stage_predecessor_collection: oci.devops.models.BuildPipelineStagePredecessorCollection + + :param freeform_tags: + The value to assign to the freeform_tags property of this UpdateBuildStageDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this UpdateBuildStageDetails. + :type defined_tags: dict(str, dict(str, object)) + + :param image: + The value to assign to the image property of this UpdateBuildStageDetails. + :type image: str + + :param build_spec_file: + The value to assign to the build_spec_file property of this UpdateBuildStageDetails. + :type build_spec_file: str + + :param stage_execution_timeout_in_seconds: + The value to assign to the stage_execution_timeout_in_seconds property of this UpdateBuildStageDetails. + :type stage_execution_timeout_in_seconds: int + + :param build_source_collection: + The value to assign to the build_source_collection property of this UpdateBuildStageDetails. + :type build_source_collection: oci.devops.models.BuildSourceCollection + + :param primary_build_source: + The value to assign to the primary_build_source property of this UpdateBuildStageDetails. + :type primary_build_source: str + + """ + self.swagger_types = { + 'display_name': 'str', + 'description': 'str', + 'build_pipeline_stage_type': 'str', + 'build_pipeline_stage_predecessor_collection': 'BuildPipelineStagePredecessorCollection', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'image': 'str', + 'build_spec_file': 'str', + 'stage_execution_timeout_in_seconds': 'int', + 'build_source_collection': 'BuildSourceCollection', + 'primary_build_source': 'str' + } + + self.attribute_map = { + 'display_name': 'displayName', + 'description': 'description', + 'build_pipeline_stage_type': 'buildPipelineStageType', + 'build_pipeline_stage_predecessor_collection': 'buildPipelineStagePredecessorCollection', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'image': 'image', + 'build_spec_file': 'buildSpecFile', + 'stage_execution_timeout_in_seconds': 'stageExecutionTimeoutInSeconds', + 'build_source_collection': 'buildSourceCollection', + 'primary_build_source': 'primaryBuildSource' + } + + self._display_name = None + self._description = None + self._build_pipeline_stage_type = None + self._build_pipeline_stage_predecessor_collection = None + self._freeform_tags = None + self._defined_tags = None + self._image = None + self._build_spec_file = None + self._stage_execution_timeout_in_seconds = None + self._build_source_collection = None + self._primary_build_source = None + self._build_pipeline_stage_type = 'BUILD' + + @property + def image(self): + """ + Gets the image of this UpdateBuildStageDetails. + Image name for the Build Environment + + + :return: The image of this UpdateBuildStageDetails. + :rtype: str + """ + return self._image + + @image.setter + def image(self, image): + """ + Sets the image of this UpdateBuildStageDetails. + Image name for the Build Environment + + + :param image: The image of this UpdateBuildStageDetails. + :type: str + """ + self._image = image + + @property + def build_spec_file(self): + """ + Gets the build_spec_file of this UpdateBuildStageDetails. + The path to the build specification file for this Environment. The default location if not specified is build_spec.yaml + + + :return: The build_spec_file of this UpdateBuildStageDetails. + :rtype: str + """ + return self._build_spec_file + + @build_spec_file.setter + def build_spec_file(self, build_spec_file): + """ + Sets the build_spec_file of this UpdateBuildStageDetails. + The path to the build specification file for this Environment. The default location if not specified is build_spec.yaml + + + :param build_spec_file: The build_spec_file of this UpdateBuildStageDetails. + :type: str + """ + self._build_spec_file = build_spec_file + + @property + def stage_execution_timeout_in_seconds(self): + """ + Gets the stage_execution_timeout_in_seconds of this UpdateBuildStageDetails. + Timeout for the Build Stage Execution. Value in seconds. + + + :return: The stage_execution_timeout_in_seconds of this UpdateBuildStageDetails. + :rtype: int + """ + return self._stage_execution_timeout_in_seconds + + @stage_execution_timeout_in_seconds.setter + def stage_execution_timeout_in_seconds(self, stage_execution_timeout_in_seconds): + """ + Sets the stage_execution_timeout_in_seconds of this UpdateBuildStageDetails. + Timeout for the Build Stage Execution. Value in seconds. + + + :param stage_execution_timeout_in_seconds: The stage_execution_timeout_in_seconds of this UpdateBuildStageDetails. + :type: int + """ + self._stage_execution_timeout_in_seconds = stage_execution_timeout_in_seconds + + @property + def build_source_collection(self): + """ + Gets the build_source_collection of this UpdateBuildStageDetails. + + :return: The build_source_collection of this UpdateBuildStageDetails. + :rtype: oci.devops.models.BuildSourceCollection + """ + return self._build_source_collection + + @build_source_collection.setter + def build_source_collection(self, build_source_collection): + """ + Sets the build_source_collection of this UpdateBuildStageDetails. + + :param build_source_collection: The build_source_collection of this UpdateBuildStageDetails. + :type: oci.devops.models.BuildSourceCollection + """ + self._build_source_collection = build_source_collection + + @property + def primary_build_source(self): + """ + Gets the primary_build_source of this UpdateBuildStageDetails. + Name of the BuildSource in which the build_spec.yml file need to be located. If not specified, the 1st entry in the BuildSource collection will be chosen as Primary. + + + :return: The primary_build_source of this UpdateBuildStageDetails. + :rtype: str + """ + return self._primary_build_source + + @primary_build_source.setter + def primary_build_source(self, primary_build_source): + """ + Sets the primary_build_source of this UpdateBuildStageDetails. + Name of the BuildSource in which the build_spec.yml file need to be located. If not specified, the 1st entry in the BuildSource collection will be chosen as Primary. + + + :param primary_build_source: The primary_build_source of this UpdateBuildStageDetails. + :type: str + """ + self._primary_build_source = primary_build_source + + 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/devops/models/update_connection_details.py b/src/oci/devops/models/update_connection_details.py new file mode 100644 index 0000000000..894a25bfc1 --- /dev/null +++ b/src/oci/devops/models/update_connection_details.py @@ -0,0 +1,223 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 UpdateConnectionDetails(object): + """ + The details for updating a connection. + """ + + def __init__(self, **kwargs): + """ + Initializes a new UpdateConnectionDetails object with values from keyword arguments. This class has the following subclasses and if you are using this class as input + to a service operations then you should favor using a subclass over the base class: + + * :class:`~oci.devops.models.UpdateGithubAccessTokenConnectionDetails` + * :class:`~oci.devops.models.UpdateGitlabAccessTokenConnectionDetails` + + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param description: + The value to assign to the description property of this UpdateConnectionDetails. + :type description: str + + :param display_name: + The value to assign to the display_name property of this UpdateConnectionDetails. + :type display_name: str + + :param connection_type: + The value to assign to the connection_type property of this UpdateConnectionDetails. + :type connection_type: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this UpdateConnectionDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this UpdateConnectionDetails. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'description': 'str', + 'display_name': 'str', + 'connection_type': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'description': 'description', + 'display_name': 'displayName', + 'connection_type': 'connectionType', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._description = None + self._display_name = None + self._connection_type = None + self._freeform_tags = None + self._defined_tags = None + + @staticmethod + def get_subtype(object_dictionary): + """ + Given the hash representation of a subtype of this class, + use the info in the hash to return the class of the subtype. + """ + type = object_dictionary['connectionType'] + + if type == 'GITHUB_ACCESS_TOKEN': + return 'UpdateGithubAccessTokenConnectionDetails' + + if type == 'GITLAB_ACCESS_TOKEN': + return 'UpdateGitlabAccessTokenConnectionDetails' + else: + return 'UpdateConnectionDetails' + + @property + def description(self): + """ + Gets the description of this UpdateConnectionDetails. + Optional description about the Connection + + + :return: The description of this UpdateConnectionDetails. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this UpdateConnectionDetails. + Optional description about the Connection + + + :param description: The description of this UpdateConnectionDetails. + :type: str + """ + self._description = description + + @property + def display_name(self): + """ + Gets the display_name of this UpdateConnectionDetails. + Optional Connection display name + + + :return: The display_name of this UpdateConnectionDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this UpdateConnectionDetails. + Optional Connection display name + + + :param display_name: The display_name of this UpdateConnectionDetails. + :type: str + """ + self._display_name = display_name + + @property + def connection_type(self): + """ + **[Required]** Gets the connection_type of this UpdateConnectionDetails. + The type of connection. + + + :return: The connection_type of this UpdateConnectionDetails. + :rtype: str + """ + return self._connection_type + + @connection_type.setter + def connection_type(self, connection_type): + """ + Sets the connection_type of this UpdateConnectionDetails. + The type of connection. + + + :param connection_type: The connection_type of this UpdateConnectionDetails. + :type: str + """ + self._connection_type = connection_type + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this UpdateConnectionDetails. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See `Resource Tags`__. Example: `{\"bar-key\": \"value\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this UpdateConnectionDetails. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this UpdateConnectionDetails. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See `Resource Tags`__. Example: `{\"bar-key\": \"value\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this UpdateConnectionDetails. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this UpdateConnectionDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this UpdateConnectionDetails. + :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 UpdateConnectionDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this UpdateConnectionDetails. + :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/devops/models/update_deliver_artifact_stage_details.py b/src/oci/devops/models/update_deliver_artifact_stage_details.py new file mode 100644 index 0000000000..64a869b968 --- /dev/null +++ b/src/oci/devops/models/update_deliver_artifact_stage_details.py @@ -0,0 +1,110 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .update_build_pipeline_stage_details import UpdateBuildPipelineStageDetails +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 UpdateDeliverArtifactStageDetails(UpdateBuildPipelineStageDetails): + """ + Specifies the DeliverArtifact Stage. + """ + + def __init__(self, **kwargs): + """ + Initializes a new UpdateDeliverArtifactStageDetails object with values from keyword arguments. The default value of the :py:attr:`~oci.devops.models.UpdateDeliverArtifactStageDetails.build_pipeline_stage_type` attribute + of this class is ``DELIVER_ARTIFACT`` and it should not be changed. + 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 UpdateDeliverArtifactStageDetails. + :type display_name: str + + :param description: + The value to assign to the description property of this UpdateDeliverArtifactStageDetails. + :type description: str + + :param build_pipeline_stage_type: + The value to assign to the build_pipeline_stage_type property of this UpdateDeliverArtifactStageDetails. + :type build_pipeline_stage_type: str + + :param build_pipeline_stage_predecessor_collection: + The value to assign to the build_pipeline_stage_predecessor_collection property of this UpdateDeliverArtifactStageDetails. + :type build_pipeline_stage_predecessor_collection: oci.devops.models.BuildPipelineStagePredecessorCollection + + :param freeform_tags: + The value to assign to the freeform_tags property of this UpdateDeliverArtifactStageDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this UpdateDeliverArtifactStageDetails. + :type defined_tags: dict(str, dict(str, object)) + + :param deliver_artifact_collection: + The value to assign to the deliver_artifact_collection property of this UpdateDeliverArtifactStageDetails. + :type deliver_artifact_collection: oci.devops.models.DeliverArtifactCollection + + """ + self.swagger_types = { + 'display_name': 'str', + 'description': 'str', + 'build_pipeline_stage_type': 'str', + 'build_pipeline_stage_predecessor_collection': 'BuildPipelineStagePredecessorCollection', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'deliver_artifact_collection': 'DeliverArtifactCollection' + } + + self.attribute_map = { + 'display_name': 'displayName', + 'description': 'description', + 'build_pipeline_stage_type': 'buildPipelineStageType', + 'build_pipeline_stage_predecessor_collection': 'buildPipelineStagePredecessorCollection', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'deliver_artifact_collection': 'deliverArtifactCollection' + } + + self._display_name = None + self._description = None + self._build_pipeline_stage_type = None + self._build_pipeline_stage_predecessor_collection = None + self._freeform_tags = None + self._defined_tags = None + self._deliver_artifact_collection = None + self._build_pipeline_stage_type = 'DELIVER_ARTIFACT' + + @property + def deliver_artifact_collection(self): + """ + Gets the deliver_artifact_collection of this UpdateDeliverArtifactStageDetails. + + :return: The deliver_artifact_collection of this UpdateDeliverArtifactStageDetails. + :rtype: oci.devops.models.DeliverArtifactCollection + """ + return self._deliver_artifact_collection + + @deliver_artifact_collection.setter + def deliver_artifact_collection(self, deliver_artifact_collection): + """ + Sets the deliver_artifact_collection of this UpdateDeliverArtifactStageDetails. + + :param deliver_artifact_collection: The deliver_artifact_collection of this UpdateDeliverArtifactStageDetails. + :type: oci.devops.models.DeliverArtifactCollection + """ + self._deliver_artifact_collection = deliver_artifact_collection + + 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/devops/models/update_devops_code_repository_trigger_details.py b/src/oci/devops/models/update_devops_code_repository_trigger_details.py new file mode 100644 index 0000000000..cebd89d21e --- /dev/null +++ b/src/oci/devops/models/update_devops_code_repository_trigger_details.py @@ -0,0 +1,114 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .update_trigger_details import UpdateTriggerDetails +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 UpdateDevopsCodeRepositoryTriggerDetails(UpdateTriggerDetails): + """ + Update Trigger specific to OCI Devops Repository + """ + + def __init__(self, **kwargs): + """ + Initializes a new UpdateDevopsCodeRepositoryTriggerDetails object with values from keyword arguments. The default value of the :py:attr:`~oci.devops.models.UpdateDevopsCodeRepositoryTriggerDetails.trigger_source` attribute + of this class is ``DEVOPS_CODE_REPOSITORY`` and it should not be changed. + 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 UpdateDevopsCodeRepositoryTriggerDetails. + :type display_name: str + + :param description: + The value to assign to the description property of this UpdateDevopsCodeRepositoryTriggerDetails. + :type description: str + + :param trigger_source: + The value to assign to the trigger_source property of this UpdateDevopsCodeRepositoryTriggerDetails. + :type trigger_source: str + + :param actions: + The value to assign to the actions property of this UpdateDevopsCodeRepositoryTriggerDetails. + :type actions: list[oci.devops.models.TriggerAction] + + :param freeform_tags: + The value to assign to the freeform_tags property of this UpdateDevopsCodeRepositoryTriggerDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this UpdateDevopsCodeRepositoryTriggerDetails. + :type defined_tags: dict(str, dict(str, object)) + + :param repository_id: + The value to assign to the repository_id property of this UpdateDevopsCodeRepositoryTriggerDetails. + :type repository_id: str + + """ + self.swagger_types = { + 'display_name': 'str', + 'description': 'str', + 'trigger_source': 'str', + 'actions': 'list[TriggerAction]', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'repository_id': 'str' + } + + self.attribute_map = { + 'display_name': 'displayName', + 'description': 'description', + 'trigger_source': 'triggerSource', + 'actions': 'actions', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'repository_id': 'repositoryId' + } + + self._display_name = None + self._description = None + self._trigger_source = None + self._actions = None + self._freeform_tags = None + self._defined_tags = None + self._repository_id = None + self._trigger_source = 'DEVOPS_CODE_REPOSITORY' + + @property + def repository_id(self): + """ + Gets the repository_id of this UpdateDevopsCodeRepositoryTriggerDetails. + The Devops Code Repository Id + + + :return: The repository_id of this UpdateDevopsCodeRepositoryTriggerDetails. + :rtype: str + """ + return self._repository_id + + @repository_id.setter + def repository_id(self, repository_id): + """ + Sets the repository_id of this UpdateDevopsCodeRepositoryTriggerDetails. + The Devops Code Repository Id + + + :param repository_id: The repository_id of this UpdateDevopsCodeRepositoryTriggerDetails. + :type: str + """ + self._repository_id = repository_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/devops/models/update_github_access_token_connection_details.py b/src/oci/devops/models/update_github_access_token_connection_details.py new file mode 100644 index 0000000000..ab8a94eba9 --- /dev/null +++ b/src/oci/devops/models/update_github_access_token_connection_details.py @@ -0,0 +1,108 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .update_connection_details import UpdateConnectionDetails +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 UpdateGithubAccessTokenConnectionDetails(UpdateConnectionDetails): + """ + The details for updating a connection of the type `GITHUB_ACCESS_TOKEN`. + This type corresponds to a connection in GitHub that is authenticated with a personal access token. + """ + + def __init__(self, **kwargs): + """ + Initializes a new UpdateGithubAccessTokenConnectionDetails object with values from keyword arguments. The default value of the :py:attr:`~oci.devops.models.UpdateGithubAccessTokenConnectionDetails.connection_type` attribute + of this class is ``GITHUB_ACCESS_TOKEN`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param description: + The value to assign to the description property of this UpdateGithubAccessTokenConnectionDetails. + :type description: str + + :param display_name: + The value to assign to the display_name property of this UpdateGithubAccessTokenConnectionDetails. + :type display_name: str + + :param connection_type: + The value to assign to the connection_type property of this UpdateGithubAccessTokenConnectionDetails. + :type connection_type: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this UpdateGithubAccessTokenConnectionDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this UpdateGithubAccessTokenConnectionDetails. + :type defined_tags: dict(str, dict(str, object)) + + :param access_token: + The value to assign to the access_token property of this UpdateGithubAccessTokenConnectionDetails. + :type access_token: str + + """ + self.swagger_types = { + 'description': 'str', + 'display_name': 'str', + 'connection_type': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'access_token': 'str' + } + + self.attribute_map = { + 'description': 'description', + 'display_name': 'displayName', + 'connection_type': 'connectionType', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'access_token': 'accessToken' + } + + self._description = None + self._display_name = None + self._connection_type = None + self._freeform_tags = None + self._defined_tags = None + self._access_token = None + self._connection_type = 'GITHUB_ACCESS_TOKEN' + + @property + def access_token(self): + """ + Gets the access_token of this UpdateGithubAccessTokenConnectionDetails. + OCID of personal access token saved in secret store + + + :return: The access_token of this UpdateGithubAccessTokenConnectionDetails. + :rtype: str + """ + return self._access_token + + @access_token.setter + def access_token(self, access_token): + """ + Sets the access_token of this UpdateGithubAccessTokenConnectionDetails. + OCID of personal access token saved in secret store + + + :param access_token: The access_token of this UpdateGithubAccessTokenConnectionDetails. + :type: str + """ + self._access_token = access_token + + 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/devops/models/update_github_trigger_details.py b/src/oci/devops/models/update_github_trigger_details.py new file mode 100644 index 0000000000..251d085769 --- /dev/null +++ b/src/oci/devops/models/update_github_trigger_details.py @@ -0,0 +1,83 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .update_trigger_details import UpdateTriggerDetails +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 UpdateGithubTriggerDetails(UpdateTriggerDetails): + """ + Update Trigger specific to Github + """ + + def __init__(self, **kwargs): + """ + Initializes a new UpdateGithubTriggerDetails object with values from keyword arguments. The default value of the :py:attr:`~oci.devops.models.UpdateGithubTriggerDetails.trigger_source` attribute + of this class is ``GITHUB`` and it should not be changed. + 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 UpdateGithubTriggerDetails. + :type display_name: str + + :param description: + The value to assign to the description property of this UpdateGithubTriggerDetails. + :type description: str + + :param trigger_source: + The value to assign to the trigger_source property of this UpdateGithubTriggerDetails. + :type trigger_source: str + + :param actions: + The value to assign to the actions property of this UpdateGithubTriggerDetails. + :type actions: list[oci.devops.models.TriggerAction] + + :param freeform_tags: + The value to assign to the freeform_tags property of this UpdateGithubTriggerDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this UpdateGithubTriggerDetails. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'display_name': 'str', + 'description': 'str', + 'trigger_source': 'str', + 'actions': 'list[TriggerAction]', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'display_name': 'displayName', + 'description': 'description', + 'trigger_source': 'triggerSource', + 'actions': 'actions', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._display_name = None + self._description = None + self._trigger_source = None + self._actions = None + self._freeform_tags = None + self._defined_tags = None + self._trigger_source = 'GITHUB' + + 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/devops/models/update_gitlab_access_token_connection_details.py b/src/oci/devops/models/update_gitlab_access_token_connection_details.py new file mode 100644 index 0000000000..0c7b0da9c3 --- /dev/null +++ b/src/oci/devops/models/update_gitlab_access_token_connection_details.py @@ -0,0 +1,108 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .update_connection_details import UpdateConnectionDetails +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 UpdateGitlabAccessTokenConnectionDetails(UpdateConnectionDetails): + """ + The details for updating a connection of the type `GITLAB_ACCESS_TOKEN`. + This type corresponds to a connection in GitLab that is authenticated with a personal access token. + """ + + def __init__(self, **kwargs): + """ + Initializes a new UpdateGitlabAccessTokenConnectionDetails object with values from keyword arguments. The default value of the :py:attr:`~oci.devops.models.UpdateGitlabAccessTokenConnectionDetails.connection_type` attribute + of this class is ``GITLAB_ACCESS_TOKEN`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param description: + The value to assign to the description property of this UpdateGitlabAccessTokenConnectionDetails. + :type description: str + + :param display_name: + The value to assign to the display_name property of this UpdateGitlabAccessTokenConnectionDetails. + :type display_name: str + + :param connection_type: + The value to assign to the connection_type property of this UpdateGitlabAccessTokenConnectionDetails. + :type connection_type: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this UpdateGitlabAccessTokenConnectionDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this UpdateGitlabAccessTokenConnectionDetails. + :type defined_tags: dict(str, dict(str, object)) + + :param access_token: + The value to assign to the access_token property of this UpdateGitlabAccessTokenConnectionDetails. + :type access_token: str + + """ + self.swagger_types = { + 'description': 'str', + 'display_name': 'str', + 'connection_type': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'access_token': 'str' + } + + self.attribute_map = { + 'description': 'description', + 'display_name': 'displayName', + 'connection_type': 'connectionType', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'access_token': 'accessToken' + } + + self._description = None + self._display_name = None + self._connection_type = None + self._freeform_tags = None + self._defined_tags = None + self._access_token = None + self._connection_type = 'GITLAB_ACCESS_TOKEN' + + @property + def access_token(self): + """ + Gets the access_token of this UpdateGitlabAccessTokenConnectionDetails. + OCID of personal access token saved in secret store + + + :return: The access_token of this UpdateGitlabAccessTokenConnectionDetails. + :rtype: str + """ + return self._access_token + + @access_token.setter + def access_token(self, access_token): + """ + Sets the access_token of this UpdateGitlabAccessTokenConnectionDetails. + OCID of personal access token saved in secret store + + + :param access_token: The access_token of this UpdateGitlabAccessTokenConnectionDetails. + :type: str + """ + self._access_token = access_token + + 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/devops/models/update_gitlab_trigger_details.py b/src/oci/devops/models/update_gitlab_trigger_details.py new file mode 100644 index 0000000000..c874a6cf44 --- /dev/null +++ b/src/oci/devops/models/update_gitlab_trigger_details.py @@ -0,0 +1,83 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .update_trigger_details import UpdateTriggerDetails +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 UpdateGitlabTriggerDetails(UpdateTriggerDetails): + """ + Update Trigger specific to Github + """ + + def __init__(self, **kwargs): + """ + Initializes a new UpdateGitlabTriggerDetails object with values from keyword arguments. The default value of the :py:attr:`~oci.devops.models.UpdateGitlabTriggerDetails.trigger_source` attribute + of this class is ``GITLAB`` and it should not be changed. + 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 UpdateGitlabTriggerDetails. + :type display_name: str + + :param description: + The value to assign to the description property of this UpdateGitlabTriggerDetails. + :type description: str + + :param trigger_source: + The value to assign to the trigger_source property of this UpdateGitlabTriggerDetails. + :type trigger_source: str + + :param actions: + The value to assign to the actions property of this UpdateGitlabTriggerDetails. + :type actions: list[oci.devops.models.TriggerAction] + + :param freeform_tags: + The value to assign to the freeform_tags property of this UpdateGitlabTriggerDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this UpdateGitlabTriggerDetails. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'display_name': 'str', + 'description': 'str', + 'trigger_source': 'str', + 'actions': 'list[TriggerAction]', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'display_name': 'displayName', + 'description': 'description', + 'trigger_source': 'triggerSource', + 'actions': 'actions', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._display_name = None + self._description = None + self._trigger_source = None + self._actions = None + self._freeform_tags = None + self._defined_tags = None + self._trigger_source = 'GITLAB' + + 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/devops/models/update_repository_details.py b/src/oci/devops/models/update_repository_details.py new file mode 100644 index 0000000000..18d446f08d --- /dev/null +++ b/src/oci/devops/models/update_repository_details.py @@ -0,0 +1,260 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 UpdateRepositoryDetails(object): + """ + The information to be updated. + """ + + def __init__(self, **kwargs): + """ + Initializes a new UpdateRepositoryDetails 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 UpdateRepositoryDetails. + :type name: str + + :param description: + The value to assign to the description property of this UpdateRepositoryDetails. + :type description: str + + :param default_branch: + The value to assign to the default_branch property of this UpdateRepositoryDetails. + :type default_branch: str + + :param repository_type: + The value to assign to the repository_type property of this UpdateRepositoryDetails. + :type repository_type: str + + :param mirror_repository_config: + The value to assign to the mirror_repository_config property of this UpdateRepositoryDetails. + :type mirror_repository_config: oci.devops.models.MirrorRepositoryConfig + + :param freeform_tags: + The value to assign to the freeform_tags property of this UpdateRepositoryDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this UpdateRepositoryDetails. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'name': 'str', + 'description': 'str', + 'default_branch': 'str', + 'repository_type': 'str', + 'mirror_repository_config': 'MirrorRepositoryConfig', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'name': 'name', + 'description': 'description', + 'default_branch': 'defaultBranch', + 'repository_type': 'repositoryType', + 'mirror_repository_config': 'mirrorRepositoryConfig', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._name = None + self._description = None + self._default_branch = None + self._repository_type = None + self._mirror_repository_config = None + self._freeform_tags = None + self._defined_tags = None + + @property + def name(self): + """ + Gets the name of this UpdateRepositoryDetails. + Repository Identifier + + + :return: The name of this UpdateRepositoryDetails. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """ + Sets the name of this UpdateRepositoryDetails. + Repository Identifier + + + :param name: The name of this UpdateRepositoryDetails. + :type: str + """ + self._name = name + + @property + def description(self): + """ + Gets the description of this UpdateRepositoryDetails. + The description of this repository. Avoid entering confidential information + + + :return: The description of this UpdateRepositoryDetails. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this UpdateRepositoryDetails. + The description of this repository. Avoid entering confidential information + + + :param description: The description of this UpdateRepositoryDetails. + :type: str + """ + self._description = description + + @property + def default_branch(self): + """ + Gets the default_branch of this UpdateRepositoryDetails. + The default branch of the repository + + + :return: The default_branch of this UpdateRepositoryDetails. + :rtype: str + """ + return self._default_branch + + @default_branch.setter + def default_branch(self, default_branch): + """ + Sets the default_branch of this UpdateRepositoryDetails. + The default branch of the repository + + + :param default_branch: The default_branch of this UpdateRepositoryDetails. + :type: str + """ + self._default_branch = default_branch + + @property + def repository_type(self): + """ + Gets the repository_type of this UpdateRepositoryDetails. + Type of repository + + + :return: The repository_type of this UpdateRepositoryDetails. + :rtype: str + """ + return self._repository_type + + @repository_type.setter + def repository_type(self, repository_type): + """ + Sets the repository_type of this UpdateRepositoryDetails. + Type of repository + + + :param repository_type: The repository_type of this UpdateRepositoryDetails. + :type: str + """ + self._repository_type = repository_type + + @property + def mirror_repository_config(self): + """ + Gets the mirror_repository_config of this UpdateRepositoryDetails. + + :return: The mirror_repository_config of this UpdateRepositoryDetails. + :rtype: oci.devops.models.MirrorRepositoryConfig + """ + return self._mirror_repository_config + + @mirror_repository_config.setter + def mirror_repository_config(self, mirror_repository_config): + """ + Sets the mirror_repository_config of this UpdateRepositoryDetails. + + :param mirror_repository_config: The mirror_repository_config of this UpdateRepositoryDetails. + :type: oci.devops.models.MirrorRepositoryConfig + """ + self._mirror_repository_config = mirror_repository_config + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this UpdateRepositoryDetails. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See `Resource Tags`__. Example: `{\"bar-key\": \"value\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this UpdateRepositoryDetails. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this UpdateRepositoryDetails. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See `Resource Tags`__. Example: `{\"bar-key\": \"value\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this UpdateRepositoryDetails. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this UpdateRepositoryDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this UpdateRepositoryDetails. + :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 UpdateRepositoryDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this UpdateRepositoryDetails. + :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/devops/models/update_trigger_deployment_stage_details.py b/src/oci/devops/models/update_trigger_deployment_stage_details.py new file mode 100644 index 0000000000..221e6ea678 --- /dev/null +++ b/src/oci/devops/models/update_trigger_deployment_stage_details.py @@ -0,0 +1,145 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .update_build_pipeline_stage_details import UpdateBuildPipelineStageDetails +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 UpdateTriggerDeploymentStageDetails(UpdateBuildPipelineStageDetails): + """ + Specifies trigger Deployment Pipleline stage which runs another pipeline of the application. + """ + + def __init__(self, **kwargs): + """ + Initializes a new UpdateTriggerDeploymentStageDetails object with values from keyword arguments. The default value of the :py:attr:`~oci.devops.models.UpdateTriggerDeploymentStageDetails.build_pipeline_stage_type` attribute + of this class is ``TRIGGER_DEPLOYMENT_PIPELINE`` and it should not be changed. + 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 UpdateTriggerDeploymentStageDetails. + :type display_name: str + + :param description: + The value to assign to the description property of this UpdateTriggerDeploymentStageDetails. + :type description: str + + :param build_pipeline_stage_type: + The value to assign to the build_pipeline_stage_type property of this UpdateTriggerDeploymentStageDetails. + :type build_pipeline_stage_type: str + + :param build_pipeline_stage_predecessor_collection: + The value to assign to the build_pipeline_stage_predecessor_collection property of this UpdateTriggerDeploymentStageDetails. + :type build_pipeline_stage_predecessor_collection: oci.devops.models.BuildPipelineStagePredecessorCollection + + :param freeform_tags: + The value to assign to the freeform_tags property of this UpdateTriggerDeploymentStageDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this UpdateTriggerDeploymentStageDetails. + :type defined_tags: dict(str, dict(str, object)) + + :param deploy_pipeline_id: + The value to assign to the deploy_pipeline_id property of this UpdateTriggerDeploymentStageDetails. + :type deploy_pipeline_id: str + + :param is_pass_all_parameters_enabled: + The value to assign to the is_pass_all_parameters_enabled property of this UpdateTriggerDeploymentStageDetails. + :type is_pass_all_parameters_enabled: bool + + """ + self.swagger_types = { + 'display_name': 'str', + 'description': 'str', + 'build_pipeline_stage_type': 'str', + 'build_pipeline_stage_predecessor_collection': 'BuildPipelineStagePredecessorCollection', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'deploy_pipeline_id': 'str', + 'is_pass_all_parameters_enabled': 'bool' + } + + self.attribute_map = { + 'display_name': 'displayName', + 'description': 'description', + 'build_pipeline_stage_type': 'buildPipelineStageType', + 'build_pipeline_stage_predecessor_collection': 'buildPipelineStagePredecessorCollection', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'deploy_pipeline_id': 'deployPipelineId', + 'is_pass_all_parameters_enabled': 'isPassAllParametersEnabled' + } + + self._display_name = None + self._description = None + self._build_pipeline_stage_type = None + self._build_pipeline_stage_predecessor_collection = None + self._freeform_tags = None + self._defined_tags = None + self._deploy_pipeline_id = None + self._is_pass_all_parameters_enabled = None + self._build_pipeline_stage_type = 'TRIGGER_DEPLOYMENT_PIPELINE' + + @property + def deploy_pipeline_id(self): + """ + Gets the deploy_pipeline_id of this UpdateTriggerDeploymentStageDetails. + A target Pipeline ocid that will be run in this stage. + + + :return: The deploy_pipeline_id of this UpdateTriggerDeploymentStageDetails. + :rtype: str + """ + return self._deploy_pipeline_id + + @deploy_pipeline_id.setter + def deploy_pipeline_id(self, deploy_pipeline_id): + """ + Sets the deploy_pipeline_id of this UpdateTriggerDeploymentStageDetails. + A target Pipeline ocid that will be run in this stage. + + + :param deploy_pipeline_id: The deploy_pipeline_id of this UpdateTriggerDeploymentStageDetails. + :type: str + """ + self._deploy_pipeline_id = deploy_pipeline_id + + @property + def is_pass_all_parameters_enabled(self): + """ + Gets the is_pass_all_parameters_enabled of this UpdateTriggerDeploymentStageDetails. + A boolean flag specifies whether the parameters should be passed during the deployment trigger. + + + :return: The is_pass_all_parameters_enabled of this UpdateTriggerDeploymentStageDetails. + :rtype: bool + """ + return self._is_pass_all_parameters_enabled + + @is_pass_all_parameters_enabled.setter + def is_pass_all_parameters_enabled(self, is_pass_all_parameters_enabled): + """ + Sets the is_pass_all_parameters_enabled of this UpdateTriggerDeploymentStageDetails. + A boolean flag specifies whether the parameters should be passed during the deployment trigger. + + + :param is_pass_all_parameters_enabled: The is_pass_all_parameters_enabled of this UpdateTriggerDeploymentStageDetails. + :type: bool + """ + self._is_pass_all_parameters_enabled = is_pass_all_parameters_enabled + + 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/devops/models/update_trigger_details.py b/src/oci/devops/models/update_trigger_details.py new file mode 100644 index 0000000000..92b699a85d --- /dev/null +++ b/src/oci/devops/models/update_trigger_details.py @@ -0,0 +1,258 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 UpdateTriggerDetails(object): + """ + The information to be updated. + """ + + def __init__(self, **kwargs): + """ + Initializes a new UpdateTriggerDetails object with values from keyword arguments. This class has the following subclasses and if you are using this class as input + to a service operations then you should favor using a subclass over the base class: + + * :class:`~oci.devops.models.UpdateDevopsCodeRepositoryTriggerDetails` + * :class:`~oci.devops.models.UpdateGithubTriggerDetails` + * :class:`~oci.devops.models.UpdateGitlabTriggerDetails` + + 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 UpdateTriggerDetails. + :type display_name: str + + :param description: + The value to assign to the description property of this UpdateTriggerDetails. + :type description: str + + :param trigger_source: + The value to assign to the trigger_source property of this UpdateTriggerDetails. + :type trigger_source: str + + :param actions: + The value to assign to the actions property of this UpdateTriggerDetails. + :type actions: list[oci.devops.models.TriggerAction] + + :param freeform_tags: + The value to assign to the freeform_tags property of this UpdateTriggerDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this UpdateTriggerDetails. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'display_name': 'str', + 'description': 'str', + 'trigger_source': 'str', + 'actions': 'list[TriggerAction]', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'display_name': 'displayName', + 'description': 'description', + 'trigger_source': 'triggerSource', + 'actions': 'actions', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._display_name = None + self._description = None + self._trigger_source = None + self._actions = None + self._freeform_tags = None + self._defined_tags = None + + @staticmethod + def get_subtype(object_dictionary): + """ + Given the hash representation of a subtype of this class, + use the info in the hash to return the class of the subtype. + """ + type = object_dictionary['triggerSource'] + + if type == 'DEVOPS_CODE_REPOSITORY': + return 'UpdateDevopsCodeRepositoryTriggerDetails' + + if type == 'GITHUB': + return 'UpdateGithubTriggerDetails' + + if type == 'GITLAB': + return 'UpdateGitlabTriggerDetails' + else: + return 'UpdateTriggerDetails' + + @property + def display_name(self): + """ + Gets the display_name of this UpdateTriggerDetails. + Trigger Identifier + + + :return: The display_name of this UpdateTriggerDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this UpdateTriggerDetails. + Trigger Identifier + + + :param display_name: The display_name of this UpdateTriggerDetails. + :type: str + """ + self._display_name = display_name + + @property + def description(self): + """ + Gets the description of this UpdateTriggerDetails. + Optional description about the Trigger + + + :return: The description of this UpdateTriggerDetails. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this UpdateTriggerDetails. + Optional description about the Trigger + + + :param description: The description of this UpdateTriggerDetails. + :type: str + """ + self._description = description + + @property + def trigger_source(self): + """ + **[Required]** Gets the trigger_source of this UpdateTriggerDetails. + Source of the Trigger (allowed values are - GITHUB, GITLAB) + + + :return: The trigger_source of this UpdateTriggerDetails. + :rtype: str + """ + return self._trigger_source + + @trigger_source.setter + def trigger_source(self, trigger_source): + """ + Sets the trigger_source of this UpdateTriggerDetails. + Source of the Trigger (allowed values are - GITHUB, GITLAB) + + + :param trigger_source: The trigger_source of this UpdateTriggerDetails. + :type: str + """ + self._trigger_source = trigger_source + + @property + def actions(self): + """ + Gets the actions of this UpdateTriggerDetails. + The list of actions that are to be performed for this Trigger + + + :return: The actions of this UpdateTriggerDetails. + :rtype: list[oci.devops.models.TriggerAction] + """ + return self._actions + + @actions.setter + def actions(self, actions): + """ + Sets the actions of this UpdateTriggerDetails. + The list of actions that are to be performed for this Trigger + + + :param actions: The actions of this UpdateTriggerDetails. + :type: list[oci.devops.models.TriggerAction] + """ + self._actions = actions + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this UpdateTriggerDetails. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See `Resource Tags`__. Example: `{\"bar-key\": \"value\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this UpdateTriggerDetails. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this UpdateTriggerDetails. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See `Resource Tags`__. Example: `{\"bar-key\": \"value\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this UpdateTriggerDetails. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this UpdateTriggerDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this UpdateTriggerDetails. + :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 UpdateTriggerDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this UpdateTriggerDetails. + :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/devops/models/update_wait_criteria_details.py b/src/oci/devops/models/update_wait_criteria_details.py new file mode 100644 index 0000000000..0117519701 --- /dev/null +++ b/src/oci/devops/models/update_wait_criteria_details.py @@ -0,0 +1,100 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 UpdateWaitCriteriaDetails(object): + """ + Specifies wait criteria for wait stage. + """ + + #: A constant which can be used with the wait_type property of a UpdateWaitCriteriaDetails. + #: This constant has a value of "ABSOLUTE_WAIT" + WAIT_TYPE_ABSOLUTE_WAIT = "ABSOLUTE_WAIT" + + def __init__(self, **kwargs): + """ + Initializes a new UpdateWaitCriteriaDetails object with values from keyword arguments. This class has the following subclasses and if you are using this class as input + to a service operations then you should favor using a subclass over the base class: + + * :class:`~oci.devops.models.UpdateAbsoluteWaitCriteriaDetails` + + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param wait_type: + The value to assign to the wait_type property of this UpdateWaitCriteriaDetails. + Allowed values for this property are: "ABSOLUTE_WAIT" + :type wait_type: str + + """ + self.swagger_types = { + 'wait_type': 'str' + } + + self.attribute_map = { + 'wait_type': 'waitType' + } + + self._wait_type = None + + @staticmethod + def get_subtype(object_dictionary): + """ + Given the hash representation of a subtype of this class, + use the info in the hash to return the class of the subtype. + """ + type = object_dictionary['waitType'] + + if type == 'ABSOLUTE_WAIT': + return 'UpdateAbsoluteWaitCriteriaDetails' + else: + return 'UpdateWaitCriteriaDetails' + + @property + def wait_type(self): + """ + **[Required]** Gets the wait_type of this UpdateWaitCriteriaDetails. + wait criteria sub type + + Allowed values for this property are: "ABSOLUTE_WAIT" + + + :return: The wait_type of this UpdateWaitCriteriaDetails. + :rtype: str + """ + return self._wait_type + + @wait_type.setter + def wait_type(self, wait_type): + """ + Sets the wait_type of this UpdateWaitCriteriaDetails. + wait criteria sub type + + + :param wait_type: The wait_type of this UpdateWaitCriteriaDetails. + :type: str + """ + allowed_values = ["ABSOLUTE_WAIT"] + if not value_allowed_none_or_none_sentinel(wait_type, allowed_values): + raise ValueError( + "Invalid value for `wait_type`, must be None or one of {0}" + .format(allowed_values) + ) + self._wait_type = wait_type + + 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/devops/models/update_wait_stage_details.py b/src/oci/devops/models/update_wait_stage_details.py new file mode 100644 index 0000000000..f9c2de3fe7 --- /dev/null +++ b/src/oci/devops/models/update_wait_stage_details.py @@ -0,0 +1,110 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .update_build_pipeline_stage_details import UpdateBuildPipelineStageDetails +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 UpdateWaitStageDetails(UpdateBuildPipelineStageDetails): + """ + Specifies the Wait Stage. User can specify variable wait times or an absolute duration. + """ + + def __init__(self, **kwargs): + """ + Initializes a new UpdateWaitStageDetails object with values from keyword arguments. The default value of the :py:attr:`~oci.devops.models.UpdateWaitStageDetails.build_pipeline_stage_type` attribute + of this class is ``WAIT`` and it should not be changed. + 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 UpdateWaitStageDetails. + :type display_name: str + + :param description: + The value to assign to the description property of this UpdateWaitStageDetails. + :type description: str + + :param build_pipeline_stage_type: + The value to assign to the build_pipeline_stage_type property of this UpdateWaitStageDetails. + :type build_pipeline_stage_type: str + + :param build_pipeline_stage_predecessor_collection: + The value to assign to the build_pipeline_stage_predecessor_collection property of this UpdateWaitStageDetails. + :type build_pipeline_stage_predecessor_collection: oci.devops.models.BuildPipelineStagePredecessorCollection + + :param freeform_tags: + The value to assign to the freeform_tags property of this UpdateWaitStageDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this UpdateWaitStageDetails. + :type defined_tags: dict(str, dict(str, object)) + + :param wait_criteria: + The value to assign to the wait_criteria property of this UpdateWaitStageDetails. + :type wait_criteria: oci.devops.models.UpdateWaitCriteriaDetails + + """ + self.swagger_types = { + 'display_name': 'str', + 'description': 'str', + 'build_pipeline_stage_type': 'str', + 'build_pipeline_stage_predecessor_collection': 'BuildPipelineStagePredecessorCollection', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'wait_criteria': 'UpdateWaitCriteriaDetails' + } + + self.attribute_map = { + 'display_name': 'displayName', + 'description': 'description', + 'build_pipeline_stage_type': 'buildPipelineStageType', + 'build_pipeline_stage_predecessor_collection': 'buildPipelineStagePredecessorCollection', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'wait_criteria': 'waitCriteria' + } + + self._display_name = None + self._description = None + self._build_pipeline_stage_type = None + self._build_pipeline_stage_predecessor_collection = None + self._freeform_tags = None + self._defined_tags = None + self._wait_criteria = None + self._build_pipeline_stage_type = 'WAIT' + + @property + def wait_criteria(self): + """ + Gets the wait_criteria of this UpdateWaitStageDetails. + + :return: The wait_criteria of this UpdateWaitStageDetails. + :rtype: oci.devops.models.UpdateWaitCriteriaDetails + """ + return self._wait_criteria + + @wait_criteria.setter + def wait_criteria(self, wait_criteria): + """ + Sets the wait_criteria of this UpdateWaitStageDetails. + + :param wait_criteria: The wait_criteria of this UpdateWaitStageDetails. + :type: oci.devops.models.UpdateWaitCriteriaDetails + """ + self._wait_criteria = wait_criteria + + 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/devops/models/wait_stage.py b/src/oci/devops/models/wait_stage.py new file mode 100644 index 0000000000..102e035099 --- /dev/null +++ b/src/oci/devops/models/wait_stage.py @@ -0,0 +1,175 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .build_pipeline_stage import BuildPipelineStage +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 WaitStage(BuildPipelineStage): + """ + Specifies the Wait Stage. User can specify variable wait times or an absolute duration. + """ + + def __init__(self, **kwargs): + """ + Initializes a new WaitStage object with values from keyword arguments. The default value of the :py:attr:`~oci.devops.models.WaitStage.build_pipeline_stage_type` attribute + of this class is ``WAIT`` and it should not be changed. + 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 WaitStage. + :type id: str + + :param display_name: + The value to assign to the display_name property of this WaitStage. + :type display_name: str + + :param description: + The value to assign to the description property of this WaitStage. + :type description: str + + :param project_id: + The value to assign to the project_id property of this WaitStage. + :type project_id: str + + :param build_pipeline_id: + The value to assign to the build_pipeline_id property of this WaitStage. + :type build_pipeline_id: str + + :param compartment_id: + The value to assign to the compartment_id property of this WaitStage. + :type compartment_id: str + + :param build_pipeline_stage_type: + The value to assign to the build_pipeline_stage_type property of this WaitStage. + Allowed values for this property are: "WAIT", "BUILD", "DELIVER_ARTIFACT", "TRIGGER_DEPLOYMENT_PIPELINE" + :type build_pipeline_stage_type: str + + :param time_created: + The value to assign to the time_created property of this WaitStage. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this WaitStage. + :type time_updated: datetime + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this WaitStage. + Allowed values for this property are: "CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED" + :type lifecycle_state: str + + :param lifecycle_details: + The value to assign to the lifecycle_details property of this WaitStage. + :type lifecycle_details: str + + :param build_pipeline_stage_predecessor_collection: + The value to assign to the build_pipeline_stage_predecessor_collection property of this WaitStage. + :type build_pipeline_stage_predecessor_collection: oci.devops.models.BuildPipelineStagePredecessorCollection + + :param freeform_tags: + The value to assign to the freeform_tags property of this WaitStage. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this WaitStage. + :type defined_tags: dict(str, dict(str, object)) + + :param system_tags: + The value to assign to the system_tags property of this WaitStage. + :type system_tags: dict(str, dict(str, object)) + + :param wait_criteria: + The value to assign to the wait_criteria property of this WaitStage. + :type wait_criteria: oci.devops.models.WaitCriteria + + """ + self.swagger_types = { + 'id': 'str', + 'display_name': 'str', + 'description': 'str', + 'project_id': 'str', + 'build_pipeline_id': 'str', + 'compartment_id': 'str', + 'build_pipeline_stage_type': 'str', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'lifecycle_state': 'str', + 'lifecycle_details': 'str', + 'build_pipeline_stage_predecessor_collection': 'BuildPipelineStagePredecessorCollection', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'system_tags': 'dict(str, dict(str, object))', + 'wait_criteria': 'WaitCriteria' + } + + self.attribute_map = { + 'id': 'id', + 'display_name': 'displayName', + 'description': 'description', + 'project_id': 'projectId', + 'build_pipeline_id': 'buildPipelineId', + 'compartment_id': 'compartmentId', + 'build_pipeline_stage_type': 'buildPipelineStageType', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'lifecycle_state': 'lifecycleState', + 'lifecycle_details': 'lifecycleDetails', + 'build_pipeline_stage_predecessor_collection': 'buildPipelineStagePredecessorCollection', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'system_tags': 'systemTags', + 'wait_criteria': 'waitCriteria' + } + + self._id = None + self._display_name = None + self._description = None + self._project_id = None + self._build_pipeline_id = None + self._compartment_id = None + self._build_pipeline_stage_type = None + self._time_created = None + self._time_updated = None + self._lifecycle_state = None + self._lifecycle_details = None + self._build_pipeline_stage_predecessor_collection = None + self._freeform_tags = None + self._defined_tags = None + self._system_tags = None + self._wait_criteria = None + self._build_pipeline_stage_type = 'WAIT' + + @property + def wait_criteria(self): + """ + **[Required]** Gets the wait_criteria of this WaitStage. + + :return: The wait_criteria of this WaitStage. + :rtype: oci.devops.models.WaitCriteria + """ + return self._wait_criteria + + @wait_criteria.setter + def wait_criteria(self, wait_criteria): + """ + Sets the wait_criteria of this WaitStage. + + :param wait_criteria: The wait_criteria of this WaitStage. + :type: oci.devops.models.WaitCriteria + """ + self._wait_criteria = wait_criteria + + 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/devops/models/wait_stage_run_progress.py b/src/oci/devops/models/wait_stage_run_progress.py new file mode 100644 index 0000000000..2a01645c07 --- /dev/null +++ b/src/oci/devops/models/wait_stage_run_progress.py @@ -0,0 +1,91 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .build_pipeline_stage_run_progress import BuildPipelineStageRunProgress +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 WaitStageRunProgress(BuildPipelineStageRunProgress): + """ + Specifies wait stage specific run details. + """ + + def __init__(self, **kwargs): + """ + Initializes a new WaitStageRunProgress object with values from keyword arguments. The default value of the :py:attr:`~oci.devops.models.WaitStageRunProgress.build_pipeline_stage_type` attribute + of this class is ``WAIT`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param stage_display_name: + The value to assign to the stage_display_name property of this WaitStageRunProgress. + :type stage_display_name: str + + :param build_pipeline_stage_type: + The value to assign to the build_pipeline_stage_type property of this WaitStageRunProgress. + :type build_pipeline_stage_type: str + + :param build_pipeline_stage_id: + The value to assign to the build_pipeline_stage_id property of this WaitStageRunProgress. + :type build_pipeline_stage_id: str + + :param time_started: + The value to assign to the time_started property of this WaitStageRunProgress. + :type time_started: datetime + + :param time_finished: + The value to assign to the time_finished property of this WaitStageRunProgress. + :type time_finished: datetime + + :param status: + The value to assign to the status property of this WaitStageRunProgress. + Allowed values for this property are: "ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED" + :type status: str + + :param build_pipeline_stage_predecessors: + The value to assign to the build_pipeline_stage_predecessors property of this WaitStageRunProgress. + :type build_pipeline_stage_predecessors: oci.devops.models.BuildPipelineStagePredecessorCollection + + """ + self.swagger_types = { + 'stage_display_name': 'str', + 'build_pipeline_stage_type': 'str', + 'build_pipeline_stage_id': 'str', + 'time_started': 'datetime', + 'time_finished': 'datetime', + 'status': 'str', + 'build_pipeline_stage_predecessors': 'BuildPipelineStagePredecessorCollection' + } + + self.attribute_map = { + 'stage_display_name': 'stageDisplayName', + 'build_pipeline_stage_type': 'buildPipelineStageType', + 'build_pipeline_stage_id': 'buildPipelineStageId', + 'time_started': 'timeStarted', + 'time_finished': 'timeFinished', + 'status': 'status', + 'build_pipeline_stage_predecessors': 'buildPipelineStagePredecessors' + } + + self._stage_display_name = None + self._build_pipeline_stage_type = None + self._build_pipeline_stage_id = None + self._time_started = None + self._time_finished = None + self._status = None + self._build_pipeline_stage_predecessors = None + self._build_pipeline_stage_type = 'WAIT' + + 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/devops/models/wait_stage_summary.py b/src/oci/devops/models/wait_stage_summary.py new file mode 100644 index 0000000000..98b8705be3 --- /dev/null +++ b/src/oci/devops/models/wait_stage_summary.py @@ -0,0 +1,173 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .build_pipeline_stage_summary import BuildPipelineStageSummary +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 WaitStageSummary(BuildPipelineStageSummary): + """ + Specifies the Wait Stage. User can specify variable wait times or an absolute duration. + """ + + def __init__(self, **kwargs): + """ + Initializes a new WaitStageSummary object with values from keyword arguments. The default value of the :py:attr:`~oci.devops.models.WaitStageSummary.build_pipeline_stage_type` attribute + of this class is ``WAIT`` and it should not be changed. + 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 WaitStageSummary. + :type id: str + + :param display_name: + The value to assign to the display_name property of this WaitStageSummary. + :type display_name: str + + :param project_id: + The value to assign to the project_id property of this WaitStageSummary. + :type project_id: str + + :param build_pipeline_id: + The value to assign to the build_pipeline_id property of this WaitStageSummary. + :type build_pipeline_id: str + + :param compartment_id: + The value to assign to the compartment_id property of this WaitStageSummary. + :type compartment_id: str + + :param build_pipeline_stage_type: + The value to assign to the build_pipeline_stage_type property of this WaitStageSummary. + :type build_pipeline_stage_type: str + + :param time_created: + The value to assign to the time_created property of this WaitStageSummary. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this WaitStageSummary. + :type time_updated: datetime + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this WaitStageSummary. + :type lifecycle_state: str + + :param lifecycle_details: + The value to assign to the lifecycle_details property of this WaitStageSummary. + :type lifecycle_details: str + + :param description: + The value to assign to the description property of this WaitStageSummary. + :type description: str + + :param build_pipeline_stage_predecessor_collection: + The value to assign to the build_pipeline_stage_predecessor_collection property of this WaitStageSummary. + :type build_pipeline_stage_predecessor_collection: oci.devops.models.BuildPipelineStagePredecessorCollection + + :param freeform_tags: + The value to assign to the freeform_tags property of this WaitStageSummary. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this WaitStageSummary. + :type defined_tags: dict(str, dict(str, object)) + + :param system_tags: + The value to assign to the system_tags property of this WaitStageSummary. + :type system_tags: dict(str, dict(str, object)) + + :param wait_criteria: + The value to assign to the wait_criteria property of this WaitStageSummary. + :type wait_criteria: oci.devops.models.WaitCriteria + + """ + self.swagger_types = { + 'id': 'str', + 'display_name': 'str', + 'project_id': 'str', + 'build_pipeline_id': 'str', + 'compartment_id': 'str', + 'build_pipeline_stage_type': 'str', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'lifecycle_state': 'str', + 'lifecycle_details': 'str', + 'description': 'str', + 'build_pipeline_stage_predecessor_collection': 'BuildPipelineStagePredecessorCollection', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'system_tags': 'dict(str, dict(str, object))', + 'wait_criteria': 'WaitCriteria' + } + + self.attribute_map = { + 'id': 'id', + 'display_name': 'displayName', + 'project_id': 'projectId', + 'build_pipeline_id': 'buildPipelineId', + 'compartment_id': 'compartmentId', + 'build_pipeline_stage_type': 'buildPipelineStageType', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'lifecycle_state': 'lifecycleState', + 'lifecycle_details': 'lifecycleDetails', + 'description': 'description', + 'build_pipeline_stage_predecessor_collection': 'buildPipelineStagePredecessorCollection', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'system_tags': 'systemTags', + 'wait_criteria': 'waitCriteria' + } + + self._id = None + self._display_name = None + self._project_id = None + self._build_pipeline_id = None + self._compartment_id = None + self._build_pipeline_stage_type = None + self._time_created = None + self._time_updated = None + self._lifecycle_state = None + self._lifecycle_details = None + self._description = None + self._build_pipeline_stage_predecessor_collection = None + self._freeform_tags = None + self._defined_tags = None + self._system_tags = None + self._wait_criteria = None + self._build_pipeline_stage_type = 'WAIT' + + @property + def wait_criteria(self): + """ + **[Required]** Gets the wait_criteria of this WaitStageSummary. + + :return: The wait_criteria of this WaitStageSummary. + :rtype: oci.devops.models.WaitCriteria + """ + return self._wait_criteria + + @wait_criteria.setter + def wait_criteria(self, wait_criteria): + """ + Sets the wait_criteria of this WaitStageSummary. + + :param wait_criteria: The wait_criteria of this WaitStageSummary. + :type: oci.devops.models.WaitCriteria + """ + self._wait_criteria = wait_criteria + + 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/devops/models/work_request.py b/src/oci/devops/models/work_request.py index 5742cd1113..aa9b2a2ebc 100644 --- a/src/oci/devops/models/work_request.py +++ b/src/oci/devops/models/work_request.py @@ -89,6 +89,74 @@ class WorkRequest(object): #: This constant has a value of "DELETE_DEPLOYMENT" OPERATION_TYPE_DELETE_DEPLOYMENT = "DELETE_DEPLOYMENT" + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "CREATE_BUILD_PIPELINE" + OPERATION_TYPE_CREATE_BUILD_PIPELINE = "CREATE_BUILD_PIPELINE" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "UPDATE_BUILD_PIPELINE" + OPERATION_TYPE_UPDATE_BUILD_PIPELINE = "UPDATE_BUILD_PIPELINE" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "DELETE_BUILD_PIPELINE" + OPERATION_TYPE_DELETE_BUILD_PIPELINE = "DELETE_BUILD_PIPELINE" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "CREATE_BUILD_PIPELINE_STAGE" + OPERATION_TYPE_CREATE_BUILD_PIPELINE_STAGE = "CREATE_BUILD_PIPELINE_STAGE" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "UPDATE_BUILD_PIPELINE_STAGE" + OPERATION_TYPE_UPDATE_BUILD_PIPELINE_STAGE = "UPDATE_BUILD_PIPELINE_STAGE" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "DELETE_BUILD_PIPELINE_STAGE" + OPERATION_TYPE_DELETE_BUILD_PIPELINE_STAGE = "DELETE_BUILD_PIPELINE_STAGE" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "CREATE_CONNECTION" + OPERATION_TYPE_CREATE_CONNECTION = "CREATE_CONNECTION" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "UPDATE_CONNECTION" + OPERATION_TYPE_UPDATE_CONNECTION = "UPDATE_CONNECTION" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "DELETE_CONNECTION" + OPERATION_TYPE_DELETE_CONNECTION = "DELETE_CONNECTION" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "CREATE_TRIGGER" + OPERATION_TYPE_CREATE_TRIGGER = "CREATE_TRIGGER" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "UPDATE_TRIGGER" + OPERATION_TYPE_UPDATE_TRIGGER = "UPDATE_TRIGGER" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "DELETE_TRIGGER" + OPERATION_TYPE_DELETE_TRIGGER = "DELETE_TRIGGER" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "EXECUTE_TRIGGER" + OPERATION_TYPE_EXECUTE_TRIGGER = "EXECUTE_TRIGGER" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "CREATE_REPOSITORY" + OPERATION_TYPE_CREATE_REPOSITORY = "CREATE_REPOSITORY" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "UPDATE_REPOSITORY" + OPERATION_TYPE_UPDATE_REPOSITORY = "UPDATE_REPOSITORY" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "DELETE_REPOSITORY" + OPERATION_TYPE_DELETE_REPOSITORY = "DELETE_REPOSITORY" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "MIRROR_REPOSITORY" + OPERATION_TYPE_MIRROR_REPOSITORY = "MIRROR_REPOSITORY" + #: A constant which can be used with the status property of a WorkRequest. #: This constant has a value of "ACCEPTED" STATUS_ACCEPTED = "ACCEPTED" @@ -120,7 +188,7 @@ def __init__(self, **kwargs): :param operation_type: The value to assign to the operation_type property of this WorkRequest. - Allowed values for this property are: "CREATE_PROJECT", "UPDATE_PROJECT", "DELETE_PROJECT", "MOVE_PROJECT", "CREATE_DEPLOY_PIPELINE", "UPDATE_DEPLOY_PIPELINE", "DELETE_DEPLOY_PIPELINE", "CREATE_DEPLOY_STAGE", "UPDATE_DEPLOY_STAGE", "DELETE_DEPLOY_STAGE", "CREATE_DEPLOY_ARTIFACT", "UPDATE_DEPLOY_ARTIFACT", "DELETE_DEPLOY_ARTIFACT", "CREATE_DEPLOY_ENVIRONMENT", "UPDATE_DEPLOY_ENVIRONMENT", "DELETE_DEPLOY_ENVIRONMENT", "CREATE_DEPLOYMENT", "UPDATE_DEPLOYMENT", "DELETE_DEPLOYMENT", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "CREATE_PROJECT", "UPDATE_PROJECT", "DELETE_PROJECT", "MOVE_PROJECT", "CREATE_DEPLOY_PIPELINE", "UPDATE_DEPLOY_PIPELINE", "DELETE_DEPLOY_PIPELINE", "CREATE_DEPLOY_STAGE", "UPDATE_DEPLOY_STAGE", "DELETE_DEPLOY_STAGE", "CREATE_DEPLOY_ARTIFACT", "UPDATE_DEPLOY_ARTIFACT", "DELETE_DEPLOY_ARTIFACT", "CREATE_DEPLOY_ENVIRONMENT", "UPDATE_DEPLOY_ENVIRONMENT", "DELETE_DEPLOY_ENVIRONMENT", "CREATE_DEPLOYMENT", "UPDATE_DEPLOYMENT", "DELETE_DEPLOYMENT", "CREATE_BUILD_PIPELINE", "UPDATE_BUILD_PIPELINE", "DELETE_BUILD_PIPELINE", "CREATE_BUILD_PIPELINE_STAGE", "UPDATE_BUILD_PIPELINE_STAGE", "DELETE_BUILD_PIPELINE_STAGE", "CREATE_CONNECTION", "UPDATE_CONNECTION", "DELETE_CONNECTION", "CREATE_TRIGGER", "UPDATE_TRIGGER", "DELETE_TRIGGER", "EXECUTE_TRIGGER", "CREATE_REPOSITORY", "UPDATE_REPOSITORY", "DELETE_REPOSITORY", "MIRROR_REPOSITORY", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type operation_type: str @@ -199,7 +267,7 @@ def operation_type(self): **[Required]** Gets the operation_type of this WorkRequest. Type of the work request. - Allowed values for this property are: "CREATE_PROJECT", "UPDATE_PROJECT", "DELETE_PROJECT", "MOVE_PROJECT", "CREATE_DEPLOY_PIPELINE", "UPDATE_DEPLOY_PIPELINE", "DELETE_DEPLOY_PIPELINE", "CREATE_DEPLOY_STAGE", "UPDATE_DEPLOY_STAGE", "DELETE_DEPLOY_STAGE", "CREATE_DEPLOY_ARTIFACT", "UPDATE_DEPLOY_ARTIFACT", "DELETE_DEPLOY_ARTIFACT", "CREATE_DEPLOY_ENVIRONMENT", "UPDATE_DEPLOY_ENVIRONMENT", "DELETE_DEPLOY_ENVIRONMENT", "CREATE_DEPLOYMENT", "UPDATE_DEPLOYMENT", "DELETE_DEPLOYMENT", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "CREATE_PROJECT", "UPDATE_PROJECT", "DELETE_PROJECT", "MOVE_PROJECT", "CREATE_DEPLOY_PIPELINE", "UPDATE_DEPLOY_PIPELINE", "DELETE_DEPLOY_PIPELINE", "CREATE_DEPLOY_STAGE", "UPDATE_DEPLOY_STAGE", "DELETE_DEPLOY_STAGE", "CREATE_DEPLOY_ARTIFACT", "UPDATE_DEPLOY_ARTIFACT", "DELETE_DEPLOY_ARTIFACT", "CREATE_DEPLOY_ENVIRONMENT", "UPDATE_DEPLOY_ENVIRONMENT", "DELETE_DEPLOY_ENVIRONMENT", "CREATE_DEPLOYMENT", "UPDATE_DEPLOYMENT", "DELETE_DEPLOYMENT", "CREATE_BUILD_PIPELINE", "UPDATE_BUILD_PIPELINE", "DELETE_BUILD_PIPELINE", "CREATE_BUILD_PIPELINE_STAGE", "UPDATE_BUILD_PIPELINE_STAGE", "DELETE_BUILD_PIPELINE_STAGE", "CREATE_CONNECTION", "UPDATE_CONNECTION", "DELETE_CONNECTION", "CREATE_TRIGGER", "UPDATE_TRIGGER", "DELETE_TRIGGER", "EXECUTE_TRIGGER", "CREATE_REPOSITORY", "UPDATE_REPOSITORY", "DELETE_REPOSITORY", "MIRROR_REPOSITORY", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. @@ -218,7 +286,7 @@ def operation_type(self, operation_type): :param operation_type: The operation_type of this WorkRequest. :type: str """ - allowed_values = ["CREATE_PROJECT", "UPDATE_PROJECT", "DELETE_PROJECT", "MOVE_PROJECT", "CREATE_DEPLOY_PIPELINE", "UPDATE_DEPLOY_PIPELINE", "DELETE_DEPLOY_PIPELINE", "CREATE_DEPLOY_STAGE", "UPDATE_DEPLOY_STAGE", "DELETE_DEPLOY_STAGE", "CREATE_DEPLOY_ARTIFACT", "UPDATE_DEPLOY_ARTIFACT", "DELETE_DEPLOY_ARTIFACT", "CREATE_DEPLOY_ENVIRONMENT", "UPDATE_DEPLOY_ENVIRONMENT", "DELETE_DEPLOY_ENVIRONMENT", "CREATE_DEPLOYMENT", "UPDATE_DEPLOYMENT", "DELETE_DEPLOYMENT"] + allowed_values = ["CREATE_PROJECT", "UPDATE_PROJECT", "DELETE_PROJECT", "MOVE_PROJECT", "CREATE_DEPLOY_PIPELINE", "UPDATE_DEPLOY_PIPELINE", "DELETE_DEPLOY_PIPELINE", "CREATE_DEPLOY_STAGE", "UPDATE_DEPLOY_STAGE", "DELETE_DEPLOY_STAGE", "CREATE_DEPLOY_ARTIFACT", "UPDATE_DEPLOY_ARTIFACT", "DELETE_DEPLOY_ARTIFACT", "CREATE_DEPLOY_ENVIRONMENT", "UPDATE_DEPLOY_ENVIRONMENT", "DELETE_DEPLOY_ENVIRONMENT", "CREATE_DEPLOYMENT", "UPDATE_DEPLOYMENT", "DELETE_DEPLOYMENT", "CREATE_BUILD_PIPELINE", "UPDATE_BUILD_PIPELINE", "DELETE_BUILD_PIPELINE", "CREATE_BUILD_PIPELINE_STAGE", "UPDATE_BUILD_PIPELINE_STAGE", "DELETE_BUILD_PIPELINE_STAGE", "CREATE_CONNECTION", "UPDATE_CONNECTION", "DELETE_CONNECTION", "CREATE_TRIGGER", "UPDATE_TRIGGER", "DELETE_TRIGGER", "EXECUTE_TRIGGER", "CREATE_REPOSITORY", "UPDATE_REPOSITORY", "DELETE_REPOSITORY", "MIRROR_REPOSITORY"] if not value_allowed_none_or_none_sentinel(operation_type, allowed_values): operation_type = 'UNKNOWN_ENUM_VALUE' self._operation_type = operation_type diff --git a/src/oci/devops/models/work_request_summary.py b/src/oci/devops/models/work_request_summary.py index b7ecd043ec..3626a6f86b 100644 --- a/src/oci/devops/models/work_request_summary.py +++ b/src/oci/devops/models/work_request_summary.py @@ -89,6 +89,74 @@ class WorkRequestSummary(object): #: This constant has a value of "DELETE_DEPLOYMENT" OPERATION_TYPE_DELETE_DEPLOYMENT = "DELETE_DEPLOYMENT" + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "CREATE_BUILD_PIPELINE" + OPERATION_TYPE_CREATE_BUILD_PIPELINE = "CREATE_BUILD_PIPELINE" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "UPDATE_BUILD_PIPELINE" + OPERATION_TYPE_UPDATE_BUILD_PIPELINE = "UPDATE_BUILD_PIPELINE" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "DELETE_BUILD_PIPELINE" + OPERATION_TYPE_DELETE_BUILD_PIPELINE = "DELETE_BUILD_PIPELINE" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "CREATE_BUILD_PIPELINE_STAGE" + OPERATION_TYPE_CREATE_BUILD_PIPELINE_STAGE = "CREATE_BUILD_PIPELINE_STAGE" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "UPDATE_BUILD_PIPELINE_STAGE" + OPERATION_TYPE_UPDATE_BUILD_PIPELINE_STAGE = "UPDATE_BUILD_PIPELINE_STAGE" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "DELETE_BUILD_PIPELINE_STAGE" + OPERATION_TYPE_DELETE_BUILD_PIPELINE_STAGE = "DELETE_BUILD_PIPELINE_STAGE" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "CREATE_CONNECTION" + OPERATION_TYPE_CREATE_CONNECTION = "CREATE_CONNECTION" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "UPDATE_CONNECTION" + OPERATION_TYPE_UPDATE_CONNECTION = "UPDATE_CONNECTION" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "DELETE_CONNECTION" + OPERATION_TYPE_DELETE_CONNECTION = "DELETE_CONNECTION" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "CREATE_TRIGGER" + OPERATION_TYPE_CREATE_TRIGGER = "CREATE_TRIGGER" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "UPDATE_TRIGGER" + OPERATION_TYPE_UPDATE_TRIGGER = "UPDATE_TRIGGER" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "DELETE_TRIGGER" + OPERATION_TYPE_DELETE_TRIGGER = "DELETE_TRIGGER" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "EXECUTE_TRIGGER" + OPERATION_TYPE_EXECUTE_TRIGGER = "EXECUTE_TRIGGER" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "CREATE_REPOSITORY" + OPERATION_TYPE_CREATE_REPOSITORY = "CREATE_REPOSITORY" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "UPDATE_REPOSITORY" + OPERATION_TYPE_UPDATE_REPOSITORY = "UPDATE_REPOSITORY" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "DELETE_REPOSITORY" + OPERATION_TYPE_DELETE_REPOSITORY = "DELETE_REPOSITORY" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "MIRROR_REPOSITORY" + OPERATION_TYPE_MIRROR_REPOSITORY = "MIRROR_REPOSITORY" + #: A constant which can be used with the status property of a WorkRequestSummary. #: This constant has a value of "ACCEPTED" STATUS_ACCEPTED = "ACCEPTED" @@ -120,7 +188,7 @@ def __init__(self, **kwargs): :param operation_type: The value to assign to the operation_type property of this WorkRequestSummary. - Allowed values for this property are: "CREATE_PROJECT", "UPDATE_PROJECT", "DELETE_PROJECT", "MOVE_PROJECT", "CREATE_DEPLOY_PIPELINE", "UPDATE_DEPLOY_PIPELINE", "DELETE_DEPLOY_PIPELINE", "CREATE_DEPLOY_STAGE", "UPDATE_DEPLOY_STAGE", "DELETE_DEPLOY_STAGE", "CREATE_DEPLOY_ARTIFACT", "UPDATE_DEPLOY_ARTIFACT", "DELETE_DEPLOY_ARTIFACT", "CREATE_DEPLOY_ENVIRONMENT", "UPDATE_DEPLOY_ENVIRONMENT", "DELETE_DEPLOY_ENVIRONMENT", "CREATE_DEPLOYMENT", "UPDATE_DEPLOYMENT", "DELETE_DEPLOYMENT", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "CREATE_PROJECT", "UPDATE_PROJECT", "DELETE_PROJECT", "MOVE_PROJECT", "CREATE_DEPLOY_PIPELINE", "UPDATE_DEPLOY_PIPELINE", "DELETE_DEPLOY_PIPELINE", "CREATE_DEPLOY_STAGE", "UPDATE_DEPLOY_STAGE", "DELETE_DEPLOY_STAGE", "CREATE_DEPLOY_ARTIFACT", "UPDATE_DEPLOY_ARTIFACT", "DELETE_DEPLOY_ARTIFACT", "CREATE_DEPLOY_ENVIRONMENT", "UPDATE_DEPLOY_ENVIRONMENT", "DELETE_DEPLOY_ENVIRONMENT", "CREATE_DEPLOYMENT", "UPDATE_DEPLOYMENT", "DELETE_DEPLOYMENT", "CREATE_BUILD_PIPELINE", "UPDATE_BUILD_PIPELINE", "DELETE_BUILD_PIPELINE", "CREATE_BUILD_PIPELINE_STAGE", "UPDATE_BUILD_PIPELINE_STAGE", "DELETE_BUILD_PIPELINE_STAGE", "CREATE_CONNECTION", "UPDATE_CONNECTION", "DELETE_CONNECTION", "CREATE_TRIGGER", "UPDATE_TRIGGER", "DELETE_TRIGGER", "EXECUTE_TRIGGER", "CREATE_REPOSITORY", "UPDATE_REPOSITORY", "DELETE_REPOSITORY", "MIRROR_REPOSITORY", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type operation_type: str @@ -199,7 +267,7 @@ def operation_type(self): **[Required]** Gets the operation_type of this WorkRequestSummary. Type of the work request. - Allowed values for this property are: "CREATE_PROJECT", "UPDATE_PROJECT", "DELETE_PROJECT", "MOVE_PROJECT", "CREATE_DEPLOY_PIPELINE", "UPDATE_DEPLOY_PIPELINE", "DELETE_DEPLOY_PIPELINE", "CREATE_DEPLOY_STAGE", "UPDATE_DEPLOY_STAGE", "DELETE_DEPLOY_STAGE", "CREATE_DEPLOY_ARTIFACT", "UPDATE_DEPLOY_ARTIFACT", "DELETE_DEPLOY_ARTIFACT", "CREATE_DEPLOY_ENVIRONMENT", "UPDATE_DEPLOY_ENVIRONMENT", "DELETE_DEPLOY_ENVIRONMENT", "CREATE_DEPLOYMENT", "UPDATE_DEPLOYMENT", "DELETE_DEPLOYMENT", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "CREATE_PROJECT", "UPDATE_PROJECT", "DELETE_PROJECT", "MOVE_PROJECT", "CREATE_DEPLOY_PIPELINE", "UPDATE_DEPLOY_PIPELINE", "DELETE_DEPLOY_PIPELINE", "CREATE_DEPLOY_STAGE", "UPDATE_DEPLOY_STAGE", "DELETE_DEPLOY_STAGE", "CREATE_DEPLOY_ARTIFACT", "UPDATE_DEPLOY_ARTIFACT", "DELETE_DEPLOY_ARTIFACT", "CREATE_DEPLOY_ENVIRONMENT", "UPDATE_DEPLOY_ENVIRONMENT", "DELETE_DEPLOY_ENVIRONMENT", "CREATE_DEPLOYMENT", "UPDATE_DEPLOYMENT", "DELETE_DEPLOYMENT", "CREATE_BUILD_PIPELINE", "UPDATE_BUILD_PIPELINE", "DELETE_BUILD_PIPELINE", "CREATE_BUILD_PIPELINE_STAGE", "UPDATE_BUILD_PIPELINE_STAGE", "DELETE_BUILD_PIPELINE_STAGE", "CREATE_CONNECTION", "UPDATE_CONNECTION", "DELETE_CONNECTION", "CREATE_TRIGGER", "UPDATE_TRIGGER", "DELETE_TRIGGER", "EXECUTE_TRIGGER", "CREATE_REPOSITORY", "UPDATE_REPOSITORY", "DELETE_REPOSITORY", "MIRROR_REPOSITORY", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. @@ -218,7 +286,7 @@ def operation_type(self, operation_type): :param operation_type: The operation_type of this WorkRequestSummary. :type: str """ - allowed_values = ["CREATE_PROJECT", "UPDATE_PROJECT", "DELETE_PROJECT", "MOVE_PROJECT", "CREATE_DEPLOY_PIPELINE", "UPDATE_DEPLOY_PIPELINE", "DELETE_DEPLOY_PIPELINE", "CREATE_DEPLOY_STAGE", "UPDATE_DEPLOY_STAGE", "DELETE_DEPLOY_STAGE", "CREATE_DEPLOY_ARTIFACT", "UPDATE_DEPLOY_ARTIFACT", "DELETE_DEPLOY_ARTIFACT", "CREATE_DEPLOY_ENVIRONMENT", "UPDATE_DEPLOY_ENVIRONMENT", "DELETE_DEPLOY_ENVIRONMENT", "CREATE_DEPLOYMENT", "UPDATE_DEPLOYMENT", "DELETE_DEPLOYMENT"] + allowed_values = ["CREATE_PROJECT", "UPDATE_PROJECT", "DELETE_PROJECT", "MOVE_PROJECT", "CREATE_DEPLOY_PIPELINE", "UPDATE_DEPLOY_PIPELINE", "DELETE_DEPLOY_PIPELINE", "CREATE_DEPLOY_STAGE", "UPDATE_DEPLOY_STAGE", "DELETE_DEPLOY_STAGE", "CREATE_DEPLOY_ARTIFACT", "UPDATE_DEPLOY_ARTIFACT", "DELETE_DEPLOY_ARTIFACT", "CREATE_DEPLOY_ENVIRONMENT", "UPDATE_DEPLOY_ENVIRONMENT", "DELETE_DEPLOY_ENVIRONMENT", "CREATE_DEPLOYMENT", "UPDATE_DEPLOYMENT", "DELETE_DEPLOYMENT", "CREATE_BUILD_PIPELINE", "UPDATE_BUILD_PIPELINE", "DELETE_BUILD_PIPELINE", "CREATE_BUILD_PIPELINE_STAGE", "UPDATE_BUILD_PIPELINE_STAGE", "DELETE_BUILD_PIPELINE_STAGE", "CREATE_CONNECTION", "UPDATE_CONNECTION", "DELETE_CONNECTION", "CREATE_TRIGGER", "UPDATE_TRIGGER", "DELETE_TRIGGER", "EXECUTE_TRIGGER", "CREATE_REPOSITORY", "UPDATE_REPOSITORY", "DELETE_REPOSITORY", "MIRROR_REPOSITORY"] if not value_allowed_none_or_none_sentinel(operation_type, allowed_values): operation_type = 'UNKNOWN_ENUM_VALUE' self._operation_type = operation_type diff --git a/src/oci/load_balancer/models/ssl_configuration.py b/src/oci/load_balancer/models/ssl_configuration.py index 66de86e9cd..4e4d0cc589 100644 --- a/src/oci/load_balancer/models/ssl_configuration.py +++ b/src/oci/load_balancer/models/ssl_configuration.py @@ -38,6 +38,14 @@ def __init__(self, **kwargs): The value to assign to the verify_peer_certificate property of this SSLConfiguration. :type verify_peer_certificate: bool + :param trusted_certificate_authority_ids: + The value to assign to the trusted_certificate_authority_ids property of this SSLConfiguration. + :type trusted_certificate_authority_ids: list[str] + + :param certificate_ids: + The value to assign to the certificate_ids property of this SSLConfiguration. + :type certificate_ids: list[str] + :param certificate_name: The value to assign to the certificate_name property of this SSLConfiguration. :type certificate_name: str @@ -60,6 +68,8 @@ def __init__(self, **kwargs): self.swagger_types = { 'verify_depth': 'int', 'verify_peer_certificate': 'bool', + 'trusted_certificate_authority_ids': 'list[str]', + 'certificate_ids': 'list[str]', 'certificate_name': 'str', 'server_order_preference': 'str', 'cipher_suite_name': 'str', @@ -69,6 +79,8 @@ def __init__(self, **kwargs): self.attribute_map = { 'verify_depth': 'verifyDepth', 'verify_peer_certificate': 'verifyPeerCertificate', + 'trusted_certificate_authority_ids': 'trustedCertificateAuthorityIds', + 'certificate_ids': 'certificateIds', 'certificate_name': 'certificateName', 'server_order_preference': 'serverOrderPreference', 'cipher_suite_name': 'cipherSuiteName', @@ -77,6 +89,8 @@ def __init__(self, **kwargs): self._verify_depth = None self._verify_peer_certificate = None + self._trusted_certificate_authority_ids = None + self._certificate_ids = None self._certificate_name = None self._server_order_preference = None self._cipher_suite_name = None @@ -138,6 +152,62 @@ def verify_peer_certificate(self, verify_peer_certificate): """ self._verify_peer_certificate = verify_peer_certificate + @property + def trusted_certificate_authority_ids(self): + """ + Gets the trusted_certificate_authority_ids of this SSLConfiguration. + Ids for OCI certificates service CA or CA bundles for the load balancer to trust. + + Example: `[ocid1.cabundle.oc1.us-ashburn-1.amaaaaaaav3bgsaagl4zzyqdop5i2vuwoqewdvauuw34llqa74otq2jdsfyq]` + + + :return: The trusted_certificate_authority_ids of this SSLConfiguration. + :rtype: list[str] + """ + return self._trusted_certificate_authority_ids + + @trusted_certificate_authority_ids.setter + def trusted_certificate_authority_ids(self, trusted_certificate_authority_ids): + """ + Sets the trusted_certificate_authority_ids of this SSLConfiguration. + Ids for OCI certificates service CA or CA bundles for the load balancer to trust. + + Example: `[ocid1.cabundle.oc1.us-ashburn-1.amaaaaaaav3bgsaagl4zzyqdop5i2vuwoqewdvauuw34llqa74otq2jdsfyq]` + + + :param trusted_certificate_authority_ids: The trusted_certificate_authority_ids of this SSLConfiguration. + :type: list[str] + """ + self._trusted_certificate_authority_ids = trusted_certificate_authority_ids + + @property + def certificate_ids(self): + """ + Gets the certificate_ids of this SSLConfiguration. + Ids for OCI certificates service certificates. Currently only a single Id may be passed. + + Example: `[ocid1.certificate.oc1.us-ashburn-1.amaaaaaaav3bgsaa5o2q7rh5nfmkkukfkogasqhk6af2opufhjlqg7m6jqzq]` + + + :return: The certificate_ids of this SSLConfiguration. + :rtype: list[str] + """ + return self._certificate_ids + + @certificate_ids.setter + def certificate_ids(self, certificate_ids): + """ + Sets the certificate_ids of this SSLConfiguration. + Ids for OCI certificates service certificates. Currently only a single Id may be passed. + + Example: `[ocid1.certificate.oc1.us-ashburn-1.amaaaaaaav3bgsaa5o2q7rh5nfmkkukfkogasqhk6af2opufhjlqg7m6jqzq]` + + + :param certificate_ids: The certificate_ids of this SSLConfiguration. + :type: list[str] + """ + self._certificate_ids = certificate_ids + @property def certificate_name(self): """ diff --git a/src/oci/load_balancer/models/ssl_configuration_details.py b/src/oci/load_balancer/models/ssl_configuration_details.py index 0fa4bf3368..5518760497 100644 --- a/src/oci/load_balancer/models/ssl_configuration_details.py +++ b/src/oci/load_balancer/models/ssl_configuration_details.py @@ -36,6 +36,14 @@ def __init__(self, **kwargs): The value to assign to the verify_peer_certificate property of this SSLConfigurationDetails. :type verify_peer_certificate: bool + :param trusted_certificate_authority_ids: + The value to assign to the trusted_certificate_authority_ids property of this SSLConfigurationDetails. + :type trusted_certificate_authority_ids: list[str] + + :param certificate_ids: + The value to assign to the certificate_ids property of this SSLConfigurationDetails. + :type certificate_ids: list[str] + :param certificate_name: The value to assign to the certificate_name property of this SSLConfigurationDetails. :type certificate_name: str @@ -57,6 +65,8 @@ def __init__(self, **kwargs): self.swagger_types = { 'verify_depth': 'int', 'verify_peer_certificate': 'bool', + 'trusted_certificate_authority_ids': 'list[str]', + 'certificate_ids': 'list[str]', 'certificate_name': 'str', 'protocols': 'list[str]', 'cipher_suite_name': 'str', @@ -66,6 +76,8 @@ def __init__(self, **kwargs): self.attribute_map = { 'verify_depth': 'verifyDepth', 'verify_peer_certificate': 'verifyPeerCertificate', + 'trusted_certificate_authority_ids': 'trustedCertificateAuthorityIds', + 'certificate_ids': 'certificateIds', 'certificate_name': 'certificateName', 'protocols': 'protocols', 'cipher_suite_name': 'cipherSuiteName', @@ -74,6 +86,8 @@ def __init__(self, **kwargs): self._verify_depth = None self._verify_peer_certificate = None + self._trusted_certificate_authority_ids = None + self._certificate_ids = None self._certificate_name = None self._protocols = None self._cipher_suite_name = None @@ -135,6 +149,62 @@ def verify_peer_certificate(self, verify_peer_certificate): """ self._verify_peer_certificate = verify_peer_certificate + @property + def trusted_certificate_authority_ids(self): + """ + Gets the trusted_certificate_authority_ids of this SSLConfigurationDetails. + Ids for OCI certificates service CA or CA bundles for the load balancer to trust. + + Example: `[ocid1.cabundle.oc1.us-ashburn-1.amaaaaaaav3bgsaagl4zzyqdop5i2vuwoqewdvauuw34llqa74otq2jdsfyq]` + + + :return: The trusted_certificate_authority_ids of this SSLConfigurationDetails. + :rtype: list[str] + """ + return self._trusted_certificate_authority_ids + + @trusted_certificate_authority_ids.setter + def trusted_certificate_authority_ids(self, trusted_certificate_authority_ids): + """ + Sets the trusted_certificate_authority_ids of this SSLConfigurationDetails. + Ids for OCI certificates service CA or CA bundles for the load balancer to trust. + + Example: `[ocid1.cabundle.oc1.us-ashburn-1.amaaaaaaav3bgsaagl4zzyqdop5i2vuwoqewdvauuw34llqa74otq2jdsfyq]` + + + :param trusted_certificate_authority_ids: The trusted_certificate_authority_ids of this SSLConfigurationDetails. + :type: list[str] + """ + self._trusted_certificate_authority_ids = trusted_certificate_authority_ids + + @property + def certificate_ids(self): + """ + Gets the certificate_ids of this SSLConfigurationDetails. + Ids for OCI certificates service certificates. Currently only a single Id may be passed. + + Example: `[ocid1.certificate.oc1.us-ashburn-1.amaaaaaaav3bgsaa5o2q7rh5nfmkkukfkogasqhk6af2opufhjlqg7m6jqzq]` + + + :return: The certificate_ids of this SSLConfigurationDetails. + :rtype: list[str] + """ + return self._certificate_ids + + @certificate_ids.setter + def certificate_ids(self, certificate_ids): + """ + Sets the certificate_ids of this SSLConfigurationDetails. + Ids for OCI certificates service certificates. Currently only a single Id may be passed. + + Example: `[ocid1.certificate.oc1.us-ashburn-1.amaaaaaaav3bgsaa5o2q7rh5nfmkkukfkogasqhk6af2opufhjlqg7m6jqzq]` + + + :param certificate_ids: The certificate_ids of this SSLConfigurationDetails. + :type: list[str] + """ + self._certificate_ids = certificate_ids + @property def certificate_name(self): """ diff --git a/src/oci/ocvp/models/create_esxi_host_details.py b/src/oci/ocvp/models/create_esxi_host_details.py index d686e1eb69..73a168e237 100644 --- a/src/oci/ocvp/models/create_esxi_host_details.py +++ b/src/oci/ocvp/models/create_esxi_host_details.py @@ -68,6 +68,10 @@ def __init__(self, **kwargs): Allowed values for this property are: "HOUR", "MONTH", "ONE_YEAR", "THREE_YEARS" :type next_sku: str + :param compute_availability_domain: + The value to assign to the compute_availability_domain property of this CreateEsxiHostDetails. + :type compute_availability_domain: str + :param freeform_tags: The value to assign to the freeform_tags property of this CreateEsxiHostDetails. :type freeform_tags: dict(str, str) @@ -82,6 +86,7 @@ def __init__(self, **kwargs): 'display_name': 'str', 'current_sku': 'str', 'next_sku': 'str', + 'compute_availability_domain': 'str', 'freeform_tags': 'dict(str, str)', 'defined_tags': 'dict(str, dict(str, object))' } @@ -91,6 +96,7 @@ def __init__(self, **kwargs): 'display_name': 'displayName', 'current_sku': 'currentSku', 'next_sku': 'nextSku', + 'compute_availability_domain': 'computeAvailabilityDomain', 'freeform_tags': 'freeformTags', 'defined_tags': 'definedTags' } @@ -99,6 +105,7 @@ def __init__(self, **kwargs): self._display_name = None self._current_sku = None self._next_sku = None + self._compute_availability_domain = None self._freeform_tags = None self._defined_tags = None @@ -242,6 +249,34 @@ def next_sku(self, next_sku): ) self._next_sku = next_sku + @property + def compute_availability_domain(self): + """ + Gets the compute_availability_domain of this CreateEsxiHostDetails. + The availability domain to create the ESXi host in. + If keep empty, for AD-specific SDDC, new ESXi host will be created in the same availability domain; + for multi-AD SDDC, new ESXi host will be auto assigned to the next availability domain following evenly distribution strategy. + + + :return: The compute_availability_domain of this CreateEsxiHostDetails. + :rtype: str + """ + return self._compute_availability_domain + + @compute_availability_domain.setter + def compute_availability_domain(self, compute_availability_domain): + """ + Sets the compute_availability_domain of this CreateEsxiHostDetails. + The availability domain to create the ESXi host in. + If keep empty, for AD-specific SDDC, new ESXi host will be created in the same availability domain; + for multi-AD SDDC, new ESXi host will be auto assigned to the next availability domain following evenly distribution strategy. + + + :param compute_availability_domain: The compute_availability_domain of this CreateEsxiHostDetails. + :type: str + """ + self._compute_availability_domain = compute_availability_domain + @property def freeform_tags(self): """ diff --git a/src/oci/ocvp/models/create_sddc_details.py b/src/oci/ocvp/models/create_sddc_details.py index 4d6fbeb941..b88eebd31e 100644 --- a/src/oci/ocvp/models/create_sddc_details.py +++ b/src/oci/ocvp/models/create_sddc_details.py @@ -215,7 +215,7 @@ def __init__(self, **kwargs): def compute_availability_domain(self): """ **[Required]** Gets the compute_availability_domain of this CreateSddcDetails. - The availability domain to create the SDDC's ESXi hosts in. + The availability domain to create the SDDC's ESXi hosts in. For multi-AD SDDC deployment, set to `multi-AD`. :return: The compute_availability_domain of this CreateSddcDetails. @@ -227,7 +227,7 @@ def compute_availability_domain(self): def compute_availability_domain(self, compute_availability_domain): """ Sets the compute_availability_domain of this CreateSddcDetails. - The availability domain to create the SDDC's ESXi hosts in. + The availability domain to create the SDDC's ESXi hosts in. For multi-AD SDDC deployment, set to `multi-AD`. :param compute_availability_domain: The compute_availability_domain of this CreateSddcDetails. diff --git a/src/oci/ocvp/models/esxi_host.py b/src/oci/ocvp/models/esxi_host.py index 5bb22ddc34..f8ecdfeb5a 100644 --- a/src/oci/ocvp/models/esxi_host.py +++ b/src/oci/ocvp/models/esxi_host.py @@ -131,6 +131,10 @@ def __init__(self, **kwargs): The value to assign to the billing_contract_end_date property of this EsxiHost. :type billing_contract_end_date: datetime + :param compute_availability_domain: + The value to assign to the compute_availability_domain property of this EsxiHost. + :type compute_availability_domain: str + :param freeform_tags: The value to assign to the freeform_tags property of this EsxiHost. :type freeform_tags: dict(str, str) @@ -152,6 +156,7 @@ def __init__(self, **kwargs): 'current_sku': 'str', 'next_sku': 'str', 'billing_contract_end_date': 'datetime', + 'compute_availability_domain': 'str', 'freeform_tags': 'dict(str, str)', 'defined_tags': 'dict(str, dict(str, object))' } @@ -168,6 +173,7 @@ def __init__(self, **kwargs): 'current_sku': 'currentSku', 'next_sku': 'nextSku', 'billing_contract_end_date': 'billingContractEndDate', + 'compute_availability_domain': 'computeAvailabilityDomain', 'freeform_tags': 'freeformTags', 'defined_tags': 'definedTags' } @@ -183,6 +189,7 @@ def __init__(self, **kwargs): self._current_sku = None self._next_sku = None self._billing_contract_end_date = None + self._compute_availability_domain = None self._freeform_tags = None self._defined_tags = None @@ -520,6 +527,30 @@ def billing_contract_end_date(self, billing_contract_end_date): """ self._billing_contract_end_date = billing_contract_end_date + @property + def compute_availability_domain(self): + """ + **[Required]** Gets the compute_availability_domain of this EsxiHost. + The availability domain of the ESXi host. + + + :return: The compute_availability_domain of this EsxiHost. + :rtype: str + """ + return self._compute_availability_domain + + @compute_availability_domain.setter + def compute_availability_domain(self, compute_availability_domain): + """ + Sets the compute_availability_domain of this EsxiHost. + The availability domain of the ESXi host. + + + :param compute_availability_domain: The compute_availability_domain of this EsxiHost. + :type: str + """ + self._compute_availability_domain = compute_availability_domain + @property def freeform_tags(self): """ diff --git a/src/oci/ocvp/models/esxi_host_summary.py b/src/oci/ocvp/models/esxi_host_summary.py index 70b187675a..78e211e675 100644 --- a/src/oci/ocvp/models/esxi_host_summary.py +++ b/src/oci/ocvp/models/esxi_host_summary.py @@ -124,6 +124,10 @@ def __init__(self, **kwargs): The value to assign to the billing_contract_end_date property of this EsxiHostSummary. :type billing_contract_end_date: datetime + :param compute_availability_domain: + The value to assign to the compute_availability_domain property of this EsxiHostSummary. + :type compute_availability_domain: str + :param freeform_tags: The value to assign to the freeform_tags property of this EsxiHostSummary. :type freeform_tags: dict(str, str) @@ -145,6 +149,7 @@ def __init__(self, **kwargs): 'current_sku': 'str', 'next_sku': 'str', 'billing_contract_end_date': 'datetime', + 'compute_availability_domain': 'str', 'freeform_tags': 'dict(str, str)', 'defined_tags': 'dict(str, dict(str, object))' } @@ -161,6 +166,7 @@ def __init__(self, **kwargs): 'current_sku': 'currentSku', 'next_sku': 'nextSku', 'billing_contract_end_date': 'billingContractEndDate', + 'compute_availability_domain': 'computeAvailabilityDomain', 'freeform_tags': 'freeformTags', 'defined_tags': 'definedTags' } @@ -176,6 +182,7 @@ def __init__(self, **kwargs): self._current_sku = None self._next_sku = None self._billing_contract_end_date = None + self._compute_availability_domain = None self._freeform_tags = None self._defined_tags = None @@ -513,6 +520,30 @@ def billing_contract_end_date(self, billing_contract_end_date): """ self._billing_contract_end_date = billing_contract_end_date + @property + def compute_availability_domain(self): + """ + **[Required]** Gets the compute_availability_domain of this EsxiHostSummary. + The availability domain of the ESXi host. + + + :return: The compute_availability_domain of this EsxiHostSummary. + :rtype: str + """ + return self._compute_availability_domain + + @compute_availability_domain.setter + def compute_availability_domain(self, compute_availability_domain): + """ + Sets the compute_availability_domain of this EsxiHostSummary. + The availability domain of the ESXi host. + + + :param compute_availability_domain: The compute_availability_domain of this EsxiHostSummary. + :type: str + """ + self._compute_availability_domain = compute_availability_domain + @property def freeform_tags(self): """ diff --git a/src/oci/ocvp/models/sddc.py b/src/oci/ocvp/models/sddc.py index 2f6d092fe1..3ccefb7dc1 100644 --- a/src/oci/ocvp/models/sddc.py +++ b/src/oci/ocvp/models/sddc.py @@ -434,9 +434,9 @@ def id(self, id): def compute_availability_domain(self): """ **[Required]** Gets the compute_availability_domain of this Sddc. - The availability domain the ESXi hosts are running in. + The availability domain the ESXi hosts are running in. For Multi-AD SDDC, it is `multi-AD`. - Example: `Uocm:PHX-AD-1` + Example: `Uocm:PHX-AD-1`, `multi-AD` :return: The compute_availability_domain of this Sddc. @@ -448,9 +448,9 @@ def compute_availability_domain(self): def compute_availability_domain(self, compute_availability_domain): """ Sets the compute_availability_domain of this Sddc. - The availability domain the ESXi hosts are running in. + The availability domain the ESXi hosts are running in. For Multi-AD SDDC, it is `multi-AD`. - Example: `Uocm:PHX-AD-1` + Example: `Uocm:PHX-AD-1`, `multi-AD` :param compute_availability_domain: The compute_availability_domain of this Sddc. diff --git a/src/oci/ocvp/models/sddc_summary.py b/src/oci/ocvp/models/sddc_summary.py index c6b3a7576c..33b7488a82 100644 --- a/src/oci/ocvp/models/sddc_summary.py +++ b/src/oci/ocvp/models/sddc_summary.py @@ -191,7 +191,7 @@ def id(self, id): def compute_availability_domain(self): """ **[Required]** Gets the compute_availability_domain of this SddcSummary. - The availability domain that the SDDC's ESXi hosts are running in. + The availability domain that the SDDC's ESXi hosts are running in. For Multi-AD SDDC, it is `multi-AD`. :return: The compute_availability_domain of this SddcSummary. @@ -203,7 +203,7 @@ def compute_availability_domain(self): def compute_availability_domain(self, compute_availability_domain): """ Sets the compute_availability_domain of this SddcSummary. - The availability domain that the SDDC's ESXi hosts are running in. + The availability domain that the SDDC's ESXi hosts are running in. For Multi-AD SDDC, it is `multi-AD`. :param compute_availability_domain: The compute_availability_domain of this SddcSummary. diff --git a/src/oci/opsi/models/__init__.py b/src/oci/opsi/models/__init__.py index 3974f3d6f9..67091d9daf 100644 --- a/src/oci/opsi/models/__init__.py +++ b/src/oci/opsi/models/__init__.py @@ -4,16 +4,23 @@ from __future__ import absolute_import +from .add_em_managed_external_exadata_insight_members_details import AddEmManagedExternalExadataInsightMembersDetails +from .add_exadata_insight_members_details import AddExadataInsightMembersDetails from .autonomous_database_configuration_summary import AutonomousDatabaseConfigurationSummary from .autonomous_database_insight import AutonomousDatabaseInsight from .autonomous_database_insight_summary import AutonomousDatabaseInsightSummary from .change_database_insight_compartment_details import ChangeDatabaseInsightCompartmentDetails from .change_enterprise_manager_bridge_compartment_details import ChangeEnterpriseManagerBridgeCompartmentDetails +from .change_exadata_insight_compartment_details import ChangeExadataInsightCompartmentDetails from .change_host_insight_compartment_details import ChangeHostInsightCompartmentDetails from .connection_details import ConnectionDetails from .create_database_insight_details import CreateDatabaseInsightDetails from .create_em_managed_external_database_insight_details import CreateEmManagedExternalDatabaseInsightDetails +from .create_em_managed_external_exadata_insight_details import CreateEmManagedExternalExadataInsightDetails +from .create_em_managed_external_exadata_member_entity_details import CreateEmManagedExternalExadataMemberEntityDetails +from .create_em_managed_external_host_insight_details import CreateEmManagedExternalHostInsightDetails from .create_enterprise_manager_bridge_details import CreateEnterpriseManagerBridgeDetails +from .create_exadata_insight_details import CreateExadataInsightDetails from .create_host_insight_details import CreateHostInsightDetails from .create_macs_managed_external_host_insight_details import CreateMacsManagedExternalHostInsightDetails from .credential_details import CredentialDetails @@ -29,19 +36,50 @@ from .database_insight_summary import DatabaseInsightSummary from .database_insights import DatabaseInsights from .database_insights_collection import DatabaseInsightsCollection +from .disk_group_details import DiskGroupDetails from .em_managed_external_database_configuration_summary import EmManagedExternalDatabaseConfigurationSummary from .em_managed_external_database_insight import EmManagedExternalDatabaseInsight from .em_managed_external_database_insight_summary import EmManagedExternalDatabaseInsightSummary +from .em_managed_external_exadata_insight import EmManagedExternalExadataInsight +from .em_managed_external_exadata_insight_summary import EmManagedExternalExadataInsightSummary +from .em_managed_external_host_configuration_summary import EmManagedExternalHostConfigurationSummary +from .em_managed_external_host_insight import EmManagedExternalHostInsight +from .em_managed_external_host_insight_summary import EmManagedExternalHostInsightSummary from .enable_database_insight_details import EnableDatabaseInsightDetails from .enable_em_managed_external_database_insight_details import EnableEmManagedExternalDatabaseInsightDetails +from .enable_em_managed_external_exadata_insight_details import EnableEmManagedExternalExadataInsightDetails +from .enable_em_managed_external_host_insight_details import EnableEmManagedExternalHostInsightDetails +from .enable_exadata_insight_details import EnableExadataInsightDetails from .enable_host_insight_details import EnableHostInsightDetails from .enable_macs_managed_external_host_insight_details import EnableMacsManagedExternalHostInsightDetails from .enterprise_manager_bridge import EnterpriseManagerBridge from .enterprise_manager_bridge_collection import EnterpriseManagerBridgeCollection from .enterprise_manager_bridge_summary import EnterpriseManagerBridgeSummary from .enterprise_manager_bridges import EnterpriseManagerBridges +from .exadata_configuration_collection import ExadataConfigurationCollection +from .exadata_configuration_summary import ExadataConfigurationSummary +from .exadata_database_machine_configuration_summary import ExadataDatabaseMachineConfigurationSummary +from .exadata_database_statistics_summary import ExadataDatabaseStatisticsSummary +from .exadata_details import ExadataDetails +from .exadata_diskgroup_statistics_summary import ExadataDiskgroupStatisticsSummary +from .exadata_host_statistics_summary import ExadataHostStatisticsSummary +from .exadata_insight import ExadataInsight +from .exadata_insight_resource_capacity_trend_aggregation import ExadataInsightResourceCapacityTrendAggregation +from .exadata_insight_resource_capacity_trend_summary import ExadataInsightResourceCapacityTrendSummary +from .exadata_insight_resource_forecast_trend_summary import ExadataInsightResourceForecastTrendSummary +from .exadata_insight_resource_insight_utilization_item import ExadataInsightResourceInsightUtilizationItem +from .exadata_insight_resource_statistics import ExadataInsightResourceStatistics +from .exadata_insight_resource_statistics_aggregation import ExadataInsightResourceStatisticsAggregation +from .exadata_insight_summary import ExadataInsightSummary +from .exadata_insight_summary_collection import ExadataInsightSummaryCollection +from .exadata_insights import ExadataInsights +from .exadata_member_collection import ExadataMemberCollection +from .exadata_member_summary import ExadataMemberSummary +from .exadata_storage_server_statistics_summary import ExadataStorageServerStatisticsSummary from .historical_data_item import HistoricalDataItem +from .host_configuration_collection import HostConfigurationCollection from .host_configuration_metric_group import HostConfigurationMetricGroup +from .host_configuration_summary import HostConfigurationSummary from .host_cpu_hardware_configuration import HostCpuHardwareConfiguration from .host_cpu_statistics import HostCpuStatistics from .host_cpu_usage import HostCpuUsage @@ -83,9 +121,11 @@ from .ingest_sql_plan_lines_response_details import IngestSqlPlanLinesResponseDetails from .ingest_sql_text_details import IngestSqlTextDetails from .ingest_sql_text_response_details import IngestSqlTextResponseDetails +from .instance_metrics import InstanceMetrics from .macs_managed_external_database_configuration_summary import MacsManagedExternalDatabaseConfigurationSummary from .macs_managed_external_database_insight import MacsManagedExternalDatabaseInsight from .macs_managed_external_database_insight_summary import MacsManagedExternalDatabaseInsightSummary +from .macs_managed_external_host_configuration_summary import MacsManagedExternalHostConfigurationSummary from .macs_managed_external_host_insight import MacsManagedExternalHostInsight from .macs_managed_external_host_insight_summary import MacsManagedExternalHostInsightSummary from .projected_data_item import ProjectedDataItem @@ -95,6 +135,7 @@ from .resource_insight_projected_utilization_item import ResourceInsightProjectedUtilizationItem from .resource_statistics import ResourceStatistics from .resource_statistics_aggregation import ResourceStatisticsAggregation +from .resource_usage_summary import ResourceUsageSummary from .resource_usage_trend_aggregation import ResourceUsageTrendAggregation from .sql_bucket import SqlBucket from .sql_insight_aggregation import SqlInsightAggregation @@ -122,6 +163,7 @@ from .sql_text import SqlText from .sql_text_collection import SqlTextCollection from .sql_text_summary import SqlTextSummary +from .storage_server_details import StorageServerDetails from .summarize_database_insight_resource_capacity_trend_aggregation_collection import SummarizeDatabaseInsightResourceCapacityTrendAggregationCollection from .summarize_database_insight_resource_forecast_trend_aggregation import SummarizeDatabaseInsightResourceForecastTrendAggregation from .summarize_database_insight_resource_statistics_aggregation_collection import SummarizeDatabaseInsightResourceStatisticsAggregationCollection @@ -129,6 +171,14 @@ from .summarize_database_insight_resource_usage_trend_aggregation_collection import SummarizeDatabaseInsightResourceUsageTrendAggregationCollection from .summarize_database_insight_resource_utilization_insight_aggregation import SummarizeDatabaseInsightResourceUtilizationInsightAggregation from .summarize_database_insight_tablespace_usage_trend_aggregation_collection import SummarizeDatabaseInsightTablespaceUsageTrendAggregationCollection +from .summarize_exadata_insight_resource_capacity_trend_aggregation import SummarizeExadataInsightResourceCapacityTrendAggregation +from .summarize_exadata_insight_resource_capacity_trend_collection import SummarizeExadataInsightResourceCapacityTrendCollection +from .summarize_exadata_insight_resource_forecast_trend_aggregation import SummarizeExadataInsightResourceForecastTrendAggregation +from .summarize_exadata_insight_resource_forecast_trend_collection import SummarizeExadataInsightResourceForecastTrendCollection +from .summarize_exadata_insight_resource_statistics_aggregation_collection import SummarizeExadataInsightResourceStatisticsAggregationCollection +from .summarize_exadata_insight_resource_usage_aggregation import SummarizeExadataInsightResourceUsageAggregation +from .summarize_exadata_insight_resource_usage_collection import SummarizeExadataInsightResourceUsageCollection +from .summarize_exadata_insight_resource_utilization_insight_aggregation import SummarizeExadataInsightResourceUtilizationInsightAggregation from .summarize_host_insight_resource_capacity_trend_aggregation_collection import SummarizeHostInsightResourceCapacityTrendAggregationCollection from .summarize_host_insight_resource_forecast_trend_aggregation import SummarizeHostInsightResourceForecastTrendAggregation from .summarize_host_insight_resource_statistics_aggregation_collection import SummarizeHostInsightResourceStatisticsAggregationCollection @@ -141,7 +191,10 @@ from .update_autonomous_database_insight_details import UpdateAutonomousDatabaseInsightDetails from .update_database_insight_details import UpdateDatabaseInsightDetails from .update_em_managed_external_database_insight_details import UpdateEmManagedExternalDatabaseInsightDetails +from .update_em_managed_external_exadata_insight_details import UpdateEmManagedExternalExadataInsightDetails +from .update_em_managed_external_host_insight_details import UpdateEmManagedExternalHostInsightDetails from .update_enterprise_manager_bridge_details import UpdateEnterpriseManagerBridgeDetails +from .update_exadata_insight_details import UpdateExadataInsightDetails from .update_host_insight_details import UpdateHostInsightDetails from .update_macs_managed_external_database_insight_details import UpdateMacsManagedExternalDatabaseInsightDetails from .update_macs_managed_external_host_insight_details import UpdateMacsManagedExternalHostInsightDetails @@ -156,16 +209,23 @@ # Maps type names to classes for opsi services. opsi_type_mapping = { + "AddEmManagedExternalExadataInsightMembersDetails": AddEmManagedExternalExadataInsightMembersDetails, + "AddExadataInsightMembersDetails": AddExadataInsightMembersDetails, "AutonomousDatabaseConfigurationSummary": AutonomousDatabaseConfigurationSummary, "AutonomousDatabaseInsight": AutonomousDatabaseInsight, "AutonomousDatabaseInsightSummary": AutonomousDatabaseInsightSummary, "ChangeDatabaseInsightCompartmentDetails": ChangeDatabaseInsightCompartmentDetails, "ChangeEnterpriseManagerBridgeCompartmentDetails": ChangeEnterpriseManagerBridgeCompartmentDetails, + "ChangeExadataInsightCompartmentDetails": ChangeExadataInsightCompartmentDetails, "ChangeHostInsightCompartmentDetails": ChangeHostInsightCompartmentDetails, "ConnectionDetails": ConnectionDetails, "CreateDatabaseInsightDetails": CreateDatabaseInsightDetails, "CreateEmManagedExternalDatabaseInsightDetails": CreateEmManagedExternalDatabaseInsightDetails, + "CreateEmManagedExternalExadataInsightDetails": CreateEmManagedExternalExadataInsightDetails, + "CreateEmManagedExternalExadataMemberEntityDetails": CreateEmManagedExternalExadataMemberEntityDetails, + "CreateEmManagedExternalHostInsightDetails": CreateEmManagedExternalHostInsightDetails, "CreateEnterpriseManagerBridgeDetails": CreateEnterpriseManagerBridgeDetails, + "CreateExadataInsightDetails": CreateExadataInsightDetails, "CreateHostInsightDetails": CreateHostInsightDetails, "CreateMacsManagedExternalHostInsightDetails": CreateMacsManagedExternalHostInsightDetails, "CredentialDetails": CredentialDetails, @@ -181,19 +241,50 @@ "DatabaseInsightSummary": DatabaseInsightSummary, "DatabaseInsights": DatabaseInsights, "DatabaseInsightsCollection": DatabaseInsightsCollection, + "DiskGroupDetails": DiskGroupDetails, "EmManagedExternalDatabaseConfigurationSummary": EmManagedExternalDatabaseConfigurationSummary, "EmManagedExternalDatabaseInsight": EmManagedExternalDatabaseInsight, "EmManagedExternalDatabaseInsightSummary": EmManagedExternalDatabaseInsightSummary, + "EmManagedExternalExadataInsight": EmManagedExternalExadataInsight, + "EmManagedExternalExadataInsightSummary": EmManagedExternalExadataInsightSummary, + "EmManagedExternalHostConfigurationSummary": EmManagedExternalHostConfigurationSummary, + "EmManagedExternalHostInsight": EmManagedExternalHostInsight, + "EmManagedExternalHostInsightSummary": EmManagedExternalHostInsightSummary, "EnableDatabaseInsightDetails": EnableDatabaseInsightDetails, "EnableEmManagedExternalDatabaseInsightDetails": EnableEmManagedExternalDatabaseInsightDetails, + "EnableEmManagedExternalExadataInsightDetails": EnableEmManagedExternalExadataInsightDetails, + "EnableEmManagedExternalHostInsightDetails": EnableEmManagedExternalHostInsightDetails, + "EnableExadataInsightDetails": EnableExadataInsightDetails, "EnableHostInsightDetails": EnableHostInsightDetails, "EnableMacsManagedExternalHostInsightDetails": EnableMacsManagedExternalHostInsightDetails, "EnterpriseManagerBridge": EnterpriseManagerBridge, "EnterpriseManagerBridgeCollection": EnterpriseManagerBridgeCollection, "EnterpriseManagerBridgeSummary": EnterpriseManagerBridgeSummary, "EnterpriseManagerBridges": EnterpriseManagerBridges, + "ExadataConfigurationCollection": ExadataConfigurationCollection, + "ExadataConfigurationSummary": ExadataConfigurationSummary, + "ExadataDatabaseMachineConfigurationSummary": ExadataDatabaseMachineConfigurationSummary, + "ExadataDatabaseStatisticsSummary": ExadataDatabaseStatisticsSummary, + "ExadataDetails": ExadataDetails, + "ExadataDiskgroupStatisticsSummary": ExadataDiskgroupStatisticsSummary, + "ExadataHostStatisticsSummary": ExadataHostStatisticsSummary, + "ExadataInsight": ExadataInsight, + "ExadataInsightResourceCapacityTrendAggregation": ExadataInsightResourceCapacityTrendAggregation, + "ExadataInsightResourceCapacityTrendSummary": ExadataInsightResourceCapacityTrendSummary, + "ExadataInsightResourceForecastTrendSummary": ExadataInsightResourceForecastTrendSummary, + "ExadataInsightResourceInsightUtilizationItem": ExadataInsightResourceInsightUtilizationItem, + "ExadataInsightResourceStatistics": ExadataInsightResourceStatistics, + "ExadataInsightResourceStatisticsAggregation": ExadataInsightResourceStatisticsAggregation, + "ExadataInsightSummary": ExadataInsightSummary, + "ExadataInsightSummaryCollection": ExadataInsightSummaryCollection, + "ExadataInsights": ExadataInsights, + "ExadataMemberCollection": ExadataMemberCollection, + "ExadataMemberSummary": ExadataMemberSummary, + "ExadataStorageServerStatisticsSummary": ExadataStorageServerStatisticsSummary, "HistoricalDataItem": HistoricalDataItem, + "HostConfigurationCollection": HostConfigurationCollection, "HostConfigurationMetricGroup": HostConfigurationMetricGroup, + "HostConfigurationSummary": HostConfigurationSummary, "HostCpuHardwareConfiguration": HostCpuHardwareConfiguration, "HostCpuStatistics": HostCpuStatistics, "HostCpuUsage": HostCpuUsage, @@ -235,9 +326,11 @@ "IngestSqlPlanLinesResponseDetails": IngestSqlPlanLinesResponseDetails, "IngestSqlTextDetails": IngestSqlTextDetails, "IngestSqlTextResponseDetails": IngestSqlTextResponseDetails, + "InstanceMetrics": InstanceMetrics, "MacsManagedExternalDatabaseConfigurationSummary": MacsManagedExternalDatabaseConfigurationSummary, "MacsManagedExternalDatabaseInsight": MacsManagedExternalDatabaseInsight, "MacsManagedExternalDatabaseInsightSummary": MacsManagedExternalDatabaseInsightSummary, + "MacsManagedExternalHostConfigurationSummary": MacsManagedExternalHostConfigurationSummary, "MacsManagedExternalHostInsight": MacsManagedExternalHostInsight, "MacsManagedExternalHostInsightSummary": MacsManagedExternalHostInsightSummary, "ProjectedDataItem": ProjectedDataItem, @@ -247,6 +340,7 @@ "ResourceInsightProjectedUtilizationItem": ResourceInsightProjectedUtilizationItem, "ResourceStatistics": ResourceStatistics, "ResourceStatisticsAggregation": ResourceStatisticsAggregation, + "ResourceUsageSummary": ResourceUsageSummary, "ResourceUsageTrendAggregation": ResourceUsageTrendAggregation, "SqlBucket": SqlBucket, "SqlInsightAggregation": SqlInsightAggregation, @@ -274,6 +368,7 @@ "SqlText": SqlText, "SqlTextCollection": SqlTextCollection, "SqlTextSummary": SqlTextSummary, + "StorageServerDetails": StorageServerDetails, "SummarizeDatabaseInsightResourceCapacityTrendAggregationCollection": SummarizeDatabaseInsightResourceCapacityTrendAggregationCollection, "SummarizeDatabaseInsightResourceForecastTrendAggregation": SummarizeDatabaseInsightResourceForecastTrendAggregation, "SummarizeDatabaseInsightResourceStatisticsAggregationCollection": SummarizeDatabaseInsightResourceStatisticsAggregationCollection, @@ -281,6 +376,14 @@ "SummarizeDatabaseInsightResourceUsageTrendAggregationCollection": SummarizeDatabaseInsightResourceUsageTrendAggregationCollection, "SummarizeDatabaseInsightResourceUtilizationInsightAggregation": SummarizeDatabaseInsightResourceUtilizationInsightAggregation, "SummarizeDatabaseInsightTablespaceUsageTrendAggregationCollection": SummarizeDatabaseInsightTablespaceUsageTrendAggregationCollection, + "SummarizeExadataInsightResourceCapacityTrendAggregation": SummarizeExadataInsightResourceCapacityTrendAggregation, + "SummarizeExadataInsightResourceCapacityTrendCollection": SummarizeExadataInsightResourceCapacityTrendCollection, + "SummarizeExadataInsightResourceForecastTrendAggregation": SummarizeExadataInsightResourceForecastTrendAggregation, + "SummarizeExadataInsightResourceForecastTrendCollection": SummarizeExadataInsightResourceForecastTrendCollection, + "SummarizeExadataInsightResourceStatisticsAggregationCollection": SummarizeExadataInsightResourceStatisticsAggregationCollection, + "SummarizeExadataInsightResourceUsageAggregation": SummarizeExadataInsightResourceUsageAggregation, + "SummarizeExadataInsightResourceUsageCollection": SummarizeExadataInsightResourceUsageCollection, + "SummarizeExadataInsightResourceUtilizationInsightAggregation": SummarizeExadataInsightResourceUtilizationInsightAggregation, "SummarizeHostInsightResourceCapacityTrendAggregationCollection": SummarizeHostInsightResourceCapacityTrendAggregationCollection, "SummarizeHostInsightResourceForecastTrendAggregation": SummarizeHostInsightResourceForecastTrendAggregation, "SummarizeHostInsightResourceStatisticsAggregationCollection": SummarizeHostInsightResourceStatisticsAggregationCollection, @@ -293,7 +396,10 @@ "UpdateAutonomousDatabaseInsightDetails": UpdateAutonomousDatabaseInsightDetails, "UpdateDatabaseInsightDetails": UpdateDatabaseInsightDetails, "UpdateEmManagedExternalDatabaseInsightDetails": UpdateEmManagedExternalDatabaseInsightDetails, + "UpdateEmManagedExternalExadataInsightDetails": UpdateEmManagedExternalExadataInsightDetails, + "UpdateEmManagedExternalHostInsightDetails": UpdateEmManagedExternalHostInsightDetails, "UpdateEnterpriseManagerBridgeDetails": UpdateEnterpriseManagerBridgeDetails, + "UpdateExadataInsightDetails": UpdateExadataInsightDetails, "UpdateHostInsightDetails": UpdateHostInsightDetails, "UpdateMacsManagedExternalDatabaseInsightDetails": UpdateMacsManagedExternalDatabaseInsightDetails, "UpdateMacsManagedExternalHostInsightDetails": UpdateMacsManagedExternalHostInsightDetails, diff --git a/src/oci/opsi/models/add_em_managed_external_exadata_insight_members_details.py b/src/oci/opsi/models/add_em_managed_external_exadata_insight_members_details.py new file mode 100644 index 0000000000..a1ff504140 --- /dev/null +++ b/src/oci/opsi/models/add_em_managed_external_exadata_insight_members_details.py @@ -0,0 +1,76 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .add_exadata_insight_members_details import AddExadataInsightMembersDetails +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 AddEmManagedExternalExadataInsightMembersDetails(AddExadataInsightMembersDetails): + """ + The information about the members of Exadata system to be added. If memberEntityDetails is not specified, the the Enterprise Manager entity (e.g. databases and hosts) associated with an Exadata system will be placed in the same compartment as the Exadata system. + """ + + def __init__(self, **kwargs): + """ + Initializes a new AddEmManagedExternalExadataInsightMembersDetails object with values from keyword arguments. The default value of the :py:attr:`~oci.opsi.models.AddEmManagedExternalExadataInsightMembersDetails.entity_source` attribute + of this class is ``EM_MANAGED_EXTERNAL_EXADATA`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param entity_source: + The value to assign to the entity_source property of this AddEmManagedExternalExadataInsightMembersDetails. + Allowed values for this property are: "EM_MANAGED_EXTERNAL_EXADATA" + :type entity_source: str + + :param member_entity_details: + The value to assign to the member_entity_details property of this AddEmManagedExternalExadataInsightMembersDetails. + :type member_entity_details: list[oci.opsi.models.CreateEmManagedExternalExadataMemberEntityDetails] + + """ + self.swagger_types = { + 'entity_source': 'str', + 'member_entity_details': 'list[CreateEmManagedExternalExadataMemberEntityDetails]' + } + + self.attribute_map = { + 'entity_source': 'entitySource', + 'member_entity_details': 'memberEntityDetails' + } + + self._entity_source = None + self._member_entity_details = None + self._entity_source = 'EM_MANAGED_EXTERNAL_EXADATA' + + @property + def member_entity_details(self): + """ + Gets the member_entity_details of this AddEmManagedExternalExadataInsightMembersDetails. + + :return: The member_entity_details of this AddEmManagedExternalExadataInsightMembersDetails. + :rtype: list[oci.opsi.models.CreateEmManagedExternalExadataMemberEntityDetails] + """ + return self._member_entity_details + + @member_entity_details.setter + def member_entity_details(self, member_entity_details): + """ + Sets the member_entity_details of this AddEmManagedExternalExadataInsightMembersDetails. + + :param member_entity_details: The member_entity_details of this AddEmManagedExternalExadataInsightMembersDetails. + :type: list[oci.opsi.models.CreateEmManagedExternalExadataMemberEntityDetails] + """ + self._member_entity_details = member_entity_details + + 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/opsi/models/add_exadata_insight_members_details.py b/src/oci/opsi/models/add_exadata_insight_members_details.py new file mode 100644 index 0000000000..3dad99f82f --- /dev/null +++ b/src/oci/opsi/models/add_exadata_insight_members_details.py @@ -0,0 +1,100 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 AddExadataInsightMembersDetails(object): + """ + The information about the members of Exadata system to be added. + """ + + #: A constant which can be used with the entity_source property of a AddExadataInsightMembersDetails. + #: This constant has a value of "EM_MANAGED_EXTERNAL_EXADATA" + ENTITY_SOURCE_EM_MANAGED_EXTERNAL_EXADATA = "EM_MANAGED_EXTERNAL_EXADATA" + + def __init__(self, **kwargs): + """ + Initializes a new AddExadataInsightMembersDetails object with values from keyword arguments. This class has the following subclasses and if you are using this class as input + to a service operations then you should favor using a subclass over the base class: + + * :class:`~oci.opsi.models.AddEmManagedExternalExadataInsightMembersDetails` + + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param entity_source: + The value to assign to the entity_source property of this AddExadataInsightMembersDetails. + Allowed values for this property are: "EM_MANAGED_EXTERNAL_EXADATA" + :type entity_source: str + + """ + self.swagger_types = { + 'entity_source': 'str' + } + + self.attribute_map = { + 'entity_source': 'entitySource' + } + + self._entity_source = None + + @staticmethod + def get_subtype(object_dictionary): + """ + Given the hash representation of a subtype of this class, + use the info in the hash to return the class of the subtype. + """ + type = object_dictionary['entitySource'] + + if type == 'EM_MANAGED_EXTERNAL_EXADATA': + return 'AddEmManagedExternalExadataInsightMembersDetails' + else: + return 'AddExadataInsightMembersDetails' + + @property + def entity_source(self): + """ + **[Required]** Gets the entity_source of this AddExadataInsightMembersDetails. + Source of the Exadata system. + + Allowed values for this property are: "EM_MANAGED_EXTERNAL_EXADATA" + + + :return: The entity_source of this AddExadataInsightMembersDetails. + :rtype: str + """ + return self._entity_source + + @entity_source.setter + def entity_source(self, entity_source): + """ + Sets the entity_source of this AddExadataInsightMembersDetails. + Source of the Exadata system. + + + :param entity_source: The entity_source of this AddExadataInsightMembersDetails. + :type: str + """ + allowed_values = ["EM_MANAGED_EXTERNAL_EXADATA"] + if not value_allowed_none_or_none_sentinel(entity_source, allowed_values): + raise ValueError( + "Invalid value for `entity_source`, must be None or one of {0}" + .format(allowed_values) + ) + self._entity_source = entity_source + + 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/opsi/models/autonomous_database_configuration_summary.py b/src/oci/opsi/models/autonomous_database_configuration_summary.py index 8a5cb7e54d..998a0c6f50 100644 --- a/src/oci/opsi/models/autonomous_database_configuration_summary.py +++ b/src/oci/opsi/models/autonomous_database_configuration_summary.py @@ -48,6 +48,10 @@ def __init__(self, **kwargs): The value to assign to the database_version property of this AutonomousDatabaseConfigurationSummary. :type database_version: str + :param cdb_name: + The value to assign to the cdb_name property of this AutonomousDatabaseConfigurationSummary. + :type cdb_name: str + :param defined_tags: The value to assign to the defined_tags property of this AutonomousDatabaseConfigurationSummary. :type defined_tags: dict(str, dict(str, object)) @@ -73,6 +77,7 @@ def __init__(self, **kwargs): 'database_display_name': 'str', 'database_type': 'str', 'database_version': 'str', + 'cdb_name': 'str', 'defined_tags': 'dict(str, dict(str, object))', 'freeform_tags': 'dict(str, str)', 'processor_count': 'int', @@ -87,6 +92,7 @@ def __init__(self, **kwargs): 'database_display_name': 'databaseDisplayName', 'database_type': 'databaseType', 'database_version': 'databaseVersion', + 'cdb_name': 'cdbName', 'defined_tags': 'definedTags', 'freeform_tags': 'freeformTags', 'processor_count': 'processorCount', @@ -100,6 +106,7 @@ def __init__(self, **kwargs): self._database_display_name = None self._database_type = None self._database_version = None + self._cdb_name = None self._defined_tags = None self._freeform_tags = None self._processor_count = None diff --git a/src/oci/opsi/models/change_exadata_insight_compartment_details.py b/src/oci/opsi/models/change_exadata_insight_compartment_details.py new file mode 100644 index 0000000000..e37f17ca43 --- /dev/null +++ b/src/oci/opsi/models/change_exadata_insight_compartment_details.py @@ -0,0 +1,74 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 ChangeExadataInsightCompartmentDetails(object): + """ + The information to be updated. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ChangeExadataInsightCompartmentDetails 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 ChangeExadataInsightCompartmentDetails. + :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 ChangeExadataInsightCompartmentDetails. + The `OCID`__ of the compartment into which the resource should be moved. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The compartment_id of this ChangeExadataInsightCompartmentDetails. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this ChangeExadataInsightCompartmentDetails. + The `OCID`__ of the compartment into which the resource should be moved. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param compartment_id: The compartment_id of this ChangeExadataInsightCompartmentDetails. + :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/opsi/models/create_em_managed_external_database_insight_details.py b/src/oci/opsi/models/create_em_managed_external_database_insight_details.py index 8df58481ae..14c4075add 100644 --- a/src/oci/opsi/models/create_em_managed_external_database_insight_details.py +++ b/src/oci/opsi/models/create_em_managed_external_database_insight_details.py @@ -48,6 +48,10 @@ def __init__(self, **kwargs): The value to assign to the enterprise_manager_entity_identifier property of this CreateEmManagedExternalDatabaseInsightDetails. :type enterprise_manager_entity_identifier: str + :param exadata_insight_id: + The value to assign to the exadata_insight_id property of this CreateEmManagedExternalDatabaseInsightDetails. + :type exadata_insight_id: str + """ self.swagger_types = { 'entity_source': 'str', @@ -56,7 +60,8 @@ def __init__(self, **kwargs): 'defined_tags': 'dict(str, dict(str, object))', 'enterprise_manager_identifier': 'str', 'enterprise_manager_bridge_id': 'str', - 'enterprise_manager_entity_identifier': 'str' + 'enterprise_manager_entity_identifier': 'str', + 'exadata_insight_id': 'str' } self.attribute_map = { @@ -66,7 +71,8 @@ def __init__(self, **kwargs): 'defined_tags': 'definedTags', 'enterprise_manager_identifier': 'enterpriseManagerIdentifier', 'enterprise_manager_bridge_id': 'enterpriseManagerBridgeId', - 'enterprise_manager_entity_identifier': 'enterpriseManagerEntityIdentifier' + 'enterprise_manager_entity_identifier': 'enterpriseManagerEntityIdentifier', + 'exadata_insight_id': 'exadataInsightId' } self._entity_source = None @@ -76,6 +82,7 @@ def __init__(self, **kwargs): self._enterprise_manager_identifier = None self._enterprise_manager_bridge_id = None self._enterprise_manager_entity_identifier = None + self._exadata_insight_id = None self._entity_source = 'EM_MANAGED_EXTERNAL_DATABASE' @property @@ -150,6 +157,34 @@ def enterprise_manager_entity_identifier(self, enterprise_manager_entity_identif """ self._enterprise_manager_entity_identifier = enterprise_manager_entity_identifier + @property + def exadata_insight_id(self): + """ + Gets the exadata_insight_id of this CreateEmManagedExternalDatabaseInsightDetails. + The `OCID`__ of the Exadata insight. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The exadata_insight_id of this CreateEmManagedExternalDatabaseInsightDetails. + :rtype: str + """ + return self._exadata_insight_id + + @exadata_insight_id.setter + def exadata_insight_id(self, exadata_insight_id): + """ + Sets the exadata_insight_id of this CreateEmManagedExternalDatabaseInsightDetails. + The `OCID`__ of the Exadata insight. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param exadata_insight_id: The exadata_insight_id of this CreateEmManagedExternalDatabaseInsightDetails. + :type: str + """ + self._exadata_insight_id = exadata_insight_id + def __repr__(self): return formatted_flat_dict(self) diff --git a/src/oci/opsi/models/create_em_managed_external_exadata_insight_details.py b/src/oci/opsi/models/create_em_managed_external_exadata_insight_details.py new file mode 100644 index 0000000000..2b85fa9eda --- /dev/null +++ b/src/oci/opsi/models/create_em_managed_external_exadata_insight_details.py @@ -0,0 +1,221 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .create_exadata_insight_details import CreateExadataInsightDetails +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 CreateEmManagedExternalExadataInsightDetails(CreateExadataInsightDetails): + """ + The information about the Exadata system to be analyzed. If memberEntityDetails is not specified, the the Enterprise Manager entity (e.g. databases and hosts) associated with an Exadata system will be placed in the same compartment as the Exadata system. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CreateEmManagedExternalExadataInsightDetails object with values from keyword arguments. The default value of the :py:attr:`~oci.opsi.models.CreateEmManagedExternalExadataInsightDetails.entity_source` attribute + of this class is ``EM_MANAGED_EXTERNAL_EXADATA`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param entity_source: + The value to assign to the entity_source property of this CreateEmManagedExternalExadataInsightDetails. + Allowed values for this property are: "EM_MANAGED_EXTERNAL_EXADATA" + :type entity_source: str + + :param compartment_id: + The value to assign to the compartment_id property of this CreateEmManagedExternalExadataInsightDetails. + :type compartment_id: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this CreateEmManagedExternalExadataInsightDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this CreateEmManagedExternalExadataInsightDetails. + :type defined_tags: dict(str, dict(str, object)) + + :param enterprise_manager_identifier: + The value to assign to the enterprise_manager_identifier property of this CreateEmManagedExternalExadataInsightDetails. + :type enterprise_manager_identifier: str + + :param enterprise_manager_bridge_id: + The value to assign to the enterprise_manager_bridge_id property of this CreateEmManagedExternalExadataInsightDetails. + :type enterprise_manager_bridge_id: str + + :param enterprise_manager_entity_identifier: + The value to assign to the enterprise_manager_entity_identifier property of this CreateEmManagedExternalExadataInsightDetails. + :type enterprise_manager_entity_identifier: str + + :param member_entity_details: + The value to assign to the member_entity_details property of this CreateEmManagedExternalExadataInsightDetails. + :type member_entity_details: list[oci.opsi.models.CreateEmManagedExternalExadataMemberEntityDetails] + + :param is_auto_sync_enabled: + The value to assign to the is_auto_sync_enabled property of this CreateEmManagedExternalExadataInsightDetails. + :type is_auto_sync_enabled: bool + + """ + self.swagger_types = { + 'entity_source': 'str', + 'compartment_id': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'enterprise_manager_identifier': 'str', + 'enterprise_manager_bridge_id': 'str', + 'enterprise_manager_entity_identifier': 'str', + 'member_entity_details': 'list[CreateEmManagedExternalExadataMemberEntityDetails]', + 'is_auto_sync_enabled': 'bool' + } + + self.attribute_map = { + 'entity_source': 'entitySource', + 'compartment_id': 'compartmentId', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'enterprise_manager_identifier': 'enterpriseManagerIdentifier', + 'enterprise_manager_bridge_id': 'enterpriseManagerBridgeId', + 'enterprise_manager_entity_identifier': 'enterpriseManagerEntityIdentifier', + 'member_entity_details': 'memberEntityDetails', + 'is_auto_sync_enabled': 'isAutoSyncEnabled' + } + + self._entity_source = None + self._compartment_id = None + self._freeform_tags = None + self._defined_tags = None + self._enterprise_manager_identifier = None + self._enterprise_manager_bridge_id = None + self._enterprise_manager_entity_identifier = None + self._member_entity_details = None + self._is_auto_sync_enabled = None + self._entity_source = 'EM_MANAGED_EXTERNAL_EXADATA' + + @property + def enterprise_manager_identifier(self): + """ + **[Required]** Gets the enterprise_manager_identifier of this CreateEmManagedExternalExadataInsightDetails. + Enterprise Manager Unique Identifier + + + :return: The enterprise_manager_identifier of this CreateEmManagedExternalExadataInsightDetails. + :rtype: str + """ + return self._enterprise_manager_identifier + + @enterprise_manager_identifier.setter + def enterprise_manager_identifier(self, enterprise_manager_identifier): + """ + Sets the enterprise_manager_identifier of this CreateEmManagedExternalExadataInsightDetails. + Enterprise Manager Unique Identifier + + + :param enterprise_manager_identifier: The enterprise_manager_identifier of this CreateEmManagedExternalExadataInsightDetails. + :type: str + """ + self._enterprise_manager_identifier = enterprise_manager_identifier + + @property + def enterprise_manager_bridge_id(self): + """ + **[Required]** Gets the enterprise_manager_bridge_id of this CreateEmManagedExternalExadataInsightDetails. + OPSI Enterprise Manager Bridge OCID + + + :return: The enterprise_manager_bridge_id of this CreateEmManagedExternalExadataInsightDetails. + :rtype: str + """ + return self._enterprise_manager_bridge_id + + @enterprise_manager_bridge_id.setter + def enterprise_manager_bridge_id(self, enterprise_manager_bridge_id): + """ + Sets the enterprise_manager_bridge_id of this CreateEmManagedExternalExadataInsightDetails. + OPSI Enterprise Manager Bridge OCID + + + :param enterprise_manager_bridge_id: The enterprise_manager_bridge_id of this CreateEmManagedExternalExadataInsightDetails. + :type: str + """ + self._enterprise_manager_bridge_id = enterprise_manager_bridge_id + + @property + def enterprise_manager_entity_identifier(self): + """ + **[Required]** Gets the enterprise_manager_entity_identifier of this CreateEmManagedExternalExadataInsightDetails. + Enterprise Manager Entity Unique Identifier + + + :return: The enterprise_manager_entity_identifier of this CreateEmManagedExternalExadataInsightDetails. + :rtype: str + """ + return self._enterprise_manager_entity_identifier + + @enterprise_manager_entity_identifier.setter + def enterprise_manager_entity_identifier(self, enterprise_manager_entity_identifier): + """ + Sets the enterprise_manager_entity_identifier of this CreateEmManagedExternalExadataInsightDetails. + Enterprise Manager Entity Unique Identifier + + + :param enterprise_manager_entity_identifier: The enterprise_manager_entity_identifier of this CreateEmManagedExternalExadataInsightDetails. + :type: str + """ + self._enterprise_manager_entity_identifier = enterprise_manager_entity_identifier + + @property + def member_entity_details(self): + """ + Gets the member_entity_details of this CreateEmManagedExternalExadataInsightDetails. + + :return: The member_entity_details of this CreateEmManagedExternalExadataInsightDetails. + :rtype: list[oci.opsi.models.CreateEmManagedExternalExadataMemberEntityDetails] + """ + return self._member_entity_details + + @member_entity_details.setter + def member_entity_details(self, member_entity_details): + """ + Sets the member_entity_details of this CreateEmManagedExternalExadataInsightDetails. + + :param member_entity_details: The member_entity_details of this CreateEmManagedExternalExadataInsightDetails. + :type: list[oci.opsi.models.CreateEmManagedExternalExadataMemberEntityDetails] + """ + self._member_entity_details = member_entity_details + + @property + def is_auto_sync_enabled(self): + """ + Gets the is_auto_sync_enabled of this CreateEmManagedExternalExadataInsightDetails. + Set to true to enable automatic enablement and disablement of related targets from Enterprise Manager. New resources (e.g. Database Insights) will be placed in the same compartment as the related Exadata Insight. + + + :return: The is_auto_sync_enabled of this CreateEmManagedExternalExadataInsightDetails. + :rtype: bool + """ + return self._is_auto_sync_enabled + + @is_auto_sync_enabled.setter + def is_auto_sync_enabled(self, is_auto_sync_enabled): + """ + Sets the is_auto_sync_enabled of this CreateEmManagedExternalExadataInsightDetails. + Set to true to enable automatic enablement and disablement of related targets from Enterprise Manager. New resources (e.g. Database Insights) will be placed in the same compartment as the related Exadata Insight. + + + :param is_auto_sync_enabled: The is_auto_sync_enabled of this CreateEmManagedExternalExadataInsightDetails. + :type: bool + """ + self._is_auto_sync_enabled = is_auto_sync_enabled + + 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/opsi/models/create_em_managed_external_exadata_member_entity_details.py b/src/oci/opsi/models/create_em_managed_external_exadata_member_entity_details.py new file mode 100644 index 0000000000..b338f09d8b --- /dev/null +++ b/src/oci/opsi/models/create_em_managed_external_exadata_member_entity_details.py @@ -0,0 +1,107 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 CreateEmManagedExternalExadataMemberEntityDetails(object): + """ + Compartment `OCID`__ of the Enterprise Manager member entity (e.g. databases and hosts) associated with an Exadata system. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + """ + + def __init__(self, **kwargs): + """ + Initializes a new CreateEmManagedExternalExadataMemberEntityDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param enterprise_manager_entity_identifier: + The value to assign to the enterprise_manager_entity_identifier property of this CreateEmManagedExternalExadataMemberEntityDetails. + :type enterprise_manager_entity_identifier: str + + :param compartment_id: + The value to assign to the compartment_id property of this CreateEmManagedExternalExadataMemberEntityDetails. + :type compartment_id: str + + """ + self.swagger_types = { + 'enterprise_manager_entity_identifier': 'str', + 'compartment_id': 'str' + } + + self.attribute_map = { + 'enterprise_manager_entity_identifier': 'enterpriseManagerEntityIdentifier', + 'compartment_id': 'compartmentId' + } + + self._enterprise_manager_entity_identifier = None + self._compartment_id = None + + @property + def enterprise_manager_entity_identifier(self): + """ + **[Required]** Gets the enterprise_manager_entity_identifier of this CreateEmManagedExternalExadataMemberEntityDetails. + Enterprise Manager Entity Unique Identifier + + + :return: The enterprise_manager_entity_identifier of this CreateEmManagedExternalExadataMemberEntityDetails. + :rtype: str + """ + return self._enterprise_manager_entity_identifier + + @enterprise_manager_entity_identifier.setter + def enterprise_manager_entity_identifier(self, enterprise_manager_entity_identifier): + """ + Sets the enterprise_manager_entity_identifier of this CreateEmManagedExternalExadataMemberEntityDetails. + Enterprise Manager Entity Unique Identifier + + + :param enterprise_manager_entity_identifier: The enterprise_manager_entity_identifier of this CreateEmManagedExternalExadataMemberEntityDetails. + :type: str + """ + self._enterprise_manager_entity_identifier = enterprise_manager_entity_identifier + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this CreateEmManagedExternalExadataMemberEntityDetails. + The `OCID`__ of the compartment. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The compartment_id of this CreateEmManagedExternalExadataMemberEntityDetails. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this CreateEmManagedExternalExadataMemberEntityDetails. + The `OCID`__ of the compartment. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param compartment_id: The compartment_id of this CreateEmManagedExternalExadataMemberEntityDetails. + :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/opsi/models/create_em_managed_external_host_insight_details.py b/src/oci/opsi/models/create_em_managed_external_host_insight_details.py new file mode 100644 index 0000000000..c63ceecfbb --- /dev/null +++ b/src/oci/opsi/models/create_em_managed_external_host_insight_details.py @@ -0,0 +1,198 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .create_host_insight_details import CreateHostInsightDetails +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 CreateEmManagedExternalHostInsightDetails(CreateHostInsightDetails): + """ + The information about the EM-managed external host to be analyzed. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CreateEmManagedExternalHostInsightDetails object with values from keyword arguments. The default value of the :py:attr:`~oci.opsi.models.CreateEmManagedExternalHostInsightDetails.entity_source` attribute + of this class is ``EM_MANAGED_EXTERNAL_HOST`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param entity_source: + The value to assign to the entity_source property of this CreateEmManagedExternalHostInsightDetails. + Allowed values for this property are: "MACS_MANAGED_EXTERNAL_HOST", "EM_MANAGED_EXTERNAL_HOST" + :type entity_source: str + + :param compartment_id: + The value to assign to the compartment_id property of this CreateEmManagedExternalHostInsightDetails. + :type compartment_id: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this CreateEmManagedExternalHostInsightDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this CreateEmManagedExternalHostInsightDetails. + :type defined_tags: dict(str, dict(str, object)) + + :param enterprise_manager_identifier: + The value to assign to the enterprise_manager_identifier property of this CreateEmManagedExternalHostInsightDetails. + :type enterprise_manager_identifier: str + + :param enterprise_manager_bridge_id: + The value to assign to the enterprise_manager_bridge_id property of this CreateEmManagedExternalHostInsightDetails. + :type enterprise_manager_bridge_id: str + + :param enterprise_manager_entity_identifier: + The value to assign to the enterprise_manager_entity_identifier property of this CreateEmManagedExternalHostInsightDetails. + :type enterprise_manager_entity_identifier: str + + :param exadata_insight_id: + The value to assign to the exadata_insight_id property of this CreateEmManagedExternalHostInsightDetails. + :type exadata_insight_id: str + + """ + self.swagger_types = { + 'entity_source': 'str', + 'compartment_id': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'enterprise_manager_identifier': 'str', + 'enterprise_manager_bridge_id': 'str', + 'enterprise_manager_entity_identifier': 'str', + 'exadata_insight_id': 'str' + } + + self.attribute_map = { + 'entity_source': 'entitySource', + 'compartment_id': 'compartmentId', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'enterprise_manager_identifier': 'enterpriseManagerIdentifier', + 'enterprise_manager_bridge_id': 'enterpriseManagerBridgeId', + 'enterprise_manager_entity_identifier': 'enterpriseManagerEntityIdentifier', + 'exadata_insight_id': 'exadataInsightId' + } + + self._entity_source = None + self._compartment_id = None + self._freeform_tags = None + self._defined_tags = None + self._enterprise_manager_identifier = None + self._enterprise_manager_bridge_id = None + self._enterprise_manager_entity_identifier = None + self._exadata_insight_id = None + self._entity_source = 'EM_MANAGED_EXTERNAL_HOST' + + @property + def enterprise_manager_identifier(self): + """ + **[Required]** Gets the enterprise_manager_identifier of this CreateEmManagedExternalHostInsightDetails. + Enterprise Manager Unique Identifier + + + :return: The enterprise_manager_identifier of this CreateEmManagedExternalHostInsightDetails. + :rtype: str + """ + return self._enterprise_manager_identifier + + @enterprise_manager_identifier.setter + def enterprise_manager_identifier(self, enterprise_manager_identifier): + """ + Sets the enterprise_manager_identifier of this CreateEmManagedExternalHostInsightDetails. + Enterprise Manager Unique Identifier + + + :param enterprise_manager_identifier: The enterprise_manager_identifier of this CreateEmManagedExternalHostInsightDetails. + :type: str + """ + self._enterprise_manager_identifier = enterprise_manager_identifier + + @property + def enterprise_manager_bridge_id(self): + """ + **[Required]** Gets the enterprise_manager_bridge_id of this CreateEmManagedExternalHostInsightDetails. + OPSI Enterprise Manager Bridge OCID + + + :return: The enterprise_manager_bridge_id of this CreateEmManagedExternalHostInsightDetails. + :rtype: str + """ + return self._enterprise_manager_bridge_id + + @enterprise_manager_bridge_id.setter + def enterprise_manager_bridge_id(self, enterprise_manager_bridge_id): + """ + Sets the enterprise_manager_bridge_id of this CreateEmManagedExternalHostInsightDetails. + OPSI Enterprise Manager Bridge OCID + + + :param enterprise_manager_bridge_id: The enterprise_manager_bridge_id of this CreateEmManagedExternalHostInsightDetails. + :type: str + """ + self._enterprise_manager_bridge_id = enterprise_manager_bridge_id + + @property + def enterprise_manager_entity_identifier(self): + """ + **[Required]** Gets the enterprise_manager_entity_identifier of this CreateEmManagedExternalHostInsightDetails. + Enterprise Manager Entity Unique Identifier + + + :return: The enterprise_manager_entity_identifier of this CreateEmManagedExternalHostInsightDetails. + :rtype: str + """ + return self._enterprise_manager_entity_identifier + + @enterprise_manager_entity_identifier.setter + def enterprise_manager_entity_identifier(self, enterprise_manager_entity_identifier): + """ + Sets the enterprise_manager_entity_identifier of this CreateEmManagedExternalHostInsightDetails. + Enterprise Manager Entity Unique Identifier + + + :param enterprise_manager_entity_identifier: The enterprise_manager_entity_identifier of this CreateEmManagedExternalHostInsightDetails. + :type: str + """ + self._enterprise_manager_entity_identifier = enterprise_manager_entity_identifier + + @property + def exadata_insight_id(self): + """ + Gets the exadata_insight_id of this CreateEmManagedExternalHostInsightDetails. + The `OCID`__ of the Exadata insight. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The exadata_insight_id of this CreateEmManagedExternalHostInsightDetails. + :rtype: str + """ + return self._exadata_insight_id + + @exadata_insight_id.setter + def exadata_insight_id(self, exadata_insight_id): + """ + Sets the exadata_insight_id of this CreateEmManagedExternalHostInsightDetails. + The `OCID`__ of the Exadata insight. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param exadata_insight_id: The exadata_insight_id of this CreateEmManagedExternalHostInsightDetails. + :type: str + """ + self._exadata_insight_id = exadata_insight_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/opsi/models/create_exadata_insight_details.py b/src/oci/opsi/models/create_exadata_insight_details.py new file mode 100644 index 0000000000..9732411faa --- /dev/null +++ b/src/oci/opsi/models/create_exadata_insight_details.py @@ -0,0 +1,197 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 CreateExadataInsightDetails(object): + """ + The information about the Exadata system to be analyzed. + """ + + #: A constant which can be used with the entity_source property of a CreateExadataInsightDetails. + #: This constant has a value of "EM_MANAGED_EXTERNAL_EXADATA" + ENTITY_SOURCE_EM_MANAGED_EXTERNAL_EXADATA = "EM_MANAGED_EXTERNAL_EXADATA" + + def __init__(self, **kwargs): + """ + Initializes a new CreateExadataInsightDetails object with values from keyword arguments. This class has the following subclasses and if you are using this class as input + to a service operations then you should favor using a subclass over the base class: + + * :class:`~oci.opsi.models.CreateEmManagedExternalExadataInsightDetails` + + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param entity_source: + The value to assign to the entity_source property of this CreateExadataInsightDetails. + Allowed values for this property are: "EM_MANAGED_EXTERNAL_EXADATA" + :type entity_source: str + + :param compartment_id: + The value to assign to the compartment_id property of this CreateExadataInsightDetails. + :type compartment_id: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this CreateExadataInsightDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this CreateExadataInsightDetails. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'entity_source': 'str', + 'compartment_id': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'entity_source': 'entitySource', + 'compartment_id': 'compartmentId', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._entity_source = None + self._compartment_id = None + self._freeform_tags = None + self._defined_tags = None + + @staticmethod + def get_subtype(object_dictionary): + """ + Given the hash representation of a subtype of this class, + use the info in the hash to return the class of the subtype. + """ + type = object_dictionary['entitySource'] + + if type == 'EM_MANAGED_EXTERNAL_EXADATA': + return 'CreateEmManagedExternalExadataInsightDetails' + else: + return 'CreateExadataInsightDetails' + + @property + def entity_source(self): + """ + **[Required]** Gets the entity_source of this CreateExadataInsightDetails. + Source of the Exadata system. + + Allowed values for this property are: "EM_MANAGED_EXTERNAL_EXADATA" + + + :return: The entity_source of this CreateExadataInsightDetails. + :rtype: str + """ + return self._entity_source + + @entity_source.setter + def entity_source(self, entity_source): + """ + Sets the entity_source of this CreateExadataInsightDetails. + Source of the Exadata system. + + + :param entity_source: The entity_source of this CreateExadataInsightDetails. + :type: str + """ + allowed_values = ["EM_MANAGED_EXTERNAL_EXADATA"] + if not value_allowed_none_or_none_sentinel(entity_source, allowed_values): + raise ValueError( + "Invalid value for `entity_source`, must be None or one of {0}" + .format(allowed_values) + ) + self._entity_source = entity_source + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this CreateExadataInsightDetails. + Compartment Identifier of Exadata insight + + + :return: The compartment_id of this CreateExadataInsightDetails. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this CreateExadataInsightDetails. + Compartment Identifier of Exadata insight + + + :param compartment_id: The compartment_id of this CreateExadataInsightDetails. + :type: str + """ + self._compartment_id = compartment_id + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this CreateExadataInsightDetails. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + Example: `{\"bar-key\": \"value\"}` + + + :return: The freeform_tags of this CreateExadataInsightDetails. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this CreateExadataInsightDetails. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + Example: `{\"bar-key\": \"value\"}` + + + :param freeform_tags: The freeform_tags of this CreateExadataInsightDetails. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this CreateExadataInsightDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. + Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + + :return: The defined_tags of this CreateExadataInsightDetails. + :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 CreateExadataInsightDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. + Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + + :param defined_tags: The defined_tags of this CreateExadataInsightDetails. + :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/opsi/models/create_host_insight_details.py b/src/oci/opsi/models/create_host_insight_details.py index fe38bdfc30..3723e6a8b3 100644 --- a/src/oci/opsi/models/create_host_insight_details.py +++ b/src/oci/opsi/models/create_host_insight_details.py @@ -17,18 +17,23 @@ class CreateHostInsightDetails(object): #: This constant has a value of "MACS_MANAGED_EXTERNAL_HOST" ENTITY_SOURCE_MACS_MANAGED_EXTERNAL_HOST = "MACS_MANAGED_EXTERNAL_HOST" + #: A constant which can be used with the entity_source property of a CreateHostInsightDetails. + #: This constant has a value of "EM_MANAGED_EXTERNAL_HOST" + ENTITY_SOURCE_EM_MANAGED_EXTERNAL_HOST = "EM_MANAGED_EXTERNAL_HOST" + def __init__(self, **kwargs): """ Initializes a new CreateHostInsightDetails object with values from keyword arguments. This class has the following subclasses and if you are using this class as input to a service operations then you should favor using a subclass over the base class: * :class:`~oci.opsi.models.CreateMacsManagedExternalHostInsightDetails` + * :class:`~oci.opsi.models.CreateEmManagedExternalHostInsightDetails` The following keyword arguments are supported (corresponding to the getters/setters of this class): :param entity_source: The value to assign to the entity_source property of this CreateHostInsightDetails. - Allowed values for this property are: "MACS_MANAGED_EXTERNAL_HOST" + Allowed values for this property are: "MACS_MANAGED_EXTERNAL_HOST", "EM_MANAGED_EXTERNAL_HOST" :type entity_source: str :param compartment_id: @@ -73,6 +78,9 @@ def get_subtype(object_dictionary): if type == 'MACS_MANAGED_EXTERNAL_HOST': return 'CreateMacsManagedExternalHostInsightDetails' + + if type == 'EM_MANAGED_EXTERNAL_HOST': + return 'CreateEmManagedExternalHostInsightDetails' else: return 'CreateHostInsightDetails' @@ -82,7 +90,7 @@ def entity_source(self): **[Required]** Gets the entity_source of this CreateHostInsightDetails. Source of the host entity. - Allowed values for this property are: "MACS_MANAGED_EXTERNAL_HOST" + Allowed values for this property are: "MACS_MANAGED_EXTERNAL_HOST", "EM_MANAGED_EXTERNAL_HOST" :return: The entity_source of this CreateHostInsightDetails. @@ -100,7 +108,7 @@ def entity_source(self, entity_source): :param entity_source: The entity_source of this CreateHostInsightDetails. :type: str """ - allowed_values = ["MACS_MANAGED_EXTERNAL_HOST"] + allowed_values = ["MACS_MANAGED_EXTERNAL_HOST", "EM_MANAGED_EXTERNAL_HOST"] if not value_allowed_none_or_none_sentinel(entity_source, allowed_values): raise ValueError( "Invalid value for `entity_source`, must be None or one of {0}" diff --git a/src/oci/opsi/models/create_macs_managed_external_host_insight_details.py b/src/oci/opsi/models/create_macs_managed_external_host_insight_details.py index 95cc17b2a6..33e6ec044a 100644 --- a/src/oci/opsi/models/create_macs_managed_external_host_insight_details.py +++ b/src/oci/opsi/models/create_macs_managed_external_host_insight_details.py @@ -21,7 +21,7 @@ def __init__(self, **kwargs): :param entity_source: The value to assign to the entity_source property of this CreateMacsManagedExternalHostInsightDetails. - Allowed values for this property are: "MACS_MANAGED_EXTERNAL_HOST" + Allowed values for this property are: "MACS_MANAGED_EXTERNAL_HOST", "EM_MANAGED_EXTERNAL_HOST" :type entity_source: str :param compartment_id: diff --git a/src/oci/opsi/models/database_configuration_summary.py b/src/oci/opsi/models/database_configuration_summary.py index a8194d0af3..74f3f38728 100644 --- a/src/oci/opsi/models/database_configuration_summary.py +++ b/src/oci/opsi/models/database_configuration_summary.py @@ -66,6 +66,10 @@ def __init__(self, **kwargs): The value to assign to the database_version property of this DatabaseConfigurationSummary. :type database_version: str + :param cdb_name: + The value to assign to the cdb_name property of this DatabaseConfigurationSummary. + :type cdb_name: str + :param defined_tags: The value to assign to the defined_tags property of this DatabaseConfigurationSummary. :type defined_tags: dict(str, dict(str, object)) @@ -87,6 +91,7 @@ def __init__(self, **kwargs): 'database_display_name': 'str', 'database_type': 'str', 'database_version': 'str', + 'cdb_name': 'str', 'defined_tags': 'dict(str, dict(str, object))', 'freeform_tags': 'dict(str, str)', 'processor_count': 'int' @@ -100,6 +105,7 @@ def __init__(self, **kwargs): 'database_display_name': 'databaseDisplayName', 'database_type': 'databaseType', 'database_version': 'databaseVersion', + 'cdb_name': 'cdbName', 'defined_tags': 'definedTags', 'freeform_tags': 'freeformTags', 'processor_count': 'processorCount' @@ -112,6 +118,7 @@ def __init__(self, **kwargs): self._database_display_name = None self._database_type = None self._database_version = None + self._cdb_name = None self._defined_tags = None self._freeform_tags = None self._processor_count = None @@ -317,6 +324,30 @@ def database_version(self, database_version): """ self._database_version = database_version + @property + def cdb_name(self): + """ + **[Required]** Gets the cdb_name of this DatabaseConfigurationSummary. + Name of the CDB.Only applies to PDB. + + + :return: The cdb_name of this DatabaseConfigurationSummary. + :rtype: str + """ + return self._cdb_name + + @cdb_name.setter + def cdb_name(self, cdb_name): + """ + Sets the cdb_name of this DatabaseConfigurationSummary. + Name of the CDB.Only applies to PDB. + + + :param cdb_name: The cdb_name of this DatabaseConfigurationSummary. + :type: str + """ + self._cdb_name = cdb_name + @property def defined_tags(self): """ diff --git a/src/oci/opsi/models/database_details.py b/src/oci/opsi/models/database_details.py index 3a2023b7aa..69806fe630 100644 --- a/src/oci/opsi/models/database_details.py +++ b/src/oci/opsi/models/database_details.py @@ -46,6 +46,10 @@ def __init__(self, **kwargs): The value to assign to the instances property of this DatabaseDetails. :type instances: list[oci.opsi.models.HostInstanceMap] + :param cdb_name: + The value to assign to the cdb_name property of this DatabaseDetails. + :type cdb_name: str + """ self.swagger_types = { 'id': 'str', @@ -54,7 +58,8 @@ def __init__(self, **kwargs): 'database_display_name': 'str', 'database_type': 'str', 'database_version': 'str', - 'instances': 'list[HostInstanceMap]' + 'instances': 'list[HostInstanceMap]', + 'cdb_name': 'str' } self.attribute_map = { @@ -64,7 +69,8 @@ def __init__(self, **kwargs): 'database_display_name': 'databaseDisplayName', 'database_type': 'databaseType', 'database_version': 'databaseVersion', - 'instances': 'instances' + 'instances': 'instances', + 'cdb_name': 'cdbName' } self._id = None @@ -74,6 +80,7 @@ def __init__(self, **kwargs): self._database_type = None self._database_version = None self._instances = None + self._cdb_name = None @property def id(self): @@ -251,6 +258,30 @@ def instances(self, instances): """ self._instances = instances + @property + def cdb_name(self): + """ + Gets the cdb_name of this DatabaseDetails. + Name of the CDB.Only applies to PDB. + + + :return: The cdb_name of this DatabaseDetails. + :rtype: str + """ + return self._cdb_name + + @cdb_name.setter + def cdb_name(self, cdb_name): + """ + Sets the cdb_name of this DatabaseDetails. + Name of the CDB.Only applies to PDB. + + + :param cdb_name: The cdb_name of this DatabaseDetails. + :type: str + """ + self._cdb_name = cdb_name + def __repr__(self): return formatted_flat_dict(self) diff --git a/src/oci/opsi/models/disk_group_details.py b/src/oci/opsi/models/disk_group_details.py new file mode 100644 index 0000000000..5acd8b7824 --- /dev/null +++ b/src/oci/opsi/models/disk_group_details.py @@ -0,0 +1,101 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 DiskGroupDetails(object): + """ + Information about a diskgroup which includes diskgroup name and ASM name. + """ + + def __init__(self, **kwargs): + """ + Initializes a new DiskGroupDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param diskgroup_name: + The value to assign to the diskgroup_name property of this DiskGroupDetails. + :type diskgroup_name: str + + :param asm_name: + The value to assign to the asm_name property of this DiskGroupDetails. + :type asm_name: str + + """ + self.swagger_types = { + 'diskgroup_name': 'str', + 'asm_name': 'str' + } + + self.attribute_map = { + 'diskgroup_name': 'diskgroupName', + 'asm_name': 'asmName' + } + + self._diskgroup_name = None + self._asm_name = None + + @property + def diskgroup_name(self): + """ + **[Required]** Gets the diskgroup_name of this DiskGroupDetails. + The diskgroup name. + + + :return: The diskgroup_name of this DiskGroupDetails. + :rtype: str + """ + return self._diskgroup_name + + @diskgroup_name.setter + def diskgroup_name(self, diskgroup_name): + """ + Sets the diskgroup_name of this DiskGroupDetails. + The diskgroup name. + + + :param diskgroup_name: The diskgroup_name of this DiskGroupDetails. + :type: str + """ + self._diskgroup_name = diskgroup_name + + @property + def asm_name(self): + """ + **[Required]** Gets the asm_name of this DiskGroupDetails. + The ASM name. + + + :return: The asm_name of this DiskGroupDetails. + :rtype: str + """ + return self._asm_name + + @asm_name.setter + def asm_name(self, asm_name): + """ + Sets the asm_name of this DiskGroupDetails. + The ASM name. + + + :param asm_name: The asm_name of this DiskGroupDetails. + :type: str + """ + self._asm_name = asm_name + + 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/opsi/models/em_managed_external_database_configuration_summary.py b/src/oci/opsi/models/em_managed_external_database_configuration_summary.py index 3424b910d5..245ba9a0d4 100644 --- a/src/oci/opsi/models/em_managed_external_database_configuration_summary.py +++ b/src/oci/opsi/models/em_managed_external_database_configuration_summary.py @@ -48,6 +48,10 @@ def __init__(self, **kwargs): The value to assign to the database_version property of this EmManagedExternalDatabaseConfigurationSummary. :type database_version: str + :param cdb_name: + The value to assign to the cdb_name property of this EmManagedExternalDatabaseConfigurationSummary. + :type cdb_name: str + :param defined_tags: The value to assign to the defined_tags property of this EmManagedExternalDatabaseConfigurationSummary. :type defined_tags: dict(str, dict(str, object)) @@ -72,6 +76,10 @@ def __init__(self, **kwargs): The value to assign to the instances property of this EmManagedExternalDatabaseConfigurationSummary. :type instances: list[oci.opsi.models.HostInstanceMap] + :param exadata_details: + The value to assign to the exadata_details property of this EmManagedExternalDatabaseConfigurationSummary. + :type exadata_details: oci.opsi.models.ExadataDetails + """ self.swagger_types = { 'database_insight_id': 'str', @@ -81,12 +89,14 @@ def __init__(self, **kwargs): 'database_display_name': 'str', 'database_type': 'str', 'database_version': 'str', + 'cdb_name': 'str', 'defined_tags': 'dict(str, dict(str, object))', 'freeform_tags': 'dict(str, str)', 'processor_count': 'int', 'enterprise_manager_identifier': 'str', 'enterprise_manager_bridge_id': 'str', - 'instances': 'list[HostInstanceMap]' + 'instances': 'list[HostInstanceMap]', + 'exadata_details': 'ExadataDetails' } self.attribute_map = { @@ -97,12 +107,14 @@ def __init__(self, **kwargs): 'database_display_name': 'databaseDisplayName', 'database_type': 'databaseType', 'database_version': 'databaseVersion', + 'cdb_name': 'cdbName', 'defined_tags': 'definedTags', 'freeform_tags': 'freeformTags', 'processor_count': 'processorCount', 'enterprise_manager_identifier': 'enterpriseManagerIdentifier', 'enterprise_manager_bridge_id': 'enterpriseManagerBridgeId', - 'instances': 'instances' + 'instances': 'instances', + 'exadata_details': 'exadataDetails' } self._database_insight_id = None @@ -112,12 +124,14 @@ def __init__(self, **kwargs): self._database_display_name = None self._database_type = None self._database_version = None + self._cdb_name = None self._defined_tags = None self._freeform_tags = None self._processor_count = None self._enterprise_manager_identifier = None self._enterprise_manager_bridge_id = None self._instances = None + self._exadata_details = None self._entity_source = 'EM_MANAGED_EXTERNAL_DATABASE' @property @@ -192,6 +206,26 @@ def instances(self, instances): """ self._instances = instances + @property + def exadata_details(self): + """ + **[Required]** Gets the exadata_details of this EmManagedExternalDatabaseConfigurationSummary. + + :return: The exadata_details of this EmManagedExternalDatabaseConfigurationSummary. + :rtype: oci.opsi.models.ExadataDetails + """ + return self._exadata_details + + @exadata_details.setter + def exadata_details(self, exadata_details): + """ + Sets the exadata_details of this EmManagedExternalDatabaseConfigurationSummary. + + :param exadata_details: The exadata_details of this EmManagedExternalDatabaseConfigurationSummary. + :type: oci.opsi.models.ExadataDetails + """ + self._exadata_details = exadata_details + def __repr__(self): return formatted_flat_dict(self) diff --git a/src/oci/opsi/models/em_managed_external_database_insight.py b/src/oci/opsi/models/em_managed_external_database_insight.py index 54a12301d4..d1e8423978 100644 --- a/src/oci/opsi/models/em_managed_external_database_insight.py +++ b/src/oci/opsi/models/em_managed_external_database_insight.py @@ -102,6 +102,10 @@ def __init__(self, **kwargs): The value to assign to the enterprise_manager_bridge_id property of this EmManagedExternalDatabaseInsight. :type enterprise_manager_bridge_id: str + :param exadata_insight_id: + The value to assign to the exadata_insight_id property of this EmManagedExternalDatabaseInsight. + :type exadata_insight_id: str + """ self.swagger_types = { 'entity_source': 'str', @@ -123,7 +127,8 @@ def __init__(self, **kwargs): 'enterprise_manager_entity_type': 'str', 'enterprise_manager_entity_identifier': 'str', 'enterprise_manager_entity_display_name': 'str', - 'enterprise_manager_bridge_id': 'str' + 'enterprise_manager_bridge_id': 'str', + 'exadata_insight_id': 'str' } self.attribute_map = { @@ -146,7 +151,8 @@ def __init__(self, **kwargs): 'enterprise_manager_entity_type': 'enterpriseManagerEntityType', 'enterprise_manager_entity_identifier': 'enterpriseManagerEntityIdentifier', 'enterprise_manager_entity_display_name': 'enterpriseManagerEntityDisplayName', - 'enterprise_manager_bridge_id': 'enterpriseManagerBridgeId' + 'enterprise_manager_bridge_id': 'enterpriseManagerBridgeId', + 'exadata_insight_id': 'exadataInsightId' } self._entity_source = None @@ -169,6 +175,7 @@ def __init__(self, **kwargs): self._enterprise_manager_entity_identifier = None self._enterprise_manager_entity_display_name = None self._enterprise_manager_bridge_id = None + self._exadata_insight_id = None self._entity_source = 'EM_MANAGED_EXTERNAL_DATABASE' @property @@ -315,6 +322,34 @@ def enterprise_manager_bridge_id(self, enterprise_manager_bridge_id): """ self._enterprise_manager_bridge_id = enterprise_manager_bridge_id + @property + def exadata_insight_id(self): + """ + Gets the exadata_insight_id of this EmManagedExternalDatabaseInsight. + The `OCID`__ of the Exadata insight. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The exadata_insight_id of this EmManagedExternalDatabaseInsight. + :rtype: str + """ + return self._exadata_insight_id + + @exadata_insight_id.setter + def exadata_insight_id(self, exadata_insight_id): + """ + Sets the exadata_insight_id of this EmManagedExternalDatabaseInsight. + The `OCID`__ of the Exadata insight. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param exadata_insight_id: The exadata_insight_id of this EmManagedExternalDatabaseInsight. + :type: str + """ + self._exadata_insight_id = exadata_insight_id + def __repr__(self): return formatted_flat_dict(self) diff --git a/src/oci/opsi/models/em_managed_external_database_insight_summary.py b/src/oci/opsi/models/em_managed_external_database_insight_summary.py index 16c6c72ca9..8282e8a822 100644 --- a/src/oci/opsi/models/em_managed_external_database_insight_summary.py +++ b/src/oci/opsi/models/em_managed_external_database_insight_summary.py @@ -118,6 +118,10 @@ def __init__(self, **kwargs): The value to assign to the enterprise_manager_bridge_id property of this EmManagedExternalDatabaseInsightSummary. :type enterprise_manager_bridge_id: str + :param exadata_insight_id: + The value to assign to the exadata_insight_id property of this EmManagedExternalDatabaseInsightSummary. + :type exadata_insight_id: str + """ self.swagger_types = { 'id': 'str', @@ -143,7 +147,8 @@ def __init__(self, **kwargs): 'enterprise_manager_entity_type': 'str', 'enterprise_manager_entity_identifier': 'str', 'enterprise_manager_entity_display_name': 'str', - 'enterprise_manager_bridge_id': 'str' + 'enterprise_manager_bridge_id': 'str', + 'exadata_insight_id': 'str' } self.attribute_map = { @@ -170,7 +175,8 @@ def __init__(self, **kwargs): 'enterprise_manager_entity_type': 'enterpriseManagerEntityType', 'enterprise_manager_entity_identifier': 'enterpriseManagerEntityIdentifier', 'enterprise_manager_entity_display_name': 'enterpriseManagerEntityDisplayName', - 'enterprise_manager_bridge_id': 'enterpriseManagerBridgeId' + 'enterprise_manager_bridge_id': 'enterpriseManagerBridgeId', + 'exadata_insight_id': 'exadataInsightId' } self._id = None @@ -197,6 +203,7 @@ def __init__(self, **kwargs): self._enterprise_manager_entity_identifier = None self._enterprise_manager_entity_display_name = None self._enterprise_manager_bridge_id = None + self._exadata_insight_id = None self._entity_source = 'EM_MANAGED_EXTERNAL_DATABASE' @property @@ -343,6 +350,34 @@ def enterprise_manager_bridge_id(self, enterprise_manager_bridge_id): """ self._enterprise_manager_bridge_id = enterprise_manager_bridge_id + @property + def exadata_insight_id(self): + """ + Gets the exadata_insight_id of this EmManagedExternalDatabaseInsightSummary. + The `OCID`__ of the Exadata insight. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The exadata_insight_id of this EmManagedExternalDatabaseInsightSummary. + :rtype: str + """ + return self._exadata_insight_id + + @exadata_insight_id.setter + def exadata_insight_id(self, exadata_insight_id): + """ + Sets the exadata_insight_id of this EmManagedExternalDatabaseInsightSummary. + The `OCID`__ of the Exadata insight. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param exadata_insight_id: The exadata_insight_id of this EmManagedExternalDatabaseInsightSummary. + :type: str + """ + self._exadata_insight_id = exadata_insight_id + def __repr__(self): return formatted_flat_dict(self) diff --git a/src/oci/opsi/models/em_managed_external_exadata_insight.py b/src/oci/opsi/models/em_managed_external_exadata_insight.py new file mode 100644 index 0000000000..991dda7ab3 --- /dev/null +++ b/src/oci/opsi/models/em_managed_external_exadata_insight.py @@ -0,0 +1,375 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .exadata_insight import ExadataInsight +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 EmManagedExternalExadataInsight(ExadataInsight): + """ + EM-managed Exadata insight resource. + """ + + def __init__(self, **kwargs): + """ + Initializes a new EmManagedExternalExadataInsight object with values from keyword arguments. The default value of the :py:attr:`~oci.opsi.models.EmManagedExternalExadataInsight.entity_source` attribute + of this class is ``EM_MANAGED_EXTERNAL_EXADATA`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param entity_source: + The value to assign to the entity_source property of this EmManagedExternalExadataInsight. + Allowed values for this property are: "EM_MANAGED_EXTERNAL_EXADATA" + :type entity_source: str + + :param id: + The value to assign to the id property of this EmManagedExternalExadataInsight. + :type id: str + + :param compartment_id: + The value to assign to the compartment_id property of this EmManagedExternalExadataInsight. + :type compartment_id: str + + :param exadata_name: + The value to assign to the exadata_name property of this EmManagedExternalExadataInsight. + :type exadata_name: str + + :param exadata_display_name: + The value to assign to the exadata_display_name property of this EmManagedExternalExadataInsight. + :type exadata_display_name: str + + :param exadata_type: + The value to assign to the exadata_type property of this EmManagedExternalExadataInsight. + Allowed values for this property are: "DBMACHINE", "EXACS", "EXACC" + :type exadata_type: str + + :param exadata_rack_type: + The value to assign to the exadata_rack_type property of this EmManagedExternalExadataInsight. + Allowed values for this property are: "FULL", "HALF", "QUARTER", "EIGHTH" + :type exadata_rack_type: str + + :param is_virtualized_exadata: + The value to assign to the is_virtualized_exadata property of this EmManagedExternalExadataInsight. + :type is_virtualized_exadata: bool + + :param status: + The value to assign to the status property of this EmManagedExternalExadataInsight. + Allowed values for this property are: "DISABLED", "ENABLED", "TERMINATED" + :type status: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this EmManagedExternalExadataInsight. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this EmManagedExternalExadataInsight. + :type defined_tags: dict(str, dict(str, object)) + + :param system_tags: + The value to assign to the system_tags property of this EmManagedExternalExadataInsight. + :type system_tags: dict(str, dict(str, object)) + + :param time_created: + The value to assign to the time_created property of this EmManagedExternalExadataInsight. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this EmManagedExternalExadataInsight. + :type time_updated: datetime + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this EmManagedExternalExadataInsight. + Allowed values for this property are: "CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED" + :type lifecycle_state: str + + :param lifecycle_details: + The value to assign to the lifecycle_details property of this EmManagedExternalExadataInsight. + :type lifecycle_details: str + + :param enterprise_manager_identifier: + The value to assign to the enterprise_manager_identifier property of this EmManagedExternalExadataInsight. + :type enterprise_manager_identifier: str + + :param enterprise_manager_entity_name: + The value to assign to the enterprise_manager_entity_name property of this EmManagedExternalExadataInsight. + :type enterprise_manager_entity_name: str + + :param enterprise_manager_entity_type: + The value to assign to the enterprise_manager_entity_type property of this EmManagedExternalExadataInsight. + :type enterprise_manager_entity_type: str + + :param enterprise_manager_entity_identifier: + The value to assign to the enterprise_manager_entity_identifier property of this EmManagedExternalExadataInsight. + :type enterprise_manager_entity_identifier: str + + :param enterprise_manager_entity_display_name: + The value to assign to the enterprise_manager_entity_display_name property of this EmManagedExternalExadataInsight. + :type enterprise_manager_entity_display_name: str + + :param enterprise_manager_bridge_id: + The value to assign to the enterprise_manager_bridge_id property of this EmManagedExternalExadataInsight. + :type enterprise_manager_bridge_id: str + + :param is_auto_sync_enabled: + The value to assign to the is_auto_sync_enabled property of this EmManagedExternalExadataInsight. + :type is_auto_sync_enabled: bool + + """ + self.swagger_types = { + 'entity_source': 'str', + 'id': 'str', + 'compartment_id': 'str', + 'exadata_name': 'str', + 'exadata_display_name': 'str', + 'exadata_type': 'str', + 'exadata_rack_type': 'str', + 'is_virtualized_exadata': 'bool', + 'status': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'system_tags': 'dict(str, dict(str, object))', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'lifecycle_state': 'str', + 'lifecycle_details': 'str', + 'enterprise_manager_identifier': 'str', + 'enterprise_manager_entity_name': 'str', + 'enterprise_manager_entity_type': 'str', + 'enterprise_manager_entity_identifier': 'str', + 'enterprise_manager_entity_display_name': 'str', + 'enterprise_manager_bridge_id': 'str', + 'is_auto_sync_enabled': 'bool' + } + + self.attribute_map = { + 'entity_source': 'entitySource', + 'id': 'id', + 'compartment_id': 'compartmentId', + 'exadata_name': 'exadataName', + 'exadata_display_name': 'exadataDisplayName', + 'exadata_type': 'exadataType', + 'exadata_rack_type': 'exadataRackType', + 'is_virtualized_exadata': 'isVirtualizedExadata', + 'status': 'status', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'system_tags': 'systemTags', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'lifecycle_state': 'lifecycleState', + 'lifecycle_details': 'lifecycleDetails', + 'enterprise_manager_identifier': 'enterpriseManagerIdentifier', + 'enterprise_manager_entity_name': 'enterpriseManagerEntityName', + 'enterprise_manager_entity_type': 'enterpriseManagerEntityType', + 'enterprise_manager_entity_identifier': 'enterpriseManagerEntityIdentifier', + 'enterprise_manager_entity_display_name': 'enterpriseManagerEntityDisplayName', + 'enterprise_manager_bridge_id': 'enterpriseManagerBridgeId', + 'is_auto_sync_enabled': 'isAutoSyncEnabled' + } + + self._entity_source = None + self._id = None + self._compartment_id = None + self._exadata_name = None + self._exadata_display_name = None + self._exadata_type = None + self._exadata_rack_type = None + self._is_virtualized_exadata = None + self._status = None + self._freeform_tags = None + self._defined_tags = None + self._system_tags = None + self._time_created = None + self._time_updated = None + self._lifecycle_state = None + self._lifecycle_details = None + self._enterprise_manager_identifier = None + self._enterprise_manager_entity_name = None + self._enterprise_manager_entity_type = None + self._enterprise_manager_entity_identifier = None + self._enterprise_manager_entity_display_name = None + self._enterprise_manager_bridge_id = None + self._is_auto_sync_enabled = None + self._entity_source = 'EM_MANAGED_EXTERNAL_EXADATA' + + @property + def enterprise_manager_identifier(self): + """ + **[Required]** Gets the enterprise_manager_identifier of this EmManagedExternalExadataInsight. + Enterprise Manager Unique Identifier + + + :return: The enterprise_manager_identifier of this EmManagedExternalExadataInsight. + :rtype: str + """ + return self._enterprise_manager_identifier + + @enterprise_manager_identifier.setter + def enterprise_manager_identifier(self, enterprise_manager_identifier): + """ + Sets the enterprise_manager_identifier of this EmManagedExternalExadataInsight. + Enterprise Manager Unique Identifier + + + :param enterprise_manager_identifier: The enterprise_manager_identifier of this EmManagedExternalExadataInsight. + :type: str + """ + self._enterprise_manager_identifier = enterprise_manager_identifier + + @property + def enterprise_manager_entity_name(self): + """ + **[Required]** Gets the enterprise_manager_entity_name of this EmManagedExternalExadataInsight. + Enterprise Manager Entity Name + + + :return: The enterprise_manager_entity_name of this EmManagedExternalExadataInsight. + :rtype: str + """ + return self._enterprise_manager_entity_name + + @enterprise_manager_entity_name.setter + def enterprise_manager_entity_name(self, enterprise_manager_entity_name): + """ + Sets the enterprise_manager_entity_name of this EmManagedExternalExadataInsight. + Enterprise Manager Entity Name + + + :param enterprise_manager_entity_name: The enterprise_manager_entity_name of this EmManagedExternalExadataInsight. + :type: str + """ + self._enterprise_manager_entity_name = enterprise_manager_entity_name + + @property + def enterprise_manager_entity_type(self): + """ + **[Required]** Gets the enterprise_manager_entity_type of this EmManagedExternalExadataInsight. + Enterprise Manager Entity Type + + + :return: The enterprise_manager_entity_type of this EmManagedExternalExadataInsight. + :rtype: str + """ + return self._enterprise_manager_entity_type + + @enterprise_manager_entity_type.setter + def enterprise_manager_entity_type(self, enterprise_manager_entity_type): + """ + Sets the enterprise_manager_entity_type of this EmManagedExternalExadataInsight. + Enterprise Manager Entity Type + + + :param enterprise_manager_entity_type: The enterprise_manager_entity_type of this EmManagedExternalExadataInsight. + :type: str + """ + self._enterprise_manager_entity_type = enterprise_manager_entity_type + + @property + def enterprise_manager_entity_identifier(self): + """ + **[Required]** Gets the enterprise_manager_entity_identifier of this EmManagedExternalExadataInsight. + Enterprise Manager Entity Unique Identifier + + + :return: The enterprise_manager_entity_identifier of this EmManagedExternalExadataInsight. + :rtype: str + """ + return self._enterprise_manager_entity_identifier + + @enterprise_manager_entity_identifier.setter + def enterprise_manager_entity_identifier(self, enterprise_manager_entity_identifier): + """ + Sets the enterprise_manager_entity_identifier of this EmManagedExternalExadataInsight. + Enterprise Manager Entity Unique Identifier + + + :param enterprise_manager_entity_identifier: The enterprise_manager_entity_identifier of this EmManagedExternalExadataInsight. + :type: str + """ + self._enterprise_manager_entity_identifier = enterprise_manager_entity_identifier + + @property + def enterprise_manager_entity_display_name(self): + """ + Gets the enterprise_manager_entity_display_name of this EmManagedExternalExadataInsight. + Enterprise Manager Entity Display Name + + + :return: The enterprise_manager_entity_display_name of this EmManagedExternalExadataInsight. + :rtype: str + """ + return self._enterprise_manager_entity_display_name + + @enterprise_manager_entity_display_name.setter + def enterprise_manager_entity_display_name(self, enterprise_manager_entity_display_name): + """ + Sets the enterprise_manager_entity_display_name of this EmManagedExternalExadataInsight. + Enterprise Manager Entity Display Name + + + :param enterprise_manager_entity_display_name: The enterprise_manager_entity_display_name of this EmManagedExternalExadataInsight. + :type: str + """ + self._enterprise_manager_entity_display_name = enterprise_manager_entity_display_name + + @property + def enterprise_manager_bridge_id(self): + """ + **[Required]** Gets the enterprise_manager_bridge_id of this EmManagedExternalExadataInsight. + OPSI Enterprise Manager Bridge OCID + + + :return: The enterprise_manager_bridge_id of this EmManagedExternalExadataInsight. + :rtype: str + """ + return self._enterprise_manager_bridge_id + + @enterprise_manager_bridge_id.setter + def enterprise_manager_bridge_id(self, enterprise_manager_bridge_id): + """ + Sets the enterprise_manager_bridge_id of this EmManagedExternalExadataInsight. + OPSI Enterprise Manager Bridge OCID + + + :param enterprise_manager_bridge_id: The enterprise_manager_bridge_id of this EmManagedExternalExadataInsight. + :type: str + """ + self._enterprise_manager_bridge_id = enterprise_manager_bridge_id + + @property + def is_auto_sync_enabled(self): + """ + Gets the is_auto_sync_enabled of this EmManagedExternalExadataInsight. + Set to true to enable automatic enablement and disablement of related targets from Enterprise Manager. New resources (e.g. Database Insights) will be placed in the same compartment as the related Exadata Insight. + + + :return: The is_auto_sync_enabled of this EmManagedExternalExadataInsight. + :rtype: bool + """ + return self._is_auto_sync_enabled + + @is_auto_sync_enabled.setter + def is_auto_sync_enabled(self, is_auto_sync_enabled): + """ + Sets the is_auto_sync_enabled of this EmManagedExternalExadataInsight. + Set to true to enable automatic enablement and disablement of related targets from Enterprise Manager. New resources (e.g. Database Insights) will be placed in the same compartment as the related Exadata Insight. + + + :param is_auto_sync_enabled: The is_auto_sync_enabled of this EmManagedExternalExadataInsight. + :type: bool + """ + self._is_auto_sync_enabled = is_auto_sync_enabled + + 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/opsi/models/em_managed_external_exadata_insight_summary.py b/src/oci/opsi/models/em_managed_external_exadata_insight_summary.py new file mode 100644 index 0000000000..66083333e5 --- /dev/null +++ b/src/oci/opsi/models/em_managed_external_exadata_insight_summary.py @@ -0,0 +1,337 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .exadata_insight_summary import ExadataInsightSummary +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 EmManagedExternalExadataInsightSummary(ExadataInsightSummary): + """ + Summary of an Exadata insight resource. + """ + + def __init__(self, **kwargs): + """ + Initializes a new EmManagedExternalExadataInsightSummary object with values from keyword arguments. The default value of the :py:attr:`~oci.opsi.models.EmManagedExternalExadataInsightSummary.entity_source` attribute + of this class is ``EM_MANAGED_EXTERNAL_EXADATA`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param entity_source: + The value to assign to the entity_source property of this EmManagedExternalExadataInsightSummary. + Allowed values for this property are: "EM_MANAGED_EXTERNAL_EXADATA" + :type entity_source: str + + :param id: + The value to assign to the id property of this EmManagedExternalExadataInsightSummary. + :type id: str + + :param compartment_id: + The value to assign to the compartment_id property of this EmManagedExternalExadataInsightSummary. + :type compartment_id: str + + :param exadata_name: + The value to assign to the exadata_name property of this EmManagedExternalExadataInsightSummary. + :type exadata_name: str + + :param exadata_display_name: + The value to assign to the exadata_display_name property of this EmManagedExternalExadataInsightSummary. + :type exadata_display_name: str + + :param exadata_type: + The value to assign to the exadata_type property of this EmManagedExternalExadataInsightSummary. + Allowed values for this property are: "DBMACHINE", "EXACS", "EXACC" + :type exadata_type: str + + :param exadata_rack_type: + The value to assign to the exadata_rack_type property of this EmManagedExternalExadataInsightSummary. + Allowed values for this property are: "FULL", "HALF", "QUARTER", "EIGHTH" + :type exadata_rack_type: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this EmManagedExternalExadataInsightSummary. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this EmManagedExternalExadataInsightSummary. + :type defined_tags: dict(str, dict(str, object)) + + :param system_tags: + The value to assign to the system_tags property of this EmManagedExternalExadataInsightSummary. + :type system_tags: dict(str, dict(str, object)) + + :param status: + The value to assign to the status property of this EmManagedExternalExadataInsightSummary. + Allowed values for this property are: "DISABLED", "ENABLED", "TERMINATED" + :type status: str + + :param time_created: + The value to assign to the time_created property of this EmManagedExternalExadataInsightSummary. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this EmManagedExternalExadataInsightSummary. + :type time_updated: datetime + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this EmManagedExternalExadataInsightSummary. + Allowed values for this property are: "CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED" + :type lifecycle_state: str + + :param lifecycle_details: + The value to assign to the lifecycle_details property of this EmManagedExternalExadataInsightSummary. + :type lifecycle_details: str + + :param enterprise_manager_identifier: + The value to assign to the enterprise_manager_identifier property of this EmManagedExternalExadataInsightSummary. + :type enterprise_manager_identifier: str + + :param enterprise_manager_entity_name: + The value to assign to the enterprise_manager_entity_name property of this EmManagedExternalExadataInsightSummary. + :type enterprise_manager_entity_name: str + + :param enterprise_manager_entity_type: + The value to assign to the enterprise_manager_entity_type property of this EmManagedExternalExadataInsightSummary. + :type enterprise_manager_entity_type: str + + :param enterprise_manager_entity_identifier: + The value to assign to the enterprise_manager_entity_identifier property of this EmManagedExternalExadataInsightSummary. + :type enterprise_manager_entity_identifier: str + + :param enterprise_manager_entity_display_name: + The value to assign to the enterprise_manager_entity_display_name property of this EmManagedExternalExadataInsightSummary. + :type enterprise_manager_entity_display_name: str + + :param enterprise_manager_bridge_id: + The value to assign to the enterprise_manager_bridge_id property of this EmManagedExternalExadataInsightSummary. + :type enterprise_manager_bridge_id: str + + """ + self.swagger_types = { + 'entity_source': 'str', + 'id': 'str', + 'compartment_id': 'str', + 'exadata_name': 'str', + 'exadata_display_name': 'str', + 'exadata_type': 'str', + 'exadata_rack_type': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'system_tags': 'dict(str, dict(str, object))', + 'status': 'str', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'lifecycle_state': 'str', + 'lifecycle_details': 'str', + 'enterprise_manager_identifier': 'str', + 'enterprise_manager_entity_name': 'str', + 'enterprise_manager_entity_type': 'str', + 'enterprise_manager_entity_identifier': 'str', + 'enterprise_manager_entity_display_name': 'str', + 'enterprise_manager_bridge_id': 'str' + } + + self.attribute_map = { + 'entity_source': 'entitySource', + 'id': 'id', + 'compartment_id': 'compartmentId', + 'exadata_name': 'exadataName', + 'exadata_display_name': 'exadataDisplayName', + 'exadata_type': 'exadataType', + 'exadata_rack_type': 'exadataRackType', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'system_tags': 'systemTags', + 'status': 'status', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'lifecycle_state': 'lifecycleState', + 'lifecycle_details': 'lifecycleDetails', + 'enterprise_manager_identifier': 'enterpriseManagerIdentifier', + 'enterprise_manager_entity_name': 'enterpriseManagerEntityName', + 'enterprise_manager_entity_type': 'enterpriseManagerEntityType', + 'enterprise_manager_entity_identifier': 'enterpriseManagerEntityIdentifier', + 'enterprise_manager_entity_display_name': 'enterpriseManagerEntityDisplayName', + 'enterprise_manager_bridge_id': 'enterpriseManagerBridgeId' + } + + self._entity_source = None + self._id = None + self._compartment_id = None + self._exadata_name = None + self._exadata_display_name = None + self._exadata_type = None + self._exadata_rack_type = None + self._freeform_tags = None + self._defined_tags = None + self._system_tags = None + self._status = None + self._time_created = None + self._time_updated = None + self._lifecycle_state = None + self._lifecycle_details = None + self._enterprise_manager_identifier = None + self._enterprise_manager_entity_name = None + self._enterprise_manager_entity_type = None + self._enterprise_manager_entity_identifier = None + self._enterprise_manager_entity_display_name = None + self._enterprise_manager_bridge_id = None + self._entity_source = 'EM_MANAGED_EXTERNAL_EXADATA' + + @property + def enterprise_manager_identifier(self): + """ + **[Required]** Gets the enterprise_manager_identifier of this EmManagedExternalExadataInsightSummary. + Enterprise Manager Unique Identifier + + + :return: The enterprise_manager_identifier of this EmManagedExternalExadataInsightSummary. + :rtype: str + """ + return self._enterprise_manager_identifier + + @enterprise_manager_identifier.setter + def enterprise_manager_identifier(self, enterprise_manager_identifier): + """ + Sets the enterprise_manager_identifier of this EmManagedExternalExadataInsightSummary. + Enterprise Manager Unique Identifier + + + :param enterprise_manager_identifier: The enterprise_manager_identifier of this EmManagedExternalExadataInsightSummary. + :type: str + """ + self._enterprise_manager_identifier = enterprise_manager_identifier + + @property + def enterprise_manager_entity_name(self): + """ + **[Required]** Gets the enterprise_manager_entity_name of this EmManagedExternalExadataInsightSummary. + Enterprise Manager Entity Name + + + :return: The enterprise_manager_entity_name of this EmManagedExternalExadataInsightSummary. + :rtype: str + """ + return self._enterprise_manager_entity_name + + @enterprise_manager_entity_name.setter + def enterprise_manager_entity_name(self, enterprise_manager_entity_name): + """ + Sets the enterprise_manager_entity_name of this EmManagedExternalExadataInsightSummary. + Enterprise Manager Entity Name + + + :param enterprise_manager_entity_name: The enterprise_manager_entity_name of this EmManagedExternalExadataInsightSummary. + :type: str + """ + self._enterprise_manager_entity_name = enterprise_manager_entity_name + + @property + def enterprise_manager_entity_type(self): + """ + **[Required]** Gets the enterprise_manager_entity_type of this EmManagedExternalExadataInsightSummary. + Enterprise Manager Entity Type + + + :return: The enterprise_manager_entity_type of this EmManagedExternalExadataInsightSummary. + :rtype: str + """ + return self._enterprise_manager_entity_type + + @enterprise_manager_entity_type.setter + def enterprise_manager_entity_type(self, enterprise_manager_entity_type): + """ + Sets the enterprise_manager_entity_type of this EmManagedExternalExadataInsightSummary. + Enterprise Manager Entity Type + + + :param enterprise_manager_entity_type: The enterprise_manager_entity_type of this EmManagedExternalExadataInsightSummary. + :type: str + """ + self._enterprise_manager_entity_type = enterprise_manager_entity_type + + @property + def enterprise_manager_entity_identifier(self): + """ + **[Required]** Gets the enterprise_manager_entity_identifier of this EmManagedExternalExadataInsightSummary. + Enterprise Manager Entity Unique Identifier + + + :return: The enterprise_manager_entity_identifier of this EmManagedExternalExadataInsightSummary. + :rtype: str + """ + return self._enterprise_manager_entity_identifier + + @enterprise_manager_entity_identifier.setter + def enterprise_manager_entity_identifier(self, enterprise_manager_entity_identifier): + """ + Sets the enterprise_manager_entity_identifier of this EmManagedExternalExadataInsightSummary. + Enterprise Manager Entity Unique Identifier + + + :param enterprise_manager_entity_identifier: The enterprise_manager_entity_identifier of this EmManagedExternalExadataInsightSummary. + :type: str + """ + self._enterprise_manager_entity_identifier = enterprise_manager_entity_identifier + + @property + def enterprise_manager_entity_display_name(self): + """ + Gets the enterprise_manager_entity_display_name of this EmManagedExternalExadataInsightSummary. + Enterprise Manager Entity Display Name + + + :return: The enterprise_manager_entity_display_name of this EmManagedExternalExadataInsightSummary. + :rtype: str + """ + return self._enterprise_manager_entity_display_name + + @enterprise_manager_entity_display_name.setter + def enterprise_manager_entity_display_name(self, enterprise_manager_entity_display_name): + """ + Sets the enterprise_manager_entity_display_name of this EmManagedExternalExadataInsightSummary. + Enterprise Manager Entity Display Name + + + :param enterprise_manager_entity_display_name: The enterprise_manager_entity_display_name of this EmManagedExternalExadataInsightSummary. + :type: str + """ + self._enterprise_manager_entity_display_name = enterprise_manager_entity_display_name + + @property + def enterprise_manager_bridge_id(self): + """ + **[Required]** Gets the enterprise_manager_bridge_id of this EmManagedExternalExadataInsightSummary. + OPSI Enterprise Manager Bridge OCID + + + :return: The enterprise_manager_bridge_id of this EmManagedExternalExadataInsightSummary. + :rtype: str + """ + return self._enterprise_manager_bridge_id + + @enterprise_manager_bridge_id.setter + def enterprise_manager_bridge_id(self, enterprise_manager_bridge_id): + """ + Sets the enterprise_manager_bridge_id of this EmManagedExternalExadataInsightSummary. + OPSI Enterprise Manager Bridge OCID + + + :param enterprise_manager_bridge_id: The enterprise_manager_bridge_id of this EmManagedExternalExadataInsightSummary. + :type: str + """ + self._enterprise_manager_bridge_id = enterprise_manager_bridge_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/opsi/models/em_managed_external_host_configuration_summary.py b/src/oci/opsi/models/em_managed_external_host_configuration_summary.py new file mode 100644 index 0000000000..6c6440a2a7 --- /dev/null +++ b/src/oci/opsi/models/em_managed_external_host_configuration_summary.py @@ -0,0 +1,272 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .host_configuration_summary import HostConfigurationSummary +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 EmManagedExternalHostConfigurationSummary(HostConfigurationSummary): + """ + Configuration summary of a EM Managed External host. + """ + + def __init__(self, **kwargs): + """ + Initializes a new EmManagedExternalHostConfigurationSummary object with values from keyword arguments. The default value of the :py:attr:`~oci.opsi.models.EmManagedExternalHostConfigurationSummary.entity_source` attribute + of this class is ``EM_MANAGED_EXTERNAL_HOST`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param host_insight_id: + The value to assign to the host_insight_id property of this EmManagedExternalHostConfigurationSummary. + :type host_insight_id: str + + :param entity_source: + The value to assign to the entity_source property of this EmManagedExternalHostConfigurationSummary. + Allowed values for this property are: "MACS_MANAGED_EXTERNAL_HOST", "EM_MANAGED_EXTERNAL_HOST" + :type entity_source: str + + :param compartment_id: + The value to assign to the compartment_id property of this EmManagedExternalHostConfigurationSummary. + :type compartment_id: str + + :param host_name: + The value to assign to the host_name property of this EmManagedExternalHostConfigurationSummary. + :type host_name: str + + :param platform_type: + The value to assign to the platform_type property of this EmManagedExternalHostConfigurationSummary. + Allowed values for this property are: "LINUX" + :type platform_type: str + + :param platform_version: + The value to assign to the platform_version property of this EmManagedExternalHostConfigurationSummary. + :type platform_version: str + + :param platform_vendor: + The value to assign to the platform_vendor property of this EmManagedExternalHostConfigurationSummary. + :type platform_vendor: str + + :param total_cpus: + The value to assign to the total_cpus property of this EmManagedExternalHostConfigurationSummary. + :type total_cpus: int + + :param total_memory_in_gbs: + The value to assign to the total_memory_in_gbs property of this EmManagedExternalHostConfigurationSummary. + :type total_memory_in_gbs: float + + :param cpu_architecture: + The value to assign to the cpu_architecture property of this EmManagedExternalHostConfigurationSummary. + :type cpu_architecture: str + + :param cpu_cache_in_mbs: + The value to assign to the cpu_cache_in_mbs property of this EmManagedExternalHostConfigurationSummary. + :type cpu_cache_in_mbs: float + + :param cpu_vendor: + The value to assign to the cpu_vendor property of this EmManagedExternalHostConfigurationSummary. + :type cpu_vendor: str + + :param cpu_frequency_in_mhz: + The value to assign to the cpu_frequency_in_mhz property of this EmManagedExternalHostConfigurationSummary. + :type cpu_frequency_in_mhz: float + + :param cpu_implementation: + The value to assign to the cpu_implementation property of this EmManagedExternalHostConfigurationSummary. + :type cpu_implementation: str + + :param cores_per_socket: + The value to assign to the cores_per_socket property of this EmManagedExternalHostConfigurationSummary. + :type cores_per_socket: int + + :param total_sockets: + The value to assign to the total_sockets property of this EmManagedExternalHostConfigurationSummary. + :type total_sockets: int + + :param threads_per_socket: + The value to assign to the threads_per_socket property of this EmManagedExternalHostConfigurationSummary. + :type threads_per_socket: int + + :param is_hyper_threading_enabled: + The value to assign to the is_hyper_threading_enabled property of this EmManagedExternalHostConfigurationSummary. + :type is_hyper_threading_enabled: bool + + :param defined_tags: + The value to assign to the defined_tags property of this EmManagedExternalHostConfigurationSummary. + :type defined_tags: dict(str, dict(str, object)) + + :param freeform_tags: + The value to assign to the freeform_tags property of this EmManagedExternalHostConfigurationSummary. + :type freeform_tags: dict(str, str) + + :param enterprise_manager_identifier: + The value to assign to the enterprise_manager_identifier property of this EmManagedExternalHostConfigurationSummary. + :type enterprise_manager_identifier: str + + :param enterprise_manager_bridge_id: + The value to assign to the enterprise_manager_bridge_id property of this EmManagedExternalHostConfigurationSummary. + :type enterprise_manager_bridge_id: str + + :param exadata_details: + The value to assign to the exadata_details property of this EmManagedExternalHostConfigurationSummary. + :type exadata_details: oci.opsi.models.ExadataDetails + + """ + self.swagger_types = { + 'host_insight_id': 'str', + 'entity_source': 'str', + 'compartment_id': 'str', + 'host_name': 'str', + 'platform_type': 'str', + 'platform_version': 'str', + 'platform_vendor': 'str', + 'total_cpus': 'int', + 'total_memory_in_gbs': 'float', + 'cpu_architecture': 'str', + 'cpu_cache_in_mbs': 'float', + 'cpu_vendor': 'str', + 'cpu_frequency_in_mhz': 'float', + 'cpu_implementation': 'str', + 'cores_per_socket': 'int', + 'total_sockets': 'int', + 'threads_per_socket': 'int', + 'is_hyper_threading_enabled': 'bool', + 'defined_tags': 'dict(str, dict(str, object))', + 'freeform_tags': 'dict(str, str)', + 'enterprise_manager_identifier': 'str', + 'enterprise_manager_bridge_id': 'str', + 'exadata_details': 'ExadataDetails' + } + + self.attribute_map = { + 'host_insight_id': 'hostInsightId', + 'entity_source': 'entitySource', + 'compartment_id': 'compartmentId', + 'host_name': 'hostName', + 'platform_type': 'platformType', + 'platform_version': 'platformVersion', + 'platform_vendor': 'platformVendor', + 'total_cpus': 'totalCpus', + 'total_memory_in_gbs': 'totalMemoryInGBs', + 'cpu_architecture': 'cpuArchitecture', + 'cpu_cache_in_mbs': 'cpuCacheInMBs', + 'cpu_vendor': 'cpuVendor', + 'cpu_frequency_in_mhz': 'cpuFrequencyInMhz', + 'cpu_implementation': 'cpuImplementation', + 'cores_per_socket': 'coresPerSocket', + 'total_sockets': 'totalSockets', + 'threads_per_socket': 'threadsPerSocket', + 'is_hyper_threading_enabled': 'isHyperThreadingEnabled', + 'defined_tags': 'definedTags', + 'freeform_tags': 'freeformTags', + 'enterprise_manager_identifier': 'enterpriseManagerIdentifier', + 'enterprise_manager_bridge_id': 'enterpriseManagerBridgeId', + 'exadata_details': 'exadataDetails' + } + + self._host_insight_id = None + self._entity_source = None + self._compartment_id = None + self._host_name = None + self._platform_type = None + self._platform_version = None + self._platform_vendor = None + self._total_cpus = None + self._total_memory_in_gbs = None + self._cpu_architecture = None + self._cpu_cache_in_mbs = None + self._cpu_vendor = None + self._cpu_frequency_in_mhz = None + self._cpu_implementation = None + self._cores_per_socket = None + self._total_sockets = None + self._threads_per_socket = None + self._is_hyper_threading_enabled = None + self._defined_tags = None + self._freeform_tags = None + self._enterprise_manager_identifier = None + self._enterprise_manager_bridge_id = None + self._exadata_details = None + self._entity_source = 'EM_MANAGED_EXTERNAL_HOST' + + @property + def enterprise_manager_identifier(self): + """ + **[Required]** Gets the enterprise_manager_identifier of this EmManagedExternalHostConfigurationSummary. + Enterprise Manager Unique Identifier + + + :return: The enterprise_manager_identifier of this EmManagedExternalHostConfigurationSummary. + :rtype: str + """ + return self._enterprise_manager_identifier + + @enterprise_manager_identifier.setter + def enterprise_manager_identifier(self, enterprise_manager_identifier): + """ + Sets the enterprise_manager_identifier of this EmManagedExternalHostConfigurationSummary. + Enterprise Manager Unique Identifier + + + :param enterprise_manager_identifier: The enterprise_manager_identifier of this EmManagedExternalHostConfigurationSummary. + :type: str + """ + self._enterprise_manager_identifier = enterprise_manager_identifier + + @property + def enterprise_manager_bridge_id(self): + """ + **[Required]** Gets the enterprise_manager_bridge_id of this EmManagedExternalHostConfigurationSummary. + OPSI Enterprise Manager Bridge OCID + + + :return: The enterprise_manager_bridge_id of this EmManagedExternalHostConfigurationSummary. + :rtype: str + """ + return self._enterprise_manager_bridge_id + + @enterprise_manager_bridge_id.setter + def enterprise_manager_bridge_id(self, enterprise_manager_bridge_id): + """ + Sets the enterprise_manager_bridge_id of this EmManagedExternalHostConfigurationSummary. + OPSI Enterprise Manager Bridge OCID + + + :param enterprise_manager_bridge_id: The enterprise_manager_bridge_id of this EmManagedExternalHostConfigurationSummary. + :type: str + """ + self._enterprise_manager_bridge_id = enterprise_manager_bridge_id + + @property + def exadata_details(self): + """ + **[Required]** Gets the exadata_details of this EmManagedExternalHostConfigurationSummary. + + :return: The exadata_details of this EmManagedExternalHostConfigurationSummary. + :rtype: oci.opsi.models.ExadataDetails + """ + return self._exadata_details + + @exadata_details.setter + def exadata_details(self, exadata_details): + """ + Sets the exadata_details of this EmManagedExternalHostConfigurationSummary. + + :param exadata_details: The exadata_details of this EmManagedExternalHostConfigurationSummary. + :type: oci.opsi.models.ExadataDetails + """ + self._exadata_details = exadata_details + + 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/opsi/models/em_managed_external_host_insight.py b/src/oci/opsi/models/em_managed_external_host_insight.py new file mode 100644 index 0000000000..628254a586 --- /dev/null +++ b/src/oci/opsi/models/em_managed_external_host_insight.py @@ -0,0 +1,478 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .host_insight import HostInsight +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 EmManagedExternalHostInsight(HostInsight): + """ + EM-managed external host insight resource. + """ + + #: A constant which can be used with the platform_type property of a EmManagedExternalHostInsight. + #: This constant has a value of "LINUX" + PLATFORM_TYPE_LINUX = "LINUX" + + def __init__(self, **kwargs): + """ + Initializes a new EmManagedExternalHostInsight object with values from keyword arguments. The default value of the :py:attr:`~oci.opsi.models.EmManagedExternalHostInsight.entity_source` attribute + of this class is ``EM_MANAGED_EXTERNAL_HOST`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param entity_source: + The value to assign to the entity_source property of this EmManagedExternalHostInsight. + Allowed values for this property are: "MACS_MANAGED_EXTERNAL_HOST", "EM_MANAGED_EXTERNAL_HOST", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type entity_source: str + + :param id: + The value to assign to the id property of this EmManagedExternalHostInsight. + :type id: str + + :param compartment_id: + The value to assign to the compartment_id property of this EmManagedExternalHostInsight. + :type compartment_id: str + + :param host_name: + The value to assign to the host_name property of this EmManagedExternalHostInsight. + :type host_name: str + + :param host_display_name: + The value to assign to the host_display_name property of this EmManagedExternalHostInsight. + :type host_display_name: str + + :param host_type: + The value to assign to the host_type property of this EmManagedExternalHostInsight. + :type host_type: str + + :param processor_count: + The value to assign to the processor_count property of this EmManagedExternalHostInsight. + :type processor_count: int + + :param freeform_tags: + The value to assign to the freeform_tags property of this EmManagedExternalHostInsight. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this EmManagedExternalHostInsight. + :type defined_tags: dict(str, dict(str, object)) + + :param system_tags: + The value to assign to the system_tags property of this EmManagedExternalHostInsight. + :type system_tags: dict(str, dict(str, object)) + + :param status: + The value to assign to the status property of this EmManagedExternalHostInsight. + Allowed values for this property are: "DISABLED", "ENABLED", "TERMINATED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type status: str + + :param time_created: + The value to assign to the time_created property of this EmManagedExternalHostInsight. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this EmManagedExternalHostInsight. + :type time_updated: datetime + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this EmManagedExternalHostInsight. + Allowed values for this property are: "CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED", "NEEDS_ATTENTION", '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 EmManagedExternalHostInsight. + :type lifecycle_details: str + + :param enterprise_manager_identifier: + The value to assign to the enterprise_manager_identifier property of this EmManagedExternalHostInsight. + :type enterprise_manager_identifier: str + + :param enterprise_manager_entity_name: + The value to assign to the enterprise_manager_entity_name property of this EmManagedExternalHostInsight. + :type enterprise_manager_entity_name: str + + :param enterprise_manager_entity_type: + The value to assign to the enterprise_manager_entity_type property of this EmManagedExternalHostInsight. + :type enterprise_manager_entity_type: str + + :param enterprise_manager_entity_identifier: + The value to assign to the enterprise_manager_entity_identifier property of this EmManagedExternalHostInsight. + :type enterprise_manager_entity_identifier: str + + :param enterprise_manager_entity_display_name: + The value to assign to the enterprise_manager_entity_display_name property of this EmManagedExternalHostInsight. + :type enterprise_manager_entity_display_name: str + + :param enterprise_manager_bridge_id: + The value to assign to the enterprise_manager_bridge_id property of this EmManagedExternalHostInsight. + :type enterprise_manager_bridge_id: str + + :param platform_type: + The value to assign to the platform_type property of this EmManagedExternalHostInsight. + Allowed values for this property are: "LINUX", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type platform_type: str + + :param platform_name: + The value to assign to the platform_name property of this EmManagedExternalHostInsight. + :type platform_name: str + + :param platform_version: + The value to assign to the platform_version property of this EmManagedExternalHostInsight. + :type platform_version: str + + :param exadata_insight_id: + The value to assign to the exadata_insight_id property of this EmManagedExternalHostInsight. + :type exadata_insight_id: str + + """ + self.swagger_types = { + 'entity_source': 'str', + 'id': 'str', + 'compartment_id': 'str', + 'host_name': 'str', + 'host_display_name': 'str', + 'host_type': 'str', + 'processor_count': 'int', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'system_tags': 'dict(str, dict(str, object))', + 'status': 'str', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'lifecycle_state': 'str', + 'lifecycle_details': 'str', + 'enterprise_manager_identifier': 'str', + 'enterprise_manager_entity_name': 'str', + 'enterprise_manager_entity_type': 'str', + 'enterprise_manager_entity_identifier': 'str', + 'enterprise_manager_entity_display_name': 'str', + 'enterprise_manager_bridge_id': 'str', + 'platform_type': 'str', + 'platform_name': 'str', + 'platform_version': 'str', + 'exadata_insight_id': 'str' + } + + self.attribute_map = { + 'entity_source': 'entitySource', + 'id': 'id', + 'compartment_id': 'compartmentId', + 'host_name': 'hostName', + 'host_display_name': 'hostDisplayName', + 'host_type': 'hostType', + 'processor_count': 'processorCount', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'system_tags': 'systemTags', + 'status': 'status', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'lifecycle_state': 'lifecycleState', + 'lifecycle_details': 'lifecycleDetails', + 'enterprise_manager_identifier': 'enterpriseManagerIdentifier', + 'enterprise_manager_entity_name': 'enterpriseManagerEntityName', + 'enterprise_manager_entity_type': 'enterpriseManagerEntityType', + 'enterprise_manager_entity_identifier': 'enterpriseManagerEntityIdentifier', + 'enterprise_manager_entity_display_name': 'enterpriseManagerEntityDisplayName', + 'enterprise_manager_bridge_id': 'enterpriseManagerBridgeId', + 'platform_type': 'platformType', + 'platform_name': 'platformName', + 'platform_version': 'platformVersion', + 'exadata_insight_id': 'exadataInsightId' + } + + self._entity_source = None + self._id = None + self._compartment_id = None + self._host_name = None + self._host_display_name = None + self._host_type = None + self._processor_count = None + self._freeform_tags = None + self._defined_tags = None + self._system_tags = None + self._status = None + self._time_created = None + self._time_updated = None + self._lifecycle_state = None + self._lifecycle_details = None + self._enterprise_manager_identifier = None + self._enterprise_manager_entity_name = None + self._enterprise_manager_entity_type = None + self._enterprise_manager_entity_identifier = None + self._enterprise_manager_entity_display_name = None + self._enterprise_manager_bridge_id = None + self._platform_type = None + self._platform_name = None + self._platform_version = None + self._exadata_insight_id = None + self._entity_source = 'EM_MANAGED_EXTERNAL_HOST' + + @property + def enterprise_manager_identifier(self): + """ + **[Required]** Gets the enterprise_manager_identifier of this EmManagedExternalHostInsight. + Enterprise Manager Unique Identifier + + + :return: The enterprise_manager_identifier of this EmManagedExternalHostInsight. + :rtype: str + """ + return self._enterprise_manager_identifier + + @enterprise_manager_identifier.setter + def enterprise_manager_identifier(self, enterprise_manager_identifier): + """ + Sets the enterprise_manager_identifier of this EmManagedExternalHostInsight. + Enterprise Manager Unique Identifier + + + :param enterprise_manager_identifier: The enterprise_manager_identifier of this EmManagedExternalHostInsight. + :type: str + """ + self._enterprise_manager_identifier = enterprise_manager_identifier + + @property + def enterprise_manager_entity_name(self): + """ + **[Required]** Gets the enterprise_manager_entity_name of this EmManagedExternalHostInsight. + Enterprise Manager Entity Name + + + :return: The enterprise_manager_entity_name of this EmManagedExternalHostInsight. + :rtype: str + """ + return self._enterprise_manager_entity_name + + @enterprise_manager_entity_name.setter + def enterprise_manager_entity_name(self, enterprise_manager_entity_name): + """ + Sets the enterprise_manager_entity_name of this EmManagedExternalHostInsight. + Enterprise Manager Entity Name + + + :param enterprise_manager_entity_name: The enterprise_manager_entity_name of this EmManagedExternalHostInsight. + :type: str + """ + self._enterprise_manager_entity_name = enterprise_manager_entity_name + + @property + def enterprise_manager_entity_type(self): + """ + **[Required]** Gets the enterprise_manager_entity_type of this EmManagedExternalHostInsight. + Enterprise Manager Entity Type + + + :return: The enterprise_manager_entity_type of this EmManagedExternalHostInsight. + :rtype: str + """ + return self._enterprise_manager_entity_type + + @enterprise_manager_entity_type.setter + def enterprise_manager_entity_type(self, enterprise_manager_entity_type): + """ + Sets the enterprise_manager_entity_type of this EmManagedExternalHostInsight. + Enterprise Manager Entity Type + + + :param enterprise_manager_entity_type: The enterprise_manager_entity_type of this EmManagedExternalHostInsight. + :type: str + """ + self._enterprise_manager_entity_type = enterprise_manager_entity_type + + @property + def enterprise_manager_entity_identifier(self): + """ + **[Required]** Gets the enterprise_manager_entity_identifier of this EmManagedExternalHostInsight. + Enterprise Manager Entity Unique Identifier + + + :return: The enterprise_manager_entity_identifier of this EmManagedExternalHostInsight. + :rtype: str + """ + return self._enterprise_manager_entity_identifier + + @enterprise_manager_entity_identifier.setter + def enterprise_manager_entity_identifier(self, enterprise_manager_entity_identifier): + """ + Sets the enterprise_manager_entity_identifier of this EmManagedExternalHostInsight. + Enterprise Manager Entity Unique Identifier + + + :param enterprise_manager_entity_identifier: The enterprise_manager_entity_identifier of this EmManagedExternalHostInsight. + :type: str + """ + self._enterprise_manager_entity_identifier = enterprise_manager_entity_identifier + + @property + def enterprise_manager_entity_display_name(self): + """ + Gets the enterprise_manager_entity_display_name of this EmManagedExternalHostInsight. + Enterprise Manager Entity Display Name + + + :return: The enterprise_manager_entity_display_name of this EmManagedExternalHostInsight. + :rtype: str + """ + return self._enterprise_manager_entity_display_name + + @enterprise_manager_entity_display_name.setter + def enterprise_manager_entity_display_name(self, enterprise_manager_entity_display_name): + """ + Sets the enterprise_manager_entity_display_name of this EmManagedExternalHostInsight. + Enterprise Manager Entity Display Name + + + :param enterprise_manager_entity_display_name: The enterprise_manager_entity_display_name of this EmManagedExternalHostInsight. + :type: str + """ + self._enterprise_manager_entity_display_name = enterprise_manager_entity_display_name + + @property + def enterprise_manager_bridge_id(self): + """ + **[Required]** Gets the enterprise_manager_bridge_id of this EmManagedExternalHostInsight. + OPSI Enterprise Manager Bridge OCID + + + :return: The enterprise_manager_bridge_id of this EmManagedExternalHostInsight. + :rtype: str + """ + return self._enterprise_manager_bridge_id + + @enterprise_manager_bridge_id.setter + def enterprise_manager_bridge_id(self, enterprise_manager_bridge_id): + """ + Sets the enterprise_manager_bridge_id of this EmManagedExternalHostInsight. + OPSI Enterprise Manager Bridge OCID + + + :param enterprise_manager_bridge_id: The enterprise_manager_bridge_id of this EmManagedExternalHostInsight. + :type: str + """ + self._enterprise_manager_bridge_id = enterprise_manager_bridge_id + + @property + def platform_type(self): + """ + Gets the platform_type of this EmManagedExternalHostInsight. + Platform type. + + Allowed values for this property are: "LINUX", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The platform_type of this EmManagedExternalHostInsight. + :rtype: str + """ + return self._platform_type + + @platform_type.setter + def platform_type(self, platform_type): + """ + Sets the platform_type of this EmManagedExternalHostInsight. + Platform type. + + + :param platform_type: The platform_type of this EmManagedExternalHostInsight. + :type: str + """ + allowed_values = ["LINUX"] + if not value_allowed_none_or_none_sentinel(platform_type, allowed_values): + platform_type = 'UNKNOWN_ENUM_VALUE' + self._platform_type = platform_type + + @property + def platform_name(self): + """ + Gets the platform_name of this EmManagedExternalHostInsight. + Platform name. + + + :return: The platform_name of this EmManagedExternalHostInsight. + :rtype: str + """ + return self._platform_name + + @platform_name.setter + def platform_name(self, platform_name): + """ + Sets the platform_name of this EmManagedExternalHostInsight. + Platform name. + + + :param platform_name: The platform_name of this EmManagedExternalHostInsight. + :type: str + """ + self._platform_name = platform_name + + @property + def platform_version(self): + """ + Gets the platform_version of this EmManagedExternalHostInsight. + Platform version. + + + :return: The platform_version of this EmManagedExternalHostInsight. + :rtype: str + """ + return self._platform_version + + @platform_version.setter + def platform_version(self, platform_version): + """ + Sets the platform_version of this EmManagedExternalHostInsight. + Platform version. + + + :param platform_version: The platform_version of this EmManagedExternalHostInsight. + :type: str + """ + self._platform_version = platform_version + + @property + def exadata_insight_id(self): + """ + Gets the exadata_insight_id of this EmManagedExternalHostInsight. + The `OCID`__ of the Exadata insight. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The exadata_insight_id of this EmManagedExternalHostInsight. + :rtype: str + """ + return self._exadata_insight_id + + @exadata_insight_id.setter + def exadata_insight_id(self, exadata_insight_id): + """ + Sets the exadata_insight_id of this EmManagedExternalHostInsight. + The `OCID`__ of the Exadata insight. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param exadata_insight_id: The exadata_insight_id of this EmManagedExternalHostInsight. + :type: str + """ + self._exadata_insight_id = exadata_insight_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/opsi/models/em_managed_external_host_insight_summary.py b/src/oci/opsi/models/em_managed_external_host_insight_summary.py new file mode 100644 index 0000000000..d4e8b65994 --- /dev/null +++ b/src/oci/opsi/models/em_managed_external_host_insight_summary.py @@ -0,0 +1,416 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .host_insight_summary import HostInsightSummary +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 EmManagedExternalHostInsightSummary(HostInsightSummary): + """ + Summary of an EM-managed external host insight resource. + """ + + #: A constant which can be used with the platform_type property of a EmManagedExternalHostInsightSummary. + #: This constant has a value of "LINUX" + PLATFORM_TYPE_LINUX = "LINUX" + + def __init__(self, **kwargs): + """ + Initializes a new EmManagedExternalHostInsightSummary object with values from keyword arguments. The default value of the :py:attr:`~oci.opsi.models.EmManagedExternalHostInsightSummary.entity_source` attribute + of this class is ``EM_MANAGED_EXTERNAL_HOST`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param entity_source: + The value to assign to the entity_source property of this EmManagedExternalHostInsightSummary. + Allowed values for this property are: "MACS_MANAGED_EXTERNAL_HOST", "EM_MANAGED_EXTERNAL_HOST", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type entity_source: str + + :param id: + The value to assign to the id property of this EmManagedExternalHostInsightSummary. + :type id: str + + :param compartment_id: + The value to assign to the compartment_id property of this EmManagedExternalHostInsightSummary. + :type compartment_id: str + + :param host_name: + The value to assign to the host_name property of this EmManagedExternalHostInsightSummary. + :type host_name: str + + :param host_display_name: + The value to assign to the host_display_name property of this EmManagedExternalHostInsightSummary. + :type host_display_name: str + + :param host_type: + The value to assign to the host_type property of this EmManagedExternalHostInsightSummary. + :type host_type: str + + :param processor_count: + The value to assign to the processor_count property of this EmManagedExternalHostInsightSummary. + :type processor_count: int + + :param freeform_tags: + The value to assign to the freeform_tags property of this EmManagedExternalHostInsightSummary. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this EmManagedExternalHostInsightSummary. + :type defined_tags: dict(str, dict(str, object)) + + :param system_tags: + The value to assign to the system_tags property of this EmManagedExternalHostInsightSummary. + :type system_tags: dict(str, dict(str, object)) + + :param status: + The value to assign to the status property of this EmManagedExternalHostInsightSummary. + Allowed values for this property are: "DISABLED", "ENABLED", "TERMINATED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type status: str + + :param time_created: + The value to assign to the time_created property of this EmManagedExternalHostInsightSummary. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this EmManagedExternalHostInsightSummary. + :type time_updated: datetime + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this EmManagedExternalHostInsightSummary. + Allowed values for this property are: "CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED", "NEEDS_ATTENTION", '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 EmManagedExternalHostInsightSummary. + :type lifecycle_details: str + + :param enterprise_manager_identifier: + The value to assign to the enterprise_manager_identifier property of this EmManagedExternalHostInsightSummary. + :type enterprise_manager_identifier: str + + :param enterprise_manager_entity_name: + The value to assign to the enterprise_manager_entity_name property of this EmManagedExternalHostInsightSummary. + :type enterprise_manager_entity_name: str + + :param enterprise_manager_entity_type: + The value to assign to the enterprise_manager_entity_type property of this EmManagedExternalHostInsightSummary. + :type enterprise_manager_entity_type: str + + :param enterprise_manager_entity_identifier: + The value to assign to the enterprise_manager_entity_identifier property of this EmManagedExternalHostInsightSummary. + :type enterprise_manager_entity_identifier: str + + :param enterprise_manager_entity_display_name: + The value to assign to the enterprise_manager_entity_display_name property of this EmManagedExternalHostInsightSummary. + :type enterprise_manager_entity_display_name: str + + :param enterprise_manager_bridge_id: + The value to assign to the enterprise_manager_bridge_id property of this EmManagedExternalHostInsightSummary. + :type enterprise_manager_bridge_id: str + + :param platform_type: + The value to assign to the platform_type property of this EmManagedExternalHostInsightSummary. + Allowed values for this property are: "LINUX", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type platform_type: str + + :param exadata_insight_id: + The value to assign to the exadata_insight_id property of this EmManagedExternalHostInsightSummary. + :type exadata_insight_id: str + + """ + self.swagger_types = { + 'entity_source': 'str', + 'id': 'str', + 'compartment_id': 'str', + 'host_name': 'str', + 'host_display_name': 'str', + 'host_type': 'str', + 'processor_count': 'int', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'system_tags': 'dict(str, dict(str, object))', + 'status': 'str', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'lifecycle_state': 'str', + 'lifecycle_details': 'str', + 'enterprise_manager_identifier': 'str', + 'enterprise_manager_entity_name': 'str', + 'enterprise_manager_entity_type': 'str', + 'enterprise_manager_entity_identifier': 'str', + 'enterprise_manager_entity_display_name': 'str', + 'enterprise_manager_bridge_id': 'str', + 'platform_type': 'str', + 'exadata_insight_id': 'str' + } + + self.attribute_map = { + 'entity_source': 'entitySource', + 'id': 'id', + 'compartment_id': 'compartmentId', + 'host_name': 'hostName', + 'host_display_name': 'hostDisplayName', + 'host_type': 'hostType', + 'processor_count': 'processorCount', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'system_tags': 'systemTags', + 'status': 'status', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'lifecycle_state': 'lifecycleState', + 'lifecycle_details': 'lifecycleDetails', + 'enterprise_manager_identifier': 'enterpriseManagerIdentifier', + 'enterprise_manager_entity_name': 'enterpriseManagerEntityName', + 'enterprise_manager_entity_type': 'enterpriseManagerEntityType', + 'enterprise_manager_entity_identifier': 'enterpriseManagerEntityIdentifier', + 'enterprise_manager_entity_display_name': 'enterpriseManagerEntityDisplayName', + 'enterprise_manager_bridge_id': 'enterpriseManagerBridgeId', + 'platform_type': 'platformType', + 'exadata_insight_id': 'exadataInsightId' + } + + self._entity_source = None + self._id = None + self._compartment_id = None + self._host_name = None + self._host_display_name = None + self._host_type = None + self._processor_count = None + self._freeform_tags = None + self._defined_tags = None + self._system_tags = None + self._status = None + self._time_created = None + self._time_updated = None + self._lifecycle_state = None + self._lifecycle_details = None + self._enterprise_manager_identifier = None + self._enterprise_manager_entity_name = None + self._enterprise_manager_entity_type = None + self._enterprise_manager_entity_identifier = None + self._enterprise_manager_entity_display_name = None + self._enterprise_manager_bridge_id = None + self._platform_type = None + self._exadata_insight_id = None + self._entity_source = 'EM_MANAGED_EXTERNAL_HOST' + + @property + def enterprise_manager_identifier(self): + """ + **[Required]** Gets the enterprise_manager_identifier of this EmManagedExternalHostInsightSummary. + Enterprise Manager Unique Identifier + + + :return: The enterprise_manager_identifier of this EmManagedExternalHostInsightSummary. + :rtype: str + """ + return self._enterprise_manager_identifier + + @enterprise_manager_identifier.setter + def enterprise_manager_identifier(self, enterprise_manager_identifier): + """ + Sets the enterprise_manager_identifier of this EmManagedExternalHostInsightSummary. + Enterprise Manager Unique Identifier + + + :param enterprise_manager_identifier: The enterprise_manager_identifier of this EmManagedExternalHostInsightSummary. + :type: str + """ + self._enterprise_manager_identifier = enterprise_manager_identifier + + @property + def enterprise_manager_entity_name(self): + """ + **[Required]** Gets the enterprise_manager_entity_name of this EmManagedExternalHostInsightSummary. + Enterprise Manager Entity Name + + + :return: The enterprise_manager_entity_name of this EmManagedExternalHostInsightSummary. + :rtype: str + """ + return self._enterprise_manager_entity_name + + @enterprise_manager_entity_name.setter + def enterprise_manager_entity_name(self, enterprise_manager_entity_name): + """ + Sets the enterprise_manager_entity_name of this EmManagedExternalHostInsightSummary. + Enterprise Manager Entity Name + + + :param enterprise_manager_entity_name: The enterprise_manager_entity_name of this EmManagedExternalHostInsightSummary. + :type: str + """ + self._enterprise_manager_entity_name = enterprise_manager_entity_name + + @property + def enterprise_manager_entity_type(self): + """ + **[Required]** Gets the enterprise_manager_entity_type of this EmManagedExternalHostInsightSummary. + Enterprise Manager Entity Type + + + :return: The enterprise_manager_entity_type of this EmManagedExternalHostInsightSummary. + :rtype: str + """ + return self._enterprise_manager_entity_type + + @enterprise_manager_entity_type.setter + def enterprise_manager_entity_type(self, enterprise_manager_entity_type): + """ + Sets the enterprise_manager_entity_type of this EmManagedExternalHostInsightSummary. + Enterprise Manager Entity Type + + + :param enterprise_manager_entity_type: The enterprise_manager_entity_type of this EmManagedExternalHostInsightSummary. + :type: str + """ + self._enterprise_manager_entity_type = enterprise_manager_entity_type + + @property + def enterprise_manager_entity_identifier(self): + """ + **[Required]** Gets the enterprise_manager_entity_identifier of this EmManagedExternalHostInsightSummary. + Enterprise Manager Entity Unique Identifier + + + :return: The enterprise_manager_entity_identifier of this EmManagedExternalHostInsightSummary. + :rtype: str + """ + return self._enterprise_manager_entity_identifier + + @enterprise_manager_entity_identifier.setter + def enterprise_manager_entity_identifier(self, enterprise_manager_entity_identifier): + """ + Sets the enterprise_manager_entity_identifier of this EmManagedExternalHostInsightSummary. + Enterprise Manager Entity Unique Identifier + + + :param enterprise_manager_entity_identifier: The enterprise_manager_entity_identifier of this EmManagedExternalHostInsightSummary. + :type: str + """ + self._enterprise_manager_entity_identifier = enterprise_manager_entity_identifier + + @property + def enterprise_manager_entity_display_name(self): + """ + Gets the enterprise_manager_entity_display_name of this EmManagedExternalHostInsightSummary. + Enterprise Manager Entity Display Name + + + :return: The enterprise_manager_entity_display_name of this EmManagedExternalHostInsightSummary. + :rtype: str + """ + return self._enterprise_manager_entity_display_name + + @enterprise_manager_entity_display_name.setter + def enterprise_manager_entity_display_name(self, enterprise_manager_entity_display_name): + """ + Sets the enterprise_manager_entity_display_name of this EmManagedExternalHostInsightSummary. + Enterprise Manager Entity Display Name + + + :param enterprise_manager_entity_display_name: The enterprise_manager_entity_display_name of this EmManagedExternalHostInsightSummary. + :type: str + """ + self._enterprise_manager_entity_display_name = enterprise_manager_entity_display_name + + @property + def enterprise_manager_bridge_id(self): + """ + **[Required]** Gets the enterprise_manager_bridge_id of this EmManagedExternalHostInsightSummary. + OPSI Enterprise Manager Bridge OCID + + + :return: The enterprise_manager_bridge_id of this EmManagedExternalHostInsightSummary. + :rtype: str + """ + return self._enterprise_manager_bridge_id + + @enterprise_manager_bridge_id.setter + def enterprise_manager_bridge_id(self, enterprise_manager_bridge_id): + """ + Sets the enterprise_manager_bridge_id of this EmManagedExternalHostInsightSummary. + OPSI Enterprise Manager Bridge OCID + + + :param enterprise_manager_bridge_id: The enterprise_manager_bridge_id of this EmManagedExternalHostInsightSummary. + :type: str + """ + self._enterprise_manager_bridge_id = enterprise_manager_bridge_id + + @property + def platform_type(self): + """ + Gets the platform_type of this EmManagedExternalHostInsightSummary. + Platform type. + + Allowed values for this property are: "LINUX", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The platform_type of this EmManagedExternalHostInsightSummary. + :rtype: str + """ + return self._platform_type + + @platform_type.setter + def platform_type(self, platform_type): + """ + Sets the platform_type of this EmManagedExternalHostInsightSummary. + Platform type. + + + :param platform_type: The platform_type of this EmManagedExternalHostInsightSummary. + :type: str + """ + allowed_values = ["LINUX"] + if not value_allowed_none_or_none_sentinel(platform_type, allowed_values): + platform_type = 'UNKNOWN_ENUM_VALUE' + self._platform_type = platform_type + + @property + def exadata_insight_id(self): + """ + Gets the exadata_insight_id of this EmManagedExternalHostInsightSummary. + The `OCID`__ of the Exadata insight. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The exadata_insight_id of this EmManagedExternalHostInsightSummary. + :rtype: str + """ + return self._exadata_insight_id + + @exadata_insight_id.setter + def exadata_insight_id(self, exadata_insight_id): + """ + Sets the exadata_insight_id of this EmManagedExternalHostInsightSummary. + The `OCID`__ of the Exadata insight. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param exadata_insight_id: The exadata_insight_id of this EmManagedExternalHostInsightSummary. + :type: str + """ + self._exadata_insight_id = exadata_insight_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/opsi/models/enable_em_managed_external_exadata_insight_details.py b/src/oci/opsi/models/enable_em_managed_external_exadata_insight_details.py new file mode 100644 index 0000000000..24a7861fd1 --- /dev/null +++ b/src/oci/opsi/models/enable_em_managed_external_exadata_insight_details.py @@ -0,0 +1,49 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .enable_exadata_insight_details import EnableExadataInsightDetails +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 EnableEmManagedExternalExadataInsightDetails(EnableExadataInsightDetails): + """ + The information about the Exadata system to be analyzed. + """ + + def __init__(self, **kwargs): + """ + Initializes a new EnableEmManagedExternalExadataInsightDetails object with values from keyword arguments. The default value of the :py:attr:`~oci.opsi.models.EnableEmManagedExternalExadataInsightDetails.entity_source` attribute + of this class is ``EM_MANAGED_EXTERNAL_EXADATA`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param entity_source: + The value to assign to the entity_source property of this EnableEmManagedExternalExadataInsightDetails. + Allowed values for this property are: "EM_MANAGED_EXTERNAL_EXADATA" + :type entity_source: str + + """ + self.swagger_types = { + 'entity_source': 'str' + } + + self.attribute_map = { + 'entity_source': 'entitySource' + } + + self._entity_source = None + self._entity_source = 'EM_MANAGED_EXTERNAL_EXADATA' + + 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/opsi/models/enable_em_managed_external_host_insight_details.py b/src/oci/opsi/models/enable_em_managed_external_host_insight_details.py new file mode 100644 index 0000000000..3b1e99ccfa --- /dev/null +++ b/src/oci/opsi/models/enable_em_managed_external_host_insight_details.py @@ -0,0 +1,49 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .enable_host_insight_details import EnableHostInsightDetails +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 EnableEmManagedExternalHostInsightDetails(EnableHostInsightDetails): + """ + The information about the EM-managed external host to be analyzed. + """ + + def __init__(self, **kwargs): + """ + Initializes a new EnableEmManagedExternalHostInsightDetails object with values from keyword arguments. The default value of the :py:attr:`~oci.opsi.models.EnableEmManagedExternalHostInsightDetails.entity_source` attribute + of this class is ``EM_MANAGED_EXTERNAL_HOST`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param entity_source: + The value to assign to the entity_source property of this EnableEmManagedExternalHostInsightDetails. + Allowed values for this property are: "MACS_MANAGED_EXTERNAL_HOST", "EM_MANAGED_EXTERNAL_HOST" + :type entity_source: str + + """ + self.swagger_types = { + 'entity_source': 'str' + } + + self.attribute_map = { + 'entity_source': 'entitySource' + } + + self._entity_source = None + self._entity_source = 'EM_MANAGED_EXTERNAL_HOST' + + 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/opsi/models/enable_exadata_insight_details.py b/src/oci/opsi/models/enable_exadata_insight_details.py new file mode 100644 index 0000000000..0540e2bdb0 --- /dev/null +++ b/src/oci/opsi/models/enable_exadata_insight_details.py @@ -0,0 +1,100 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 EnableExadataInsightDetails(object): + """ + The information about the Exadata system to be analyzed. + """ + + #: A constant which can be used with the entity_source property of a EnableExadataInsightDetails. + #: This constant has a value of "EM_MANAGED_EXTERNAL_EXADATA" + ENTITY_SOURCE_EM_MANAGED_EXTERNAL_EXADATA = "EM_MANAGED_EXTERNAL_EXADATA" + + def __init__(self, **kwargs): + """ + Initializes a new EnableExadataInsightDetails object with values from keyword arguments. This class has the following subclasses and if you are using this class as input + to a service operations then you should favor using a subclass over the base class: + + * :class:`~oci.opsi.models.EnableEmManagedExternalExadataInsightDetails` + + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param entity_source: + The value to assign to the entity_source property of this EnableExadataInsightDetails. + Allowed values for this property are: "EM_MANAGED_EXTERNAL_EXADATA" + :type entity_source: str + + """ + self.swagger_types = { + 'entity_source': 'str' + } + + self.attribute_map = { + 'entity_source': 'entitySource' + } + + self._entity_source = None + + @staticmethod + def get_subtype(object_dictionary): + """ + Given the hash representation of a subtype of this class, + use the info in the hash to return the class of the subtype. + """ + type = object_dictionary['entitySource'] + + if type == 'EM_MANAGED_EXTERNAL_EXADATA': + return 'EnableEmManagedExternalExadataInsightDetails' + else: + return 'EnableExadataInsightDetails' + + @property + def entity_source(self): + """ + **[Required]** Gets the entity_source of this EnableExadataInsightDetails. + Source of the Exadata system. + + Allowed values for this property are: "EM_MANAGED_EXTERNAL_EXADATA" + + + :return: The entity_source of this EnableExadataInsightDetails. + :rtype: str + """ + return self._entity_source + + @entity_source.setter + def entity_source(self, entity_source): + """ + Sets the entity_source of this EnableExadataInsightDetails. + Source of the Exadata system. + + + :param entity_source: The entity_source of this EnableExadataInsightDetails. + :type: str + """ + allowed_values = ["EM_MANAGED_EXTERNAL_EXADATA"] + if not value_allowed_none_or_none_sentinel(entity_source, allowed_values): + raise ValueError( + "Invalid value for `entity_source`, must be None or one of {0}" + .format(allowed_values) + ) + self._entity_source = entity_source + + 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/opsi/models/enable_host_insight_details.py b/src/oci/opsi/models/enable_host_insight_details.py index de2808e25d..7a3e9e9fdc 100644 --- a/src/oci/opsi/models/enable_host_insight_details.py +++ b/src/oci/opsi/models/enable_host_insight_details.py @@ -17,18 +17,23 @@ class EnableHostInsightDetails(object): #: This constant has a value of "MACS_MANAGED_EXTERNAL_HOST" ENTITY_SOURCE_MACS_MANAGED_EXTERNAL_HOST = "MACS_MANAGED_EXTERNAL_HOST" + #: A constant which can be used with the entity_source property of a EnableHostInsightDetails. + #: This constant has a value of "EM_MANAGED_EXTERNAL_HOST" + ENTITY_SOURCE_EM_MANAGED_EXTERNAL_HOST = "EM_MANAGED_EXTERNAL_HOST" + def __init__(self, **kwargs): """ Initializes a new EnableHostInsightDetails object with values from keyword arguments. This class has the following subclasses and if you are using this class as input to a service operations then you should favor using a subclass over the base class: * :class:`~oci.opsi.models.EnableMacsManagedExternalHostInsightDetails` + * :class:`~oci.opsi.models.EnableEmManagedExternalHostInsightDetails` The following keyword arguments are supported (corresponding to the getters/setters of this class): :param entity_source: The value to assign to the entity_source property of this EnableHostInsightDetails. - Allowed values for this property are: "MACS_MANAGED_EXTERNAL_HOST" + Allowed values for this property are: "MACS_MANAGED_EXTERNAL_HOST", "EM_MANAGED_EXTERNAL_HOST" :type entity_source: str """ @@ -52,6 +57,9 @@ def get_subtype(object_dictionary): if type == 'MACS_MANAGED_EXTERNAL_HOST': return 'EnableMacsManagedExternalHostInsightDetails' + + if type == 'EM_MANAGED_EXTERNAL_HOST': + return 'EnableEmManagedExternalHostInsightDetails' else: return 'EnableHostInsightDetails' @@ -61,7 +69,7 @@ def entity_source(self): **[Required]** Gets the entity_source of this EnableHostInsightDetails. Source of the host entity. - Allowed values for this property are: "MACS_MANAGED_EXTERNAL_HOST" + Allowed values for this property are: "MACS_MANAGED_EXTERNAL_HOST", "EM_MANAGED_EXTERNAL_HOST" :return: The entity_source of this EnableHostInsightDetails. @@ -79,7 +87,7 @@ def entity_source(self, entity_source): :param entity_source: The entity_source of this EnableHostInsightDetails. :type: str """ - allowed_values = ["MACS_MANAGED_EXTERNAL_HOST"] + allowed_values = ["MACS_MANAGED_EXTERNAL_HOST", "EM_MANAGED_EXTERNAL_HOST"] if not value_allowed_none_or_none_sentinel(entity_source, allowed_values): raise ValueError( "Invalid value for `entity_source`, must be None or one of {0}" diff --git a/src/oci/opsi/models/enable_macs_managed_external_host_insight_details.py b/src/oci/opsi/models/enable_macs_managed_external_host_insight_details.py index 4a4e446334..59cfc15e2b 100644 --- a/src/oci/opsi/models/enable_macs_managed_external_host_insight_details.py +++ b/src/oci/opsi/models/enable_macs_managed_external_host_insight_details.py @@ -21,7 +21,7 @@ def __init__(self, **kwargs): :param entity_source: The value to assign to the entity_source property of this EnableMacsManagedExternalHostInsightDetails. - Allowed values for this property are: "MACS_MANAGED_EXTERNAL_HOST" + Allowed values for this property are: "MACS_MANAGED_EXTERNAL_HOST", "EM_MANAGED_EXTERNAL_HOST" :type entity_source: str """ diff --git a/src/oci/opsi/models/exadata_configuration_collection.py b/src/oci/opsi/models/exadata_configuration_collection.py new file mode 100644 index 0000000000..585a7c0ba2 --- /dev/null +++ b/src/oci/opsi/models/exadata_configuration_collection.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 ExadataConfigurationCollection(object): + """ + Collection of exadata insight configuration summary objects. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ExadataConfigurationCollection object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param items: + The value to assign to the items property of this ExadataConfigurationCollection. + :type items: list[oci.opsi.models.ExadataConfigurationSummary] + + """ + self.swagger_types = { + 'items': 'list[ExadataConfigurationSummary]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this ExadataConfigurationCollection. + Array of exadata insight configurations summary objects. + + + :return: The items of this ExadataConfigurationCollection. + :rtype: list[oci.opsi.models.ExadataConfigurationSummary] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this ExadataConfigurationCollection. + Array of exadata insight configurations summary objects. + + + :param items: The items of this ExadataConfigurationCollection. + :type: list[oci.opsi.models.ExadataConfigurationSummary] + """ + self._items = items + + 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/opsi/models/exadata_configuration_summary.py b/src/oci/opsi/models/exadata_configuration_summary.py new file mode 100644 index 0000000000..ee974043a7 --- /dev/null +++ b/src/oci/opsi/models/exadata_configuration_summary.py @@ -0,0 +1,403 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 ExadataConfigurationSummary(object): + """ + Summary of a exadata configuration for a resource. + """ + + #: A constant which can be used with the entity_source property of a ExadataConfigurationSummary. + #: This constant has a value of "EM_MANAGED_EXTERNAL_EXADATA" + ENTITY_SOURCE_EM_MANAGED_EXTERNAL_EXADATA = "EM_MANAGED_EXTERNAL_EXADATA" + + #: A constant which can be used with the exadata_type property of a ExadataConfigurationSummary. + #: This constant has a value of "DBMACHINE" + EXADATA_TYPE_DBMACHINE = "DBMACHINE" + + #: A constant which can be used with the exadata_type property of a ExadataConfigurationSummary. + #: This constant has a value of "EXACS" + EXADATA_TYPE_EXACS = "EXACS" + + #: A constant which can be used with the exadata_type property of a ExadataConfigurationSummary. + #: This constant has a value of "EXACC" + EXADATA_TYPE_EXACC = "EXACC" + + #: A constant which can be used with the exadata_rack_type property of a ExadataConfigurationSummary. + #: This constant has a value of "FULL" + EXADATA_RACK_TYPE_FULL = "FULL" + + #: A constant which can be used with the exadata_rack_type property of a ExadataConfigurationSummary. + #: This constant has a value of "HALF" + EXADATA_RACK_TYPE_HALF = "HALF" + + #: A constant which can be used with the exadata_rack_type property of a ExadataConfigurationSummary. + #: This constant has a value of "QUARTER" + EXADATA_RACK_TYPE_QUARTER = "QUARTER" + + #: A constant which can be used with the exadata_rack_type property of a ExadataConfigurationSummary. + #: This constant has a value of "EIGHTH" + EXADATA_RACK_TYPE_EIGHTH = "EIGHTH" + + def __init__(self, **kwargs): + """ + Initializes a new ExadataConfigurationSummary object with values from keyword arguments. This class has the following subclasses and if you are using this class as input + to a service operations then you should favor using a subclass over the base class: + + * :class:`~oci.opsi.models.ExadataDatabaseMachineConfigurationSummary` + + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param exadata_insight_id: + The value to assign to the exadata_insight_id property of this ExadataConfigurationSummary. + :type exadata_insight_id: str + + :param entity_source: + The value to assign to the entity_source property of this ExadataConfigurationSummary. + Allowed values for this property are: "EM_MANAGED_EXTERNAL_EXADATA", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type entity_source: str + + :param compartment_id: + The value to assign to the compartment_id property of this ExadataConfigurationSummary. + :type compartment_id: str + + :param exadata_name: + The value to assign to the exadata_name property of this ExadataConfigurationSummary. + :type exadata_name: str + + :param exadata_display_name: + The value to assign to the exadata_display_name property of this ExadataConfigurationSummary. + :type exadata_display_name: str + + :param exadata_type: + The value to assign to the exadata_type property of this ExadataConfigurationSummary. + Allowed values for this property are: "DBMACHINE", "EXACS", "EXACC", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type exadata_type: str + + :param exadata_rack_type: + The value to assign to the exadata_rack_type property of this ExadataConfigurationSummary. + Allowed values for this property are: "FULL", "HALF", "QUARTER", "EIGHTH", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type exadata_rack_type: str + + :param defined_tags: + The value to assign to the defined_tags property of this ExadataConfigurationSummary. + :type defined_tags: dict(str, dict(str, object)) + + :param freeform_tags: + The value to assign to the freeform_tags property of this ExadataConfigurationSummary. + :type freeform_tags: dict(str, str) + + """ + self.swagger_types = { + 'exadata_insight_id': 'str', + 'entity_source': 'str', + 'compartment_id': 'str', + 'exadata_name': 'str', + 'exadata_display_name': 'str', + 'exadata_type': 'str', + 'exadata_rack_type': 'str', + 'defined_tags': 'dict(str, dict(str, object))', + 'freeform_tags': 'dict(str, str)' + } + + self.attribute_map = { + 'exadata_insight_id': 'exadataInsightId', + 'entity_source': 'entitySource', + 'compartment_id': 'compartmentId', + 'exadata_name': 'exadataName', + 'exadata_display_name': 'exadataDisplayName', + 'exadata_type': 'exadataType', + 'exadata_rack_type': 'exadataRackType', + 'defined_tags': 'definedTags', + 'freeform_tags': 'freeformTags' + } + + self._exadata_insight_id = None + self._entity_source = None + self._compartment_id = None + self._exadata_name = None + self._exadata_display_name = None + self._exadata_type = None + self._exadata_rack_type = None + self._defined_tags = None + self._freeform_tags = None + + @staticmethod + def get_subtype(object_dictionary): + """ + Given the hash representation of a subtype of this class, + use the info in the hash to return the class of the subtype. + """ + type = object_dictionary['entitySource'] + + if type == 'EM_MANAGED_EXTERNAL_EXADATA': + return 'ExadataDatabaseMachineConfigurationSummary' + else: + return 'ExadataConfigurationSummary' + + @property + def exadata_insight_id(self): + """ + **[Required]** Gets the exadata_insight_id of this ExadataConfigurationSummary. + The `OCID`__ of the Exadata insight. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The exadata_insight_id of this ExadataConfigurationSummary. + :rtype: str + """ + return self._exadata_insight_id + + @exadata_insight_id.setter + def exadata_insight_id(self, exadata_insight_id): + """ + Sets the exadata_insight_id of this ExadataConfigurationSummary. + The `OCID`__ of the Exadata insight. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param exadata_insight_id: The exadata_insight_id of this ExadataConfigurationSummary. + :type: str + """ + self._exadata_insight_id = exadata_insight_id + + @property + def entity_source(self): + """ + **[Required]** Gets the entity_source of this ExadataConfigurationSummary. + Source of the exadata entity. + + Allowed values for this property are: "EM_MANAGED_EXTERNAL_EXADATA", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The entity_source of this ExadataConfigurationSummary. + :rtype: str + """ + return self._entity_source + + @entity_source.setter + def entity_source(self, entity_source): + """ + Sets the entity_source of this ExadataConfigurationSummary. + Source of the exadata entity. + + + :param entity_source: The entity_source of this ExadataConfigurationSummary. + :type: str + """ + allowed_values = ["EM_MANAGED_EXTERNAL_EXADATA"] + if not value_allowed_none_or_none_sentinel(entity_source, allowed_values): + entity_source = 'UNKNOWN_ENUM_VALUE' + self._entity_source = entity_source + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this ExadataConfigurationSummary. + The `OCID`__ of the compartment. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The compartment_id of this ExadataConfigurationSummary. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this ExadataConfigurationSummary. + The `OCID`__ of the compartment. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param compartment_id: The compartment_id of this ExadataConfigurationSummary. + :type: str + """ + self._compartment_id = compartment_id + + @property + def exadata_name(self): + """ + **[Required]** Gets the exadata_name of this ExadataConfigurationSummary. + The Exadata system name. If the Exadata systems managed by Enterprise Manager, the name is unique amongst the Exadata systems managed by the same Enterprise Manager. + + + :return: The exadata_name of this ExadataConfigurationSummary. + :rtype: str + """ + return self._exadata_name + + @exadata_name.setter + def exadata_name(self, exadata_name): + """ + Sets the exadata_name of this ExadataConfigurationSummary. + The Exadata system name. If the Exadata systems managed by Enterprise Manager, the name is unique amongst the Exadata systems managed by the same Enterprise Manager. + + + :param exadata_name: The exadata_name of this ExadataConfigurationSummary. + :type: str + """ + self._exadata_name = exadata_name + + @property + def exadata_display_name(self): + """ + **[Required]** Gets the exadata_display_name of this ExadataConfigurationSummary. + The user-friendly name for the Exadata system. The name does not have to be unique. + + + :return: The exadata_display_name of this ExadataConfigurationSummary. + :rtype: str + """ + return self._exadata_display_name + + @exadata_display_name.setter + def exadata_display_name(self, exadata_display_name): + """ + Sets the exadata_display_name of this ExadataConfigurationSummary. + The user-friendly name for the Exadata system. The name does not have to be unique. + + + :param exadata_display_name: The exadata_display_name of this ExadataConfigurationSummary. + :type: str + """ + self._exadata_display_name = exadata_display_name + + @property + def exadata_type(self): + """ + **[Required]** Gets the exadata_type of this ExadataConfigurationSummary. + Operations Insights internal representation of the the Exadata system type. + + Allowed values for this property are: "DBMACHINE", "EXACS", "EXACC", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The exadata_type of this ExadataConfigurationSummary. + :rtype: str + """ + return self._exadata_type + + @exadata_type.setter + def exadata_type(self, exadata_type): + """ + Sets the exadata_type of this ExadataConfigurationSummary. + Operations Insights internal representation of the the Exadata system type. + + + :param exadata_type: The exadata_type of this ExadataConfigurationSummary. + :type: str + """ + allowed_values = ["DBMACHINE", "EXACS", "EXACC"] + if not value_allowed_none_or_none_sentinel(exadata_type, allowed_values): + exadata_type = 'UNKNOWN_ENUM_VALUE' + self._exadata_type = exadata_type + + @property + def exadata_rack_type(self): + """ + **[Required]** Gets the exadata_rack_type of this ExadataConfigurationSummary. + Exadata rack type. + + Allowed values for this property are: "FULL", "HALF", "QUARTER", "EIGHTH", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The exadata_rack_type of this ExadataConfigurationSummary. + :rtype: str + """ + return self._exadata_rack_type + + @exadata_rack_type.setter + def exadata_rack_type(self, exadata_rack_type): + """ + Sets the exadata_rack_type of this ExadataConfigurationSummary. + Exadata rack type. + + + :param exadata_rack_type: The exadata_rack_type of this ExadataConfigurationSummary. + :type: str + """ + allowed_values = ["FULL", "HALF", "QUARTER", "EIGHTH"] + if not value_allowed_none_or_none_sentinel(exadata_rack_type, allowed_values): + exadata_rack_type = 'UNKNOWN_ENUM_VALUE' + self._exadata_rack_type = exadata_rack_type + + @property + def defined_tags(self): + """ + **[Required]** Gets the defined_tags of this ExadataConfigurationSummary. + Defined tags for this resource. Each key is predefined and scoped to a namespace. + Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + + :return: The defined_tags of this ExadataConfigurationSummary. + :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 ExadataConfigurationSummary. + Defined tags for this resource. Each key is predefined and scoped to a namespace. + Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + + :param defined_tags: The defined_tags of this ExadataConfigurationSummary. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + @property + def freeform_tags(self): + """ + **[Required]** Gets the freeform_tags of this ExadataConfigurationSummary. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + Example: `{\"bar-key\": \"value\"}` + + + :return: The freeform_tags of this ExadataConfigurationSummary. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this ExadataConfigurationSummary. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + Example: `{\"bar-key\": \"value\"}` + + + :param freeform_tags: The freeform_tags of this ExadataConfigurationSummary. + :type: dict(str, str) + """ + self._freeform_tags = freeform_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/opsi/models/exadata_database_machine_configuration_summary.py b/src/oci/opsi/models/exadata_database_machine_configuration_summary.py new file mode 100644 index 0000000000..c4e1ec96e0 --- /dev/null +++ b/src/oci/opsi/models/exadata_database_machine_configuration_summary.py @@ -0,0 +1,169 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .exadata_configuration_summary import ExadataConfigurationSummary +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 ExadataDatabaseMachineConfigurationSummary(ExadataConfigurationSummary): + """ + Configuration summary of a database machine. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ExadataDatabaseMachineConfigurationSummary object with values from keyword arguments. The default value of the :py:attr:`~oci.opsi.models.ExadataDatabaseMachineConfigurationSummary.entity_source` attribute + of this class is ``EM_MANAGED_EXTERNAL_EXADATA`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param exadata_insight_id: + The value to assign to the exadata_insight_id property of this ExadataDatabaseMachineConfigurationSummary. + :type exadata_insight_id: str + + :param entity_source: + The value to assign to the entity_source property of this ExadataDatabaseMachineConfigurationSummary. + Allowed values for this property are: "EM_MANAGED_EXTERNAL_EXADATA" + :type entity_source: str + + :param compartment_id: + The value to assign to the compartment_id property of this ExadataDatabaseMachineConfigurationSummary. + :type compartment_id: str + + :param exadata_name: + The value to assign to the exadata_name property of this ExadataDatabaseMachineConfigurationSummary. + :type exadata_name: str + + :param exadata_display_name: + The value to assign to the exadata_display_name property of this ExadataDatabaseMachineConfigurationSummary. + :type exadata_display_name: str + + :param exadata_type: + The value to assign to the exadata_type property of this ExadataDatabaseMachineConfigurationSummary. + Allowed values for this property are: "DBMACHINE", "EXACS", "EXACC" + :type exadata_type: str + + :param exadata_rack_type: + The value to assign to the exadata_rack_type property of this ExadataDatabaseMachineConfigurationSummary. + Allowed values for this property are: "FULL", "HALF", "QUARTER", "EIGHTH" + :type exadata_rack_type: str + + :param defined_tags: + The value to assign to the defined_tags property of this ExadataDatabaseMachineConfigurationSummary. + :type defined_tags: dict(str, dict(str, object)) + + :param freeform_tags: + The value to assign to the freeform_tags property of this ExadataDatabaseMachineConfigurationSummary. + :type freeform_tags: dict(str, str) + + :param enterprise_manager_identifier: + The value to assign to the enterprise_manager_identifier property of this ExadataDatabaseMachineConfigurationSummary. + :type enterprise_manager_identifier: str + + :param enterprise_manager_bridge_id: + The value to assign to the enterprise_manager_bridge_id property of this ExadataDatabaseMachineConfigurationSummary. + :type enterprise_manager_bridge_id: str + + """ + self.swagger_types = { + 'exadata_insight_id': 'str', + 'entity_source': 'str', + 'compartment_id': 'str', + 'exadata_name': 'str', + 'exadata_display_name': 'str', + 'exadata_type': 'str', + 'exadata_rack_type': 'str', + 'defined_tags': 'dict(str, dict(str, object))', + 'freeform_tags': 'dict(str, str)', + 'enterprise_manager_identifier': 'str', + 'enterprise_manager_bridge_id': 'str' + } + + self.attribute_map = { + 'exadata_insight_id': 'exadataInsightId', + 'entity_source': 'entitySource', + 'compartment_id': 'compartmentId', + 'exadata_name': 'exadataName', + 'exadata_display_name': 'exadataDisplayName', + 'exadata_type': 'exadataType', + 'exadata_rack_type': 'exadataRackType', + 'defined_tags': 'definedTags', + 'freeform_tags': 'freeformTags', + 'enterprise_manager_identifier': 'enterpriseManagerIdentifier', + 'enterprise_manager_bridge_id': 'enterpriseManagerBridgeId' + } + + self._exadata_insight_id = None + self._entity_source = None + self._compartment_id = None + self._exadata_name = None + self._exadata_display_name = None + self._exadata_type = None + self._exadata_rack_type = None + self._defined_tags = None + self._freeform_tags = None + self._enterprise_manager_identifier = None + self._enterprise_manager_bridge_id = None + self._entity_source = 'EM_MANAGED_EXTERNAL_EXADATA' + + @property + def enterprise_manager_identifier(self): + """ + **[Required]** Gets the enterprise_manager_identifier of this ExadataDatabaseMachineConfigurationSummary. + Enterprise Manager Unique Identifier + + + :return: The enterprise_manager_identifier of this ExadataDatabaseMachineConfigurationSummary. + :rtype: str + """ + return self._enterprise_manager_identifier + + @enterprise_manager_identifier.setter + def enterprise_manager_identifier(self, enterprise_manager_identifier): + """ + Sets the enterprise_manager_identifier of this ExadataDatabaseMachineConfigurationSummary. + Enterprise Manager Unique Identifier + + + :param enterprise_manager_identifier: The enterprise_manager_identifier of this ExadataDatabaseMachineConfigurationSummary. + :type: str + """ + self._enterprise_manager_identifier = enterprise_manager_identifier + + @property + def enterprise_manager_bridge_id(self): + """ + **[Required]** Gets the enterprise_manager_bridge_id of this ExadataDatabaseMachineConfigurationSummary. + OPSI Enterprise Manager Bridge OCID + + + :return: The enterprise_manager_bridge_id of this ExadataDatabaseMachineConfigurationSummary. + :rtype: str + """ + return self._enterprise_manager_bridge_id + + @enterprise_manager_bridge_id.setter + def enterprise_manager_bridge_id(self, enterprise_manager_bridge_id): + """ + Sets the enterprise_manager_bridge_id of this ExadataDatabaseMachineConfigurationSummary. + OPSI Enterprise Manager Bridge OCID + + + :param enterprise_manager_bridge_id: The enterprise_manager_bridge_id of this ExadataDatabaseMachineConfigurationSummary. + :type: str + """ + self._enterprise_manager_bridge_id = enterprise_manager_bridge_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/opsi/models/exadata_database_statistics_summary.py b/src/oci/opsi/models/exadata_database_statistics_summary.py new file mode 100644 index 0000000000..d5b1f2d5a2 --- /dev/null +++ b/src/oci/opsi/models/exadata_database_statistics_summary.py @@ -0,0 +1,103 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .exadata_insight_resource_statistics_aggregation import ExadataInsightResourceStatisticsAggregation +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 ExadataDatabaseStatisticsSummary(ExadataInsightResourceStatisticsAggregation): + """ + Database details and statistics. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ExadataDatabaseStatisticsSummary object with values from keyword arguments. The default value of the :py:attr:`~oci.opsi.models.ExadataDatabaseStatisticsSummary.exadata_resource_type` attribute + of this class is ``DATABASE`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param exadata_resource_type: + The value to assign to the exadata_resource_type property of this ExadataDatabaseStatisticsSummary. + Allowed values for this property are: "DATABASE", "HOST", "STORAGE_SERVER", "DISKGROUP" + :type exadata_resource_type: str + + :param resource_details: + The value to assign to the resource_details property of this ExadataDatabaseStatisticsSummary. + :type resource_details: oci.opsi.models.DatabaseDetails + + :param current_statistics: + The value to assign to the current_statistics property of this ExadataDatabaseStatisticsSummary. + :type current_statistics: oci.opsi.models.ExadataInsightResourceStatistics + + """ + self.swagger_types = { + 'exadata_resource_type': 'str', + 'resource_details': 'DatabaseDetails', + 'current_statistics': 'ExadataInsightResourceStatistics' + } + + self.attribute_map = { + 'exadata_resource_type': 'exadataResourceType', + 'resource_details': 'resourceDetails', + 'current_statistics': 'currentStatistics' + } + + self._exadata_resource_type = None + self._resource_details = None + self._current_statistics = None + self._exadata_resource_type = 'DATABASE' + + @property + def resource_details(self): + """ + **[Required]** Gets the resource_details of this ExadataDatabaseStatisticsSummary. + + :return: The resource_details of this ExadataDatabaseStatisticsSummary. + :rtype: oci.opsi.models.DatabaseDetails + """ + return self._resource_details + + @resource_details.setter + def resource_details(self, resource_details): + """ + Sets the resource_details of this ExadataDatabaseStatisticsSummary. + + :param resource_details: The resource_details of this ExadataDatabaseStatisticsSummary. + :type: oci.opsi.models.DatabaseDetails + """ + self._resource_details = resource_details + + @property + def current_statistics(self): + """ + **[Required]** Gets the current_statistics of this ExadataDatabaseStatisticsSummary. + + :return: The current_statistics of this ExadataDatabaseStatisticsSummary. + :rtype: oci.opsi.models.ExadataInsightResourceStatistics + """ + return self._current_statistics + + @current_statistics.setter + def current_statistics(self, current_statistics): + """ + Sets the current_statistics of this ExadataDatabaseStatisticsSummary. + + :param current_statistics: The current_statistics of this ExadataDatabaseStatisticsSummary. + :type: oci.opsi.models.ExadataInsightResourceStatistics + """ + self._current_statistics = current_statistics + + 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/opsi/models/exadata_details.py b/src/oci/opsi/models/exadata_details.py new file mode 100644 index 0000000000..401cdebfc6 --- /dev/null +++ b/src/oci/opsi/models/exadata_details.py @@ -0,0 +1,105 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 ExadataDetails(object): + """ + Partial information about the exadata which includes id and name. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ExadataDetails 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 ExadataDetails. + :type id: str + + :param name: + The value to assign to the name property of this ExadataDetails. + :type name: str + + """ + self.swagger_types = { + 'id': 'str', + 'name': 'str' + } + + self.attribute_map = { + 'id': 'id', + 'name': 'name' + } + + self._id = None + self._name = None + + @property + def id(self): + """ + **[Required]** Gets the id of this ExadataDetails. + The `OCID`__ of exadata insight resource. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The id of this ExadataDetails. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this ExadataDetails. + The `OCID`__ of exadata insight resource. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param id: The id of this ExadataDetails. + :type: str + """ + self._id = id + + @property + def name(self): + """ + **[Required]** Gets the name of this ExadataDetails. + Name of exadata insight resource. + + + :return: The name of this ExadataDetails. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """ + Sets the name of this ExadataDetails. + Name of exadata insight resource. + + + :param name: The name of this ExadataDetails. + :type: str + """ + self._name = name + + 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/opsi/models/exadata_diskgroup_statistics_summary.py b/src/oci/opsi/models/exadata_diskgroup_statistics_summary.py new file mode 100644 index 0000000000..5399f41ccc --- /dev/null +++ b/src/oci/opsi/models/exadata_diskgroup_statistics_summary.py @@ -0,0 +1,103 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .exadata_insight_resource_statistics_aggregation import ExadataInsightResourceStatisticsAggregation +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 ExadataDiskgroupStatisticsSummary(ExadataInsightResourceStatisticsAggregation): + """ + Diskgroup details and statistics. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ExadataDiskgroupStatisticsSummary object with values from keyword arguments. The default value of the :py:attr:`~oci.opsi.models.ExadataDiskgroupStatisticsSummary.exadata_resource_type` attribute + of this class is ``DISKGROUP`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param exadata_resource_type: + The value to assign to the exadata_resource_type property of this ExadataDiskgroupStatisticsSummary. + Allowed values for this property are: "DATABASE", "HOST", "STORAGE_SERVER", "DISKGROUP" + :type exadata_resource_type: str + + :param resource_details: + The value to assign to the resource_details property of this ExadataDiskgroupStatisticsSummary. + :type resource_details: oci.opsi.models.DiskGroupDetails + + :param current_statistics: + The value to assign to the current_statistics property of this ExadataDiskgroupStatisticsSummary. + :type current_statistics: oci.opsi.models.ExadataInsightResourceStatistics + + """ + self.swagger_types = { + 'exadata_resource_type': 'str', + 'resource_details': 'DiskGroupDetails', + 'current_statistics': 'ExadataInsightResourceStatistics' + } + + self.attribute_map = { + 'exadata_resource_type': 'exadataResourceType', + 'resource_details': 'resourceDetails', + 'current_statistics': 'currentStatistics' + } + + self._exadata_resource_type = None + self._resource_details = None + self._current_statistics = None + self._exadata_resource_type = 'DISKGROUP' + + @property + def resource_details(self): + """ + **[Required]** Gets the resource_details of this ExadataDiskgroupStatisticsSummary. + + :return: The resource_details of this ExadataDiskgroupStatisticsSummary. + :rtype: oci.opsi.models.DiskGroupDetails + """ + return self._resource_details + + @resource_details.setter + def resource_details(self, resource_details): + """ + Sets the resource_details of this ExadataDiskgroupStatisticsSummary. + + :param resource_details: The resource_details of this ExadataDiskgroupStatisticsSummary. + :type: oci.opsi.models.DiskGroupDetails + """ + self._resource_details = resource_details + + @property + def current_statistics(self): + """ + **[Required]** Gets the current_statistics of this ExadataDiskgroupStatisticsSummary. + + :return: The current_statistics of this ExadataDiskgroupStatisticsSummary. + :rtype: oci.opsi.models.ExadataInsightResourceStatistics + """ + return self._current_statistics + + @current_statistics.setter + def current_statistics(self, current_statistics): + """ + Sets the current_statistics of this ExadataDiskgroupStatisticsSummary. + + :param current_statistics: The current_statistics of this ExadataDiskgroupStatisticsSummary. + :type: oci.opsi.models.ExadataInsightResourceStatistics + """ + self._current_statistics = current_statistics + + 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/opsi/models/exadata_host_statistics_summary.py b/src/oci/opsi/models/exadata_host_statistics_summary.py new file mode 100644 index 0000000000..6c15b64dd8 --- /dev/null +++ b/src/oci/opsi/models/exadata_host_statistics_summary.py @@ -0,0 +1,103 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .exadata_insight_resource_statistics_aggregation import ExadataInsightResourceStatisticsAggregation +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 ExadataHostStatisticsSummary(ExadataInsightResourceStatisticsAggregation): + """ + Host details and statistics. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ExadataHostStatisticsSummary object with values from keyword arguments. The default value of the :py:attr:`~oci.opsi.models.ExadataHostStatisticsSummary.exadata_resource_type` attribute + of this class is ``HOST`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param exadata_resource_type: + The value to assign to the exadata_resource_type property of this ExadataHostStatisticsSummary. + Allowed values for this property are: "DATABASE", "HOST", "STORAGE_SERVER", "DISKGROUP" + :type exadata_resource_type: str + + :param resource_details: + The value to assign to the resource_details property of this ExadataHostStatisticsSummary. + :type resource_details: oci.opsi.models.HostDetails + + :param current_statistics: + The value to assign to the current_statistics property of this ExadataHostStatisticsSummary. + :type current_statistics: oci.opsi.models.ExadataInsightResourceStatistics + + """ + self.swagger_types = { + 'exadata_resource_type': 'str', + 'resource_details': 'HostDetails', + 'current_statistics': 'ExadataInsightResourceStatistics' + } + + self.attribute_map = { + 'exadata_resource_type': 'exadataResourceType', + 'resource_details': 'resourceDetails', + 'current_statistics': 'currentStatistics' + } + + self._exadata_resource_type = None + self._resource_details = None + self._current_statistics = None + self._exadata_resource_type = 'HOST' + + @property + def resource_details(self): + """ + **[Required]** Gets the resource_details of this ExadataHostStatisticsSummary. + + :return: The resource_details of this ExadataHostStatisticsSummary. + :rtype: oci.opsi.models.HostDetails + """ + return self._resource_details + + @resource_details.setter + def resource_details(self, resource_details): + """ + Sets the resource_details of this ExadataHostStatisticsSummary. + + :param resource_details: The resource_details of this ExadataHostStatisticsSummary. + :type: oci.opsi.models.HostDetails + """ + self._resource_details = resource_details + + @property + def current_statistics(self): + """ + **[Required]** Gets the current_statistics of this ExadataHostStatisticsSummary. + + :return: The current_statistics of this ExadataHostStatisticsSummary. + :rtype: oci.opsi.models.ExadataInsightResourceStatistics + """ + return self._current_statistics + + @current_statistics.setter + def current_statistics(self, current_statistics): + """ + Sets the current_statistics of this ExadataHostStatisticsSummary. + + :param current_statistics: The current_statistics of this ExadataHostStatisticsSummary. + :type: oci.opsi.models.ExadataInsightResourceStatistics + """ + self._current_statistics = current_statistics + + 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/opsi/models/exadata_insight.py b/src/oci/opsi/models/exadata_insight.py new file mode 100644 index 0000000000..7a1b5796ff --- /dev/null +++ b/src/oci/opsi/models/exadata_insight.py @@ -0,0 +1,666 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 ExadataInsight(object): + """ + Exadata insight resource. + """ + + #: A constant which can be used with the entity_source property of a ExadataInsight. + #: This constant has a value of "EM_MANAGED_EXTERNAL_EXADATA" + ENTITY_SOURCE_EM_MANAGED_EXTERNAL_EXADATA = "EM_MANAGED_EXTERNAL_EXADATA" + + #: A constant which can be used with the exadata_type property of a ExadataInsight. + #: This constant has a value of "DBMACHINE" + EXADATA_TYPE_DBMACHINE = "DBMACHINE" + + #: A constant which can be used with the exadata_type property of a ExadataInsight. + #: This constant has a value of "EXACS" + EXADATA_TYPE_EXACS = "EXACS" + + #: A constant which can be used with the exadata_type property of a ExadataInsight. + #: This constant has a value of "EXACC" + EXADATA_TYPE_EXACC = "EXACC" + + #: A constant which can be used with the exadata_rack_type property of a ExadataInsight. + #: This constant has a value of "FULL" + EXADATA_RACK_TYPE_FULL = "FULL" + + #: A constant which can be used with the exadata_rack_type property of a ExadataInsight. + #: This constant has a value of "HALF" + EXADATA_RACK_TYPE_HALF = "HALF" + + #: A constant which can be used with the exadata_rack_type property of a ExadataInsight. + #: This constant has a value of "QUARTER" + EXADATA_RACK_TYPE_QUARTER = "QUARTER" + + #: A constant which can be used with the exadata_rack_type property of a ExadataInsight. + #: This constant has a value of "EIGHTH" + EXADATA_RACK_TYPE_EIGHTH = "EIGHTH" + + #: A constant which can be used with the status property of a ExadataInsight. + #: This constant has a value of "DISABLED" + STATUS_DISABLED = "DISABLED" + + #: A constant which can be used with the status property of a ExadataInsight. + #: This constant has a value of "ENABLED" + STATUS_ENABLED = "ENABLED" + + #: A constant which can be used with the status property of a ExadataInsight. + #: This constant has a value of "TERMINATED" + STATUS_TERMINATED = "TERMINATED" + + #: A constant which can be used with the lifecycle_state property of a ExadataInsight. + #: This constant has a value of "CREATING" + LIFECYCLE_STATE_CREATING = "CREATING" + + #: A constant which can be used with the lifecycle_state property of a ExadataInsight. + #: This constant has a value of "UPDATING" + LIFECYCLE_STATE_UPDATING = "UPDATING" + + #: A constant which can be used with the lifecycle_state property of a ExadataInsight. + #: This constant has a value of "ACTIVE" + LIFECYCLE_STATE_ACTIVE = "ACTIVE" + + #: A constant which can be used with the lifecycle_state property of a ExadataInsight. + #: This constant has a value of "DELETING" + LIFECYCLE_STATE_DELETING = "DELETING" + + #: A constant which can be used with the lifecycle_state property of a ExadataInsight. + #: This constant has a value of "DELETED" + LIFECYCLE_STATE_DELETED = "DELETED" + + #: A constant which can be used with the lifecycle_state property of a ExadataInsight. + #: This constant has a value of "FAILED" + LIFECYCLE_STATE_FAILED = "FAILED" + + def __init__(self, **kwargs): + """ + Initializes a new ExadataInsight object with values from keyword arguments. This class has the following subclasses and if you are using this class as input + to a service operations then you should favor using a subclass over the base class: + + * :class:`~oci.opsi.models.EmManagedExternalExadataInsight` + + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param entity_source: + The value to assign to the entity_source property of this ExadataInsight. + Allowed values for this property are: "EM_MANAGED_EXTERNAL_EXADATA", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type entity_source: str + + :param id: + The value to assign to the id property of this ExadataInsight. + :type id: str + + :param compartment_id: + The value to assign to the compartment_id property of this ExadataInsight. + :type compartment_id: str + + :param exadata_name: + The value to assign to the exadata_name property of this ExadataInsight. + :type exadata_name: str + + :param exadata_display_name: + The value to assign to the exadata_display_name property of this ExadataInsight. + :type exadata_display_name: str + + :param exadata_type: + The value to assign to the exadata_type property of this ExadataInsight. + Allowed values for this property are: "DBMACHINE", "EXACS", "EXACC", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type exadata_type: str + + :param exadata_rack_type: + The value to assign to the exadata_rack_type property of this ExadataInsight. + Allowed values for this property are: "FULL", "HALF", "QUARTER", "EIGHTH", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type exadata_rack_type: str + + :param is_virtualized_exadata: + The value to assign to the is_virtualized_exadata property of this ExadataInsight. + :type is_virtualized_exadata: bool + + :param status: + The value to assign to the status property of this ExadataInsight. + Allowed values for this property are: "DISABLED", "ENABLED", "TERMINATED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type status: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this ExadataInsight. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this ExadataInsight. + :type defined_tags: dict(str, dict(str, object)) + + :param system_tags: + The value to assign to the system_tags property of this ExadataInsight. + :type system_tags: dict(str, dict(str, object)) + + :param time_created: + The value to assign to the time_created property of this ExadataInsight. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this ExadataInsight. + :type time_updated: datetime + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this ExadataInsight. + Allowed values for this property are: "CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type lifecycle_state: str + + :param lifecycle_details: + The value to assign to the lifecycle_details property of this ExadataInsight. + :type lifecycle_details: str + + """ + self.swagger_types = { + 'entity_source': 'str', + 'id': 'str', + 'compartment_id': 'str', + 'exadata_name': 'str', + 'exadata_display_name': 'str', + 'exadata_type': 'str', + 'exadata_rack_type': 'str', + 'is_virtualized_exadata': 'bool', + 'status': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'system_tags': 'dict(str, dict(str, object))', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'lifecycle_state': 'str', + 'lifecycle_details': 'str' + } + + self.attribute_map = { + 'entity_source': 'entitySource', + 'id': 'id', + 'compartment_id': 'compartmentId', + 'exadata_name': 'exadataName', + 'exadata_display_name': 'exadataDisplayName', + 'exadata_type': 'exadataType', + 'exadata_rack_type': 'exadataRackType', + 'is_virtualized_exadata': 'isVirtualizedExadata', + 'status': 'status', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'system_tags': 'systemTags', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'lifecycle_state': 'lifecycleState', + 'lifecycle_details': 'lifecycleDetails' + } + + self._entity_source = None + self._id = None + self._compartment_id = None + self._exadata_name = None + self._exadata_display_name = None + self._exadata_type = None + self._exadata_rack_type = None + self._is_virtualized_exadata = None + self._status = None + self._freeform_tags = None + self._defined_tags = None + self._system_tags = None + self._time_created = None + self._time_updated = None + self._lifecycle_state = None + self._lifecycle_details = None + + @staticmethod + def get_subtype(object_dictionary): + """ + Given the hash representation of a subtype of this class, + use the info in the hash to return the class of the subtype. + """ + type = object_dictionary['entitySource'] + + if type == 'EM_MANAGED_EXTERNAL_EXADATA': + return 'EmManagedExternalExadataInsight' + else: + return 'ExadataInsight' + + @property + def entity_source(self): + """ + **[Required]** Gets the entity_source of this ExadataInsight. + Source of the Exadata system. + + Allowed values for this property are: "EM_MANAGED_EXTERNAL_EXADATA", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The entity_source of this ExadataInsight. + :rtype: str + """ + return self._entity_source + + @entity_source.setter + def entity_source(self, entity_source): + """ + Sets the entity_source of this ExadataInsight. + Source of the Exadata system. + + + :param entity_source: The entity_source of this ExadataInsight. + :type: str + """ + allowed_values = ["EM_MANAGED_EXTERNAL_EXADATA"] + if not value_allowed_none_or_none_sentinel(entity_source, allowed_values): + entity_source = 'UNKNOWN_ENUM_VALUE' + self._entity_source = entity_source + + @property + def id(self): + """ + **[Required]** Gets the id of this ExadataInsight. + Exadata insight identifier + + + :return: The id of this ExadataInsight. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this ExadataInsight. + Exadata insight identifier + + + :param id: The id of this ExadataInsight. + :type: str + """ + self._id = id + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this ExadataInsight. + Compartment identifier of the Exadata insight resource + + + :return: The compartment_id of this ExadataInsight. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this ExadataInsight. + Compartment identifier of the Exadata insight resource + + + :param compartment_id: The compartment_id of this ExadataInsight. + :type: str + """ + self._compartment_id = compartment_id + + @property + def exadata_name(self): + """ + **[Required]** Gets the exadata_name of this ExadataInsight. + The Exadata system name. If the Exadata systems managed by Enterprise Manager, the name is unique amongst the Exadata systems managed by the same Enterprise Manager. + + + :return: The exadata_name of this ExadataInsight. + :rtype: str + """ + return self._exadata_name + + @exadata_name.setter + def exadata_name(self, exadata_name): + """ + Sets the exadata_name of this ExadataInsight. + The Exadata system name. If the Exadata systems managed by Enterprise Manager, the name is unique amongst the Exadata systems managed by the same Enterprise Manager. + + + :param exadata_name: The exadata_name of this ExadataInsight. + :type: str + """ + self._exadata_name = exadata_name + + @property + def exadata_display_name(self): + """ + Gets the exadata_display_name of this ExadataInsight. + The user-friendly name for the Exadata system. The name does not have to be unique. + + + :return: The exadata_display_name of this ExadataInsight. + :rtype: str + """ + return self._exadata_display_name + + @exadata_display_name.setter + def exadata_display_name(self, exadata_display_name): + """ + Sets the exadata_display_name of this ExadataInsight. + The user-friendly name for the Exadata system. The name does not have to be unique. + + + :param exadata_display_name: The exadata_display_name of this ExadataInsight. + :type: str + """ + self._exadata_display_name = exadata_display_name + + @property + def exadata_type(self): + """ + Gets the exadata_type of this ExadataInsight. + Operations Insights internal representation of the the Exadata system type. + + Allowed values for this property are: "DBMACHINE", "EXACS", "EXACC", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The exadata_type of this ExadataInsight. + :rtype: str + """ + return self._exadata_type + + @exadata_type.setter + def exadata_type(self, exadata_type): + """ + Sets the exadata_type of this ExadataInsight. + Operations Insights internal representation of the the Exadata system type. + + + :param exadata_type: The exadata_type of this ExadataInsight. + :type: str + """ + allowed_values = ["DBMACHINE", "EXACS", "EXACC"] + if not value_allowed_none_or_none_sentinel(exadata_type, allowed_values): + exadata_type = 'UNKNOWN_ENUM_VALUE' + self._exadata_type = exadata_type + + @property + def exadata_rack_type(self): + """ + Gets the exadata_rack_type of this ExadataInsight. + Exadata rack type. + + Allowed values for this property are: "FULL", "HALF", "QUARTER", "EIGHTH", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The exadata_rack_type of this ExadataInsight. + :rtype: str + """ + return self._exadata_rack_type + + @exadata_rack_type.setter + def exadata_rack_type(self, exadata_rack_type): + """ + Sets the exadata_rack_type of this ExadataInsight. + Exadata rack type. + + + :param exadata_rack_type: The exadata_rack_type of this ExadataInsight. + :type: str + """ + allowed_values = ["FULL", "HALF", "QUARTER", "EIGHTH"] + if not value_allowed_none_or_none_sentinel(exadata_rack_type, allowed_values): + exadata_rack_type = 'UNKNOWN_ENUM_VALUE' + self._exadata_rack_type = exadata_rack_type + + @property + def is_virtualized_exadata(self): + """ + Gets the is_virtualized_exadata of this ExadataInsight. + true if virtualization is used in the Exadata system + + + :return: The is_virtualized_exadata of this ExadataInsight. + :rtype: bool + """ + return self._is_virtualized_exadata + + @is_virtualized_exadata.setter + def is_virtualized_exadata(self, is_virtualized_exadata): + """ + Sets the is_virtualized_exadata of this ExadataInsight. + true if virtualization is used in the Exadata system + + + :param is_virtualized_exadata: The is_virtualized_exadata of this ExadataInsight. + :type: bool + """ + self._is_virtualized_exadata = is_virtualized_exadata + + @property + def status(self): + """ + **[Required]** Gets the status of this ExadataInsight. + Indicates the status of an Exadata insight in Operations Insights + + Allowed values for this property are: "DISABLED", "ENABLED", "TERMINATED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The status of this ExadataInsight. + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """ + Sets the status of this ExadataInsight. + Indicates the status of an Exadata insight in Operations Insights + + + :param status: The status of this ExadataInsight. + :type: str + """ + allowed_values = ["DISABLED", "ENABLED", "TERMINATED"] + if not value_allowed_none_or_none_sentinel(status, allowed_values): + status = 'UNKNOWN_ENUM_VALUE' + self._status = status + + @property + def freeform_tags(self): + """ + **[Required]** Gets the freeform_tags of this ExadataInsight. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + Example: `{\"bar-key\": \"value\"}` + + + :return: The freeform_tags of this ExadataInsight. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this ExadataInsight. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + Example: `{\"bar-key\": \"value\"}` + + + :param freeform_tags: The freeform_tags of this ExadataInsight. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + **[Required]** Gets the defined_tags of this ExadataInsight. + Defined tags for this resource. Each key is predefined and scoped to a namespace. + Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + + :return: The defined_tags of this ExadataInsight. + :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 ExadataInsight. + Defined tags for this resource. Each key is predefined and scoped to a namespace. + Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + + :param defined_tags: The defined_tags of this ExadataInsight. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + @property + def system_tags(self): + """ + Gets the system_tags of this ExadataInsight. + System tags for this resource. Each key is predefined and scoped to a namespace. + Example: `{\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}` + + + :return: The system_tags of this ExadataInsight. + :rtype: dict(str, dict(str, object)) + """ + return self._system_tags + + @system_tags.setter + def system_tags(self, system_tags): + """ + Sets the system_tags of this ExadataInsight. + System tags for this resource. Each key is predefined and scoped to a namespace. + Example: `{\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}` + + + :param system_tags: The system_tags of this ExadataInsight. + :type: dict(str, dict(str, object)) + """ + self._system_tags = system_tags + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this ExadataInsight. + The time the the Exadata insight was first enabled. An RFC3339 formatted datetime string + + + :return: The time_created of this ExadataInsight. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this ExadataInsight. + The time the the Exadata insight was first enabled. An RFC3339 formatted datetime string + + + :param time_created: The time_created of this ExadataInsight. + :type: datetime + """ + self._time_created = time_created + + @property + def time_updated(self): + """ + Gets the time_updated of this ExadataInsight. + The time the Exadata insight was updated. An RFC3339 formatted datetime string + + + :return: The time_updated of this ExadataInsight. + :rtype: datetime + """ + return self._time_updated + + @time_updated.setter + def time_updated(self, time_updated): + """ + Sets the time_updated of this ExadataInsight. + The time the Exadata insight was updated. An RFC3339 formatted datetime string + + + :param time_updated: The time_updated of this ExadataInsight. + :type: datetime + """ + self._time_updated = time_updated + + @property + def lifecycle_state(self): + """ + **[Required]** Gets the lifecycle_state of this ExadataInsight. + The current state of the Exadata insight. + + Allowed values for this property are: "CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The lifecycle_state of this ExadataInsight. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this ExadataInsight. + The current state of the Exadata insight. + + + :param lifecycle_state: The lifecycle_state of this ExadataInsight. + :type: str + """ + allowed_values = ["CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED"] + 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 ExadataInsight. + A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + + + :return: The lifecycle_details of this ExadataInsight. + :rtype: str + """ + return self._lifecycle_details + + @lifecycle_details.setter + def lifecycle_details(self, lifecycle_details): + """ + Sets the lifecycle_details of this ExadataInsight. + A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + + + :param lifecycle_details: The lifecycle_details of this ExadataInsight. + :type: str + """ + self._lifecycle_details = lifecycle_details + + 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/opsi/models/exadata_insight_resource_capacity_trend_aggregation.py b/src/oci/opsi/models/exadata_insight_resource_capacity_trend_aggregation.py new file mode 100644 index 0000000000..7041c25e61 --- /dev/null +++ b/src/oci/opsi/models/exadata_insight_resource_capacity_trend_aggregation.py @@ -0,0 +1,101 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 ExadataInsightResourceCapacityTrendAggregation(object): + """ + Resource Capacity samples + """ + + def __init__(self, **kwargs): + """ + Initializes a new ExadataInsightResourceCapacityTrendAggregation object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param end_timestamp: + The value to assign to the end_timestamp property of this ExadataInsightResourceCapacityTrendAggregation. + :type end_timestamp: datetime + + :param capacity: + The value to assign to the capacity property of this ExadataInsightResourceCapacityTrendAggregation. + :type capacity: float + + """ + self.swagger_types = { + 'end_timestamp': 'datetime', + 'capacity': 'float' + } + + self.attribute_map = { + 'end_timestamp': 'endTimestamp', + 'capacity': 'capacity' + } + + self._end_timestamp = None + self._capacity = None + + @property + def end_timestamp(self): + """ + **[Required]** Gets the end_timestamp of this ExadataInsightResourceCapacityTrendAggregation. + The timestamp in which the current sampling period ends in RFC 3339 format. + + + :return: The end_timestamp of this ExadataInsightResourceCapacityTrendAggregation. + :rtype: datetime + """ + return self._end_timestamp + + @end_timestamp.setter + def end_timestamp(self, end_timestamp): + """ + Sets the end_timestamp of this ExadataInsightResourceCapacityTrendAggregation. + The timestamp in which the current sampling period ends in RFC 3339 format. + + + :param end_timestamp: The end_timestamp of this ExadataInsightResourceCapacityTrendAggregation. + :type: datetime + """ + self._end_timestamp = end_timestamp + + @property + def capacity(self): + """ + **[Required]** Gets the capacity of this ExadataInsightResourceCapacityTrendAggregation. + The maximum allocated amount of the resource metric type (CPU, STORAGE). + + + :return: The capacity of this ExadataInsightResourceCapacityTrendAggregation. + :rtype: float + """ + return self._capacity + + @capacity.setter + def capacity(self, capacity): + """ + Sets the capacity of this ExadataInsightResourceCapacityTrendAggregation. + The maximum allocated amount of the resource metric type (CPU, STORAGE). + + + :param capacity: The capacity of this ExadataInsightResourceCapacityTrendAggregation. + :type: float + """ + self._capacity = capacity + + 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/opsi/models/exadata_insight_resource_capacity_trend_summary.py b/src/oci/opsi/models/exadata_insight_resource_capacity_trend_summary.py new file mode 100644 index 0000000000..c8ad4185cb --- /dev/null +++ b/src/oci/opsi/models/exadata_insight_resource_capacity_trend_summary.py @@ -0,0 +1,136 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 ExadataInsightResourceCapacityTrendSummary(object): + """ + List of resource id, name , capacity time series data + """ + + def __init__(self, **kwargs): + """ + Initializes a new ExadataInsightResourceCapacityTrendSummary 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 ExadataInsightResourceCapacityTrendSummary. + :type id: str + + :param name: + The value to assign to the name property of this ExadataInsightResourceCapacityTrendSummary. + :type name: str + + :param capacity_data: + The value to assign to the capacity_data property of this ExadataInsightResourceCapacityTrendSummary. + :type capacity_data: list[oci.opsi.models.ExadataInsightResourceCapacityTrendAggregation] + + """ + self.swagger_types = { + 'id': 'str', + 'name': 'str', + 'capacity_data': 'list[ExadataInsightResourceCapacityTrendAggregation]' + } + + self.attribute_map = { + 'id': 'id', + 'name': 'name', + 'capacity_data': 'capacityData' + } + + self._id = None + self._name = None + self._capacity_data = None + + @property + def id(self): + """ + **[Required]** Gets the id of this ExadataInsightResourceCapacityTrendSummary. + The `OCID`__ of the database insight resource. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The id of this ExadataInsightResourceCapacityTrendSummary. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this ExadataInsightResourceCapacityTrendSummary. + The `OCID`__ of the database insight resource. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param id: The id of this ExadataInsightResourceCapacityTrendSummary. + :type: str + """ + self._id = id + + @property + def name(self): + """ + **[Required]** Gets the name of this ExadataInsightResourceCapacityTrendSummary. + The name of the resource. + + + :return: The name of this ExadataInsightResourceCapacityTrendSummary. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """ + Sets the name of this ExadataInsightResourceCapacityTrendSummary. + The name of the resource. + + + :param name: The name of this ExadataInsightResourceCapacityTrendSummary. + :type: str + """ + self._name = name + + @property + def capacity_data(self): + """ + **[Required]** Gets the capacity_data of this ExadataInsightResourceCapacityTrendSummary. + Time series data for capacity + + + :return: The capacity_data of this ExadataInsightResourceCapacityTrendSummary. + :rtype: list[oci.opsi.models.ExadataInsightResourceCapacityTrendAggregation] + """ + return self._capacity_data + + @capacity_data.setter + def capacity_data(self, capacity_data): + """ + Sets the capacity_data of this ExadataInsightResourceCapacityTrendSummary. + Time series data for capacity + + + :param capacity_data: The capacity_data of this ExadataInsightResourceCapacityTrendSummary. + :type: list[oci.opsi.models.ExadataInsightResourceCapacityTrendAggregation] + """ + self._capacity_data = capacity_data + + 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/opsi/models/exadata_insight_resource_forecast_trend_summary.py b/src/oci/opsi/models/exadata_insight_resource_forecast_trend_summary.py new file mode 100644 index 0000000000..d5fb076ebd --- /dev/null +++ b/src/oci/opsi/models/exadata_insight_resource_forecast_trend_summary.py @@ -0,0 +1,269 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 ExadataInsightResourceForecastTrendSummary(object): + """ + List of resource id, name , capacity insight value, pattern, historical usage and projected data. + """ + + #: A constant which can be used with the pattern property of a ExadataInsightResourceForecastTrendSummary. + #: This constant has a value of "LINEAR" + PATTERN_LINEAR = "LINEAR" + + #: A constant which can be used with the pattern property of a ExadataInsightResourceForecastTrendSummary. + #: This constant has a value of "MONTHLY_SEASONS" + PATTERN_MONTHLY_SEASONS = "MONTHLY_SEASONS" + + #: A constant which can be used with the pattern property of a ExadataInsightResourceForecastTrendSummary. + #: This constant has a value of "MONTHLY_AND_YEARLY_SEASONS" + PATTERN_MONTHLY_AND_YEARLY_SEASONS = "MONTHLY_AND_YEARLY_SEASONS" + + #: A constant which can be used with the pattern property of a ExadataInsightResourceForecastTrendSummary. + #: This constant has a value of "WEEKLY_SEASONS" + PATTERN_WEEKLY_SEASONS = "WEEKLY_SEASONS" + + #: A constant which can be used with the pattern property of a ExadataInsightResourceForecastTrendSummary. + #: This constant has a value of "WEEKLY_AND_MONTHLY_SEASONS" + PATTERN_WEEKLY_AND_MONTHLY_SEASONS = "WEEKLY_AND_MONTHLY_SEASONS" + + #: A constant which can be used with the pattern property of a ExadataInsightResourceForecastTrendSummary. + #: This constant has a value of "WEEKLY_MONTHLY_AND_YEARLY_SEASONS" + PATTERN_WEEKLY_MONTHLY_AND_YEARLY_SEASONS = "WEEKLY_MONTHLY_AND_YEARLY_SEASONS" + + #: A constant which can be used with the pattern property of a ExadataInsightResourceForecastTrendSummary. + #: This constant has a value of "WEEKLY_AND_YEARLY_SEASONS" + PATTERN_WEEKLY_AND_YEARLY_SEASONS = "WEEKLY_AND_YEARLY_SEASONS" + + #: A constant which can be used with the pattern property of a ExadataInsightResourceForecastTrendSummary. + #: This constant has a value of "YEARLY_SEASONS" + PATTERN_YEARLY_SEASONS = "YEARLY_SEASONS" + + def __init__(self, **kwargs): + """ + Initializes a new ExadataInsightResourceForecastTrendSummary 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 ExadataInsightResourceForecastTrendSummary. + :type id: str + + :param name: + The value to assign to the name property of this ExadataInsightResourceForecastTrendSummary. + :type name: str + + :param days_to_reach_capacity: + The value to assign to the days_to_reach_capacity property of this ExadataInsightResourceForecastTrendSummary. + :type days_to_reach_capacity: int + + :param pattern: + The value to assign to the pattern property of this ExadataInsightResourceForecastTrendSummary. + Allowed values for this property are: "LINEAR", "MONTHLY_SEASONS", "MONTHLY_AND_YEARLY_SEASONS", "WEEKLY_SEASONS", "WEEKLY_AND_MONTHLY_SEASONS", "WEEKLY_MONTHLY_AND_YEARLY_SEASONS", "WEEKLY_AND_YEARLY_SEASONS", "YEARLY_SEASONS", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type pattern: str + + :param historical_data: + The value to assign to the historical_data property of this ExadataInsightResourceForecastTrendSummary. + :type historical_data: list[oci.opsi.models.HistoricalDataItem] + + :param projected_data: + The value to assign to the projected_data property of this ExadataInsightResourceForecastTrendSummary. + :type projected_data: list[oci.opsi.models.ProjectedDataItem] + + """ + self.swagger_types = { + 'id': 'str', + 'name': 'str', + 'days_to_reach_capacity': 'int', + 'pattern': 'str', + 'historical_data': 'list[HistoricalDataItem]', + 'projected_data': 'list[ProjectedDataItem]' + } + + self.attribute_map = { + 'id': 'id', + 'name': 'name', + 'days_to_reach_capacity': 'daysToReachCapacity', + 'pattern': 'pattern', + 'historical_data': 'historicalData', + 'projected_data': 'projectedData' + } + + self._id = None + self._name = None + self._days_to_reach_capacity = None + self._pattern = None + self._historical_data = None + self._projected_data = None + + @property + def id(self): + """ + **[Required]** Gets the id of this ExadataInsightResourceForecastTrendSummary. + The `OCID`__ of the database insight resource. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The id of this ExadataInsightResourceForecastTrendSummary. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this ExadataInsightResourceForecastTrendSummary. + The `OCID`__ of the database insight resource. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param id: The id of this ExadataInsightResourceForecastTrendSummary. + :type: str + """ + self._id = id + + @property + def name(self): + """ + **[Required]** Gets the name of this ExadataInsightResourceForecastTrendSummary. + The name of the resource. + + + :return: The name of this ExadataInsightResourceForecastTrendSummary. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """ + Sets the name of this ExadataInsightResourceForecastTrendSummary. + The name of the resource. + + + :param name: The name of this ExadataInsightResourceForecastTrendSummary. + :type: str + """ + self._name = name + + @property + def days_to_reach_capacity(self): + """ + **[Required]** Gets the days_to_reach_capacity of this ExadataInsightResourceForecastTrendSummary. + Days to reach capacity for a storage server + + + :return: The days_to_reach_capacity of this ExadataInsightResourceForecastTrendSummary. + :rtype: int + """ + return self._days_to_reach_capacity + + @days_to_reach_capacity.setter + def days_to_reach_capacity(self, days_to_reach_capacity): + """ + Sets the days_to_reach_capacity of this ExadataInsightResourceForecastTrendSummary. + Days to reach capacity for a storage server + + + :param days_to_reach_capacity: The days_to_reach_capacity of this ExadataInsightResourceForecastTrendSummary. + :type: int + """ + self._days_to_reach_capacity = days_to_reach_capacity + + @property + def pattern(self): + """ + **[Required]** Gets the pattern of this ExadataInsightResourceForecastTrendSummary. + Time series patterns used in the forecasting. + + Allowed values for this property are: "LINEAR", "MONTHLY_SEASONS", "MONTHLY_AND_YEARLY_SEASONS", "WEEKLY_SEASONS", "WEEKLY_AND_MONTHLY_SEASONS", "WEEKLY_MONTHLY_AND_YEARLY_SEASONS", "WEEKLY_AND_YEARLY_SEASONS", "YEARLY_SEASONS", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The pattern of this ExadataInsightResourceForecastTrendSummary. + :rtype: str + """ + return self._pattern + + @pattern.setter + def pattern(self, pattern): + """ + Sets the pattern of this ExadataInsightResourceForecastTrendSummary. + Time series patterns used in the forecasting. + + + :param pattern: The pattern of this ExadataInsightResourceForecastTrendSummary. + :type: str + """ + allowed_values = ["LINEAR", "MONTHLY_SEASONS", "MONTHLY_AND_YEARLY_SEASONS", "WEEKLY_SEASONS", "WEEKLY_AND_MONTHLY_SEASONS", "WEEKLY_MONTHLY_AND_YEARLY_SEASONS", "WEEKLY_AND_YEARLY_SEASONS", "YEARLY_SEASONS"] + if not value_allowed_none_or_none_sentinel(pattern, allowed_values): + pattern = 'UNKNOWN_ENUM_VALUE' + self._pattern = pattern + + @property + def historical_data(self): + """ + **[Required]** Gets the historical_data of this ExadataInsightResourceForecastTrendSummary. + Time series data used for the forecast analysis. + + + :return: The historical_data of this ExadataInsightResourceForecastTrendSummary. + :rtype: list[oci.opsi.models.HistoricalDataItem] + """ + return self._historical_data + + @historical_data.setter + def historical_data(self, historical_data): + """ + Sets the historical_data of this ExadataInsightResourceForecastTrendSummary. + Time series data used for the forecast analysis. + + + :param historical_data: The historical_data of this ExadataInsightResourceForecastTrendSummary. + :type: list[oci.opsi.models.HistoricalDataItem] + """ + self._historical_data = historical_data + + @property + def projected_data(self): + """ + **[Required]** Gets the projected_data of this ExadataInsightResourceForecastTrendSummary. + Time series data result of the forecasting analysis. + + + :return: The projected_data of this ExadataInsightResourceForecastTrendSummary. + :rtype: list[oci.opsi.models.ProjectedDataItem] + """ + return self._projected_data + + @projected_data.setter + def projected_data(self, projected_data): + """ + Sets the projected_data of this ExadataInsightResourceForecastTrendSummary. + Time series data result of the forecasting analysis. + + + :param projected_data: The projected_data of this ExadataInsightResourceForecastTrendSummary. + :type: list[oci.opsi.models.ProjectedDataItem] + """ + self._projected_data = projected_data + + 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/opsi/models/exadata_insight_resource_insight_utilization_item.py b/src/oci/opsi/models/exadata_insight_resource_insight_utilization_item.py new file mode 100644 index 0000000000..d4dcac0437 --- /dev/null +++ b/src/oci/opsi/models/exadata_insight_resource_insight_utilization_item.py @@ -0,0 +1,198 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 ExadataInsightResourceInsightUtilizationItem(object): + """ + Object containing current utilization, projected utilization, id and daysToReach high and low utilization value. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ExadataInsightResourceInsightUtilizationItem object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param exadata_insight_id: + The value to assign to the exadata_insight_id property of this ExadataInsightResourceInsightUtilizationItem. + :type exadata_insight_id: str + + :param current_utilization: + The value to assign to the current_utilization property of this ExadataInsightResourceInsightUtilizationItem. + :type current_utilization: float + + :param projected_utilization: + The value to assign to the projected_utilization property of this ExadataInsightResourceInsightUtilizationItem. + :type projected_utilization: float + + :param days_to_reach_high_utilization: + The value to assign to the days_to_reach_high_utilization property of this ExadataInsightResourceInsightUtilizationItem. + :type days_to_reach_high_utilization: int + + :param days_to_reach_low_utilization: + The value to assign to the days_to_reach_low_utilization property of this ExadataInsightResourceInsightUtilizationItem. + :type days_to_reach_low_utilization: int + + """ + self.swagger_types = { + 'exadata_insight_id': 'str', + 'current_utilization': 'float', + 'projected_utilization': 'float', + 'days_to_reach_high_utilization': 'int', + 'days_to_reach_low_utilization': 'int' + } + + self.attribute_map = { + 'exadata_insight_id': 'exadataInsightId', + 'current_utilization': 'currentUtilization', + 'projected_utilization': 'projectedUtilization', + 'days_to_reach_high_utilization': 'daysToReachHighUtilization', + 'days_to_reach_low_utilization': 'daysToReachLowUtilization' + } + + self._exadata_insight_id = None + self._current_utilization = None + self._projected_utilization = None + self._days_to_reach_high_utilization = None + self._days_to_reach_low_utilization = None + + @property + def exadata_insight_id(self): + """ + **[Required]** Gets the exadata_insight_id of this ExadataInsightResourceInsightUtilizationItem. + The `OCID`__ of the Exadata insight. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The exadata_insight_id of this ExadataInsightResourceInsightUtilizationItem. + :rtype: str + """ + return self._exadata_insight_id + + @exadata_insight_id.setter + def exadata_insight_id(self, exadata_insight_id): + """ + Sets the exadata_insight_id of this ExadataInsightResourceInsightUtilizationItem. + The `OCID`__ of the Exadata insight. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param exadata_insight_id: The exadata_insight_id of this ExadataInsightResourceInsightUtilizationItem. + :type: str + """ + self._exadata_insight_id = exadata_insight_id + + @property + def current_utilization(self): + """ + **[Required]** Gets the current_utilization of this ExadataInsightResourceInsightUtilizationItem. + Current utilization + + + :return: The current_utilization of this ExadataInsightResourceInsightUtilizationItem. + :rtype: float + """ + return self._current_utilization + + @current_utilization.setter + def current_utilization(self, current_utilization): + """ + Sets the current_utilization of this ExadataInsightResourceInsightUtilizationItem. + Current utilization + + + :param current_utilization: The current_utilization of this ExadataInsightResourceInsightUtilizationItem. + :type: float + """ + self._current_utilization = current_utilization + + @property + def projected_utilization(self): + """ + **[Required]** Gets the projected_utilization of this ExadataInsightResourceInsightUtilizationItem. + Projected utilization + + + :return: The projected_utilization of this ExadataInsightResourceInsightUtilizationItem. + :rtype: float + """ + return self._projected_utilization + + @projected_utilization.setter + def projected_utilization(self, projected_utilization): + """ + Sets the projected_utilization of this ExadataInsightResourceInsightUtilizationItem. + Projected utilization + + + :param projected_utilization: The projected_utilization of this ExadataInsightResourceInsightUtilizationItem. + :type: float + """ + self._projected_utilization = projected_utilization + + @property + def days_to_reach_high_utilization(self): + """ + **[Required]** Gets the days_to_reach_high_utilization of this ExadataInsightResourceInsightUtilizationItem. + Days to reach projected high utilization + + + :return: The days_to_reach_high_utilization of this ExadataInsightResourceInsightUtilizationItem. + :rtype: int + """ + return self._days_to_reach_high_utilization + + @days_to_reach_high_utilization.setter + def days_to_reach_high_utilization(self, days_to_reach_high_utilization): + """ + Sets the days_to_reach_high_utilization of this ExadataInsightResourceInsightUtilizationItem. + Days to reach projected high utilization + + + :param days_to_reach_high_utilization: The days_to_reach_high_utilization of this ExadataInsightResourceInsightUtilizationItem. + :type: int + """ + self._days_to_reach_high_utilization = days_to_reach_high_utilization + + @property + def days_to_reach_low_utilization(self): + """ + **[Required]** Gets the days_to_reach_low_utilization of this ExadataInsightResourceInsightUtilizationItem. + Days to reach projected low utilization + + + :return: The days_to_reach_low_utilization of this ExadataInsightResourceInsightUtilizationItem. + :rtype: int + """ + return self._days_to_reach_low_utilization + + @days_to_reach_low_utilization.setter + def days_to_reach_low_utilization(self, days_to_reach_low_utilization): + """ + Sets the days_to_reach_low_utilization of this ExadataInsightResourceInsightUtilizationItem. + Days to reach projected low utilization + + + :param days_to_reach_low_utilization: The days_to_reach_low_utilization of this ExadataInsightResourceInsightUtilizationItem. + :type: int + """ + self._days_to_reach_low_utilization = days_to_reach_low_utilization + + 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/opsi/models/exadata_insight_resource_statistics.py b/src/oci/opsi/models/exadata_insight_resource_statistics.py new file mode 100644 index 0000000000..d8c53994bb --- /dev/null +++ b/src/oci/opsi/models/exadata_insight_resource_statistics.py @@ -0,0 +1,194 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 ExadataInsightResourceStatistics(object): + """ + Contains resource statistics with usage unit + """ + + def __init__(self, **kwargs): + """ + Initializes a new ExadataInsightResourceStatistics object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param usage: + The value to assign to the usage property of this ExadataInsightResourceStatistics. + :type usage: float + + :param capacity: + The value to assign to the capacity property of this ExadataInsightResourceStatistics. + :type capacity: float + + :param utilization_percent: + The value to assign to the utilization_percent property of this ExadataInsightResourceStatistics. + :type utilization_percent: float + + :param usage_change_percent: + The value to assign to the usage_change_percent property of this ExadataInsightResourceStatistics. + :type usage_change_percent: float + + :param instance_metrics: + The value to assign to the instance_metrics property of this ExadataInsightResourceStatistics. + :type instance_metrics: list[oci.opsi.models.InstanceMetrics] + + """ + self.swagger_types = { + 'usage': 'float', + 'capacity': 'float', + 'utilization_percent': 'float', + 'usage_change_percent': 'float', + 'instance_metrics': 'list[InstanceMetrics]' + } + + self.attribute_map = { + 'usage': 'usage', + 'capacity': 'capacity', + 'utilization_percent': 'utilizationPercent', + 'usage_change_percent': 'usageChangePercent', + 'instance_metrics': 'instanceMetrics' + } + + self._usage = None + self._capacity = None + self._utilization_percent = None + self._usage_change_percent = None + self._instance_metrics = None + + @property + def usage(self): + """ + **[Required]** Gets the usage of this ExadataInsightResourceStatistics. + Total amount used of the resource metric type (CPU, STORAGE). + + + :return: The usage of this ExadataInsightResourceStatistics. + :rtype: float + """ + return self._usage + + @usage.setter + def usage(self, usage): + """ + Sets the usage of this ExadataInsightResourceStatistics. + Total amount used of the resource metric type (CPU, STORAGE). + + + :param usage: The usage of this ExadataInsightResourceStatistics. + :type: float + """ + self._usage = usage + + @property + def capacity(self): + """ + **[Required]** Gets the capacity of this ExadataInsightResourceStatistics. + The maximum allocated amount of the resource metric type (CPU, STORAGE). + + + :return: The capacity of this ExadataInsightResourceStatistics. + :rtype: float + """ + return self._capacity + + @capacity.setter + def capacity(self, capacity): + """ + Sets the capacity of this ExadataInsightResourceStatistics. + The maximum allocated amount of the resource metric type (CPU, STORAGE). + + + :param capacity: The capacity of this ExadataInsightResourceStatistics. + :type: float + """ + self._capacity = capacity + + @property + def utilization_percent(self): + """ + **[Required]** Gets the utilization_percent of this ExadataInsightResourceStatistics. + Resource utilization in percentage + + + :return: The utilization_percent of this ExadataInsightResourceStatistics. + :rtype: float + """ + return self._utilization_percent + + @utilization_percent.setter + def utilization_percent(self, utilization_percent): + """ + Sets the utilization_percent of this ExadataInsightResourceStatistics. + Resource utilization in percentage + + + :param utilization_percent: The utilization_percent of this ExadataInsightResourceStatistics. + :type: float + """ + self._utilization_percent = utilization_percent + + @property + def usage_change_percent(self): + """ + **[Required]** Gets the usage_change_percent of this ExadataInsightResourceStatistics. + Change in resource utilization in percentage + + + :return: The usage_change_percent of this ExadataInsightResourceStatistics. + :rtype: float + """ + return self._usage_change_percent + + @usage_change_percent.setter + def usage_change_percent(self, usage_change_percent): + """ + Sets the usage_change_percent of this ExadataInsightResourceStatistics. + Change in resource utilization in percentage + + + :param usage_change_percent: The usage_change_percent of this ExadataInsightResourceStatistics. + :type: float + """ + self._usage_change_percent = usage_change_percent + + @property + def instance_metrics(self): + """ + Gets the instance_metrics of this ExadataInsightResourceStatistics. + Array of instance metrics + + + :return: The instance_metrics of this ExadataInsightResourceStatistics. + :rtype: list[oci.opsi.models.InstanceMetrics] + """ + return self._instance_metrics + + @instance_metrics.setter + def instance_metrics(self, instance_metrics): + """ + Sets the instance_metrics of this ExadataInsightResourceStatistics. + Array of instance metrics + + + :param instance_metrics: The instance_metrics of this ExadataInsightResourceStatistics. + :type: list[oci.opsi.models.InstanceMetrics] + """ + self._instance_metrics = instance_metrics + + 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/opsi/models/exadata_insight_resource_statistics_aggregation.py b/src/oci/opsi/models/exadata_insight_resource_statistics_aggregation.py new file mode 100644 index 0000000000..f0850ec46b --- /dev/null +++ b/src/oci/opsi/models/exadata_insight_resource_statistics_aggregation.py @@ -0,0 +1,123 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 ExadataInsightResourceStatisticsAggregation(object): + """ + Contains resource details and current statistics + """ + + #: A constant which can be used with the exadata_resource_type property of a ExadataInsightResourceStatisticsAggregation. + #: This constant has a value of "DATABASE" + EXADATA_RESOURCE_TYPE_DATABASE = "DATABASE" + + #: A constant which can be used with the exadata_resource_type property of a ExadataInsightResourceStatisticsAggregation. + #: This constant has a value of "HOST" + EXADATA_RESOURCE_TYPE_HOST = "HOST" + + #: A constant which can be used with the exadata_resource_type property of a ExadataInsightResourceStatisticsAggregation. + #: This constant has a value of "STORAGE_SERVER" + EXADATA_RESOURCE_TYPE_STORAGE_SERVER = "STORAGE_SERVER" + + #: A constant which can be used with the exadata_resource_type property of a ExadataInsightResourceStatisticsAggregation. + #: This constant has a value of "DISKGROUP" + EXADATA_RESOURCE_TYPE_DISKGROUP = "DISKGROUP" + + def __init__(self, **kwargs): + """ + Initializes a new ExadataInsightResourceStatisticsAggregation object with values from keyword arguments. This class has the following subclasses and if you are using this class as input + to a service operations then you should favor using a subclass over the base class: + + * :class:`~oci.opsi.models.ExadataStorageServerStatisticsSummary` + * :class:`~oci.opsi.models.ExadataHostStatisticsSummary` + * :class:`~oci.opsi.models.ExadataDatabaseStatisticsSummary` + * :class:`~oci.opsi.models.ExadataDiskgroupStatisticsSummary` + + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param exadata_resource_type: + The value to assign to the exadata_resource_type property of this ExadataInsightResourceStatisticsAggregation. + Allowed values for this property are: "DATABASE", "HOST", "STORAGE_SERVER", "DISKGROUP", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type exadata_resource_type: str + + """ + self.swagger_types = { + 'exadata_resource_type': 'str' + } + + self.attribute_map = { + 'exadata_resource_type': 'exadataResourceType' + } + + self._exadata_resource_type = None + + @staticmethod + def get_subtype(object_dictionary): + """ + Given the hash representation of a subtype of this class, + use the info in the hash to return the class of the subtype. + """ + type = object_dictionary['exadataResourceType'] + + if type == 'STORAGE_SERVER': + return 'ExadataStorageServerStatisticsSummary' + + if type == 'HOST': + return 'ExadataHostStatisticsSummary' + + if type == 'DATABASE': + return 'ExadataDatabaseStatisticsSummary' + + if type == 'DISKGROUP': + return 'ExadataDiskgroupStatisticsSummary' + else: + return 'ExadataInsightResourceStatisticsAggregation' + + @property + def exadata_resource_type(self): + """ + **[Required]** Gets the exadata_resource_type of this ExadataInsightResourceStatisticsAggregation. + Defines the resource type for an exadata (example: DATABASE, STORAGE_SERVER, HOST, DISKGROUP) + + Allowed values for this property are: "DATABASE", "HOST", "STORAGE_SERVER", "DISKGROUP", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The exadata_resource_type of this ExadataInsightResourceStatisticsAggregation. + :rtype: str + """ + return self._exadata_resource_type + + @exadata_resource_type.setter + def exadata_resource_type(self, exadata_resource_type): + """ + Sets the exadata_resource_type of this ExadataInsightResourceStatisticsAggregation. + Defines the resource type for an exadata (example: DATABASE, STORAGE_SERVER, HOST, DISKGROUP) + + + :param exadata_resource_type: The exadata_resource_type of this ExadataInsightResourceStatisticsAggregation. + :type: str + """ + allowed_values = ["DATABASE", "HOST", "STORAGE_SERVER", "DISKGROUP"] + if not value_allowed_none_or_none_sentinel(exadata_resource_type, allowed_values): + exadata_resource_type = 'UNKNOWN_ENUM_VALUE' + self._exadata_resource_type = exadata_resource_type + + 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/opsi/models/exadata_insight_summary.py b/src/oci/opsi/models/exadata_insight_summary.py new file mode 100644 index 0000000000..398d2756bc --- /dev/null +++ b/src/oci/opsi/models/exadata_insight_summary.py @@ -0,0 +1,643 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 ExadataInsightSummary(object): + """ + Summary of an Exadata insight resource. + """ + + #: A constant which can be used with the entity_source property of a ExadataInsightSummary. + #: This constant has a value of "EM_MANAGED_EXTERNAL_EXADATA" + ENTITY_SOURCE_EM_MANAGED_EXTERNAL_EXADATA = "EM_MANAGED_EXTERNAL_EXADATA" + + #: A constant which can be used with the exadata_type property of a ExadataInsightSummary. + #: This constant has a value of "DBMACHINE" + EXADATA_TYPE_DBMACHINE = "DBMACHINE" + + #: A constant which can be used with the exadata_type property of a ExadataInsightSummary. + #: This constant has a value of "EXACS" + EXADATA_TYPE_EXACS = "EXACS" + + #: A constant which can be used with the exadata_type property of a ExadataInsightSummary. + #: This constant has a value of "EXACC" + EXADATA_TYPE_EXACC = "EXACC" + + #: A constant which can be used with the exadata_rack_type property of a ExadataInsightSummary. + #: This constant has a value of "FULL" + EXADATA_RACK_TYPE_FULL = "FULL" + + #: A constant which can be used with the exadata_rack_type property of a ExadataInsightSummary. + #: This constant has a value of "HALF" + EXADATA_RACK_TYPE_HALF = "HALF" + + #: A constant which can be used with the exadata_rack_type property of a ExadataInsightSummary. + #: This constant has a value of "QUARTER" + EXADATA_RACK_TYPE_QUARTER = "QUARTER" + + #: A constant which can be used with the exadata_rack_type property of a ExadataInsightSummary. + #: This constant has a value of "EIGHTH" + EXADATA_RACK_TYPE_EIGHTH = "EIGHTH" + + #: A constant which can be used with the status property of a ExadataInsightSummary. + #: This constant has a value of "DISABLED" + STATUS_DISABLED = "DISABLED" + + #: A constant which can be used with the status property of a ExadataInsightSummary. + #: This constant has a value of "ENABLED" + STATUS_ENABLED = "ENABLED" + + #: A constant which can be used with the status property of a ExadataInsightSummary. + #: This constant has a value of "TERMINATED" + STATUS_TERMINATED = "TERMINATED" + + #: A constant which can be used with the lifecycle_state property of a ExadataInsightSummary. + #: This constant has a value of "CREATING" + LIFECYCLE_STATE_CREATING = "CREATING" + + #: A constant which can be used with the lifecycle_state property of a ExadataInsightSummary. + #: This constant has a value of "UPDATING" + LIFECYCLE_STATE_UPDATING = "UPDATING" + + #: A constant which can be used with the lifecycle_state property of a ExadataInsightSummary. + #: This constant has a value of "ACTIVE" + LIFECYCLE_STATE_ACTIVE = "ACTIVE" + + #: A constant which can be used with the lifecycle_state property of a ExadataInsightSummary. + #: This constant has a value of "DELETING" + LIFECYCLE_STATE_DELETING = "DELETING" + + #: A constant which can be used with the lifecycle_state property of a ExadataInsightSummary. + #: This constant has a value of "DELETED" + LIFECYCLE_STATE_DELETED = "DELETED" + + #: A constant which can be used with the lifecycle_state property of a ExadataInsightSummary. + #: This constant has a value of "FAILED" + LIFECYCLE_STATE_FAILED = "FAILED" + + def __init__(self, **kwargs): + """ + Initializes a new ExadataInsightSummary object with values from keyword arguments. This class has the following subclasses and if you are using this class as input + to a service operations then you should favor using a subclass over the base class: + + * :class:`~oci.opsi.models.EmManagedExternalExadataInsightSummary` + + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param entity_source: + The value to assign to the entity_source property of this ExadataInsightSummary. + Allowed values for this property are: "EM_MANAGED_EXTERNAL_EXADATA", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type entity_source: str + + :param id: + The value to assign to the id property of this ExadataInsightSummary. + :type id: str + + :param compartment_id: + The value to assign to the compartment_id property of this ExadataInsightSummary. + :type compartment_id: str + + :param exadata_name: + The value to assign to the exadata_name property of this ExadataInsightSummary. + :type exadata_name: str + + :param exadata_display_name: + The value to assign to the exadata_display_name property of this ExadataInsightSummary. + :type exadata_display_name: str + + :param exadata_type: + The value to assign to the exadata_type property of this ExadataInsightSummary. + Allowed values for this property are: "DBMACHINE", "EXACS", "EXACC", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type exadata_type: str + + :param exadata_rack_type: + The value to assign to the exadata_rack_type property of this ExadataInsightSummary. + Allowed values for this property are: "FULL", "HALF", "QUARTER", "EIGHTH", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type exadata_rack_type: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this ExadataInsightSummary. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this ExadataInsightSummary. + :type defined_tags: dict(str, dict(str, object)) + + :param system_tags: + The value to assign to the system_tags property of this ExadataInsightSummary. + :type system_tags: dict(str, dict(str, object)) + + :param status: + The value to assign to the status property of this ExadataInsightSummary. + Allowed values for this property are: "DISABLED", "ENABLED", "TERMINATED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type status: str + + :param time_created: + The value to assign to the time_created property of this ExadataInsightSummary. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this ExadataInsightSummary. + :type time_updated: datetime + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this ExadataInsightSummary. + Allowed values for this property are: "CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type lifecycle_state: str + + :param lifecycle_details: + The value to assign to the lifecycle_details property of this ExadataInsightSummary. + :type lifecycle_details: str + + """ + self.swagger_types = { + 'entity_source': 'str', + 'id': 'str', + 'compartment_id': 'str', + 'exadata_name': 'str', + 'exadata_display_name': 'str', + 'exadata_type': 'str', + 'exadata_rack_type': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'system_tags': 'dict(str, dict(str, object))', + 'status': 'str', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'lifecycle_state': 'str', + 'lifecycle_details': 'str' + } + + self.attribute_map = { + 'entity_source': 'entitySource', + 'id': 'id', + 'compartment_id': 'compartmentId', + 'exadata_name': 'exadataName', + 'exadata_display_name': 'exadataDisplayName', + 'exadata_type': 'exadataType', + 'exadata_rack_type': 'exadataRackType', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'system_tags': 'systemTags', + 'status': 'status', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'lifecycle_state': 'lifecycleState', + 'lifecycle_details': 'lifecycleDetails' + } + + self._entity_source = None + self._id = None + self._compartment_id = None + self._exadata_name = None + self._exadata_display_name = None + self._exadata_type = None + self._exadata_rack_type = None + self._freeform_tags = None + self._defined_tags = None + self._system_tags = None + self._status = None + self._time_created = None + self._time_updated = None + self._lifecycle_state = None + self._lifecycle_details = None + + @staticmethod + def get_subtype(object_dictionary): + """ + Given the hash representation of a subtype of this class, + use the info in the hash to return the class of the subtype. + """ + type = object_dictionary['entitySource'] + + if type == 'EM_MANAGED_EXTERNAL_EXADATA': + return 'EmManagedExternalExadataInsightSummary' + else: + return 'ExadataInsightSummary' + + @property + def entity_source(self): + """ + **[Required]** Gets the entity_source of this ExadataInsightSummary. + Source of the Exadata system. + + Allowed values for this property are: "EM_MANAGED_EXTERNAL_EXADATA", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The entity_source of this ExadataInsightSummary. + :rtype: str + """ + return self._entity_source + + @entity_source.setter + def entity_source(self, entity_source): + """ + Sets the entity_source of this ExadataInsightSummary. + Source of the Exadata system. + + + :param entity_source: The entity_source of this ExadataInsightSummary. + :type: str + """ + allowed_values = ["EM_MANAGED_EXTERNAL_EXADATA"] + if not value_allowed_none_or_none_sentinel(entity_source, allowed_values): + entity_source = 'UNKNOWN_ENUM_VALUE' + self._entity_source = entity_source + + @property + def id(self): + """ + **[Required]** Gets the id of this ExadataInsightSummary. + The `OCID`__ of the Exadata insight resource. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The id of this ExadataInsightSummary. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this ExadataInsightSummary. + The `OCID`__ of the Exadata insight resource. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param id: The id of this ExadataInsightSummary. + :type: str + """ + self._id = id + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this ExadataInsightSummary. + The `OCID`__ of the compartment. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The compartment_id of this ExadataInsightSummary. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this ExadataInsightSummary. + The `OCID`__ of the compartment. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param compartment_id: The compartment_id of this ExadataInsightSummary. + :type: str + """ + self._compartment_id = compartment_id + + @property + def exadata_name(self): + """ + **[Required]** Gets the exadata_name of this ExadataInsightSummary. + The Exadata system name. If the Exadata systems managed by Enterprise Manager, the name is unique amongst the Exadata systems managed by the same Enterprise Manager. + + + :return: The exadata_name of this ExadataInsightSummary. + :rtype: str + """ + return self._exadata_name + + @exadata_name.setter + def exadata_name(self, exadata_name): + """ + Sets the exadata_name of this ExadataInsightSummary. + The Exadata system name. If the Exadata systems managed by Enterprise Manager, the name is unique amongst the Exadata systems managed by the same Enterprise Manager. + + + :param exadata_name: The exadata_name of this ExadataInsightSummary. + :type: str + """ + self._exadata_name = exadata_name + + @property + def exadata_display_name(self): + """ + Gets the exadata_display_name of this ExadataInsightSummary. + The user-friendly name for the Exadata system. The name does not have to be unique. + + + :return: The exadata_display_name of this ExadataInsightSummary. + :rtype: str + """ + return self._exadata_display_name + + @exadata_display_name.setter + def exadata_display_name(self, exadata_display_name): + """ + Sets the exadata_display_name of this ExadataInsightSummary. + The user-friendly name for the Exadata system. The name does not have to be unique. + + + :param exadata_display_name: The exadata_display_name of this ExadataInsightSummary. + :type: str + """ + self._exadata_display_name = exadata_display_name + + @property + def exadata_type(self): + """ + Gets the exadata_type of this ExadataInsightSummary. + Operations Insights internal representation of the the Exadata system type. + + Allowed values for this property are: "DBMACHINE", "EXACS", "EXACC", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The exadata_type of this ExadataInsightSummary. + :rtype: str + """ + return self._exadata_type + + @exadata_type.setter + def exadata_type(self, exadata_type): + """ + Sets the exadata_type of this ExadataInsightSummary. + Operations Insights internal representation of the the Exadata system type. + + + :param exadata_type: The exadata_type of this ExadataInsightSummary. + :type: str + """ + allowed_values = ["DBMACHINE", "EXACS", "EXACC"] + if not value_allowed_none_or_none_sentinel(exadata_type, allowed_values): + exadata_type = 'UNKNOWN_ENUM_VALUE' + self._exadata_type = exadata_type + + @property + def exadata_rack_type(self): + """ + Gets the exadata_rack_type of this ExadataInsightSummary. + Operations Insights internal representation of the the Exadata system rack type. + + Allowed values for this property are: "FULL", "HALF", "QUARTER", "EIGHTH", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The exadata_rack_type of this ExadataInsightSummary. + :rtype: str + """ + return self._exadata_rack_type + + @exadata_rack_type.setter + def exadata_rack_type(self, exadata_rack_type): + """ + Sets the exadata_rack_type of this ExadataInsightSummary. + Operations Insights internal representation of the the Exadata system rack type. + + + :param exadata_rack_type: The exadata_rack_type of this ExadataInsightSummary. + :type: str + """ + allowed_values = ["FULL", "HALF", "QUARTER", "EIGHTH"] + if not value_allowed_none_or_none_sentinel(exadata_rack_type, allowed_values): + exadata_rack_type = 'UNKNOWN_ENUM_VALUE' + self._exadata_rack_type = exadata_rack_type + + @property + def freeform_tags(self): + """ + **[Required]** Gets the freeform_tags of this ExadataInsightSummary. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + Example: `{\"bar-key\": \"value\"}` + + + :return: The freeform_tags of this ExadataInsightSummary. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this ExadataInsightSummary. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + Example: `{\"bar-key\": \"value\"}` + + + :param freeform_tags: The freeform_tags of this ExadataInsightSummary. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + **[Required]** Gets the defined_tags of this ExadataInsightSummary. + Defined tags for this resource. Each key is predefined and scoped to a namespace. + Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + + :return: The defined_tags of this ExadataInsightSummary. + :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 ExadataInsightSummary. + Defined tags for this resource. Each key is predefined and scoped to a namespace. + Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + + :param defined_tags: The defined_tags of this ExadataInsightSummary. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + @property + def system_tags(self): + """ + Gets the system_tags of this ExadataInsightSummary. + System tags for this resource. Each key is predefined and scoped to a namespace. + Example: `{\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}` + + + :return: The system_tags of this ExadataInsightSummary. + :rtype: dict(str, dict(str, object)) + """ + return self._system_tags + + @system_tags.setter + def system_tags(self, system_tags): + """ + Sets the system_tags of this ExadataInsightSummary. + System tags for this resource. Each key is predefined and scoped to a namespace. + Example: `{\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}` + + + :param system_tags: The system_tags of this ExadataInsightSummary. + :type: dict(str, dict(str, object)) + """ + self._system_tags = system_tags + + @property + def status(self): + """ + **[Required]** Gets the status of this ExadataInsightSummary. + Indicates the status of an Exadata insight in Operations Insights + + Allowed values for this property are: "DISABLED", "ENABLED", "TERMINATED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The status of this ExadataInsightSummary. + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """ + Sets the status of this ExadataInsightSummary. + Indicates the status of an Exadata insight in Operations Insights + + + :param status: The status of this ExadataInsightSummary. + :type: str + """ + allowed_values = ["DISABLED", "ENABLED", "TERMINATED"] + if not value_allowed_none_or_none_sentinel(status, allowed_values): + status = 'UNKNOWN_ENUM_VALUE' + self._status = status + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this ExadataInsightSummary. + The time the the Exadata insight was first enabled. An RFC3339 formatted datetime string + + + :return: The time_created of this ExadataInsightSummary. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this ExadataInsightSummary. + The time the the Exadata insight was first enabled. An RFC3339 formatted datetime string + + + :param time_created: The time_created of this ExadataInsightSummary. + :type: datetime + """ + self._time_created = time_created + + @property + def time_updated(self): + """ + Gets the time_updated of this ExadataInsightSummary. + The time the Exadata insight was updated. An RFC3339 formatted datetime string + + + :return: The time_updated of this ExadataInsightSummary. + :rtype: datetime + """ + return self._time_updated + + @time_updated.setter + def time_updated(self, time_updated): + """ + Sets the time_updated of this ExadataInsightSummary. + The time the Exadata insight was updated. An RFC3339 formatted datetime string + + + :param time_updated: The time_updated of this ExadataInsightSummary. + :type: datetime + """ + self._time_updated = time_updated + + @property + def lifecycle_state(self): + """ + **[Required]** Gets the lifecycle_state of this ExadataInsightSummary. + The current state of the Exadata insight. + + Allowed values for this property are: "CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The lifecycle_state of this ExadataInsightSummary. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this ExadataInsightSummary. + The current state of the Exadata insight. + + + :param lifecycle_state: The lifecycle_state of this ExadataInsightSummary. + :type: str + """ + allowed_values = ["CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED"] + 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 ExadataInsightSummary. + A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + + + :return: The lifecycle_details of this ExadataInsightSummary. + :rtype: str + """ + return self._lifecycle_details + + @lifecycle_details.setter + def lifecycle_details(self, lifecycle_details): + """ + Sets the lifecycle_details of this ExadataInsightSummary. + A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + + + :param lifecycle_details: The lifecycle_details of this ExadataInsightSummary. + :type: str + """ + self._lifecycle_details = lifecycle_details + + 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/opsi/models/exadata_insight_summary_collection.py b/src/oci/opsi/models/exadata_insight_summary_collection.py new file mode 100644 index 0000000000..73fbef616b --- /dev/null +++ b/src/oci/opsi/models/exadata_insight_summary_collection.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 ExadataInsightSummaryCollection(object): + """ + Collection of Exadata insight summary objects. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ExadataInsightSummaryCollection object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param items: + The value to assign to the items property of this ExadataInsightSummaryCollection. + :type items: list[oci.opsi.models.ExadataInsightSummary] + + """ + self.swagger_types = { + 'items': 'list[ExadataInsightSummary]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this ExadataInsightSummaryCollection. + Array of Exadata insight summary objects. + + + :return: The items of this ExadataInsightSummaryCollection. + :rtype: list[oci.opsi.models.ExadataInsightSummary] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this ExadataInsightSummaryCollection. + Array of Exadata insight summary objects. + + + :param items: The items of this ExadataInsightSummaryCollection. + :type: list[oci.opsi.models.ExadataInsightSummary] + """ + self._items = items + + 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/opsi/models/exadata_insights.py b/src/oci/opsi/models/exadata_insights.py new file mode 100644 index 0000000000..43dfe84405 --- /dev/null +++ b/src/oci/opsi/models/exadata_insights.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 ExadataInsights(object): + """ + Logical grouping used for Operations Insights Exadata related operations. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ExadataInsights object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param exadata_insights: + The value to assign to the exadata_insights property of this ExadataInsights. + :type exadata_insights: object + + """ + self.swagger_types = { + 'exadata_insights': 'object' + } + + self.attribute_map = { + 'exadata_insights': 'exadataInsights' + } + + self._exadata_insights = None + + @property + def exadata_insights(self): + """ + Gets the exadata_insights of this ExadataInsights. + Exadata Insights Object. + + + :return: The exadata_insights of this ExadataInsights. + :rtype: object + """ + return self._exadata_insights + + @exadata_insights.setter + def exadata_insights(self, exadata_insights): + """ + Sets the exadata_insights of this ExadataInsights. + Exadata Insights Object. + + + :param exadata_insights: The exadata_insights of this ExadataInsights. + :type: object + """ + self._exadata_insights = exadata_insights + + 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/opsi/models/exadata_member_collection.py b/src/oci/opsi/models/exadata_member_collection.py new file mode 100644 index 0000000000..9878f58b5a --- /dev/null +++ b/src/oci/opsi/models/exadata_member_collection.py @@ -0,0 +1,273 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 ExadataMemberCollection(object): + """ + Partial definition of the exadata insight resource. + """ + + #: A constant which can be used with the exadata_type property of a ExadataMemberCollection. + #: This constant has a value of "DBMACHINE" + EXADATA_TYPE_DBMACHINE = "DBMACHINE" + + #: A constant which can be used with the exadata_type property of a ExadataMemberCollection. + #: This constant has a value of "EXACS" + EXADATA_TYPE_EXACS = "EXACS" + + #: A constant which can be used with the exadata_type property of a ExadataMemberCollection. + #: This constant has a value of "EXACC" + EXADATA_TYPE_EXACC = "EXACC" + + #: A constant which can be used with the exadata_rack_type property of a ExadataMemberCollection. + #: This constant has a value of "FULL" + EXADATA_RACK_TYPE_FULL = "FULL" + + #: A constant which can be used with the exadata_rack_type property of a ExadataMemberCollection. + #: This constant has a value of "HALF" + EXADATA_RACK_TYPE_HALF = "HALF" + + #: A constant which can be used with the exadata_rack_type property of a ExadataMemberCollection. + #: This constant has a value of "QUARTER" + EXADATA_RACK_TYPE_QUARTER = "QUARTER" + + #: A constant which can be used with the exadata_rack_type property of a ExadataMemberCollection. + #: This constant has a value of "EIGHTH" + EXADATA_RACK_TYPE_EIGHTH = "EIGHTH" + + def __init__(self, **kwargs): + """ + Initializes a new ExadataMemberCollection object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param exadata_insight_id: + The value to assign to the exadata_insight_id property of this ExadataMemberCollection. + :type exadata_insight_id: str + + :param exadata_name: + The value to assign to the exadata_name property of this ExadataMemberCollection. + :type exadata_name: str + + :param exadata_display_name: + The value to assign to the exadata_display_name property of this ExadataMemberCollection. + :type exadata_display_name: str + + :param exadata_type: + The value to assign to the exadata_type property of this ExadataMemberCollection. + Allowed values for this property are: "DBMACHINE", "EXACS", "EXACC", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type exadata_type: str + + :param exadata_rack_type: + The value to assign to the exadata_rack_type property of this ExadataMemberCollection. + Allowed values for this property are: "FULL", "HALF", "QUARTER", "EIGHTH", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type exadata_rack_type: str + + :param items: + The value to assign to the items property of this ExadataMemberCollection. + :type items: list[oci.opsi.models.ExadataMemberSummary] + + """ + self.swagger_types = { + 'exadata_insight_id': 'str', + 'exadata_name': 'str', + 'exadata_display_name': 'str', + 'exadata_type': 'str', + 'exadata_rack_type': 'str', + 'items': 'list[ExadataMemberSummary]' + } + + self.attribute_map = { + 'exadata_insight_id': 'exadataInsightId', + 'exadata_name': 'exadataName', + 'exadata_display_name': 'exadataDisplayName', + 'exadata_type': 'exadataType', + 'exadata_rack_type': 'exadataRackType', + 'items': 'items' + } + + self._exadata_insight_id = None + self._exadata_name = None + self._exadata_display_name = None + self._exadata_type = None + self._exadata_rack_type = None + self._items = None + + @property + def exadata_insight_id(self): + """ + **[Required]** Gets the exadata_insight_id of this ExadataMemberCollection. + The `OCID`__ of the Exadata insight. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The exadata_insight_id of this ExadataMemberCollection. + :rtype: str + """ + return self._exadata_insight_id + + @exadata_insight_id.setter + def exadata_insight_id(self, exadata_insight_id): + """ + Sets the exadata_insight_id of this ExadataMemberCollection. + The `OCID`__ of the Exadata insight. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param exadata_insight_id: The exadata_insight_id of this ExadataMemberCollection. + :type: str + """ + self._exadata_insight_id = exadata_insight_id + + @property + def exadata_name(self): + """ + **[Required]** Gets the exadata_name of this ExadataMemberCollection. + The Exadata system name. If the Exadata systems managed by Enterprise Manager, the name is unique amongst the Exadata systems managed by the same Enterprise Manager. + + + :return: The exadata_name of this ExadataMemberCollection. + :rtype: str + """ + return self._exadata_name + + @exadata_name.setter + def exadata_name(self, exadata_name): + """ + Sets the exadata_name of this ExadataMemberCollection. + The Exadata system name. If the Exadata systems managed by Enterprise Manager, the name is unique amongst the Exadata systems managed by the same Enterprise Manager. + + + :param exadata_name: The exadata_name of this ExadataMemberCollection. + :type: str + """ + self._exadata_name = exadata_name + + @property + def exadata_display_name(self): + """ + **[Required]** Gets the exadata_display_name of this ExadataMemberCollection. + The user-friendly name for the Exadata system. The name does not have to be unique. + + + :return: The exadata_display_name of this ExadataMemberCollection. + :rtype: str + """ + return self._exadata_display_name + + @exadata_display_name.setter + def exadata_display_name(self, exadata_display_name): + """ + Sets the exadata_display_name of this ExadataMemberCollection. + The user-friendly name for the Exadata system. The name does not have to be unique. + + + :param exadata_display_name: The exadata_display_name of this ExadataMemberCollection. + :type: str + """ + self._exadata_display_name = exadata_display_name + + @property + def exadata_type(self): + """ + **[Required]** Gets the exadata_type of this ExadataMemberCollection. + Operations Insights internal representation of the the Exadata system type. + + Allowed values for this property are: "DBMACHINE", "EXACS", "EXACC", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The exadata_type of this ExadataMemberCollection. + :rtype: str + """ + return self._exadata_type + + @exadata_type.setter + def exadata_type(self, exadata_type): + """ + Sets the exadata_type of this ExadataMemberCollection. + Operations Insights internal representation of the the Exadata system type. + + + :param exadata_type: The exadata_type of this ExadataMemberCollection. + :type: str + """ + allowed_values = ["DBMACHINE", "EXACS", "EXACC"] + if not value_allowed_none_or_none_sentinel(exadata_type, allowed_values): + exadata_type = 'UNKNOWN_ENUM_VALUE' + self._exadata_type = exadata_type + + @property + def exadata_rack_type(self): + """ + **[Required]** Gets the exadata_rack_type of this ExadataMemberCollection. + Exadata rack type. + + Allowed values for this property are: "FULL", "HALF", "QUARTER", "EIGHTH", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The exadata_rack_type of this ExadataMemberCollection. + :rtype: str + """ + return self._exadata_rack_type + + @exadata_rack_type.setter + def exadata_rack_type(self, exadata_rack_type): + """ + Sets the exadata_rack_type of this ExadataMemberCollection. + Exadata rack type. + + + :param exadata_rack_type: The exadata_rack_type of this ExadataMemberCollection. + :type: str + """ + allowed_values = ["FULL", "HALF", "QUARTER", "EIGHTH"] + if not value_allowed_none_or_none_sentinel(exadata_rack_type, allowed_values): + exadata_rack_type = 'UNKNOWN_ENUM_VALUE' + self._exadata_rack_type = exadata_rack_type + + @property + def items(self): + """ + **[Required]** Gets the items of this ExadataMemberCollection. + Collection of Exadata members + + + :return: The items of this ExadataMemberCollection. + :rtype: list[oci.opsi.models.ExadataMemberSummary] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this ExadataMemberCollection. + Collection of Exadata members + + + :param items: The items of this ExadataMemberCollection. + :type: list[oci.opsi.models.ExadataMemberSummary] + """ + self._items = items + + 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/opsi/models/exadata_member_summary.py b/src/oci/opsi/models/exadata_member_summary.py new file mode 100644 index 0000000000..4bf50dd7bd --- /dev/null +++ b/src/oci/opsi/models/exadata_member_summary.py @@ -0,0 +1,168 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 ExadataMemberSummary(object): + """ + Lists name, display name and type of exadata member. + """ + + #: A constant which can be used with the entity_type property of a ExadataMemberSummary. + #: This constant has a value of "DATABASE" + ENTITY_TYPE_DATABASE = "DATABASE" + + #: A constant which can be used with the entity_type property of a ExadataMemberSummary. + #: This constant has a value of "ILOM_SERVER" + ENTITY_TYPE_ILOM_SERVER = "ILOM_SERVER" + + #: A constant which can be used with the entity_type property of a ExadataMemberSummary. + #: This constant has a value of "PDU" + ENTITY_TYPE_PDU = "PDU" + + #: A constant which can be used with the entity_type property of a ExadataMemberSummary. + #: This constant has a value of "STORAGE_SERVER" + ENTITY_TYPE_STORAGE_SERVER = "STORAGE_SERVER" + + #: A constant which can be used with the entity_type property of a ExadataMemberSummary. + #: This constant has a value of "CLUSTER_ASM" + ENTITY_TYPE_CLUSTER_ASM = "CLUSTER_ASM" + + #: A constant which can be used with the entity_type property of a ExadataMemberSummary. + #: This constant has a value of "INFINIBAND_SWITCH" + ENTITY_TYPE_INFINIBAND_SWITCH = "INFINIBAND_SWITCH" + + #: A constant which can be used with the entity_type property of a ExadataMemberSummary. + #: This constant has a value of "ETHERNET_SWITCH" + ENTITY_TYPE_ETHERNET_SWITCH = "ETHERNET_SWITCH" + + def __init__(self, **kwargs): + """ + Initializes a new ExadataMemberSummary 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 ExadataMemberSummary. + :type name: str + + :param display_name: + The value to assign to the display_name property of this ExadataMemberSummary. + :type display_name: str + + :param entity_type: + The value to assign to the entity_type property of this ExadataMemberSummary. + Allowed values for this property are: "DATABASE", "ILOM_SERVER", "PDU", "STORAGE_SERVER", "CLUSTER_ASM", "INFINIBAND_SWITCH", "ETHERNET_SWITCH", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type entity_type: str + + """ + self.swagger_types = { + 'name': 'str', + 'display_name': 'str', + 'entity_type': 'str' + } + + self.attribute_map = { + 'name': 'name', + 'display_name': 'displayName', + 'entity_type': 'entityType' + } + + self._name = None + self._display_name = None + self._entity_type = None + + @property + def name(self): + """ + **[Required]** Gets the name of this ExadataMemberSummary. + Name of exadata member target + + + :return: The name of this ExadataMemberSummary. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """ + Sets the name of this ExadataMemberSummary. + Name of exadata member target + + + :param name: The name of this ExadataMemberSummary. + :type: str + """ + self._name = name + + @property + def display_name(self): + """ + **[Required]** Gets the display_name of this ExadataMemberSummary. + Display Name of exadata member target + + + :return: The display_name of this ExadataMemberSummary. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this ExadataMemberSummary. + Display Name of exadata member target + + + :param display_name: The display_name of this ExadataMemberSummary. + :type: str + """ + self._display_name = display_name + + @property + def entity_type(self): + """ + **[Required]** Gets the entity_type of this ExadataMemberSummary. + Entity type of exadata member target + + Allowed values for this property are: "DATABASE", "ILOM_SERVER", "PDU", "STORAGE_SERVER", "CLUSTER_ASM", "INFINIBAND_SWITCH", "ETHERNET_SWITCH", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The entity_type of this ExadataMemberSummary. + :rtype: str + """ + return self._entity_type + + @entity_type.setter + def entity_type(self, entity_type): + """ + Sets the entity_type of this ExadataMemberSummary. + Entity type of exadata member target + + + :param entity_type: The entity_type of this ExadataMemberSummary. + :type: str + """ + allowed_values = ["DATABASE", "ILOM_SERVER", "PDU", "STORAGE_SERVER", "CLUSTER_ASM", "INFINIBAND_SWITCH", "ETHERNET_SWITCH"] + if not value_allowed_none_or_none_sentinel(entity_type, allowed_values): + entity_type = 'UNKNOWN_ENUM_VALUE' + self._entity_type = entity_type + + 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/opsi/models/exadata_storage_server_statistics_summary.py b/src/oci/opsi/models/exadata_storage_server_statistics_summary.py new file mode 100644 index 0000000000..b96a65217c --- /dev/null +++ b/src/oci/opsi/models/exadata_storage_server_statistics_summary.py @@ -0,0 +1,103 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .exadata_insight_resource_statistics_aggregation import ExadataInsightResourceStatisticsAggregation +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 ExadataStorageServerStatisticsSummary(ExadataInsightResourceStatisticsAggregation): + """ + Storage server details and statistics. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ExadataStorageServerStatisticsSummary object with values from keyword arguments. The default value of the :py:attr:`~oci.opsi.models.ExadataStorageServerStatisticsSummary.exadata_resource_type` attribute + of this class is ``STORAGE_SERVER`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param exadata_resource_type: + The value to assign to the exadata_resource_type property of this ExadataStorageServerStatisticsSummary. + Allowed values for this property are: "DATABASE", "HOST", "STORAGE_SERVER", "DISKGROUP" + :type exadata_resource_type: str + + :param resource_details: + The value to assign to the resource_details property of this ExadataStorageServerStatisticsSummary. + :type resource_details: oci.opsi.models.StorageServerDetails + + :param current_statistics: + The value to assign to the current_statistics property of this ExadataStorageServerStatisticsSummary. + :type current_statistics: oci.opsi.models.ExadataInsightResourceStatistics + + """ + self.swagger_types = { + 'exadata_resource_type': 'str', + 'resource_details': 'StorageServerDetails', + 'current_statistics': 'ExadataInsightResourceStatistics' + } + + self.attribute_map = { + 'exadata_resource_type': 'exadataResourceType', + 'resource_details': 'resourceDetails', + 'current_statistics': 'currentStatistics' + } + + self._exadata_resource_type = None + self._resource_details = None + self._current_statistics = None + self._exadata_resource_type = 'STORAGE_SERVER' + + @property + def resource_details(self): + """ + **[Required]** Gets the resource_details of this ExadataStorageServerStatisticsSummary. + + :return: The resource_details of this ExadataStorageServerStatisticsSummary. + :rtype: oci.opsi.models.StorageServerDetails + """ + return self._resource_details + + @resource_details.setter + def resource_details(self, resource_details): + """ + Sets the resource_details of this ExadataStorageServerStatisticsSummary. + + :param resource_details: The resource_details of this ExadataStorageServerStatisticsSummary. + :type: oci.opsi.models.StorageServerDetails + """ + self._resource_details = resource_details + + @property + def current_statistics(self): + """ + **[Required]** Gets the current_statistics of this ExadataStorageServerStatisticsSummary. + + :return: The current_statistics of this ExadataStorageServerStatisticsSummary. + :rtype: oci.opsi.models.ExadataInsightResourceStatistics + """ + return self._current_statistics + + @current_statistics.setter + def current_statistics(self, current_statistics): + """ + Sets the current_statistics of this ExadataStorageServerStatisticsSummary. + + :param current_statistics: The current_statistics of this ExadataStorageServerStatisticsSummary. + :type: oci.opsi.models.ExadataInsightResourceStatistics + """ + self._current_statistics = current_statistics + + 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/opsi/models/host_configuration_collection.py b/src/oci/opsi/models/host_configuration_collection.py new file mode 100644 index 0000000000..8ce711b461 --- /dev/null +++ b/src/oci/opsi/models/host_configuration_collection.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 HostConfigurationCollection(object): + """ + Collection of host insight configuration summary objects. + """ + + def __init__(self, **kwargs): + """ + Initializes a new HostConfigurationCollection object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param items: + The value to assign to the items property of this HostConfigurationCollection. + :type items: list[oci.opsi.models.HostConfigurationSummary] + + """ + self.swagger_types = { + 'items': 'list[HostConfigurationSummary]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this HostConfigurationCollection. + Array of host insight configurations summary objects. + + + :return: The items of this HostConfigurationCollection. + :rtype: list[oci.opsi.models.HostConfigurationSummary] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this HostConfigurationCollection. + Array of host insight configurations summary objects. + + + :param items: The items of this HostConfigurationCollection. + :type: list[oci.opsi.models.HostConfigurationSummary] + """ + self._items = items + + 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/opsi/models/host_configuration_summary.py b/src/oci/opsi/models/host_configuration_summary.py new file mode 100644 index 0000000000..e8d570012d --- /dev/null +++ b/src/oci/opsi/models/host_configuration_summary.py @@ -0,0 +1,720 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 HostConfigurationSummary(object): + """ + Summary of a host configuration for a resource. + """ + + #: A constant which can be used with the entity_source property of a HostConfigurationSummary. + #: This constant has a value of "MACS_MANAGED_EXTERNAL_HOST" + ENTITY_SOURCE_MACS_MANAGED_EXTERNAL_HOST = "MACS_MANAGED_EXTERNAL_HOST" + + #: A constant which can be used with the entity_source property of a HostConfigurationSummary. + #: This constant has a value of "EM_MANAGED_EXTERNAL_HOST" + ENTITY_SOURCE_EM_MANAGED_EXTERNAL_HOST = "EM_MANAGED_EXTERNAL_HOST" + + #: A constant which can be used with the platform_type property of a HostConfigurationSummary. + #: This constant has a value of "LINUX" + PLATFORM_TYPE_LINUX = "LINUX" + + def __init__(self, **kwargs): + """ + Initializes a new HostConfigurationSummary object with values from keyword arguments. This class has the following subclasses and if you are using this class as input + to a service operations then you should favor using a subclass over the base class: + + * :class:`~oci.opsi.models.MacsManagedExternalHostConfigurationSummary` + * :class:`~oci.opsi.models.EmManagedExternalHostConfigurationSummary` + + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param host_insight_id: + The value to assign to the host_insight_id property of this HostConfigurationSummary. + :type host_insight_id: str + + :param entity_source: + The value to assign to the entity_source property of this HostConfigurationSummary. + Allowed values for this property are: "MACS_MANAGED_EXTERNAL_HOST", "EM_MANAGED_EXTERNAL_HOST", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type entity_source: str + + :param compartment_id: + The value to assign to the compartment_id property of this HostConfigurationSummary. + :type compartment_id: str + + :param host_name: + The value to assign to the host_name property of this HostConfigurationSummary. + :type host_name: str + + :param platform_type: + The value to assign to the platform_type property of this HostConfigurationSummary. + Allowed values for this property are: "LINUX", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type platform_type: str + + :param platform_version: + The value to assign to the platform_version property of this HostConfigurationSummary. + :type platform_version: str + + :param platform_vendor: + The value to assign to the platform_vendor property of this HostConfigurationSummary. + :type platform_vendor: str + + :param total_cpus: + The value to assign to the total_cpus property of this HostConfigurationSummary. + :type total_cpus: int + + :param total_memory_in_gbs: + The value to assign to the total_memory_in_gbs property of this HostConfigurationSummary. + :type total_memory_in_gbs: float + + :param cpu_architecture: + The value to assign to the cpu_architecture property of this HostConfigurationSummary. + :type cpu_architecture: str + + :param cpu_cache_in_mbs: + The value to assign to the cpu_cache_in_mbs property of this HostConfigurationSummary. + :type cpu_cache_in_mbs: float + + :param cpu_vendor: + The value to assign to the cpu_vendor property of this HostConfigurationSummary. + :type cpu_vendor: str + + :param cpu_frequency_in_mhz: + The value to assign to the cpu_frequency_in_mhz property of this HostConfigurationSummary. + :type cpu_frequency_in_mhz: float + + :param cpu_implementation: + The value to assign to the cpu_implementation property of this HostConfigurationSummary. + :type cpu_implementation: str + + :param cores_per_socket: + The value to assign to the cores_per_socket property of this HostConfigurationSummary. + :type cores_per_socket: int + + :param total_sockets: + The value to assign to the total_sockets property of this HostConfigurationSummary. + :type total_sockets: int + + :param threads_per_socket: + The value to assign to the threads_per_socket property of this HostConfigurationSummary. + :type threads_per_socket: int + + :param is_hyper_threading_enabled: + The value to assign to the is_hyper_threading_enabled property of this HostConfigurationSummary. + :type is_hyper_threading_enabled: bool + + :param defined_tags: + The value to assign to the defined_tags property of this HostConfigurationSummary. + :type defined_tags: dict(str, dict(str, object)) + + :param freeform_tags: + The value to assign to the freeform_tags property of this HostConfigurationSummary. + :type freeform_tags: dict(str, str) + + """ + self.swagger_types = { + 'host_insight_id': 'str', + 'entity_source': 'str', + 'compartment_id': 'str', + 'host_name': 'str', + 'platform_type': 'str', + 'platform_version': 'str', + 'platform_vendor': 'str', + 'total_cpus': 'int', + 'total_memory_in_gbs': 'float', + 'cpu_architecture': 'str', + 'cpu_cache_in_mbs': 'float', + 'cpu_vendor': 'str', + 'cpu_frequency_in_mhz': 'float', + 'cpu_implementation': 'str', + 'cores_per_socket': 'int', + 'total_sockets': 'int', + 'threads_per_socket': 'int', + 'is_hyper_threading_enabled': 'bool', + 'defined_tags': 'dict(str, dict(str, object))', + 'freeform_tags': 'dict(str, str)' + } + + self.attribute_map = { + 'host_insight_id': 'hostInsightId', + 'entity_source': 'entitySource', + 'compartment_id': 'compartmentId', + 'host_name': 'hostName', + 'platform_type': 'platformType', + 'platform_version': 'platformVersion', + 'platform_vendor': 'platformVendor', + 'total_cpus': 'totalCpus', + 'total_memory_in_gbs': 'totalMemoryInGBs', + 'cpu_architecture': 'cpuArchitecture', + 'cpu_cache_in_mbs': 'cpuCacheInMBs', + 'cpu_vendor': 'cpuVendor', + 'cpu_frequency_in_mhz': 'cpuFrequencyInMhz', + 'cpu_implementation': 'cpuImplementation', + 'cores_per_socket': 'coresPerSocket', + 'total_sockets': 'totalSockets', + 'threads_per_socket': 'threadsPerSocket', + 'is_hyper_threading_enabled': 'isHyperThreadingEnabled', + 'defined_tags': 'definedTags', + 'freeform_tags': 'freeformTags' + } + + self._host_insight_id = None + self._entity_source = None + self._compartment_id = None + self._host_name = None + self._platform_type = None + self._platform_version = None + self._platform_vendor = None + self._total_cpus = None + self._total_memory_in_gbs = None + self._cpu_architecture = None + self._cpu_cache_in_mbs = None + self._cpu_vendor = None + self._cpu_frequency_in_mhz = None + self._cpu_implementation = None + self._cores_per_socket = None + self._total_sockets = None + self._threads_per_socket = None + self._is_hyper_threading_enabled = None + self._defined_tags = None + self._freeform_tags = None + + @staticmethod + def get_subtype(object_dictionary): + """ + Given the hash representation of a subtype of this class, + use the info in the hash to return the class of the subtype. + """ + type = object_dictionary['entitySource'] + + if type == 'MACS_MANAGED_EXTERNAL_HOST': + return 'MacsManagedExternalHostConfigurationSummary' + + if type == 'EM_MANAGED_EXTERNAL_HOST': + return 'EmManagedExternalHostConfigurationSummary' + else: + return 'HostConfigurationSummary' + + @property + def host_insight_id(self): + """ + **[Required]** Gets the host_insight_id of this HostConfigurationSummary. + The `OCID`__ of the host insight resource. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The host_insight_id of this HostConfigurationSummary. + :rtype: str + """ + return self._host_insight_id + + @host_insight_id.setter + def host_insight_id(self, host_insight_id): + """ + Sets the host_insight_id of this HostConfigurationSummary. + The `OCID`__ of the host insight resource. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param host_insight_id: The host_insight_id of this HostConfigurationSummary. + :type: str + """ + self._host_insight_id = host_insight_id + + @property + def entity_source(self): + """ + **[Required]** Gets the entity_source of this HostConfigurationSummary. + Source of the host entity. + + Allowed values for this property are: "MACS_MANAGED_EXTERNAL_HOST", "EM_MANAGED_EXTERNAL_HOST", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The entity_source of this HostConfigurationSummary. + :rtype: str + """ + return self._entity_source + + @entity_source.setter + def entity_source(self, entity_source): + """ + Sets the entity_source of this HostConfigurationSummary. + Source of the host entity. + + + :param entity_source: The entity_source of this HostConfigurationSummary. + :type: str + """ + allowed_values = ["MACS_MANAGED_EXTERNAL_HOST", "EM_MANAGED_EXTERNAL_HOST"] + if not value_allowed_none_or_none_sentinel(entity_source, allowed_values): + entity_source = 'UNKNOWN_ENUM_VALUE' + self._entity_source = entity_source + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this HostConfigurationSummary. + The `OCID`__ of the compartment. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The compartment_id of this HostConfigurationSummary. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this HostConfigurationSummary. + The `OCID`__ of the compartment. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param compartment_id: The compartment_id of this HostConfigurationSummary. + :type: str + """ + self._compartment_id = compartment_id + + @property + def host_name(self): + """ + **[Required]** Gets the host_name of this HostConfigurationSummary. + The host name. The host name is unique amongst the hosts managed by the same management agent. + + + :return: The host_name of this HostConfigurationSummary. + :rtype: str + """ + return self._host_name + + @host_name.setter + def host_name(self, host_name): + """ + Sets the host_name of this HostConfigurationSummary. + The host name. The host name is unique amongst the hosts managed by the same management agent. + + + :param host_name: The host_name of this HostConfigurationSummary. + :type: str + """ + self._host_name = host_name + + @property + def platform_type(self): + """ + **[Required]** Gets the platform_type of this HostConfigurationSummary. + Platform type. + + Allowed values for this property are: "LINUX", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The platform_type of this HostConfigurationSummary. + :rtype: str + """ + return self._platform_type + + @platform_type.setter + def platform_type(self, platform_type): + """ + Sets the platform_type of this HostConfigurationSummary. + Platform type. + + + :param platform_type: The platform_type of this HostConfigurationSummary. + :type: str + """ + allowed_values = ["LINUX"] + if not value_allowed_none_or_none_sentinel(platform_type, allowed_values): + platform_type = 'UNKNOWN_ENUM_VALUE' + self._platform_type = platform_type + + @property + def platform_version(self): + """ + **[Required]** Gets the platform_version of this HostConfigurationSummary. + Platform version. + + + :return: The platform_version of this HostConfigurationSummary. + :rtype: str + """ + return self._platform_version + + @platform_version.setter + def platform_version(self, platform_version): + """ + Sets the platform_version of this HostConfigurationSummary. + Platform version. + + + :param platform_version: The platform_version of this HostConfigurationSummary. + :type: str + """ + self._platform_version = platform_version + + @property + def platform_vendor(self): + """ + **[Required]** Gets the platform_vendor of this HostConfigurationSummary. + Platform vendor. + + + :return: The platform_vendor of this HostConfigurationSummary. + :rtype: str + """ + return self._platform_vendor + + @platform_vendor.setter + def platform_vendor(self, platform_vendor): + """ + Sets the platform_vendor of this HostConfigurationSummary. + Platform vendor. + + + :param platform_vendor: The platform_vendor of this HostConfigurationSummary. + :type: str + """ + self._platform_vendor = platform_vendor + + @property + def total_cpus(self): + """ + **[Required]** Gets the total_cpus of this HostConfigurationSummary. + Total CPU on this host. + + + :return: The total_cpus of this HostConfigurationSummary. + :rtype: int + """ + return self._total_cpus + + @total_cpus.setter + def total_cpus(self, total_cpus): + """ + Sets the total_cpus of this HostConfigurationSummary. + Total CPU on this host. + + + :param total_cpus: The total_cpus of this HostConfigurationSummary. + :type: int + """ + self._total_cpus = total_cpus + + @property + def total_memory_in_gbs(self): + """ + **[Required]** Gets the total_memory_in_gbs of this HostConfigurationSummary. + Total amount of usable physical memory in gibabytes + + + :return: The total_memory_in_gbs of this HostConfigurationSummary. + :rtype: float + """ + return self._total_memory_in_gbs + + @total_memory_in_gbs.setter + def total_memory_in_gbs(self, total_memory_in_gbs): + """ + Sets the total_memory_in_gbs of this HostConfigurationSummary. + Total amount of usable physical memory in gibabytes + + + :param total_memory_in_gbs: The total_memory_in_gbs of this HostConfigurationSummary. + :type: float + """ + self._total_memory_in_gbs = total_memory_in_gbs + + @property + def cpu_architecture(self): + """ + **[Required]** Gets the cpu_architecture of this HostConfigurationSummary. + CPU architechure + + + :return: The cpu_architecture of this HostConfigurationSummary. + :rtype: str + """ + return self._cpu_architecture + + @cpu_architecture.setter + def cpu_architecture(self, cpu_architecture): + """ + Sets the cpu_architecture of this HostConfigurationSummary. + CPU architechure + + + :param cpu_architecture: The cpu_architecture of this HostConfigurationSummary. + :type: str + """ + self._cpu_architecture = cpu_architecture + + @property + def cpu_cache_in_mbs(self): + """ + **[Required]** Gets the cpu_cache_in_mbs of this HostConfigurationSummary. + Size of cache memory in megabytes. + + + :return: The cpu_cache_in_mbs of this HostConfigurationSummary. + :rtype: float + """ + return self._cpu_cache_in_mbs + + @cpu_cache_in_mbs.setter + def cpu_cache_in_mbs(self, cpu_cache_in_mbs): + """ + Sets the cpu_cache_in_mbs of this HostConfigurationSummary. + Size of cache memory in megabytes. + + + :param cpu_cache_in_mbs: The cpu_cache_in_mbs of this HostConfigurationSummary. + :type: float + """ + self._cpu_cache_in_mbs = cpu_cache_in_mbs + + @property + def cpu_vendor(self): + """ + **[Required]** Gets the cpu_vendor of this HostConfigurationSummary. + Name of the CPU vendor. + + + :return: The cpu_vendor of this HostConfigurationSummary. + :rtype: str + """ + return self._cpu_vendor + + @cpu_vendor.setter + def cpu_vendor(self, cpu_vendor): + """ + Sets the cpu_vendor of this HostConfigurationSummary. + Name of the CPU vendor. + + + :param cpu_vendor: The cpu_vendor of this HostConfigurationSummary. + :type: str + """ + self._cpu_vendor = cpu_vendor + + @property + def cpu_frequency_in_mhz(self): + """ + **[Required]** Gets the cpu_frequency_in_mhz of this HostConfigurationSummary. + Clock frequency of the processor in megahertz. + + + :return: The cpu_frequency_in_mhz of this HostConfigurationSummary. + :rtype: float + """ + return self._cpu_frequency_in_mhz + + @cpu_frequency_in_mhz.setter + def cpu_frequency_in_mhz(self, cpu_frequency_in_mhz): + """ + Sets the cpu_frequency_in_mhz of this HostConfigurationSummary. + Clock frequency of the processor in megahertz. + + + :param cpu_frequency_in_mhz: The cpu_frequency_in_mhz of this HostConfigurationSummary. + :type: float + """ + self._cpu_frequency_in_mhz = cpu_frequency_in_mhz + + @property + def cpu_implementation(self): + """ + **[Required]** Gets the cpu_implementation of this HostConfigurationSummary. + Model name of processor. + + + :return: The cpu_implementation of this HostConfigurationSummary. + :rtype: str + """ + return self._cpu_implementation + + @cpu_implementation.setter + def cpu_implementation(self, cpu_implementation): + """ + Sets the cpu_implementation of this HostConfigurationSummary. + Model name of processor. + + + :param cpu_implementation: The cpu_implementation of this HostConfigurationSummary. + :type: str + """ + self._cpu_implementation = cpu_implementation + + @property + def cores_per_socket(self): + """ + **[Required]** Gets the cores_per_socket of this HostConfigurationSummary. + Number of cores per socket. + + + :return: The cores_per_socket of this HostConfigurationSummary. + :rtype: int + """ + return self._cores_per_socket + + @cores_per_socket.setter + def cores_per_socket(self, cores_per_socket): + """ + Sets the cores_per_socket of this HostConfigurationSummary. + Number of cores per socket. + + + :param cores_per_socket: The cores_per_socket of this HostConfigurationSummary. + :type: int + """ + self._cores_per_socket = cores_per_socket + + @property + def total_sockets(self): + """ + **[Required]** Gets the total_sockets of this HostConfigurationSummary. + Number of total sockets. + + + :return: The total_sockets of this HostConfigurationSummary. + :rtype: int + """ + return self._total_sockets + + @total_sockets.setter + def total_sockets(self, total_sockets): + """ + Sets the total_sockets of this HostConfigurationSummary. + Number of total sockets. + + + :param total_sockets: The total_sockets of this HostConfigurationSummary. + :type: int + """ + self._total_sockets = total_sockets + + @property + def threads_per_socket(self): + """ + **[Required]** Gets the threads_per_socket of this HostConfigurationSummary. + Number of threads per socket. + + + :return: The threads_per_socket of this HostConfigurationSummary. + :rtype: int + """ + return self._threads_per_socket + + @threads_per_socket.setter + def threads_per_socket(self, threads_per_socket): + """ + Sets the threads_per_socket of this HostConfigurationSummary. + Number of threads per socket. + + + :param threads_per_socket: The threads_per_socket of this HostConfigurationSummary. + :type: int + """ + self._threads_per_socket = threads_per_socket + + @property + def is_hyper_threading_enabled(self): + """ + **[Required]** Gets the is_hyper_threading_enabled of this HostConfigurationSummary. + Indicates if hyper-threading is enabled or not + + + :return: The is_hyper_threading_enabled of this HostConfigurationSummary. + :rtype: bool + """ + return self._is_hyper_threading_enabled + + @is_hyper_threading_enabled.setter + def is_hyper_threading_enabled(self, is_hyper_threading_enabled): + """ + Sets the is_hyper_threading_enabled of this HostConfigurationSummary. + Indicates if hyper-threading is enabled or not + + + :param is_hyper_threading_enabled: The is_hyper_threading_enabled of this HostConfigurationSummary. + :type: bool + """ + self._is_hyper_threading_enabled = is_hyper_threading_enabled + + @property + def defined_tags(self): + """ + **[Required]** Gets the defined_tags of this HostConfigurationSummary. + Defined tags for this resource. Each key is predefined and scoped to a namespace. + Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + + :return: The defined_tags of this HostConfigurationSummary. + :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 HostConfigurationSummary. + Defined tags for this resource. Each key is predefined and scoped to a namespace. + Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + + :param defined_tags: The defined_tags of this HostConfigurationSummary. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + @property + def freeform_tags(self): + """ + **[Required]** Gets the freeform_tags of this HostConfigurationSummary. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + Example: `{\"bar-key\": \"value\"}` + + + :return: The freeform_tags of this HostConfigurationSummary. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this HostConfigurationSummary. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + Example: `{\"bar-key\": \"value\"}` + + + :param freeform_tags: The freeform_tags of this HostConfigurationSummary. + :type: dict(str, str) + """ + self._freeform_tags = freeform_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/opsi/models/host_insight.py b/src/oci/opsi/models/host_insight.py index 2f2ec82482..9bcc5e7111 100644 --- a/src/oci/opsi/models/host_insight.py +++ b/src/oci/opsi/models/host_insight.py @@ -17,6 +17,10 @@ class HostInsight(object): #: This constant has a value of "MACS_MANAGED_EXTERNAL_HOST" ENTITY_SOURCE_MACS_MANAGED_EXTERNAL_HOST = "MACS_MANAGED_EXTERNAL_HOST" + #: A constant which can be used with the entity_source property of a HostInsight. + #: This constant has a value of "EM_MANAGED_EXTERNAL_HOST" + ENTITY_SOURCE_EM_MANAGED_EXTERNAL_HOST = "EM_MANAGED_EXTERNAL_HOST" + #: A constant which can be used with the status property of a HostInsight. #: This constant has a value of "DISABLED" STATUS_DISABLED = "DISABLED" @@ -62,13 +66,14 @@ def __init__(self, **kwargs): Initializes a new HostInsight object with values from keyword arguments. This class has the following subclasses and if you are using this class as input to a service operations then you should favor using a subclass over the base class: + * :class:`~oci.opsi.models.EmManagedExternalHostInsight` * :class:`~oci.opsi.models.MacsManagedExternalHostInsight` The following keyword arguments are supported (corresponding to the getters/setters of this class): :param entity_source: The value to assign to the entity_source property of this HostInsight. - Allowed values for this property are: "MACS_MANAGED_EXTERNAL_HOST", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "MACS_MANAGED_EXTERNAL_HOST", "EM_MANAGED_EXTERNAL_HOST", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type entity_source: str @@ -193,6 +198,9 @@ def get_subtype(object_dictionary): """ type = object_dictionary['entitySource'] + if type == 'EM_MANAGED_EXTERNAL_HOST': + return 'EmManagedExternalHostInsight' + if type == 'MACS_MANAGED_EXTERNAL_HOST': return 'MacsManagedExternalHostInsight' else: @@ -204,7 +212,7 @@ def entity_source(self): **[Required]** Gets the entity_source of this HostInsight. Source of the host entity. - Allowed values for this property are: "MACS_MANAGED_EXTERNAL_HOST", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "MACS_MANAGED_EXTERNAL_HOST", "EM_MANAGED_EXTERNAL_HOST", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. @@ -223,7 +231,7 @@ def entity_source(self, entity_source): :param entity_source: The entity_source of this HostInsight. :type: str """ - allowed_values = ["MACS_MANAGED_EXTERNAL_HOST"] + allowed_values = ["MACS_MANAGED_EXTERNAL_HOST", "EM_MANAGED_EXTERNAL_HOST"] if not value_allowed_none_or_none_sentinel(entity_source, allowed_values): entity_source = 'UNKNOWN_ENUM_VALUE' self._entity_source = entity_source diff --git a/src/oci/opsi/models/host_insight_summary.py b/src/oci/opsi/models/host_insight_summary.py index 96d75e5671..dd1871ea30 100644 --- a/src/oci/opsi/models/host_insight_summary.py +++ b/src/oci/opsi/models/host_insight_summary.py @@ -17,6 +17,10 @@ class HostInsightSummary(object): #: This constant has a value of "MACS_MANAGED_EXTERNAL_HOST" ENTITY_SOURCE_MACS_MANAGED_EXTERNAL_HOST = "MACS_MANAGED_EXTERNAL_HOST" + #: A constant which can be used with the entity_source property of a HostInsightSummary. + #: This constant has a value of "EM_MANAGED_EXTERNAL_HOST" + ENTITY_SOURCE_EM_MANAGED_EXTERNAL_HOST = "EM_MANAGED_EXTERNAL_HOST" + #: A constant which can be used with the status property of a HostInsightSummary. #: This constant has a value of "DISABLED" STATUS_DISABLED = "DISABLED" @@ -63,12 +67,13 @@ def __init__(self, **kwargs): to a service operations then you should favor using a subclass over the base class: * :class:`~oci.opsi.models.MacsManagedExternalHostInsightSummary` + * :class:`~oci.opsi.models.EmManagedExternalHostInsightSummary` The following keyword arguments are supported (corresponding to the getters/setters of this class): :param entity_source: The value to assign to the entity_source property of this HostInsightSummary. - Allowed values for this property are: "MACS_MANAGED_EXTERNAL_HOST", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "MACS_MANAGED_EXTERNAL_HOST", "EM_MANAGED_EXTERNAL_HOST", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type entity_source: str @@ -195,6 +200,9 @@ def get_subtype(object_dictionary): if type == 'MACS_MANAGED_EXTERNAL_HOST': return 'MacsManagedExternalHostInsightSummary' + + if type == 'EM_MANAGED_EXTERNAL_HOST': + return 'EmManagedExternalHostInsightSummary' else: return 'HostInsightSummary' @@ -204,7 +212,7 @@ def entity_source(self): **[Required]** Gets the entity_source of this HostInsightSummary. Source of the host entity. - Allowed values for this property are: "MACS_MANAGED_EXTERNAL_HOST", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "MACS_MANAGED_EXTERNAL_HOST", "EM_MANAGED_EXTERNAL_HOST", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. @@ -223,7 +231,7 @@ def entity_source(self, entity_source): :param entity_source: The entity_source of this HostInsightSummary. :type: str """ - allowed_values = ["MACS_MANAGED_EXTERNAL_HOST"] + allowed_values = ["MACS_MANAGED_EXTERNAL_HOST", "EM_MANAGED_EXTERNAL_HOST"] if not value_allowed_none_or_none_sentinel(entity_source, allowed_values): entity_source = 'UNKNOWN_ENUM_VALUE' self._entity_source = entity_source diff --git a/src/oci/opsi/models/instance_metrics.py b/src/oci/opsi/models/instance_metrics.py new file mode 100644 index 0000000000..6e1633f2c4 --- /dev/null +++ b/src/oci/opsi/models/instance_metrics.py @@ -0,0 +1,225 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 InstanceMetrics(object): + """ + Object containing instance metrics. + """ + + def __init__(self, **kwargs): + """ + Initializes a new InstanceMetrics object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param host_name: + The value to assign to the host_name property of this InstanceMetrics. + :type host_name: str + + :param instance_name: + The value to assign to the instance_name property of this InstanceMetrics. + :type instance_name: str + + :param usage: + The value to assign to the usage property of this InstanceMetrics. + :type usage: float + + :param capacity: + The value to assign to the capacity property of this InstanceMetrics. + :type capacity: float + + :param utilization_percent: + The value to assign to the utilization_percent property of this InstanceMetrics. + :type utilization_percent: float + + :param usage_change_percent: + The value to assign to the usage_change_percent property of this InstanceMetrics. + :type usage_change_percent: float + + """ + self.swagger_types = { + 'host_name': 'str', + 'instance_name': 'str', + 'usage': 'float', + 'capacity': 'float', + 'utilization_percent': 'float', + 'usage_change_percent': 'float' + } + + self.attribute_map = { + 'host_name': 'hostName', + 'instance_name': 'instanceName', + 'usage': 'usage', + 'capacity': 'capacity', + 'utilization_percent': 'utilizationPercent', + 'usage_change_percent': 'usageChangePercent' + } + + self._host_name = None + self._instance_name = None + self._usage = None + self._capacity = None + self._utilization_percent = None + self._usage_change_percent = None + + @property + def host_name(self): + """ + Gets the host_name of this InstanceMetrics. + The hostname of the database insight resource. + + + :return: The host_name of this InstanceMetrics. + :rtype: str + """ + return self._host_name + + @host_name.setter + def host_name(self, host_name): + """ + Sets the host_name of this InstanceMetrics. + The hostname of the database insight resource. + + + :param host_name: The host_name of this InstanceMetrics. + :type: str + """ + self._host_name = host_name + + @property + def instance_name(self): + """ + Gets the instance_name of this InstanceMetrics. + The instance name of the database insight resource. + + + :return: The instance_name of this InstanceMetrics. + :rtype: str + """ + return self._instance_name + + @instance_name.setter + def instance_name(self, instance_name): + """ + Sets the instance_name of this InstanceMetrics. + The instance name of the database insight resource. + + + :param instance_name: The instance_name of this InstanceMetrics. + :type: str + """ + self._instance_name = instance_name + + @property + def usage(self): + """ + Gets the usage of this InstanceMetrics. + Total amount used of the resource metric type (CPU, STORAGE). + + + :return: The usage of this InstanceMetrics. + :rtype: float + """ + return self._usage + + @usage.setter + def usage(self, usage): + """ + Sets the usage of this InstanceMetrics. + Total amount used of the resource metric type (CPU, STORAGE). + + + :param usage: The usage of this InstanceMetrics. + :type: float + """ + self._usage = usage + + @property + def capacity(self): + """ + Gets the capacity of this InstanceMetrics. + The maximum allocated amount of the resource metric type (CPU, STORAGE). + + + :return: The capacity of this InstanceMetrics. + :rtype: float + """ + return self._capacity + + @capacity.setter + def capacity(self, capacity): + """ + Sets the capacity of this InstanceMetrics. + The maximum allocated amount of the resource metric type (CPU, STORAGE). + + + :param capacity: The capacity of this InstanceMetrics. + :type: float + """ + self._capacity = capacity + + @property + def utilization_percent(self): + """ + Gets the utilization_percent of this InstanceMetrics. + Resource utilization in percentage + + + :return: The utilization_percent of this InstanceMetrics. + :rtype: float + """ + return self._utilization_percent + + @utilization_percent.setter + def utilization_percent(self, utilization_percent): + """ + Sets the utilization_percent of this InstanceMetrics. + Resource utilization in percentage + + + :param utilization_percent: The utilization_percent of this InstanceMetrics. + :type: float + """ + self._utilization_percent = utilization_percent + + @property + def usage_change_percent(self): + """ + Gets the usage_change_percent of this InstanceMetrics. + Change in resource utilization in percentage + + + :return: The usage_change_percent of this InstanceMetrics. + :rtype: float + """ + return self._usage_change_percent + + @usage_change_percent.setter + def usage_change_percent(self, usage_change_percent): + """ + Sets the usage_change_percent of this InstanceMetrics. + Change in resource utilization in percentage + + + :param usage_change_percent: The usage_change_percent of this InstanceMetrics. + :type: float + """ + self._usage_change_percent = usage_change_percent + + 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/opsi/models/macs_managed_external_database_configuration_summary.py b/src/oci/opsi/models/macs_managed_external_database_configuration_summary.py index 69c269a425..2230398591 100644 --- a/src/oci/opsi/models/macs_managed_external_database_configuration_summary.py +++ b/src/oci/opsi/models/macs_managed_external_database_configuration_summary.py @@ -48,6 +48,10 @@ def __init__(self, **kwargs): The value to assign to the database_version property of this MacsManagedExternalDatabaseConfigurationSummary. :type database_version: str + :param cdb_name: + The value to assign to the cdb_name property of this MacsManagedExternalDatabaseConfigurationSummary. + :type cdb_name: str + :param defined_tags: The value to assign to the defined_tags property of this MacsManagedExternalDatabaseConfigurationSummary. :type defined_tags: dict(str, dict(str, object)) @@ -85,6 +89,7 @@ def __init__(self, **kwargs): 'database_display_name': 'str', 'database_type': 'str', 'database_version': 'str', + 'cdb_name': 'str', 'defined_tags': 'dict(str, dict(str, object))', 'freeform_tags': 'dict(str, str)', 'processor_count': 'int', @@ -102,6 +107,7 @@ def __init__(self, **kwargs): 'database_display_name': 'databaseDisplayName', 'database_type': 'databaseType', 'database_version': 'databaseVersion', + 'cdb_name': 'cdbName', 'defined_tags': 'definedTags', 'freeform_tags': 'freeformTags', 'processor_count': 'processorCount', @@ -118,6 +124,7 @@ def __init__(self, **kwargs): self._database_display_name = None self._database_type = None self._database_version = None + self._cdb_name = None self._defined_tags = None self._freeform_tags = None self._processor_count = None diff --git a/src/oci/opsi/models/macs_managed_external_host_configuration_summary.py b/src/oci/opsi/models/macs_managed_external_host_configuration_summary.py new file mode 100644 index 0000000000..588ca29f00 --- /dev/null +++ b/src/oci/opsi/models/macs_managed_external_host_configuration_summary.py @@ -0,0 +1,253 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .host_configuration_summary import HostConfigurationSummary +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 MacsManagedExternalHostConfigurationSummary(HostConfigurationSummary): + """ + Configuration Summary of a Macs Managed External host. + """ + + def __init__(self, **kwargs): + """ + Initializes a new MacsManagedExternalHostConfigurationSummary object with values from keyword arguments. The default value of the :py:attr:`~oci.opsi.models.MacsManagedExternalHostConfigurationSummary.entity_source` attribute + of this class is ``MACS_MANAGED_EXTERNAL_HOST`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param host_insight_id: + The value to assign to the host_insight_id property of this MacsManagedExternalHostConfigurationSummary. + :type host_insight_id: str + + :param entity_source: + The value to assign to the entity_source property of this MacsManagedExternalHostConfigurationSummary. + Allowed values for this property are: "MACS_MANAGED_EXTERNAL_HOST", "EM_MANAGED_EXTERNAL_HOST" + :type entity_source: str + + :param compartment_id: + The value to assign to the compartment_id property of this MacsManagedExternalHostConfigurationSummary. + :type compartment_id: str + + :param host_name: + The value to assign to the host_name property of this MacsManagedExternalHostConfigurationSummary. + :type host_name: str + + :param platform_type: + The value to assign to the platform_type property of this MacsManagedExternalHostConfigurationSummary. + Allowed values for this property are: "LINUX" + :type platform_type: str + + :param platform_version: + The value to assign to the platform_version property of this MacsManagedExternalHostConfigurationSummary. + :type platform_version: str + + :param platform_vendor: + The value to assign to the platform_vendor property of this MacsManagedExternalHostConfigurationSummary. + :type platform_vendor: str + + :param total_cpus: + The value to assign to the total_cpus property of this MacsManagedExternalHostConfigurationSummary. + :type total_cpus: int + + :param total_memory_in_gbs: + The value to assign to the total_memory_in_gbs property of this MacsManagedExternalHostConfigurationSummary. + :type total_memory_in_gbs: float + + :param cpu_architecture: + The value to assign to the cpu_architecture property of this MacsManagedExternalHostConfigurationSummary. + :type cpu_architecture: str + + :param cpu_cache_in_mbs: + The value to assign to the cpu_cache_in_mbs property of this MacsManagedExternalHostConfigurationSummary. + :type cpu_cache_in_mbs: float + + :param cpu_vendor: + The value to assign to the cpu_vendor property of this MacsManagedExternalHostConfigurationSummary. + :type cpu_vendor: str + + :param cpu_frequency_in_mhz: + The value to assign to the cpu_frequency_in_mhz property of this MacsManagedExternalHostConfigurationSummary. + :type cpu_frequency_in_mhz: float + + :param cpu_implementation: + The value to assign to the cpu_implementation property of this MacsManagedExternalHostConfigurationSummary. + :type cpu_implementation: str + + :param cores_per_socket: + The value to assign to the cores_per_socket property of this MacsManagedExternalHostConfigurationSummary. + :type cores_per_socket: int + + :param total_sockets: + The value to assign to the total_sockets property of this MacsManagedExternalHostConfigurationSummary. + :type total_sockets: int + + :param threads_per_socket: + The value to assign to the threads_per_socket property of this MacsManagedExternalHostConfigurationSummary. + :type threads_per_socket: int + + :param is_hyper_threading_enabled: + The value to assign to the is_hyper_threading_enabled property of this MacsManagedExternalHostConfigurationSummary. + :type is_hyper_threading_enabled: bool + + :param defined_tags: + The value to assign to the defined_tags property of this MacsManagedExternalHostConfigurationSummary. + :type defined_tags: dict(str, dict(str, object)) + + :param freeform_tags: + The value to assign to the freeform_tags property of this MacsManagedExternalHostConfigurationSummary. + :type freeform_tags: dict(str, str) + + :param management_agent_id: + The value to assign to the management_agent_id property of this MacsManagedExternalHostConfigurationSummary. + :type management_agent_id: str + + :param connector_id: + The value to assign to the connector_id property of this MacsManagedExternalHostConfigurationSummary. + :type connector_id: str + + """ + self.swagger_types = { + 'host_insight_id': 'str', + 'entity_source': 'str', + 'compartment_id': 'str', + 'host_name': 'str', + 'platform_type': 'str', + 'platform_version': 'str', + 'platform_vendor': 'str', + 'total_cpus': 'int', + 'total_memory_in_gbs': 'float', + 'cpu_architecture': 'str', + 'cpu_cache_in_mbs': 'float', + 'cpu_vendor': 'str', + 'cpu_frequency_in_mhz': 'float', + 'cpu_implementation': 'str', + 'cores_per_socket': 'int', + 'total_sockets': 'int', + 'threads_per_socket': 'int', + 'is_hyper_threading_enabled': 'bool', + 'defined_tags': 'dict(str, dict(str, object))', + 'freeform_tags': 'dict(str, str)', + 'management_agent_id': 'str', + 'connector_id': 'str' + } + + self.attribute_map = { + 'host_insight_id': 'hostInsightId', + 'entity_source': 'entitySource', + 'compartment_id': 'compartmentId', + 'host_name': 'hostName', + 'platform_type': 'platformType', + 'platform_version': 'platformVersion', + 'platform_vendor': 'platformVendor', + 'total_cpus': 'totalCpus', + 'total_memory_in_gbs': 'totalMemoryInGBs', + 'cpu_architecture': 'cpuArchitecture', + 'cpu_cache_in_mbs': 'cpuCacheInMBs', + 'cpu_vendor': 'cpuVendor', + 'cpu_frequency_in_mhz': 'cpuFrequencyInMhz', + 'cpu_implementation': 'cpuImplementation', + 'cores_per_socket': 'coresPerSocket', + 'total_sockets': 'totalSockets', + 'threads_per_socket': 'threadsPerSocket', + 'is_hyper_threading_enabled': 'isHyperThreadingEnabled', + 'defined_tags': 'definedTags', + 'freeform_tags': 'freeformTags', + 'management_agent_id': 'managementAgentId', + 'connector_id': 'connectorId' + } + + self._host_insight_id = None + self._entity_source = None + self._compartment_id = None + self._host_name = None + self._platform_type = None + self._platform_version = None + self._platform_vendor = None + self._total_cpus = None + self._total_memory_in_gbs = None + self._cpu_architecture = None + self._cpu_cache_in_mbs = None + self._cpu_vendor = None + self._cpu_frequency_in_mhz = None + self._cpu_implementation = None + self._cores_per_socket = None + self._total_sockets = None + self._threads_per_socket = None + self._is_hyper_threading_enabled = None + self._defined_tags = None + self._freeform_tags = None + self._management_agent_id = None + self._connector_id = None + self._entity_source = 'MACS_MANAGED_EXTERNAL_HOST' + + @property + def management_agent_id(self): + """ + **[Required]** Gets the management_agent_id of this MacsManagedExternalHostConfigurationSummary. + The `OCID`__ of the Management Agent + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The management_agent_id of this MacsManagedExternalHostConfigurationSummary. + :rtype: str + """ + return self._management_agent_id + + @management_agent_id.setter + def management_agent_id(self, management_agent_id): + """ + Sets the management_agent_id of this MacsManagedExternalHostConfigurationSummary. + The `OCID`__ of the Management Agent + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param management_agent_id: The management_agent_id of this MacsManagedExternalHostConfigurationSummary. + :type: str + """ + self._management_agent_id = management_agent_id + + @property + def connector_id(self): + """ + Gets the connector_id of this MacsManagedExternalHostConfigurationSummary. + The `OCID`__ of External Database Connector + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The connector_id of this MacsManagedExternalHostConfigurationSummary. + :rtype: str + """ + return self._connector_id + + @connector_id.setter + def connector_id(self, connector_id): + """ + Sets the connector_id of this MacsManagedExternalHostConfigurationSummary. + The `OCID`__ of External Database Connector + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param connector_id: The connector_id of this MacsManagedExternalHostConfigurationSummary. + :type: str + """ + self._connector_id = connector_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/opsi/models/macs_managed_external_host_insight.py b/src/oci/opsi/models/macs_managed_external_host_insight.py index bcfcf0da80..fb225ca383 100644 --- a/src/oci/opsi/models/macs_managed_external_host_insight.py +++ b/src/oci/opsi/models/macs_managed_external_host_insight.py @@ -25,7 +25,7 @@ def __init__(self, **kwargs): :param entity_source: The value to assign to the entity_source property of this MacsManagedExternalHostInsight. - Allowed values for this property are: "MACS_MANAGED_EXTERNAL_HOST", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "MACS_MANAGED_EXTERNAL_HOST", "EM_MANAGED_EXTERNAL_HOST", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type entity_source: str diff --git a/src/oci/opsi/models/macs_managed_external_host_insight_summary.py b/src/oci/opsi/models/macs_managed_external_host_insight_summary.py index 39ab39ce4e..5c22c7b8be 100644 --- a/src/oci/opsi/models/macs_managed_external_host_insight_summary.py +++ b/src/oci/opsi/models/macs_managed_external_host_insight_summary.py @@ -25,7 +25,7 @@ def __init__(self, **kwargs): :param entity_source: The value to assign to the entity_source property of this MacsManagedExternalHostInsightSummary. - Allowed values for this property are: "MACS_MANAGED_EXTERNAL_HOST", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "MACS_MANAGED_EXTERNAL_HOST", "EM_MANAGED_EXTERNAL_HOST", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type entity_source: str diff --git a/src/oci/opsi/models/resource_statistics.py b/src/oci/opsi/models/resource_statistics.py index c5531493a1..e386f1f298 100644 --- a/src/oci/opsi/models/resource_statistics.py +++ b/src/oci/opsi/models/resource_statistics.py @@ -42,6 +42,10 @@ def __init__(self, **kwargs): The value to assign to the usage_change_percent property of this ResourceStatistics. :type usage_change_percent: float + :param instance_metrics: + The value to assign to the instance_metrics property of this ResourceStatistics. + :type instance_metrics: list[oci.opsi.models.InstanceMetrics] + """ self.swagger_types = { 'usage': 'float', @@ -49,7 +53,8 @@ def __init__(self, **kwargs): 'base_capacity': 'float', 'is_auto_scaling_enabled': 'bool', 'utilization_percent': 'float', - 'usage_change_percent': 'float' + 'usage_change_percent': 'float', + 'instance_metrics': 'list[InstanceMetrics]' } self.attribute_map = { @@ -58,7 +63,8 @@ def __init__(self, **kwargs): 'base_capacity': 'baseCapacity', 'is_auto_scaling_enabled': 'isAutoScalingEnabled', 'utilization_percent': 'utilizationPercent', - 'usage_change_percent': 'usageChangePercent' + 'usage_change_percent': 'usageChangePercent', + 'instance_metrics': 'instanceMetrics' } self._usage = None @@ -67,6 +73,7 @@ def __init__(self, **kwargs): self._is_auto_scaling_enabled = None self._utilization_percent = None self._usage_change_percent = None + self._instance_metrics = None @property def usage(self): @@ -212,6 +219,30 @@ def usage_change_percent(self, usage_change_percent): """ self._usage_change_percent = usage_change_percent + @property + def instance_metrics(self): + """ + Gets the instance_metrics of this ResourceStatistics. + Array of instance metrics + + + :return: The instance_metrics of this ResourceStatistics. + :rtype: list[oci.opsi.models.InstanceMetrics] + """ + return self._instance_metrics + + @instance_metrics.setter + def instance_metrics(self, instance_metrics): + """ + Sets the instance_metrics of this ResourceStatistics. + Array of instance metrics + + + :param instance_metrics: The instance_metrics of this ResourceStatistics. + :type: list[oci.opsi.models.InstanceMetrics] + """ + self._instance_metrics = instance_metrics + def __repr__(self): return formatted_flat_dict(self) diff --git a/src/oci/opsi/models/resource_usage_summary.py b/src/oci/opsi/models/resource_usage_summary.py new file mode 100644 index 0000000000..43e0b9fa8c --- /dev/null +++ b/src/oci/opsi/models/resource_usage_summary.py @@ -0,0 +1,198 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 ResourceUsageSummary(object): + """ + Contains resource usage summary + """ + + def __init__(self, **kwargs): + """ + Initializes a new ResourceUsageSummary object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param exadata_insight_id: + The value to assign to the exadata_insight_id property of this ResourceUsageSummary. + :type exadata_insight_id: str + + :param usage: + The value to assign to the usage property of this ResourceUsageSummary. + :type usage: float + + :param capacity: + The value to assign to the capacity property of this ResourceUsageSummary. + :type capacity: float + + :param utilization_percent: + The value to assign to the utilization_percent property of this ResourceUsageSummary. + :type utilization_percent: float + + :param usage_change_percent: + The value to assign to the usage_change_percent property of this ResourceUsageSummary. + :type usage_change_percent: float + + """ + self.swagger_types = { + 'exadata_insight_id': 'str', + 'usage': 'float', + 'capacity': 'float', + 'utilization_percent': 'float', + 'usage_change_percent': 'float' + } + + self.attribute_map = { + 'exadata_insight_id': 'exadataInsightId', + 'usage': 'usage', + 'capacity': 'capacity', + 'utilization_percent': 'utilizationPercent', + 'usage_change_percent': 'usageChangePercent' + } + + self._exadata_insight_id = None + self._usage = None + self._capacity = None + self._utilization_percent = None + self._usage_change_percent = None + + @property + def exadata_insight_id(self): + """ + **[Required]** Gets the exadata_insight_id of this ResourceUsageSummary. + The `OCID`__ of the Exadata insight. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The exadata_insight_id of this ResourceUsageSummary. + :rtype: str + """ + return self._exadata_insight_id + + @exadata_insight_id.setter + def exadata_insight_id(self, exadata_insight_id): + """ + Sets the exadata_insight_id of this ResourceUsageSummary. + The `OCID`__ of the Exadata insight. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param exadata_insight_id: The exadata_insight_id of this ResourceUsageSummary. + :type: str + """ + self._exadata_insight_id = exadata_insight_id + + @property + def usage(self): + """ + **[Required]** Gets the usage of this ResourceUsageSummary. + Total amount used of the resource metric type (CPU, STORAGE). + + + :return: The usage of this ResourceUsageSummary. + :rtype: float + """ + return self._usage + + @usage.setter + def usage(self, usage): + """ + Sets the usage of this ResourceUsageSummary. + Total amount used of the resource metric type (CPU, STORAGE). + + + :param usage: The usage of this ResourceUsageSummary. + :type: float + """ + self._usage = usage + + @property + def capacity(self): + """ + **[Required]** Gets the capacity of this ResourceUsageSummary. + The maximum allocated amount of the resource metric type (CPU, STORAGE). + + + :return: The capacity of this ResourceUsageSummary. + :rtype: float + """ + return self._capacity + + @capacity.setter + def capacity(self, capacity): + """ + Sets the capacity of this ResourceUsageSummary. + The maximum allocated amount of the resource metric type (CPU, STORAGE). + + + :param capacity: The capacity of this ResourceUsageSummary. + :type: float + """ + self._capacity = capacity + + @property + def utilization_percent(self): + """ + **[Required]** Gets the utilization_percent of this ResourceUsageSummary. + Resource utilization in percentage + + + :return: The utilization_percent of this ResourceUsageSummary. + :rtype: float + """ + return self._utilization_percent + + @utilization_percent.setter + def utilization_percent(self, utilization_percent): + """ + Sets the utilization_percent of this ResourceUsageSummary. + Resource utilization in percentage + + + :param utilization_percent: The utilization_percent of this ResourceUsageSummary. + :type: float + """ + self._utilization_percent = utilization_percent + + @property + def usage_change_percent(self): + """ + **[Required]** Gets the usage_change_percent of this ResourceUsageSummary. + Change in resource utilization in percentage + + + :return: The usage_change_percent of this ResourceUsageSummary. + :rtype: float + """ + return self._usage_change_percent + + @usage_change_percent.setter + def usage_change_percent(self, usage_change_percent): + """ + Sets the usage_change_percent of this ResourceUsageSummary. + Change in resource utilization in percentage + + + :param usage_change_percent: The usage_change_percent of this ResourceUsageSummary. + :type: float + """ + self._usage_change_percent = usage_change_percent + + 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/opsi/models/storage_server_details.py b/src/oci/opsi/models/storage_server_details.py new file mode 100644 index 0000000000..5ea11e72d0 --- /dev/null +++ b/src/oci/opsi/models/storage_server_details.py @@ -0,0 +1,101 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 StorageServerDetails(object): + """ + Partial information about a storage server which includes name and displayName. + """ + + def __init__(self, **kwargs): + """ + Initializes a new StorageServerDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param storage_server_name: + The value to assign to the storage_server_name property of this StorageServerDetails. + :type storage_server_name: str + + :param storage_server_display_name: + The value to assign to the storage_server_display_name property of this StorageServerDetails. + :type storage_server_display_name: str + + """ + self.swagger_types = { + 'storage_server_name': 'str', + 'storage_server_display_name': 'str' + } + + self.attribute_map = { + 'storage_server_name': 'storageServerName', + 'storage_server_display_name': 'storageServerDisplayName' + } + + self._storage_server_name = None + self._storage_server_display_name = None + + @property + def storage_server_name(self): + """ + **[Required]** Gets the storage_server_name of this StorageServerDetails. + The storage server name. + + + :return: The storage_server_name of this StorageServerDetails. + :rtype: str + """ + return self._storage_server_name + + @storage_server_name.setter + def storage_server_name(self, storage_server_name): + """ + Sets the storage_server_name of this StorageServerDetails. + The storage server name. + + + :param storage_server_name: The storage_server_name of this StorageServerDetails. + :type: str + """ + self._storage_server_name = storage_server_name + + @property + def storage_server_display_name(self): + """ + **[Required]** Gets the storage_server_display_name of this StorageServerDetails. + The user-friendly name for the storage server. The name does not have to be unique. + + + :return: The storage_server_display_name of this StorageServerDetails. + :rtype: str + """ + return self._storage_server_display_name + + @storage_server_display_name.setter + def storage_server_display_name(self, storage_server_display_name): + """ + Sets the storage_server_display_name of this StorageServerDetails. + The user-friendly name for the storage server. The name does not have to be unique. + + + :param storage_server_display_name: The storage_server_display_name of this StorageServerDetails. + :type: str + """ + self._storage_server_display_name = storage_server_display_name + + 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/opsi/models/summarize_database_insight_resource_capacity_trend_aggregation_collection.py b/src/oci/opsi/models/summarize_database_insight_resource_capacity_trend_aggregation_collection.py index 78d5c9b3f0..e5ce3bca13 100644 --- a/src/oci/opsi/models/summarize_database_insight_resource_capacity_trend_aggregation_collection.py +++ b/src/oci/opsi/models/summarize_database_insight_resource_capacity_trend_aggregation_collection.py @@ -49,6 +49,10 @@ class SummarizeDatabaseInsightResourceCapacityTrendAggregationCollection(object) #: This constant has a value of "MBPS" USAGE_UNIT_MBPS = "MBPS" + #: A constant which can be used with the usage_unit property of a SummarizeDatabaseInsightResourceCapacityTrendAggregationCollection. + #: This constant has a value of "IOPS" + USAGE_UNIT_IOPS = "IOPS" + #: A constant which can be used with the usage_unit property of a SummarizeDatabaseInsightResourceCapacityTrendAggregationCollection. #: This constant has a value of "PERCENT" USAGE_UNIT_PERCENT = "PERCENT" @@ -74,7 +78,7 @@ def __init__(self, **kwargs): :param usage_unit: The value to assign to the usage_unit property of this SummarizeDatabaseInsightResourceCapacityTrendAggregationCollection. - Allowed values for this property are: "CORES", "GB", "MBPS", "PERCENT", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "CORES", "GB", "MBPS", "IOPS", "PERCENT", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type usage_unit: str @@ -196,7 +200,7 @@ def usage_unit(self): **[Required]** Gets the usage_unit of this SummarizeDatabaseInsightResourceCapacityTrendAggregationCollection. Identifies the units of the current resource metric (CORES, GB). - Allowed values for this property are: "CORES", "GB", "MBPS", "PERCENT", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "CORES", "GB", "MBPS", "IOPS", "PERCENT", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. @@ -215,7 +219,7 @@ def usage_unit(self, usage_unit): :param usage_unit: The usage_unit of this SummarizeDatabaseInsightResourceCapacityTrendAggregationCollection. :type: str """ - allowed_values = ["CORES", "GB", "MBPS", "PERCENT"] + allowed_values = ["CORES", "GB", "MBPS", "IOPS", "PERCENT"] if not value_allowed_none_or_none_sentinel(usage_unit, allowed_values): usage_unit = 'UNKNOWN_ENUM_VALUE' self._usage_unit = usage_unit diff --git a/src/oci/opsi/models/summarize_database_insight_resource_forecast_trend_aggregation.py b/src/oci/opsi/models/summarize_database_insight_resource_forecast_trend_aggregation.py index 598175a7cd..78e6f7e945 100644 --- a/src/oci/opsi/models/summarize_database_insight_resource_forecast_trend_aggregation.py +++ b/src/oci/opsi/models/summarize_database_insight_resource_forecast_trend_aggregation.py @@ -49,6 +49,10 @@ class SummarizeDatabaseInsightResourceForecastTrendAggregation(object): #: This constant has a value of "MBPS" USAGE_UNIT_MBPS = "MBPS" + #: A constant which can be used with the usage_unit property of a SummarizeDatabaseInsightResourceForecastTrendAggregation. + #: This constant has a value of "IOPS" + USAGE_UNIT_IOPS = "IOPS" + #: A constant which can be used with the usage_unit property of a SummarizeDatabaseInsightResourceForecastTrendAggregation. #: This constant has a value of "PERCENT" USAGE_UNIT_PERCENT = "PERCENT" @@ -106,7 +110,7 @@ def __init__(self, **kwargs): :param usage_unit: The value to assign to the usage_unit property of this SummarizeDatabaseInsightResourceForecastTrendAggregation. - Allowed values for this property are: "CORES", "GB", "MBPS", "PERCENT", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "CORES", "GB", "MBPS", "IOPS", "PERCENT", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type usage_unit: str @@ -244,7 +248,7 @@ def usage_unit(self): **[Required]** Gets the usage_unit of this SummarizeDatabaseInsightResourceForecastTrendAggregation. Displays usage unit ( CORES, GB) - Allowed values for this property are: "CORES", "GB", "MBPS", "PERCENT", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "CORES", "GB", "MBPS", "IOPS", "PERCENT", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. @@ -263,7 +267,7 @@ def usage_unit(self, usage_unit): :param usage_unit: The usage_unit of this SummarizeDatabaseInsightResourceForecastTrendAggregation. :type: str """ - allowed_values = ["CORES", "GB", "MBPS", "PERCENT"] + allowed_values = ["CORES", "GB", "MBPS", "IOPS", "PERCENT"] if not value_allowed_none_or_none_sentinel(usage_unit, allowed_values): usage_unit = 'UNKNOWN_ENUM_VALUE' self._usage_unit = usage_unit diff --git a/src/oci/opsi/models/summarize_database_insight_resource_statistics_aggregation_collection.py b/src/oci/opsi/models/summarize_database_insight_resource_statistics_aggregation_collection.py index ee778bff3d..e74974cd08 100644 --- a/src/oci/opsi/models/summarize_database_insight_resource_statistics_aggregation_collection.py +++ b/src/oci/opsi/models/summarize_database_insight_resource_statistics_aggregation_collection.py @@ -49,6 +49,10 @@ class SummarizeDatabaseInsightResourceStatisticsAggregationCollection(object): #: This constant has a value of "MBPS" USAGE_UNIT_MBPS = "MBPS" + #: A constant which can be used with the usage_unit property of a SummarizeDatabaseInsightResourceStatisticsAggregationCollection. + #: This constant has a value of "IOPS" + USAGE_UNIT_IOPS = "IOPS" + #: A constant which can be used with the usage_unit property of a SummarizeDatabaseInsightResourceStatisticsAggregationCollection. #: This constant has a value of "PERCENT" USAGE_UNIT_PERCENT = "PERCENT" @@ -74,7 +78,7 @@ def __init__(self, **kwargs): :param usage_unit: The value to assign to the usage_unit property of this SummarizeDatabaseInsightResourceStatisticsAggregationCollection. - Allowed values for this property are: "CORES", "GB", "MBPS", "PERCENT", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "CORES", "GB", "MBPS", "IOPS", "PERCENT", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type usage_unit: str @@ -189,7 +193,7 @@ def usage_unit(self): **[Required]** Gets the usage_unit of this SummarizeDatabaseInsightResourceStatisticsAggregationCollection. Displays usage unit ( CORES, GB) - Allowed values for this property are: "CORES", "GB", "MBPS", "PERCENT", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "CORES", "GB", "MBPS", "IOPS", "PERCENT", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. @@ -208,7 +212,7 @@ def usage_unit(self, usage_unit): :param usage_unit: The usage_unit of this SummarizeDatabaseInsightResourceStatisticsAggregationCollection. :type: str """ - allowed_values = ["CORES", "GB", "MBPS", "PERCENT"] + allowed_values = ["CORES", "GB", "MBPS", "IOPS", "PERCENT"] if not value_allowed_none_or_none_sentinel(usage_unit, allowed_values): usage_unit = 'UNKNOWN_ENUM_VALUE' self._usage_unit = usage_unit diff --git a/src/oci/opsi/models/summarize_database_insight_resource_usage_aggregation.py b/src/oci/opsi/models/summarize_database_insight_resource_usage_aggregation.py index cce68cdb78..f7a1b8171d 100644 --- a/src/oci/opsi/models/summarize_database_insight_resource_usage_aggregation.py +++ b/src/oci/opsi/models/summarize_database_insight_resource_usage_aggregation.py @@ -49,6 +49,10 @@ class SummarizeDatabaseInsightResourceUsageAggregation(object): #: This constant has a value of "MBPS" USAGE_UNIT_MBPS = "MBPS" + #: A constant which can be used with the usage_unit property of a SummarizeDatabaseInsightResourceUsageAggregation. + #: This constant has a value of "IOPS" + USAGE_UNIT_IOPS = "IOPS" + #: A constant which can be used with the usage_unit property of a SummarizeDatabaseInsightResourceUsageAggregation. #: This constant has a value of "PERCENT" USAGE_UNIT_PERCENT = "PERCENT" @@ -74,7 +78,7 @@ def __init__(self, **kwargs): :param usage_unit: The value to assign to the usage_unit property of this SummarizeDatabaseInsightResourceUsageAggregation. - Allowed values for this property are: "CORES", "GB", "MBPS", "PERCENT", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "CORES", "GB", "MBPS", "IOPS", "PERCENT", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type usage_unit: str @@ -203,7 +207,7 @@ def usage_unit(self): **[Required]** Gets the usage_unit of this SummarizeDatabaseInsightResourceUsageAggregation. Displays usage unit (CORES, GB) - Allowed values for this property are: "CORES", "GB", "MBPS", "PERCENT", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "CORES", "GB", "MBPS", "IOPS", "PERCENT", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. @@ -222,7 +226,7 @@ def usage_unit(self, usage_unit): :param usage_unit: The usage_unit of this SummarizeDatabaseInsightResourceUsageAggregation. :type: str """ - allowed_values = ["CORES", "GB", "MBPS", "PERCENT"] + allowed_values = ["CORES", "GB", "MBPS", "IOPS", "PERCENT"] if not value_allowed_none_or_none_sentinel(usage_unit, allowed_values): usage_unit = 'UNKNOWN_ENUM_VALUE' self._usage_unit = usage_unit diff --git a/src/oci/opsi/models/summarize_database_insight_resource_usage_trend_aggregation_collection.py b/src/oci/opsi/models/summarize_database_insight_resource_usage_trend_aggregation_collection.py index edb71ebe9c..412402a2b0 100644 --- a/src/oci/opsi/models/summarize_database_insight_resource_usage_trend_aggregation_collection.py +++ b/src/oci/opsi/models/summarize_database_insight_resource_usage_trend_aggregation_collection.py @@ -49,6 +49,10 @@ class SummarizeDatabaseInsightResourceUsageTrendAggregationCollection(object): #: This constant has a value of "MBPS" USAGE_UNIT_MBPS = "MBPS" + #: A constant which can be used with the usage_unit property of a SummarizeDatabaseInsightResourceUsageTrendAggregationCollection. + #: This constant has a value of "IOPS" + USAGE_UNIT_IOPS = "IOPS" + #: A constant which can be used with the usage_unit property of a SummarizeDatabaseInsightResourceUsageTrendAggregationCollection. #: This constant has a value of "PERCENT" USAGE_UNIT_PERCENT = "PERCENT" @@ -74,7 +78,7 @@ def __init__(self, **kwargs): :param usage_unit: The value to assign to the usage_unit property of this SummarizeDatabaseInsightResourceUsageTrendAggregationCollection. - Allowed values for this property are: "CORES", "GB", "MBPS", "PERCENT", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "CORES", "GB", "MBPS", "IOPS", "PERCENT", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type usage_unit: str @@ -196,7 +200,7 @@ def usage_unit(self): **[Required]** Gets the usage_unit of this SummarizeDatabaseInsightResourceUsageTrendAggregationCollection. Displays usage unit ( CORES, GB) - Allowed values for this property are: "CORES", "GB", "MBPS", "PERCENT", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "CORES", "GB", "MBPS", "IOPS", "PERCENT", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. @@ -215,7 +219,7 @@ def usage_unit(self, usage_unit): :param usage_unit: The usage_unit of this SummarizeDatabaseInsightResourceUsageTrendAggregationCollection. :type: str """ - allowed_values = ["CORES", "GB", "MBPS", "PERCENT"] + allowed_values = ["CORES", "GB", "MBPS", "IOPS", "PERCENT"] if not value_allowed_none_or_none_sentinel(usage_unit, allowed_values): usage_unit = 'UNKNOWN_ENUM_VALUE' self._usage_unit = usage_unit diff --git a/src/oci/opsi/models/summarize_database_insight_tablespace_usage_trend_aggregation_collection.py b/src/oci/opsi/models/summarize_database_insight_tablespace_usage_trend_aggregation_collection.py index 3eca857fd3..242cd04bf8 100644 --- a/src/oci/opsi/models/summarize_database_insight_tablespace_usage_trend_aggregation_collection.py +++ b/src/oci/opsi/models/summarize_database_insight_tablespace_usage_trend_aggregation_collection.py @@ -25,6 +25,10 @@ class SummarizeDatabaseInsightTablespaceUsageTrendAggregationCollection(object): #: This constant has a value of "MBPS" USAGE_UNIT_MBPS = "MBPS" + #: A constant which can be used with the usage_unit property of a SummarizeDatabaseInsightTablespaceUsageTrendAggregationCollection. + #: This constant has a value of "IOPS" + USAGE_UNIT_IOPS = "IOPS" + #: A constant which can be used with the usage_unit property of a SummarizeDatabaseInsightTablespaceUsageTrendAggregationCollection. #: This constant has a value of "PERCENT" USAGE_UNIT_PERCENT = "PERCENT" @@ -44,7 +48,7 @@ def __init__(self, **kwargs): :param usage_unit: The value to assign to the usage_unit property of this SummarizeDatabaseInsightTablespaceUsageTrendAggregationCollection. - Allowed values for this property are: "CORES", "GB", "MBPS", "PERCENT", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "CORES", "GB", "MBPS", "IOPS", "PERCENT", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type usage_unit: str @@ -133,7 +137,7 @@ def usage_unit(self): **[Required]** Gets the usage_unit of this SummarizeDatabaseInsightTablespaceUsageTrendAggregationCollection. Displays usage unit ( CORES, GB) - Allowed values for this property are: "CORES", "GB", "MBPS", "PERCENT", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "CORES", "GB", "MBPS", "IOPS", "PERCENT", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. @@ -152,7 +156,7 @@ def usage_unit(self, usage_unit): :param usage_unit: The usage_unit of this SummarizeDatabaseInsightTablespaceUsageTrendAggregationCollection. :type: str """ - allowed_values = ["CORES", "GB", "MBPS", "PERCENT"] + allowed_values = ["CORES", "GB", "MBPS", "IOPS", "PERCENT"] if not value_allowed_none_or_none_sentinel(usage_unit, allowed_values): usage_unit = 'UNKNOWN_ENUM_VALUE' self._usage_unit = usage_unit diff --git a/src/oci/opsi/models/summarize_exadata_insight_resource_capacity_trend_aggregation.py b/src/oci/opsi/models/summarize_exadata_insight_resource_capacity_trend_aggregation.py new file mode 100644 index 0000000000..92a96994b0 --- /dev/null +++ b/src/oci/opsi/models/summarize_exadata_insight_resource_capacity_trend_aggregation.py @@ -0,0 +1,340 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 SummarizeExadataInsightResourceCapacityTrendAggregation(object): + """ + Collection of resource capacity trend. + """ + + #: A constant which can be used with the exadata_resource_metric property of a SummarizeExadataInsightResourceCapacityTrendAggregation. + #: This constant has a value of "CPU" + EXADATA_RESOURCE_METRIC_CPU = "CPU" + + #: A constant which can be used with the exadata_resource_metric property of a SummarizeExadataInsightResourceCapacityTrendAggregation. + #: This constant has a value of "STORAGE" + EXADATA_RESOURCE_METRIC_STORAGE = "STORAGE" + + #: A constant which can be used with the exadata_resource_metric property of a SummarizeExadataInsightResourceCapacityTrendAggregation. + #: This constant has a value of "IO" + EXADATA_RESOURCE_METRIC_IO = "IO" + + #: A constant which can be used with the exadata_resource_metric property of a SummarizeExadataInsightResourceCapacityTrendAggregation. + #: This constant has a value of "MEMORY" + EXADATA_RESOURCE_METRIC_MEMORY = "MEMORY" + + #: A constant which can be used with the exadata_resource_metric property of a SummarizeExadataInsightResourceCapacityTrendAggregation. + #: This constant has a value of "IOPS" + EXADATA_RESOURCE_METRIC_IOPS = "IOPS" + + #: A constant which can be used with the exadata_resource_metric property of a SummarizeExadataInsightResourceCapacityTrendAggregation. + #: This constant has a value of "THROUGHPUT" + EXADATA_RESOURCE_METRIC_THROUGHPUT = "THROUGHPUT" + + #: A constant which can be used with the exadata_resource_type property of a SummarizeExadataInsightResourceCapacityTrendAggregation. + #: This constant has a value of "DATABASE" + EXADATA_RESOURCE_TYPE_DATABASE = "DATABASE" + + #: A constant which can be used with the exadata_resource_type property of a SummarizeExadataInsightResourceCapacityTrendAggregation. + #: This constant has a value of "HOST" + EXADATA_RESOURCE_TYPE_HOST = "HOST" + + #: A constant which can be used with the exadata_resource_type property of a SummarizeExadataInsightResourceCapacityTrendAggregation. + #: This constant has a value of "STORAGE_SERVER" + EXADATA_RESOURCE_TYPE_STORAGE_SERVER = "STORAGE_SERVER" + + #: A constant which can be used with the exadata_resource_type property of a SummarizeExadataInsightResourceCapacityTrendAggregation. + #: This constant has a value of "DISKGROUP" + EXADATA_RESOURCE_TYPE_DISKGROUP = "DISKGROUP" + + #: A constant which can be used with the usage_unit property of a SummarizeExadataInsightResourceCapacityTrendAggregation. + #: This constant has a value of "CORES" + USAGE_UNIT_CORES = "CORES" + + #: A constant which can be used with the usage_unit property of a SummarizeExadataInsightResourceCapacityTrendAggregation. + #: This constant has a value of "GB" + USAGE_UNIT_GB = "GB" + + #: A constant which can be used with the usage_unit property of a SummarizeExadataInsightResourceCapacityTrendAggregation. + #: This constant has a value of "MBPS" + USAGE_UNIT_MBPS = "MBPS" + + #: A constant which can be used with the usage_unit property of a SummarizeExadataInsightResourceCapacityTrendAggregation. + #: This constant has a value of "IOPS" + USAGE_UNIT_IOPS = "IOPS" + + #: A constant which can be used with the usage_unit property of a SummarizeExadataInsightResourceCapacityTrendAggregation. + #: This constant has a value of "PERCENT" + USAGE_UNIT_PERCENT = "PERCENT" + + def __init__(self, **kwargs): + """ + Initializes a new SummarizeExadataInsightResourceCapacityTrendAggregation object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param time_interval_start: + The value to assign to the time_interval_start property of this SummarizeExadataInsightResourceCapacityTrendAggregation. + :type time_interval_start: datetime + + :param time_interval_end: + The value to assign to the time_interval_end property of this SummarizeExadataInsightResourceCapacityTrendAggregation. + :type time_interval_end: datetime + + :param exadata_resource_metric: + The value to assign to the exadata_resource_metric property of this SummarizeExadataInsightResourceCapacityTrendAggregation. + Allowed values for this property are: "CPU", "STORAGE", "IO", "MEMORY", "IOPS", "THROUGHPUT", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type exadata_resource_metric: str + + :param exadata_resource_type: + The value to assign to the exadata_resource_type property of this SummarizeExadataInsightResourceCapacityTrendAggregation. + Allowed values for this property are: "DATABASE", "HOST", "STORAGE_SERVER", "DISKGROUP", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type exadata_resource_type: str + + :param usage_unit: + The value to assign to the usage_unit property of this SummarizeExadataInsightResourceCapacityTrendAggregation. + Allowed values for this property are: "CORES", "GB", "MBPS", "IOPS", "PERCENT", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type usage_unit: str + + :param item_duration_in_ms: + The value to assign to the item_duration_in_ms property of this SummarizeExadataInsightResourceCapacityTrendAggregation. + :type item_duration_in_ms: int + + :param capacity_data: + The value to assign to the capacity_data property of this SummarizeExadataInsightResourceCapacityTrendAggregation. + :type capacity_data: list[oci.opsi.models.ExadataInsightResourceCapacityTrendAggregation] + + """ + self.swagger_types = { + 'time_interval_start': 'datetime', + 'time_interval_end': 'datetime', + 'exadata_resource_metric': 'str', + 'exadata_resource_type': 'str', + 'usage_unit': 'str', + 'item_duration_in_ms': 'int', + 'capacity_data': 'list[ExadataInsightResourceCapacityTrendAggregation]' + } + + self.attribute_map = { + 'time_interval_start': 'timeIntervalStart', + 'time_interval_end': 'timeIntervalEnd', + 'exadata_resource_metric': 'exadataResourceMetric', + 'exadata_resource_type': 'exadataResourceType', + 'usage_unit': 'usageUnit', + 'item_duration_in_ms': 'itemDurationInMs', + 'capacity_data': 'capacityData' + } + + self._time_interval_start = None + self._time_interval_end = None + self._exadata_resource_metric = None + self._exadata_resource_type = None + self._usage_unit = None + self._item_duration_in_ms = None + self._capacity_data = None + + @property + def time_interval_start(self): + """ + **[Required]** Gets the time_interval_start of this SummarizeExadataInsightResourceCapacityTrendAggregation. + The start timestamp that was passed into the request. + + + :return: The time_interval_start of this SummarizeExadataInsightResourceCapacityTrendAggregation. + :rtype: datetime + """ + return self._time_interval_start + + @time_interval_start.setter + def time_interval_start(self, time_interval_start): + """ + Sets the time_interval_start of this SummarizeExadataInsightResourceCapacityTrendAggregation. + The start timestamp that was passed into the request. + + + :param time_interval_start: The time_interval_start of this SummarizeExadataInsightResourceCapacityTrendAggregation. + :type: datetime + """ + self._time_interval_start = time_interval_start + + @property + def time_interval_end(self): + """ + **[Required]** Gets the time_interval_end of this SummarizeExadataInsightResourceCapacityTrendAggregation. + The end timestamp that was passed into the request. + + + :return: The time_interval_end of this SummarizeExadataInsightResourceCapacityTrendAggregation. + :rtype: datetime + """ + return self._time_interval_end + + @time_interval_end.setter + def time_interval_end(self, time_interval_end): + """ + Sets the time_interval_end of this SummarizeExadataInsightResourceCapacityTrendAggregation. + The end timestamp that was passed into the request. + + + :param time_interval_end: The time_interval_end of this SummarizeExadataInsightResourceCapacityTrendAggregation. + :type: datetime + """ + self._time_interval_end = time_interval_end + + @property + def exadata_resource_metric(self): + """ + **[Required]** Gets the exadata_resource_metric of this SummarizeExadataInsightResourceCapacityTrendAggregation. + Defines the type of exadata resource metric (example: CPU, STORAGE) + + Allowed values for this property are: "CPU", "STORAGE", "IO", "MEMORY", "IOPS", "THROUGHPUT", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The exadata_resource_metric of this SummarizeExadataInsightResourceCapacityTrendAggregation. + :rtype: str + """ + return self._exadata_resource_metric + + @exadata_resource_metric.setter + def exadata_resource_metric(self, exadata_resource_metric): + """ + Sets the exadata_resource_metric of this SummarizeExadataInsightResourceCapacityTrendAggregation. + Defines the type of exadata resource metric (example: CPU, STORAGE) + + + :param exadata_resource_metric: The exadata_resource_metric of this SummarizeExadataInsightResourceCapacityTrendAggregation. + :type: str + """ + allowed_values = ["CPU", "STORAGE", "IO", "MEMORY", "IOPS", "THROUGHPUT"] + if not value_allowed_none_or_none_sentinel(exadata_resource_metric, allowed_values): + exadata_resource_metric = 'UNKNOWN_ENUM_VALUE' + self._exadata_resource_metric = exadata_resource_metric + + @property + def exadata_resource_type(self): + """ + **[Required]** Gets the exadata_resource_type of this SummarizeExadataInsightResourceCapacityTrendAggregation. + Defines the resource type for an exadata (example: DATABASE, STORAGE_SERVER, HOST, DISKGROUP) + + Allowed values for this property are: "DATABASE", "HOST", "STORAGE_SERVER", "DISKGROUP", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The exadata_resource_type of this SummarizeExadataInsightResourceCapacityTrendAggregation. + :rtype: str + """ + return self._exadata_resource_type + + @exadata_resource_type.setter + def exadata_resource_type(self, exadata_resource_type): + """ + Sets the exadata_resource_type of this SummarizeExadataInsightResourceCapacityTrendAggregation. + Defines the resource type for an exadata (example: DATABASE, STORAGE_SERVER, HOST, DISKGROUP) + + + :param exadata_resource_type: The exadata_resource_type of this SummarizeExadataInsightResourceCapacityTrendAggregation. + :type: str + """ + allowed_values = ["DATABASE", "HOST", "STORAGE_SERVER", "DISKGROUP"] + if not value_allowed_none_or_none_sentinel(exadata_resource_type, allowed_values): + exadata_resource_type = 'UNKNOWN_ENUM_VALUE' + self._exadata_resource_type = exadata_resource_type + + @property + def usage_unit(self): + """ + **[Required]** Gets the usage_unit of this SummarizeExadataInsightResourceCapacityTrendAggregation. + Identifies the units of the current resource metric (CORES, GB). + + Allowed values for this property are: "CORES", "GB", "MBPS", "IOPS", "PERCENT", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The usage_unit of this SummarizeExadataInsightResourceCapacityTrendAggregation. + :rtype: str + """ + return self._usage_unit + + @usage_unit.setter + def usage_unit(self, usage_unit): + """ + Sets the usage_unit of this SummarizeExadataInsightResourceCapacityTrendAggregation. + Identifies the units of the current resource metric (CORES, GB). + + + :param usage_unit: The usage_unit of this SummarizeExadataInsightResourceCapacityTrendAggregation. + :type: str + """ + allowed_values = ["CORES", "GB", "MBPS", "IOPS", "PERCENT"] + if not value_allowed_none_or_none_sentinel(usage_unit, allowed_values): + usage_unit = 'UNKNOWN_ENUM_VALUE' + self._usage_unit = usage_unit + + @property + def item_duration_in_ms(self): + """ + **[Required]** Gets the item_duration_in_ms of this SummarizeExadataInsightResourceCapacityTrendAggregation. + Time duration in milliseconds between data points (one hour or one day). + + + :return: The item_duration_in_ms of this SummarizeExadataInsightResourceCapacityTrendAggregation. + :rtype: int + """ + return self._item_duration_in_ms + + @item_duration_in_ms.setter + def item_duration_in_ms(self, item_duration_in_ms): + """ + Sets the item_duration_in_ms of this SummarizeExadataInsightResourceCapacityTrendAggregation. + Time duration in milliseconds between data points (one hour or one day). + + + :param item_duration_in_ms: The item_duration_in_ms of this SummarizeExadataInsightResourceCapacityTrendAggregation. + :type: int + """ + self._item_duration_in_ms = item_duration_in_ms + + @property + def capacity_data(self): + """ + **[Required]** Gets the capacity_data of this SummarizeExadataInsightResourceCapacityTrendAggregation. + Capacity Data with time interval + + + :return: The capacity_data of this SummarizeExadataInsightResourceCapacityTrendAggregation. + :rtype: list[oci.opsi.models.ExadataInsightResourceCapacityTrendAggregation] + """ + return self._capacity_data + + @capacity_data.setter + def capacity_data(self, capacity_data): + """ + Sets the capacity_data of this SummarizeExadataInsightResourceCapacityTrendAggregation. + Capacity Data with time interval + + + :param capacity_data: The capacity_data of this SummarizeExadataInsightResourceCapacityTrendAggregation. + :type: list[oci.opsi.models.ExadataInsightResourceCapacityTrendAggregation] + """ + self._capacity_data = capacity_data + + 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/opsi/models/summarize_exadata_insight_resource_capacity_trend_collection.py b/src/oci/opsi/models/summarize_exadata_insight_resource_capacity_trend_collection.py new file mode 100644 index 0000000000..b06f159c7d --- /dev/null +++ b/src/oci/opsi/models/summarize_exadata_insight_resource_capacity_trend_collection.py @@ -0,0 +1,344 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 SummarizeExadataInsightResourceCapacityTrendCollection(object): + """ + capacity results with breakdown by databases, hosts, storage servers or diskgroup. + """ + + #: A constant which can be used with the exadata_resource_type property of a SummarizeExadataInsightResourceCapacityTrendCollection. + #: This constant has a value of "DATABASE" + EXADATA_RESOURCE_TYPE_DATABASE = "DATABASE" + + #: A constant which can be used with the exadata_resource_type property of a SummarizeExadataInsightResourceCapacityTrendCollection. + #: This constant has a value of "HOST" + EXADATA_RESOURCE_TYPE_HOST = "HOST" + + #: A constant which can be used with the exadata_resource_type property of a SummarizeExadataInsightResourceCapacityTrendCollection. + #: This constant has a value of "STORAGE_SERVER" + EXADATA_RESOURCE_TYPE_STORAGE_SERVER = "STORAGE_SERVER" + + #: A constant which can be used with the exadata_resource_type property of a SummarizeExadataInsightResourceCapacityTrendCollection. + #: This constant has a value of "DISKGROUP" + EXADATA_RESOURCE_TYPE_DISKGROUP = "DISKGROUP" + + #: A constant which can be used with the exadata_resource_metric property of a SummarizeExadataInsightResourceCapacityTrendCollection. + #: This constant has a value of "CPU" + EXADATA_RESOURCE_METRIC_CPU = "CPU" + + #: A constant which can be used with the exadata_resource_metric property of a SummarizeExadataInsightResourceCapacityTrendCollection. + #: This constant has a value of "STORAGE" + EXADATA_RESOURCE_METRIC_STORAGE = "STORAGE" + + #: A constant which can be used with the exadata_resource_metric property of a SummarizeExadataInsightResourceCapacityTrendCollection. + #: This constant has a value of "IO" + EXADATA_RESOURCE_METRIC_IO = "IO" + + #: A constant which can be used with the exadata_resource_metric property of a SummarizeExadataInsightResourceCapacityTrendCollection. + #: This constant has a value of "MEMORY" + EXADATA_RESOURCE_METRIC_MEMORY = "MEMORY" + + #: A constant which can be used with the exadata_resource_metric property of a SummarizeExadataInsightResourceCapacityTrendCollection. + #: This constant has a value of "IOPS" + EXADATA_RESOURCE_METRIC_IOPS = "IOPS" + + #: A constant which can be used with the exadata_resource_metric property of a SummarizeExadataInsightResourceCapacityTrendCollection. + #: This constant has a value of "THROUGHPUT" + EXADATA_RESOURCE_METRIC_THROUGHPUT = "THROUGHPUT" + + #: A constant which can be used with the usage_unit property of a SummarizeExadataInsightResourceCapacityTrendCollection. + #: This constant has a value of "CORES" + USAGE_UNIT_CORES = "CORES" + + #: A constant which can be used with the usage_unit property of a SummarizeExadataInsightResourceCapacityTrendCollection. + #: This constant has a value of "GB" + USAGE_UNIT_GB = "GB" + + #: A constant which can be used with the usage_unit property of a SummarizeExadataInsightResourceCapacityTrendCollection. + #: This constant has a value of "MBPS" + USAGE_UNIT_MBPS = "MBPS" + + #: A constant which can be used with the usage_unit property of a SummarizeExadataInsightResourceCapacityTrendCollection. + #: This constant has a value of "IOPS" + USAGE_UNIT_IOPS = "IOPS" + + #: A constant which can be used with the usage_unit property of a SummarizeExadataInsightResourceCapacityTrendCollection. + #: This constant has a value of "PERCENT" + USAGE_UNIT_PERCENT = "PERCENT" + + def __init__(self, **kwargs): + """ + Initializes a new SummarizeExadataInsightResourceCapacityTrendCollection object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param exadata_insight_id: + The value to assign to the exadata_insight_id property of this SummarizeExadataInsightResourceCapacityTrendCollection. + :type exadata_insight_id: str + + :param exadata_resource_type: + The value to assign to the exadata_resource_type property of this SummarizeExadataInsightResourceCapacityTrendCollection. + Allowed values for this property are: "DATABASE", "HOST", "STORAGE_SERVER", "DISKGROUP", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type exadata_resource_type: str + + :param exadata_resource_metric: + The value to assign to the exadata_resource_metric property of this SummarizeExadataInsightResourceCapacityTrendCollection. + Allowed values for this property are: "CPU", "STORAGE", "IO", "MEMORY", "IOPS", "THROUGHPUT", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type exadata_resource_metric: str + + :param time_interval_start: + The value to assign to the time_interval_start property of this SummarizeExadataInsightResourceCapacityTrendCollection. + :type time_interval_start: datetime + + :param time_interval_end: + The value to assign to the time_interval_end property of this SummarizeExadataInsightResourceCapacityTrendCollection. + :type time_interval_end: datetime + + :param usage_unit: + The value to assign to the usage_unit property of this SummarizeExadataInsightResourceCapacityTrendCollection. + Allowed values for this property are: "CORES", "GB", "MBPS", "IOPS", "PERCENT", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type usage_unit: str + + :param items: + The value to assign to the items property of this SummarizeExadataInsightResourceCapacityTrendCollection. + :type items: list[oci.opsi.models.ExadataInsightResourceCapacityTrendSummary] + + """ + self.swagger_types = { + 'exadata_insight_id': 'str', + 'exadata_resource_type': 'str', + 'exadata_resource_metric': 'str', + 'time_interval_start': 'datetime', + 'time_interval_end': 'datetime', + 'usage_unit': 'str', + 'items': 'list[ExadataInsightResourceCapacityTrendSummary]' + } + + self.attribute_map = { + 'exadata_insight_id': 'exadataInsightId', + 'exadata_resource_type': 'exadataResourceType', + 'exadata_resource_metric': 'exadataResourceMetric', + 'time_interval_start': 'timeIntervalStart', + 'time_interval_end': 'timeIntervalEnd', + 'usage_unit': 'usageUnit', + 'items': 'items' + } + + self._exadata_insight_id = None + self._exadata_resource_type = None + self._exadata_resource_metric = None + self._time_interval_start = None + self._time_interval_end = None + self._usage_unit = None + self._items = None + + @property + def exadata_insight_id(self): + """ + **[Required]** Gets the exadata_insight_id of this SummarizeExadataInsightResourceCapacityTrendCollection. + The `OCID`__ of the Exadata insight. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The exadata_insight_id of this SummarizeExadataInsightResourceCapacityTrendCollection. + :rtype: str + """ + return self._exadata_insight_id + + @exadata_insight_id.setter + def exadata_insight_id(self, exadata_insight_id): + """ + Sets the exadata_insight_id of this SummarizeExadataInsightResourceCapacityTrendCollection. + The `OCID`__ of the Exadata insight. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param exadata_insight_id: The exadata_insight_id of this SummarizeExadataInsightResourceCapacityTrendCollection. + :type: str + """ + self._exadata_insight_id = exadata_insight_id + + @property + def exadata_resource_type(self): + """ + **[Required]** Gets the exadata_resource_type of this SummarizeExadataInsightResourceCapacityTrendCollection. + Defines the resource type for an exadata (example: DATABASE, STORAGE_SERVER, HOST, DISKGROUP) + + Allowed values for this property are: "DATABASE", "HOST", "STORAGE_SERVER", "DISKGROUP", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The exadata_resource_type of this SummarizeExadataInsightResourceCapacityTrendCollection. + :rtype: str + """ + return self._exadata_resource_type + + @exadata_resource_type.setter + def exadata_resource_type(self, exadata_resource_type): + """ + Sets the exadata_resource_type of this SummarizeExadataInsightResourceCapacityTrendCollection. + Defines the resource type for an exadata (example: DATABASE, STORAGE_SERVER, HOST, DISKGROUP) + + + :param exadata_resource_type: The exadata_resource_type of this SummarizeExadataInsightResourceCapacityTrendCollection. + :type: str + """ + allowed_values = ["DATABASE", "HOST", "STORAGE_SERVER", "DISKGROUP"] + if not value_allowed_none_or_none_sentinel(exadata_resource_type, allowed_values): + exadata_resource_type = 'UNKNOWN_ENUM_VALUE' + self._exadata_resource_type = exadata_resource_type + + @property + def exadata_resource_metric(self): + """ + **[Required]** Gets the exadata_resource_metric of this SummarizeExadataInsightResourceCapacityTrendCollection. + Defines the type of exadata resource metric (example: CPU, STORAGE) + + Allowed values for this property are: "CPU", "STORAGE", "IO", "MEMORY", "IOPS", "THROUGHPUT", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The exadata_resource_metric of this SummarizeExadataInsightResourceCapacityTrendCollection. + :rtype: str + """ + return self._exadata_resource_metric + + @exadata_resource_metric.setter + def exadata_resource_metric(self, exadata_resource_metric): + """ + Sets the exadata_resource_metric of this SummarizeExadataInsightResourceCapacityTrendCollection. + Defines the type of exadata resource metric (example: CPU, STORAGE) + + + :param exadata_resource_metric: The exadata_resource_metric of this SummarizeExadataInsightResourceCapacityTrendCollection. + :type: str + """ + allowed_values = ["CPU", "STORAGE", "IO", "MEMORY", "IOPS", "THROUGHPUT"] + if not value_allowed_none_or_none_sentinel(exadata_resource_metric, allowed_values): + exadata_resource_metric = 'UNKNOWN_ENUM_VALUE' + self._exadata_resource_metric = exadata_resource_metric + + @property + def time_interval_start(self): + """ + **[Required]** Gets the time_interval_start of this SummarizeExadataInsightResourceCapacityTrendCollection. + The start timestamp that was passed into the request. + + + :return: The time_interval_start of this SummarizeExadataInsightResourceCapacityTrendCollection. + :rtype: datetime + """ + return self._time_interval_start + + @time_interval_start.setter + def time_interval_start(self, time_interval_start): + """ + Sets the time_interval_start of this SummarizeExadataInsightResourceCapacityTrendCollection. + The start timestamp that was passed into the request. + + + :param time_interval_start: The time_interval_start of this SummarizeExadataInsightResourceCapacityTrendCollection. + :type: datetime + """ + self._time_interval_start = time_interval_start + + @property + def time_interval_end(self): + """ + **[Required]** Gets the time_interval_end of this SummarizeExadataInsightResourceCapacityTrendCollection. + The end timestamp that was passed into the request. + + + :return: The time_interval_end of this SummarizeExadataInsightResourceCapacityTrendCollection. + :rtype: datetime + """ + return self._time_interval_end + + @time_interval_end.setter + def time_interval_end(self, time_interval_end): + """ + Sets the time_interval_end of this SummarizeExadataInsightResourceCapacityTrendCollection. + The end timestamp that was passed into the request. + + + :param time_interval_end: The time_interval_end of this SummarizeExadataInsightResourceCapacityTrendCollection. + :type: datetime + """ + self._time_interval_end = time_interval_end + + @property + def usage_unit(self): + """ + **[Required]** Gets the usage_unit of this SummarizeExadataInsightResourceCapacityTrendCollection. + Displays usage unit ( CORES, GB) + + Allowed values for this property are: "CORES", "GB", "MBPS", "IOPS", "PERCENT", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The usage_unit of this SummarizeExadataInsightResourceCapacityTrendCollection. + :rtype: str + """ + return self._usage_unit + + @usage_unit.setter + def usage_unit(self, usage_unit): + """ + Sets the usage_unit of this SummarizeExadataInsightResourceCapacityTrendCollection. + Displays usage unit ( CORES, GB) + + + :param usage_unit: The usage_unit of this SummarizeExadataInsightResourceCapacityTrendCollection. + :type: str + """ + allowed_values = ["CORES", "GB", "MBPS", "IOPS", "PERCENT"] + if not value_allowed_none_or_none_sentinel(usage_unit, allowed_values): + usage_unit = 'UNKNOWN_ENUM_VALUE' + self._usage_unit = usage_unit + + @property + def items(self): + """ + **[Required]** Gets the items of this SummarizeExadataInsightResourceCapacityTrendCollection. + Capacity Data with time interval + + + :return: The items of this SummarizeExadataInsightResourceCapacityTrendCollection. + :rtype: list[oci.opsi.models.ExadataInsightResourceCapacityTrendSummary] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this SummarizeExadataInsightResourceCapacityTrendCollection. + Capacity Data with time interval + + + :param items: The items of this SummarizeExadataInsightResourceCapacityTrendCollection. + :type: list[oci.opsi.models.ExadataInsightResourceCapacityTrendSummary] + """ + self._items = items + + 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/opsi/models/summarize_exadata_insight_resource_forecast_trend_aggregation.py b/src/oci/opsi/models/summarize_exadata_insight_resource_forecast_trend_aggregation.py new file mode 100644 index 0000000000..c6348e86c6 --- /dev/null +++ b/src/oci/opsi/models/summarize_exadata_insight_resource_forecast_trend_aggregation.py @@ -0,0 +1,442 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 SummarizeExadataInsightResourceForecastTrendAggregation(object): + """ + Usage and Forecast results from the selected time period. + """ + + #: A constant which can be used with the exadata_resource_metric property of a SummarizeExadataInsightResourceForecastTrendAggregation. + #: This constant has a value of "CPU" + EXADATA_RESOURCE_METRIC_CPU = "CPU" + + #: A constant which can be used with the exadata_resource_metric property of a SummarizeExadataInsightResourceForecastTrendAggregation. + #: This constant has a value of "STORAGE" + EXADATA_RESOURCE_METRIC_STORAGE = "STORAGE" + + #: A constant which can be used with the exadata_resource_metric property of a SummarizeExadataInsightResourceForecastTrendAggregation. + #: This constant has a value of "IO" + EXADATA_RESOURCE_METRIC_IO = "IO" + + #: A constant which can be used with the exadata_resource_metric property of a SummarizeExadataInsightResourceForecastTrendAggregation. + #: This constant has a value of "MEMORY" + EXADATA_RESOURCE_METRIC_MEMORY = "MEMORY" + + #: A constant which can be used with the exadata_resource_metric property of a SummarizeExadataInsightResourceForecastTrendAggregation. + #: This constant has a value of "IOPS" + EXADATA_RESOURCE_METRIC_IOPS = "IOPS" + + #: A constant which can be used with the exadata_resource_metric property of a SummarizeExadataInsightResourceForecastTrendAggregation. + #: This constant has a value of "THROUGHPUT" + EXADATA_RESOURCE_METRIC_THROUGHPUT = "THROUGHPUT" + + #: A constant which can be used with the exadata_resource_type property of a SummarizeExadataInsightResourceForecastTrendAggregation. + #: This constant has a value of "DATABASE" + EXADATA_RESOURCE_TYPE_DATABASE = "DATABASE" + + #: A constant which can be used with the exadata_resource_type property of a SummarizeExadataInsightResourceForecastTrendAggregation. + #: This constant has a value of "HOST" + EXADATA_RESOURCE_TYPE_HOST = "HOST" + + #: A constant which can be used with the exadata_resource_type property of a SummarizeExadataInsightResourceForecastTrendAggregation. + #: This constant has a value of "STORAGE_SERVER" + EXADATA_RESOURCE_TYPE_STORAGE_SERVER = "STORAGE_SERVER" + + #: A constant which can be used with the exadata_resource_type property of a SummarizeExadataInsightResourceForecastTrendAggregation. + #: This constant has a value of "DISKGROUP" + EXADATA_RESOURCE_TYPE_DISKGROUP = "DISKGROUP" + + #: A constant which can be used with the usage_unit property of a SummarizeExadataInsightResourceForecastTrendAggregation. + #: This constant has a value of "CORES" + USAGE_UNIT_CORES = "CORES" + + #: A constant which can be used with the usage_unit property of a SummarizeExadataInsightResourceForecastTrendAggregation. + #: This constant has a value of "GB" + USAGE_UNIT_GB = "GB" + + #: A constant which can be used with the usage_unit property of a SummarizeExadataInsightResourceForecastTrendAggregation. + #: This constant has a value of "MBPS" + USAGE_UNIT_MBPS = "MBPS" + + #: A constant which can be used with the usage_unit property of a SummarizeExadataInsightResourceForecastTrendAggregation. + #: This constant has a value of "IOPS" + USAGE_UNIT_IOPS = "IOPS" + + #: A constant which can be used with the usage_unit property of a SummarizeExadataInsightResourceForecastTrendAggregation. + #: This constant has a value of "PERCENT" + USAGE_UNIT_PERCENT = "PERCENT" + + #: A constant which can be used with the pattern property of a SummarizeExadataInsightResourceForecastTrendAggregation. + #: This constant has a value of "LINEAR" + PATTERN_LINEAR = "LINEAR" + + #: A constant which can be used with the pattern property of a SummarizeExadataInsightResourceForecastTrendAggregation. + #: This constant has a value of "MONTHLY_SEASONS" + PATTERN_MONTHLY_SEASONS = "MONTHLY_SEASONS" + + #: A constant which can be used with the pattern property of a SummarizeExadataInsightResourceForecastTrendAggregation. + #: This constant has a value of "MONTHLY_AND_YEARLY_SEASONS" + PATTERN_MONTHLY_AND_YEARLY_SEASONS = "MONTHLY_AND_YEARLY_SEASONS" + + #: A constant which can be used with the pattern property of a SummarizeExadataInsightResourceForecastTrendAggregation. + #: This constant has a value of "WEEKLY_SEASONS" + PATTERN_WEEKLY_SEASONS = "WEEKLY_SEASONS" + + #: A constant which can be used with the pattern property of a SummarizeExadataInsightResourceForecastTrendAggregation. + #: This constant has a value of "WEEKLY_AND_MONTHLY_SEASONS" + PATTERN_WEEKLY_AND_MONTHLY_SEASONS = "WEEKLY_AND_MONTHLY_SEASONS" + + #: A constant which can be used with the pattern property of a SummarizeExadataInsightResourceForecastTrendAggregation. + #: This constant has a value of "WEEKLY_MONTHLY_AND_YEARLY_SEASONS" + PATTERN_WEEKLY_MONTHLY_AND_YEARLY_SEASONS = "WEEKLY_MONTHLY_AND_YEARLY_SEASONS" + + #: A constant which can be used with the pattern property of a SummarizeExadataInsightResourceForecastTrendAggregation. + #: This constant has a value of "WEEKLY_AND_YEARLY_SEASONS" + PATTERN_WEEKLY_AND_YEARLY_SEASONS = "WEEKLY_AND_YEARLY_SEASONS" + + #: A constant which can be used with the pattern property of a SummarizeExadataInsightResourceForecastTrendAggregation. + #: This constant has a value of "YEARLY_SEASONS" + PATTERN_YEARLY_SEASONS = "YEARLY_SEASONS" + + def __init__(self, **kwargs): + """ + Initializes a new SummarizeExadataInsightResourceForecastTrendAggregation object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param time_interval_start: + The value to assign to the time_interval_start property of this SummarizeExadataInsightResourceForecastTrendAggregation. + :type time_interval_start: datetime + + :param time_interval_end: + The value to assign to the time_interval_end property of this SummarizeExadataInsightResourceForecastTrendAggregation. + :type time_interval_end: datetime + + :param exadata_resource_metric: + The value to assign to the exadata_resource_metric property of this SummarizeExadataInsightResourceForecastTrendAggregation. + Allowed values for this property are: "CPU", "STORAGE", "IO", "MEMORY", "IOPS", "THROUGHPUT", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type exadata_resource_metric: str + + :param exadata_resource_type: + The value to assign to the exadata_resource_type property of this SummarizeExadataInsightResourceForecastTrendAggregation. + Allowed values for this property are: "DATABASE", "HOST", "STORAGE_SERVER", "DISKGROUP", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type exadata_resource_type: str + + :param usage_unit: + The value to assign to the usage_unit property of this SummarizeExadataInsightResourceForecastTrendAggregation. + Allowed values for this property are: "CORES", "GB", "MBPS", "IOPS", "PERCENT", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type usage_unit: str + + :param pattern: + The value to assign to the pattern property of this SummarizeExadataInsightResourceForecastTrendAggregation. + Allowed values for this property are: "LINEAR", "MONTHLY_SEASONS", "MONTHLY_AND_YEARLY_SEASONS", "WEEKLY_SEASONS", "WEEKLY_AND_MONTHLY_SEASONS", "WEEKLY_MONTHLY_AND_YEARLY_SEASONS", "WEEKLY_AND_YEARLY_SEASONS", "YEARLY_SEASONS", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type pattern: str + + :param days_to_reach_capacity: + The value to assign to the days_to_reach_capacity property of this SummarizeExadataInsightResourceForecastTrendAggregation. + :type days_to_reach_capacity: int + + :param historical_data: + The value to assign to the historical_data property of this SummarizeExadataInsightResourceForecastTrendAggregation. + :type historical_data: list[oci.opsi.models.HistoricalDataItem] + + :param projected_data: + The value to assign to the projected_data property of this SummarizeExadataInsightResourceForecastTrendAggregation. + :type projected_data: list[oci.opsi.models.ProjectedDataItem] + + """ + self.swagger_types = { + 'time_interval_start': 'datetime', + 'time_interval_end': 'datetime', + 'exadata_resource_metric': 'str', + 'exadata_resource_type': 'str', + 'usage_unit': 'str', + 'pattern': 'str', + 'days_to_reach_capacity': 'int', + 'historical_data': 'list[HistoricalDataItem]', + 'projected_data': 'list[ProjectedDataItem]' + } + + self.attribute_map = { + 'time_interval_start': 'timeIntervalStart', + 'time_interval_end': 'timeIntervalEnd', + 'exadata_resource_metric': 'exadataResourceMetric', + 'exadata_resource_type': 'exadataResourceType', + 'usage_unit': 'usageUnit', + 'pattern': 'pattern', + 'days_to_reach_capacity': 'daysToReachCapacity', + 'historical_data': 'historicalData', + 'projected_data': 'projectedData' + } + + self._time_interval_start = None + self._time_interval_end = None + self._exadata_resource_metric = None + self._exadata_resource_type = None + self._usage_unit = None + self._pattern = None + self._days_to_reach_capacity = None + self._historical_data = None + self._projected_data = None + + @property + def time_interval_start(self): + """ + **[Required]** Gets the time_interval_start of this SummarizeExadataInsightResourceForecastTrendAggregation. + The start timestamp that was passed into the request. + + + :return: The time_interval_start of this SummarizeExadataInsightResourceForecastTrendAggregation. + :rtype: datetime + """ + return self._time_interval_start + + @time_interval_start.setter + def time_interval_start(self, time_interval_start): + """ + Sets the time_interval_start of this SummarizeExadataInsightResourceForecastTrendAggregation. + The start timestamp that was passed into the request. + + + :param time_interval_start: The time_interval_start of this SummarizeExadataInsightResourceForecastTrendAggregation. + :type: datetime + """ + self._time_interval_start = time_interval_start + + @property + def time_interval_end(self): + """ + **[Required]** Gets the time_interval_end of this SummarizeExadataInsightResourceForecastTrendAggregation. + The end timestamp that was passed into the request. + + + :return: The time_interval_end of this SummarizeExadataInsightResourceForecastTrendAggregation. + :rtype: datetime + """ + return self._time_interval_end + + @time_interval_end.setter + def time_interval_end(self, time_interval_end): + """ + Sets the time_interval_end of this SummarizeExadataInsightResourceForecastTrendAggregation. + The end timestamp that was passed into the request. + + + :param time_interval_end: The time_interval_end of this SummarizeExadataInsightResourceForecastTrendAggregation. + :type: datetime + """ + self._time_interval_end = time_interval_end + + @property + def exadata_resource_metric(self): + """ + **[Required]** Gets the exadata_resource_metric of this SummarizeExadataInsightResourceForecastTrendAggregation. + Defines the type of exadata resource metric (example: CPU, STORAGE) + + Allowed values for this property are: "CPU", "STORAGE", "IO", "MEMORY", "IOPS", "THROUGHPUT", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The exadata_resource_metric of this SummarizeExadataInsightResourceForecastTrendAggregation. + :rtype: str + """ + return self._exadata_resource_metric + + @exadata_resource_metric.setter + def exadata_resource_metric(self, exadata_resource_metric): + """ + Sets the exadata_resource_metric of this SummarizeExadataInsightResourceForecastTrendAggregation. + Defines the type of exadata resource metric (example: CPU, STORAGE) + + + :param exadata_resource_metric: The exadata_resource_metric of this SummarizeExadataInsightResourceForecastTrendAggregation. + :type: str + """ + allowed_values = ["CPU", "STORAGE", "IO", "MEMORY", "IOPS", "THROUGHPUT"] + if not value_allowed_none_or_none_sentinel(exadata_resource_metric, allowed_values): + exadata_resource_metric = 'UNKNOWN_ENUM_VALUE' + self._exadata_resource_metric = exadata_resource_metric + + @property + def exadata_resource_type(self): + """ + **[Required]** Gets the exadata_resource_type of this SummarizeExadataInsightResourceForecastTrendAggregation. + Defines the resource type for an exadata (example: DATABASE, STORAGE_SERVER, HOST, DISKGROUP) + + Allowed values for this property are: "DATABASE", "HOST", "STORAGE_SERVER", "DISKGROUP", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The exadata_resource_type of this SummarizeExadataInsightResourceForecastTrendAggregation. + :rtype: str + """ + return self._exadata_resource_type + + @exadata_resource_type.setter + def exadata_resource_type(self, exadata_resource_type): + """ + Sets the exadata_resource_type of this SummarizeExadataInsightResourceForecastTrendAggregation. + Defines the resource type for an exadata (example: DATABASE, STORAGE_SERVER, HOST, DISKGROUP) + + + :param exadata_resource_type: The exadata_resource_type of this SummarizeExadataInsightResourceForecastTrendAggregation. + :type: str + """ + allowed_values = ["DATABASE", "HOST", "STORAGE_SERVER", "DISKGROUP"] + if not value_allowed_none_or_none_sentinel(exadata_resource_type, allowed_values): + exadata_resource_type = 'UNKNOWN_ENUM_VALUE' + self._exadata_resource_type = exadata_resource_type + + @property + def usage_unit(self): + """ + **[Required]** Gets the usage_unit of this SummarizeExadataInsightResourceForecastTrendAggregation. + Displays usage unit ( CORES, GB) + + Allowed values for this property are: "CORES", "GB", "MBPS", "IOPS", "PERCENT", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The usage_unit of this SummarizeExadataInsightResourceForecastTrendAggregation. + :rtype: str + """ + return self._usage_unit + + @usage_unit.setter + def usage_unit(self, usage_unit): + """ + Sets the usage_unit of this SummarizeExadataInsightResourceForecastTrendAggregation. + Displays usage unit ( CORES, GB) + + + :param usage_unit: The usage_unit of this SummarizeExadataInsightResourceForecastTrendAggregation. + :type: str + """ + allowed_values = ["CORES", "GB", "MBPS", "IOPS", "PERCENT"] + if not value_allowed_none_or_none_sentinel(usage_unit, allowed_values): + usage_unit = 'UNKNOWN_ENUM_VALUE' + self._usage_unit = usage_unit + + @property + def pattern(self): + """ + **[Required]** Gets the pattern of this SummarizeExadataInsightResourceForecastTrendAggregation. + Time series patterns used in the forecasting. + + Allowed values for this property are: "LINEAR", "MONTHLY_SEASONS", "MONTHLY_AND_YEARLY_SEASONS", "WEEKLY_SEASONS", "WEEKLY_AND_MONTHLY_SEASONS", "WEEKLY_MONTHLY_AND_YEARLY_SEASONS", "WEEKLY_AND_YEARLY_SEASONS", "YEARLY_SEASONS", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The pattern of this SummarizeExadataInsightResourceForecastTrendAggregation. + :rtype: str + """ + return self._pattern + + @pattern.setter + def pattern(self, pattern): + """ + Sets the pattern of this SummarizeExadataInsightResourceForecastTrendAggregation. + Time series patterns used in the forecasting. + + + :param pattern: The pattern of this SummarizeExadataInsightResourceForecastTrendAggregation. + :type: str + """ + allowed_values = ["LINEAR", "MONTHLY_SEASONS", "MONTHLY_AND_YEARLY_SEASONS", "WEEKLY_SEASONS", "WEEKLY_AND_MONTHLY_SEASONS", "WEEKLY_MONTHLY_AND_YEARLY_SEASONS", "WEEKLY_AND_YEARLY_SEASONS", "YEARLY_SEASONS"] + if not value_allowed_none_or_none_sentinel(pattern, allowed_values): + pattern = 'UNKNOWN_ENUM_VALUE' + self._pattern = pattern + + @property + def days_to_reach_capacity(self): + """ + **[Required]** Gets the days_to_reach_capacity of this SummarizeExadataInsightResourceForecastTrendAggregation. + Days to reach capacity for a storage server + + + :return: The days_to_reach_capacity of this SummarizeExadataInsightResourceForecastTrendAggregation. + :rtype: int + """ + return self._days_to_reach_capacity + + @days_to_reach_capacity.setter + def days_to_reach_capacity(self, days_to_reach_capacity): + """ + Sets the days_to_reach_capacity of this SummarizeExadataInsightResourceForecastTrendAggregation. + Days to reach capacity for a storage server + + + :param days_to_reach_capacity: The days_to_reach_capacity of this SummarizeExadataInsightResourceForecastTrendAggregation. + :type: int + """ + self._days_to_reach_capacity = days_to_reach_capacity + + @property + def historical_data(self): + """ + **[Required]** Gets the historical_data of this SummarizeExadataInsightResourceForecastTrendAggregation. + Time series data used for the forecast analysis. + + + :return: The historical_data of this SummarizeExadataInsightResourceForecastTrendAggregation. + :rtype: list[oci.opsi.models.HistoricalDataItem] + """ + return self._historical_data + + @historical_data.setter + def historical_data(self, historical_data): + """ + Sets the historical_data of this SummarizeExadataInsightResourceForecastTrendAggregation. + Time series data used for the forecast analysis. + + + :param historical_data: The historical_data of this SummarizeExadataInsightResourceForecastTrendAggregation. + :type: list[oci.opsi.models.HistoricalDataItem] + """ + self._historical_data = historical_data + + @property + def projected_data(self): + """ + **[Required]** Gets the projected_data of this SummarizeExadataInsightResourceForecastTrendAggregation. + Time series data result of the forecasting analysis. + + + :return: The projected_data of this SummarizeExadataInsightResourceForecastTrendAggregation. + :rtype: list[oci.opsi.models.ProjectedDataItem] + """ + return self._projected_data + + @projected_data.setter + def projected_data(self, projected_data): + """ + Sets the projected_data of this SummarizeExadataInsightResourceForecastTrendAggregation. + Time series data result of the forecasting analysis. + + + :param projected_data: The projected_data of this SummarizeExadataInsightResourceForecastTrendAggregation. + :type: list[oci.opsi.models.ProjectedDataItem] + """ + self._projected_data = projected_data + + 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/opsi/models/summarize_exadata_insight_resource_forecast_trend_collection.py b/src/oci/opsi/models/summarize_exadata_insight_resource_forecast_trend_collection.py new file mode 100644 index 0000000000..af48356969 --- /dev/null +++ b/src/oci/opsi/models/summarize_exadata_insight_resource_forecast_trend_collection.py @@ -0,0 +1,344 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 SummarizeExadataInsightResourceForecastTrendCollection(object): + """ + Usage and Forecast results with breakdown by databases, hosts or storage servers. + """ + + #: A constant which can be used with the exadata_resource_type property of a SummarizeExadataInsightResourceForecastTrendCollection. + #: This constant has a value of "DATABASE" + EXADATA_RESOURCE_TYPE_DATABASE = "DATABASE" + + #: A constant which can be used with the exadata_resource_type property of a SummarizeExadataInsightResourceForecastTrendCollection. + #: This constant has a value of "HOST" + EXADATA_RESOURCE_TYPE_HOST = "HOST" + + #: A constant which can be used with the exadata_resource_type property of a SummarizeExadataInsightResourceForecastTrendCollection. + #: This constant has a value of "STORAGE_SERVER" + EXADATA_RESOURCE_TYPE_STORAGE_SERVER = "STORAGE_SERVER" + + #: A constant which can be used with the exadata_resource_type property of a SummarizeExadataInsightResourceForecastTrendCollection. + #: This constant has a value of "DISKGROUP" + EXADATA_RESOURCE_TYPE_DISKGROUP = "DISKGROUP" + + #: A constant which can be used with the exadata_resource_metric property of a SummarizeExadataInsightResourceForecastTrendCollection. + #: This constant has a value of "CPU" + EXADATA_RESOURCE_METRIC_CPU = "CPU" + + #: A constant which can be used with the exadata_resource_metric property of a SummarizeExadataInsightResourceForecastTrendCollection. + #: This constant has a value of "STORAGE" + EXADATA_RESOURCE_METRIC_STORAGE = "STORAGE" + + #: A constant which can be used with the exadata_resource_metric property of a SummarizeExadataInsightResourceForecastTrendCollection. + #: This constant has a value of "IO" + EXADATA_RESOURCE_METRIC_IO = "IO" + + #: A constant which can be used with the exadata_resource_metric property of a SummarizeExadataInsightResourceForecastTrendCollection. + #: This constant has a value of "MEMORY" + EXADATA_RESOURCE_METRIC_MEMORY = "MEMORY" + + #: A constant which can be used with the exadata_resource_metric property of a SummarizeExadataInsightResourceForecastTrendCollection. + #: This constant has a value of "IOPS" + EXADATA_RESOURCE_METRIC_IOPS = "IOPS" + + #: A constant which can be used with the exadata_resource_metric property of a SummarizeExadataInsightResourceForecastTrendCollection. + #: This constant has a value of "THROUGHPUT" + EXADATA_RESOURCE_METRIC_THROUGHPUT = "THROUGHPUT" + + #: A constant which can be used with the usage_unit property of a SummarizeExadataInsightResourceForecastTrendCollection. + #: This constant has a value of "CORES" + USAGE_UNIT_CORES = "CORES" + + #: A constant which can be used with the usage_unit property of a SummarizeExadataInsightResourceForecastTrendCollection. + #: This constant has a value of "GB" + USAGE_UNIT_GB = "GB" + + #: A constant which can be used with the usage_unit property of a SummarizeExadataInsightResourceForecastTrendCollection. + #: This constant has a value of "MBPS" + USAGE_UNIT_MBPS = "MBPS" + + #: A constant which can be used with the usage_unit property of a SummarizeExadataInsightResourceForecastTrendCollection. + #: This constant has a value of "IOPS" + USAGE_UNIT_IOPS = "IOPS" + + #: A constant which can be used with the usage_unit property of a SummarizeExadataInsightResourceForecastTrendCollection. + #: This constant has a value of "PERCENT" + USAGE_UNIT_PERCENT = "PERCENT" + + def __init__(self, **kwargs): + """ + Initializes a new SummarizeExadataInsightResourceForecastTrendCollection object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param exadata_insight_id: + The value to assign to the exadata_insight_id property of this SummarizeExadataInsightResourceForecastTrendCollection. + :type exadata_insight_id: str + + :param exadata_resource_type: + The value to assign to the exadata_resource_type property of this SummarizeExadataInsightResourceForecastTrendCollection. + Allowed values for this property are: "DATABASE", "HOST", "STORAGE_SERVER", "DISKGROUP", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type exadata_resource_type: str + + :param exadata_resource_metric: + The value to assign to the exadata_resource_metric property of this SummarizeExadataInsightResourceForecastTrendCollection. + Allowed values for this property are: "CPU", "STORAGE", "IO", "MEMORY", "IOPS", "THROUGHPUT", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type exadata_resource_metric: str + + :param time_interval_start: + The value to assign to the time_interval_start property of this SummarizeExadataInsightResourceForecastTrendCollection. + :type time_interval_start: datetime + + :param time_interval_end: + The value to assign to the time_interval_end property of this SummarizeExadataInsightResourceForecastTrendCollection. + :type time_interval_end: datetime + + :param usage_unit: + The value to assign to the usage_unit property of this SummarizeExadataInsightResourceForecastTrendCollection. + Allowed values for this property are: "CORES", "GB", "MBPS", "IOPS", "PERCENT", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type usage_unit: str + + :param items: + The value to assign to the items property of this SummarizeExadataInsightResourceForecastTrendCollection. + :type items: list[oci.opsi.models.ExadataInsightResourceForecastTrendSummary] + + """ + self.swagger_types = { + 'exadata_insight_id': 'str', + 'exadata_resource_type': 'str', + 'exadata_resource_metric': 'str', + 'time_interval_start': 'datetime', + 'time_interval_end': 'datetime', + 'usage_unit': 'str', + 'items': 'list[ExadataInsightResourceForecastTrendSummary]' + } + + self.attribute_map = { + 'exadata_insight_id': 'exadataInsightId', + 'exadata_resource_type': 'exadataResourceType', + 'exadata_resource_metric': 'exadataResourceMetric', + 'time_interval_start': 'timeIntervalStart', + 'time_interval_end': 'timeIntervalEnd', + 'usage_unit': 'usageUnit', + 'items': 'items' + } + + self._exadata_insight_id = None + self._exadata_resource_type = None + self._exadata_resource_metric = None + self._time_interval_start = None + self._time_interval_end = None + self._usage_unit = None + self._items = None + + @property + def exadata_insight_id(self): + """ + **[Required]** Gets the exadata_insight_id of this SummarizeExadataInsightResourceForecastTrendCollection. + The `OCID`__ of the Exadata insight. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The exadata_insight_id of this SummarizeExadataInsightResourceForecastTrendCollection. + :rtype: str + """ + return self._exadata_insight_id + + @exadata_insight_id.setter + def exadata_insight_id(self, exadata_insight_id): + """ + Sets the exadata_insight_id of this SummarizeExadataInsightResourceForecastTrendCollection. + The `OCID`__ of the Exadata insight. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param exadata_insight_id: The exadata_insight_id of this SummarizeExadataInsightResourceForecastTrendCollection. + :type: str + """ + self._exadata_insight_id = exadata_insight_id + + @property + def exadata_resource_type(self): + """ + **[Required]** Gets the exadata_resource_type of this SummarizeExadataInsightResourceForecastTrendCollection. + Defines the resource type for an exadata (example: DATABASE, STORAGE_SERVER, HOST, DISKGROUP) + + Allowed values for this property are: "DATABASE", "HOST", "STORAGE_SERVER", "DISKGROUP", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The exadata_resource_type of this SummarizeExadataInsightResourceForecastTrendCollection. + :rtype: str + """ + return self._exadata_resource_type + + @exadata_resource_type.setter + def exadata_resource_type(self, exadata_resource_type): + """ + Sets the exadata_resource_type of this SummarizeExadataInsightResourceForecastTrendCollection. + Defines the resource type for an exadata (example: DATABASE, STORAGE_SERVER, HOST, DISKGROUP) + + + :param exadata_resource_type: The exadata_resource_type of this SummarizeExadataInsightResourceForecastTrendCollection. + :type: str + """ + allowed_values = ["DATABASE", "HOST", "STORAGE_SERVER", "DISKGROUP"] + if not value_allowed_none_or_none_sentinel(exadata_resource_type, allowed_values): + exadata_resource_type = 'UNKNOWN_ENUM_VALUE' + self._exadata_resource_type = exadata_resource_type + + @property + def exadata_resource_metric(self): + """ + **[Required]** Gets the exadata_resource_metric of this SummarizeExadataInsightResourceForecastTrendCollection. + Defines the type of exadata resource metric (example: CPU, STORAGE) + + Allowed values for this property are: "CPU", "STORAGE", "IO", "MEMORY", "IOPS", "THROUGHPUT", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The exadata_resource_metric of this SummarizeExadataInsightResourceForecastTrendCollection. + :rtype: str + """ + return self._exadata_resource_metric + + @exadata_resource_metric.setter + def exadata_resource_metric(self, exadata_resource_metric): + """ + Sets the exadata_resource_metric of this SummarizeExadataInsightResourceForecastTrendCollection. + Defines the type of exadata resource metric (example: CPU, STORAGE) + + + :param exadata_resource_metric: The exadata_resource_metric of this SummarizeExadataInsightResourceForecastTrendCollection. + :type: str + """ + allowed_values = ["CPU", "STORAGE", "IO", "MEMORY", "IOPS", "THROUGHPUT"] + if not value_allowed_none_or_none_sentinel(exadata_resource_metric, allowed_values): + exadata_resource_metric = 'UNKNOWN_ENUM_VALUE' + self._exadata_resource_metric = exadata_resource_metric + + @property + def time_interval_start(self): + """ + **[Required]** Gets the time_interval_start of this SummarizeExadataInsightResourceForecastTrendCollection. + The start timestamp that was passed into the request. + + + :return: The time_interval_start of this SummarizeExadataInsightResourceForecastTrendCollection. + :rtype: datetime + """ + return self._time_interval_start + + @time_interval_start.setter + def time_interval_start(self, time_interval_start): + """ + Sets the time_interval_start of this SummarizeExadataInsightResourceForecastTrendCollection. + The start timestamp that was passed into the request. + + + :param time_interval_start: The time_interval_start of this SummarizeExadataInsightResourceForecastTrendCollection. + :type: datetime + """ + self._time_interval_start = time_interval_start + + @property + def time_interval_end(self): + """ + **[Required]** Gets the time_interval_end of this SummarizeExadataInsightResourceForecastTrendCollection. + The end timestamp that was passed into the request. + + + :return: The time_interval_end of this SummarizeExadataInsightResourceForecastTrendCollection. + :rtype: datetime + """ + return self._time_interval_end + + @time_interval_end.setter + def time_interval_end(self, time_interval_end): + """ + Sets the time_interval_end of this SummarizeExadataInsightResourceForecastTrendCollection. + The end timestamp that was passed into the request. + + + :param time_interval_end: The time_interval_end of this SummarizeExadataInsightResourceForecastTrendCollection. + :type: datetime + """ + self._time_interval_end = time_interval_end + + @property + def usage_unit(self): + """ + **[Required]** Gets the usage_unit of this SummarizeExadataInsightResourceForecastTrendCollection. + Displays usage unit ( CORES, GB) + + Allowed values for this property are: "CORES", "GB", "MBPS", "IOPS", "PERCENT", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The usage_unit of this SummarizeExadataInsightResourceForecastTrendCollection. + :rtype: str + """ + return self._usage_unit + + @usage_unit.setter + def usage_unit(self, usage_unit): + """ + Sets the usage_unit of this SummarizeExadataInsightResourceForecastTrendCollection. + Displays usage unit ( CORES, GB) + + + :param usage_unit: The usage_unit of this SummarizeExadataInsightResourceForecastTrendCollection. + :type: str + """ + allowed_values = ["CORES", "GB", "MBPS", "IOPS", "PERCENT"] + if not value_allowed_none_or_none_sentinel(usage_unit, allowed_values): + usage_unit = 'UNKNOWN_ENUM_VALUE' + self._usage_unit = usage_unit + + @property + def items(self): + """ + **[Required]** Gets the items of this SummarizeExadataInsightResourceForecastTrendCollection. + Collection of id, name , daysToReach Capacity, historical usage and projected usage forecast. + + + :return: The items of this SummarizeExadataInsightResourceForecastTrendCollection. + :rtype: list[oci.opsi.models.ExadataInsightResourceForecastTrendSummary] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this SummarizeExadataInsightResourceForecastTrendCollection. + Collection of id, name , daysToReach Capacity, historical usage and projected usage forecast. + + + :param items: The items of this SummarizeExadataInsightResourceForecastTrendCollection. + :type: list[oci.opsi.models.ExadataInsightResourceForecastTrendSummary] + """ + self._items = items + + 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/opsi/models/summarize_exadata_insight_resource_statistics_aggregation_collection.py b/src/oci/opsi/models/summarize_exadata_insight_resource_statistics_aggregation_collection.py new file mode 100644 index 0000000000..13d64d5dbc --- /dev/null +++ b/src/oci/opsi/models/summarize_exadata_insight_resource_statistics_aggregation_collection.py @@ -0,0 +1,289 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 SummarizeExadataInsightResourceStatisticsAggregationCollection(object): + """ + Returns list of the resources with resource statistics like usage,capacity,utilization and usage change percent. + """ + + #: A constant which can be used with the usage_unit property of a SummarizeExadataInsightResourceStatisticsAggregationCollection. + #: This constant has a value of "CORES" + USAGE_UNIT_CORES = "CORES" + + #: A constant which can be used with the usage_unit property of a SummarizeExadataInsightResourceStatisticsAggregationCollection. + #: This constant has a value of "GB" + USAGE_UNIT_GB = "GB" + + #: A constant which can be used with the usage_unit property of a SummarizeExadataInsightResourceStatisticsAggregationCollection. + #: This constant has a value of "MBPS" + USAGE_UNIT_MBPS = "MBPS" + + #: A constant which can be used with the usage_unit property of a SummarizeExadataInsightResourceStatisticsAggregationCollection. + #: This constant has a value of "IOPS" + USAGE_UNIT_IOPS = "IOPS" + + #: A constant which can be used with the usage_unit property of a SummarizeExadataInsightResourceStatisticsAggregationCollection. + #: This constant has a value of "PERCENT" + USAGE_UNIT_PERCENT = "PERCENT" + + #: A constant which can be used with the exadata_resource_metric property of a SummarizeExadataInsightResourceStatisticsAggregationCollection. + #: This constant has a value of "CPU" + EXADATA_RESOURCE_METRIC_CPU = "CPU" + + #: A constant which can be used with the exadata_resource_metric property of a SummarizeExadataInsightResourceStatisticsAggregationCollection. + #: This constant has a value of "STORAGE" + EXADATA_RESOURCE_METRIC_STORAGE = "STORAGE" + + #: A constant which can be used with the exadata_resource_metric property of a SummarizeExadataInsightResourceStatisticsAggregationCollection. + #: This constant has a value of "IO" + EXADATA_RESOURCE_METRIC_IO = "IO" + + #: A constant which can be used with the exadata_resource_metric property of a SummarizeExadataInsightResourceStatisticsAggregationCollection. + #: This constant has a value of "MEMORY" + EXADATA_RESOURCE_METRIC_MEMORY = "MEMORY" + + #: A constant which can be used with the exadata_resource_metric property of a SummarizeExadataInsightResourceStatisticsAggregationCollection. + #: This constant has a value of "IOPS" + EXADATA_RESOURCE_METRIC_IOPS = "IOPS" + + #: A constant which can be used with the exadata_resource_metric property of a SummarizeExadataInsightResourceStatisticsAggregationCollection. + #: This constant has a value of "THROUGHPUT" + EXADATA_RESOURCE_METRIC_THROUGHPUT = "THROUGHPUT" + + def __init__(self, **kwargs): + """ + Initializes a new SummarizeExadataInsightResourceStatisticsAggregationCollection object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param time_interval_start: + The value to assign to the time_interval_start property of this SummarizeExadataInsightResourceStatisticsAggregationCollection. + :type time_interval_start: datetime + + :param time_interval_end: + The value to assign to the time_interval_end property of this SummarizeExadataInsightResourceStatisticsAggregationCollection. + :type time_interval_end: datetime + + :param items: + The value to assign to the items property of this SummarizeExadataInsightResourceStatisticsAggregationCollection. + :type items: list[oci.opsi.models.ExadataInsightResourceStatisticsAggregation] + + :param usage_unit: + The value to assign to the usage_unit property of this SummarizeExadataInsightResourceStatisticsAggregationCollection. + Allowed values for this property are: "CORES", "GB", "MBPS", "IOPS", "PERCENT", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type usage_unit: str + + :param exadata_resource_metric: + The value to assign to the exadata_resource_metric property of this SummarizeExadataInsightResourceStatisticsAggregationCollection. + Allowed values for this property are: "CPU", "STORAGE", "IO", "MEMORY", "IOPS", "THROUGHPUT", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type exadata_resource_metric: str + + :param exadata_insight_id: + The value to assign to the exadata_insight_id property of this SummarizeExadataInsightResourceStatisticsAggregationCollection. + :type exadata_insight_id: str + + """ + self.swagger_types = { + 'time_interval_start': 'datetime', + 'time_interval_end': 'datetime', + 'items': 'list[ExadataInsightResourceStatisticsAggregation]', + 'usage_unit': 'str', + 'exadata_resource_metric': 'str', + 'exadata_insight_id': 'str' + } + + self.attribute_map = { + 'time_interval_start': 'timeIntervalStart', + 'time_interval_end': 'timeIntervalEnd', + 'items': 'items', + 'usage_unit': 'usageUnit', + 'exadata_resource_metric': 'exadataResourceMetric', + 'exadata_insight_id': 'exadataInsightId' + } + + self._time_interval_start = None + self._time_interval_end = None + self._items = None + self._usage_unit = None + self._exadata_resource_metric = None + self._exadata_insight_id = None + + @property + def time_interval_start(self): + """ + **[Required]** Gets the time_interval_start of this SummarizeExadataInsightResourceStatisticsAggregationCollection. + The start timestamp that was passed into the request. + + + :return: The time_interval_start of this SummarizeExadataInsightResourceStatisticsAggregationCollection. + :rtype: datetime + """ + return self._time_interval_start + + @time_interval_start.setter + def time_interval_start(self, time_interval_start): + """ + Sets the time_interval_start of this SummarizeExadataInsightResourceStatisticsAggregationCollection. + The start timestamp that was passed into the request. + + + :param time_interval_start: The time_interval_start of this SummarizeExadataInsightResourceStatisticsAggregationCollection. + :type: datetime + """ + self._time_interval_start = time_interval_start + + @property + def time_interval_end(self): + """ + **[Required]** Gets the time_interval_end of this SummarizeExadataInsightResourceStatisticsAggregationCollection. + The end timestamp that was passed into the request. + + + :return: The time_interval_end of this SummarizeExadataInsightResourceStatisticsAggregationCollection. + :rtype: datetime + """ + return self._time_interval_end + + @time_interval_end.setter + def time_interval_end(self, time_interval_end): + """ + Sets the time_interval_end of this SummarizeExadataInsightResourceStatisticsAggregationCollection. + The end timestamp that was passed into the request. + + + :param time_interval_end: The time_interval_end of this SummarizeExadataInsightResourceStatisticsAggregationCollection. + :type: datetime + """ + self._time_interval_end = time_interval_end + + @property + def items(self): + """ + **[Required]** Gets the items of this SummarizeExadataInsightResourceStatisticsAggregationCollection. + Collection of Resource Statistics items + + + :return: The items of this SummarizeExadataInsightResourceStatisticsAggregationCollection. + :rtype: list[oci.opsi.models.ExadataInsightResourceStatisticsAggregation] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this SummarizeExadataInsightResourceStatisticsAggregationCollection. + Collection of Resource Statistics items + + + :param items: The items of this SummarizeExadataInsightResourceStatisticsAggregationCollection. + :type: list[oci.opsi.models.ExadataInsightResourceStatisticsAggregation] + """ + self._items = items + + @property + def usage_unit(self): + """ + **[Required]** Gets the usage_unit of this SummarizeExadataInsightResourceStatisticsAggregationCollection. + Displays usage unit ( CORES, GB) + + Allowed values for this property are: "CORES", "GB", "MBPS", "IOPS", "PERCENT", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The usage_unit of this SummarizeExadataInsightResourceStatisticsAggregationCollection. + :rtype: str + """ + return self._usage_unit + + @usage_unit.setter + def usage_unit(self, usage_unit): + """ + Sets the usage_unit of this SummarizeExadataInsightResourceStatisticsAggregationCollection. + Displays usage unit ( CORES, GB) + + + :param usage_unit: The usage_unit of this SummarizeExadataInsightResourceStatisticsAggregationCollection. + :type: str + """ + allowed_values = ["CORES", "GB", "MBPS", "IOPS", "PERCENT"] + if not value_allowed_none_or_none_sentinel(usage_unit, allowed_values): + usage_unit = 'UNKNOWN_ENUM_VALUE' + self._usage_unit = usage_unit + + @property + def exadata_resource_metric(self): + """ + **[Required]** Gets the exadata_resource_metric of this SummarizeExadataInsightResourceStatisticsAggregationCollection. + Defines the type of exadata resource metric (example: CPU, STORAGE) + + Allowed values for this property are: "CPU", "STORAGE", "IO", "MEMORY", "IOPS", "THROUGHPUT", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The exadata_resource_metric of this SummarizeExadataInsightResourceStatisticsAggregationCollection. + :rtype: str + """ + return self._exadata_resource_metric + + @exadata_resource_metric.setter + def exadata_resource_metric(self, exadata_resource_metric): + """ + Sets the exadata_resource_metric of this SummarizeExadataInsightResourceStatisticsAggregationCollection. + Defines the type of exadata resource metric (example: CPU, STORAGE) + + + :param exadata_resource_metric: The exadata_resource_metric of this SummarizeExadataInsightResourceStatisticsAggregationCollection. + :type: str + """ + allowed_values = ["CPU", "STORAGE", "IO", "MEMORY", "IOPS", "THROUGHPUT"] + if not value_allowed_none_or_none_sentinel(exadata_resource_metric, allowed_values): + exadata_resource_metric = 'UNKNOWN_ENUM_VALUE' + self._exadata_resource_metric = exadata_resource_metric + + @property + def exadata_insight_id(self): + """ + **[Required]** Gets the exadata_insight_id of this SummarizeExadataInsightResourceStatisticsAggregationCollection. + The `OCID`__ of the Exadata insight. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The exadata_insight_id of this SummarizeExadataInsightResourceStatisticsAggregationCollection. + :rtype: str + """ + return self._exadata_insight_id + + @exadata_insight_id.setter + def exadata_insight_id(self, exadata_insight_id): + """ + Sets the exadata_insight_id of this SummarizeExadataInsightResourceStatisticsAggregationCollection. + The `OCID`__ of the Exadata insight. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param exadata_insight_id: The exadata_insight_id of this SummarizeExadataInsightResourceStatisticsAggregationCollection. + :type: str + """ + self._exadata_insight_id = exadata_insight_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/opsi/models/summarize_exadata_insight_resource_usage_aggregation.py b/src/oci/opsi/models/summarize_exadata_insight_resource_usage_aggregation.py new file mode 100644 index 0000000000..7595a13658 --- /dev/null +++ b/src/oci/opsi/models/summarize_exadata_insight_resource_usage_aggregation.py @@ -0,0 +1,371 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 SummarizeExadataInsightResourceUsageAggregation(object): + """ + Resource usage summation for the current time period + """ + + #: A constant which can be used with the exadata_resource_metric property of a SummarizeExadataInsightResourceUsageAggregation. + #: This constant has a value of "CPU" + EXADATA_RESOURCE_METRIC_CPU = "CPU" + + #: A constant which can be used with the exadata_resource_metric property of a SummarizeExadataInsightResourceUsageAggregation. + #: This constant has a value of "STORAGE" + EXADATA_RESOURCE_METRIC_STORAGE = "STORAGE" + + #: A constant which can be used with the exadata_resource_metric property of a SummarizeExadataInsightResourceUsageAggregation. + #: This constant has a value of "IO" + EXADATA_RESOURCE_METRIC_IO = "IO" + + #: A constant which can be used with the exadata_resource_metric property of a SummarizeExadataInsightResourceUsageAggregation. + #: This constant has a value of "MEMORY" + EXADATA_RESOURCE_METRIC_MEMORY = "MEMORY" + + #: A constant which can be used with the exadata_resource_metric property of a SummarizeExadataInsightResourceUsageAggregation. + #: This constant has a value of "IOPS" + EXADATA_RESOURCE_METRIC_IOPS = "IOPS" + + #: A constant which can be used with the exadata_resource_metric property of a SummarizeExadataInsightResourceUsageAggregation. + #: This constant has a value of "THROUGHPUT" + EXADATA_RESOURCE_METRIC_THROUGHPUT = "THROUGHPUT" + + #: A constant which can be used with the exadata_resource_type property of a SummarizeExadataInsightResourceUsageAggregation. + #: This constant has a value of "DATABASE" + EXADATA_RESOURCE_TYPE_DATABASE = "DATABASE" + + #: A constant which can be used with the exadata_resource_type property of a SummarizeExadataInsightResourceUsageAggregation. + #: This constant has a value of "HOST" + EXADATA_RESOURCE_TYPE_HOST = "HOST" + + #: A constant which can be used with the exadata_resource_type property of a SummarizeExadataInsightResourceUsageAggregation. + #: This constant has a value of "STORAGE_SERVER" + EXADATA_RESOURCE_TYPE_STORAGE_SERVER = "STORAGE_SERVER" + + #: A constant which can be used with the exadata_resource_type property of a SummarizeExadataInsightResourceUsageAggregation. + #: This constant has a value of "DISKGROUP" + EXADATA_RESOURCE_TYPE_DISKGROUP = "DISKGROUP" + + #: A constant which can be used with the usage_unit property of a SummarizeExadataInsightResourceUsageAggregation. + #: This constant has a value of "CORES" + USAGE_UNIT_CORES = "CORES" + + #: A constant which can be used with the usage_unit property of a SummarizeExadataInsightResourceUsageAggregation. + #: This constant has a value of "GB" + USAGE_UNIT_GB = "GB" + + #: A constant which can be used with the usage_unit property of a SummarizeExadataInsightResourceUsageAggregation. + #: This constant has a value of "MBPS" + USAGE_UNIT_MBPS = "MBPS" + + #: A constant which can be used with the usage_unit property of a SummarizeExadataInsightResourceUsageAggregation. + #: This constant has a value of "IOPS" + USAGE_UNIT_IOPS = "IOPS" + + #: A constant which can be used with the usage_unit property of a SummarizeExadataInsightResourceUsageAggregation. + #: This constant has a value of "PERCENT" + USAGE_UNIT_PERCENT = "PERCENT" + + def __init__(self, **kwargs): + """ + Initializes a new SummarizeExadataInsightResourceUsageAggregation object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param time_interval_start: + The value to assign to the time_interval_start property of this SummarizeExadataInsightResourceUsageAggregation. + :type time_interval_start: datetime + + :param time_interval_end: + The value to assign to the time_interval_end property of this SummarizeExadataInsightResourceUsageAggregation. + :type time_interval_end: datetime + + :param exadata_resource_metric: + The value to assign to the exadata_resource_metric property of this SummarizeExadataInsightResourceUsageAggregation. + Allowed values for this property are: "CPU", "STORAGE", "IO", "MEMORY", "IOPS", "THROUGHPUT", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type exadata_resource_metric: str + + :param exadata_resource_type: + The value to assign to the exadata_resource_type property of this SummarizeExadataInsightResourceUsageAggregation. + Allowed values for this property are: "DATABASE", "HOST", "STORAGE_SERVER", "DISKGROUP", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type exadata_resource_type: str + + :param usage_unit: + The value to assign to the usage_unit property of this SummarizeExadataInsightResourceUsageAggregation. + Allowed values for this property are: "CORES", "GB", "MBPS", "IOPS", "PERCENT", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type usage_unit: str + + :param usage: + The value to assign to the usage property of this SummarizeExadataInsightResourceUsageAggregation. + :type usage: float + + :param capacity: + The value to assign to the capacity property of this SummarizeExadataInsightResourceUsageAggregation. + :type capacity: float + + :param usage_change_percent: + The value to assign to the usage_change_percent property of this SummarizeExadataInsightResourceUsageAggregation. + :type usage_change_percent: float + + """ + self.swagger_types = { + 'time_interval_start': 'datetime', + 'time_interval_end': 'datetime', + 'exadata_resource_metric': 'str', + 'exadata_resource_type': 'str', + 'usage_unit': 'str', + 'usage': 'float', + 'capacity': 'float', + 'usage_change_percent': 'float' + } + + self.attribute_map = { + 'time_interval_start': 'timeIntervalStart', + 'time_interval_end': 'timeIntervalEnd', + 'exadata_resource_metric': 'exadataResourceMetric', + 'exadata_resource_type': 'exadataResourceType', + 'usage_unit': 'usageUnit', + 'usage': 'usage', + 'capacity': 'capacity', + 'usage_change_percent': 'usageChangePercent' + } + + self._time_interval_start = None + self._time_interval_end = None + self._exadata_resource_metric = None + self._exadata_resource_type = None + self._usage_unit = None + self._usage = None + self._capacity = None + self._usage_change_percent = None + + @property + def time_interval_start(self): + """ + **[Required]** Gets the time_interval_start of this SummarizeExadataInsightResourceUsageAggregation. + The start timestamp that was passed into the request. + + + :return: The time_interval_start of this SummarizeExadataInsightResourceUsageAggregation. + :rtype: datetime + """ + return self._time_interval_start + + @time_interval_start.setter + def time_interval_start(self, time_interval_start): + """ + Sets the time_interval_start of this SummarizeExadataInsightResourceUsageAggregation. + The start timestamp that was passed into the request. + + + :param time_interval_start: The time_interval_start of this SummarizeExadataInsightResourceUsageAggregation. + :type: datetime + """ + self._time_interval_start = time_interval_start + + @property + def time_interval_end(self): + """ + **[Required]** Gets the time_interval_end of this SummarizeExadataInsightResourceUsageAggregation. + The end timestamp that was passed into the request. + + + :return: The time_interval_end of this SummarizeExadataInsightResourceUsageAggregation. + :rtype: datetime + """ + return self._time_interval_end + + @time_interval_end.setter + def time_interval_end(self, time_interval_end): + """ + Sets the time_interval_end of this SummarizeExadataInsightResourceUsageAggregation. + The end timestamp that was passed into the request. + + + :param time_interval_end: The time_interval_end of this SummarizeExadataInsightResourceUsageAggregation. + :type: datetime + """ + self._time_interval_end = time_interval_end + + @property + def exadata_resource_metric(self): + """ + **[Required]** Gets the exadata_resource_metric of this SummarizeExadataInsightResourceUsageAggregation. + Defines the type of exadata resource metric (example: CPU, STORAGE) + + Allowed values for this property are: "CPU", "STORAGE", "IO", "MEMORY", "IOPS", "THROUGHPUT", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The exadata_resource_metric of this SummarizeExadataInsightResourceUsageAggregation. + :rtype: str + """ + return self._exadata_resource_metric + + @exadata_resource_metric.setter + def exadata_resource_metric(self, exadata_resource_metric): + """ + Sets the exadata_resource_metric of this SummarizeExadataInsightResourceUsageAggregation. + Defines the type of exadata resource metric (example: CPU, STORAGE) + + + :param exadata_resource_metric: The exadata_resource_metric of this SummarizeExadataInsightResourceUsageAggregation. + :type: str + """ + allowed_values = ["CPU", "STORAGE", "IO", "MEMORY", "IOPS", "THROUGHPUT"] + if not value_allowed_none_or_none_sentinel(exadata_resource_metric, allowed_values): + exadata_resource_metric = 'UNKNOWN_ENUM_VALUE' + self._exadata_resource_metric = exadata_resource_metric + + @property + def exadata_resource_type(self): + """ + **[Required]** Gets the exadata_resource_type of this SummarizeExadataInsightResourceUsageAggregation. + Defines the resource type for an exadata (example: DATABASE, STORAGE_SERVER, HOST, DISKGROUP) + + Allowed values for this property are: "DATABASE", "HOST", "STORAGE_SERVER", "DISKGROUP", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The exadata_resource_type of this SummarizeExadataInsightResourceUsageAggregation. + :rtype: str + """ + return self._exadata_resource_type + + @exadata_resource_type.setter + def exadata_resource_type(self, exadata_resource_type): + """ + Sets the exadata_resource_type of this SummarizeExadataInsightResourceUsageAggregation. + Defines the resource type for an exadata (example: DATABASE, STORAGE_SERVER, HOST, DISKGROUP) + + + :param exadata_resource_type: The exadata_resource_type of this SummarizeExadataInsightResourceUsageAggregation. + :type: str + """ + allowed_values = ["DATABASE", "HOST", "STORAGE_SERVER", "DISKGROUP"] + if not value_allowed_none_or_none_sentinel(exadata_resource_type, allowed_values): + exadata_resource_type = 'UNKNOWN_ENUM_VALUE' + self._exadata_resource_type = exadata_resource_type + + @property + def usage_unit(self): + """ + **[Required]** Gets the usage_unit of this SummarizeExadataInsightResourceUsageAggregation. + Displays usage unit (CORES, GB) + + Allowed values for this property are: "CORES", "GB", "MBPS", "IOPS", "PERCENT", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The usage_unit of this SummarizeExadataInsightResourceUsageAggregation. + :rtype: str + """ + return self._usage_unit + + @usage_unit.setter + def usage_unit(self, usage_unit): + """ + Sets the usage_unit of this SummarizeExadataInsightResourceUsageAggregation. + Displays usage unit (CORES, GB) + + + :param usage_unit: The usage_unit of this SummarizeExadataInsightResourceUsageAggregation. + :type: str + """ + allowed_values = ["CORES", "GB", "MBPS", "IOPS", "PERCENT"] + if not value_allowed_none_or_none_sentinel(usage_unit, allowed_values): + usage_unit = 'UNKNOWN_ENUM_VALUE' + self._usage_unit = usage_unit + + @property + def usage(self): + """ + **[Required]** Gets the usage of this SummarizeExadataInsightResourceUsageAggregation. + Total amount used of the resource metric type (CPU, STORAGE). + + + :return: The usage of this SummarizeExadataInsightResourceUsageAggregation. + :rtype: float + """ + return self._usage + + @usage.setter + def usage(self, usage): + """ + Sets the usage of this SummarizeExadataInsightResourceUsageAggregation. + Total amount used of the resource metric type (CPU, STORAGE). + + + :param usage: The usage of this SummarizeExadataInsightResourceUsageAggregation. + :type: float + """ + self._usage = usage + + @property + def capacity(self): + """ + **[Required]** Gets the capacity of this SummarizeExadataInsightResourceUsageAggregation. + The maximum allocated amount of the resource metric type (CPU, STORAGE). + + + :return: The capacity of this SummarizeExadataInsightResourceUsageAggregation. + :rtype: float + """ + return self._capacity + + @capacity.setter + def capacity(self, capacity): + """ + Sets the capacity of this SummarizeExadataInsightResourceUsageAggregation. + The maximum allocated amount of the resource metric type (CPU, STORAGE). + + + :param capacity: The capacity of this SummarizeExadataInsightResourceUsageAggregation. + :type: float + """ + self._capacity = capacity + + @property + def usage_change_percent(self): + """ + **[Required]** Gets the usage_change_percent of this SummarizeExadataInsightResourceUsageAggregation. + Percentage change in resource usage during the current period calculated using linear regression functions + + + :return: The usage_change_percent of this SummarizeExadataInsightResourceUsageAggregation. + :rtype: float + """ + return self._usage_change_percent + + @usage_change_percent.setter + def usage_change_percent(self, usage_change_percent): + """ + Sets the usage_change_percent of this SummarizeExadataInsightResourceUsageAggregation. + Percentage change in resource usage during the current period calculated using linear regression functions + + + :param usage_change_percent: The usage_change_percent of this SummarizeExadataInsightResourceUsageAggregation. + :type: float + """ + self._usage_change_percent = usage_change_percent + + 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/opsi/models/summarize_exadata_insight_resource_usage_collection.py b/src/oci/opsi/models/summarize_exadata_insight_resource_usage_collection.py new file mode 100644 index 0000000000..c4c7f7145b --- /dev/null +++ b/src/oci/opsi/models/summarize_exadata_insight_resource_usage_collection.py @@ -0,0 +1,309 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 SummarizeExadataInsightResourceUsageCollection(object): + """ + Resource usage , allocation, utilization and usage ChangePercent for the current time period + """ + + #: A constant which can be used with the exadata_resource_metric property of a SummarizeExadataInsightResourceUsageCollection. + #: This constant has a value of "CPU" + EXADATA_RESOURCE_METRIC_CPU = "CPU" + + #: A constant which can be used with the exadata_resource_metric property of a SummarizeExadataInsightResourceUsageCollection. + #: This constant has a value of "STORAGE" + EXADATA_RESOURCE_METRIC_STORAGE = "STORAGE" + + #: A constant which can be used with the exadata_resource_metric property of a SummarizeExadataInsightResourceUsageCollection. + #: This constant has a value of "IO" + EXADATA_RESOURCE_METRIC_IO = "IO" + + #: A constant which can be used with the exadata_resource_metric property of a SummarizeExadataInsightResourceUsageCollection. + #: This constant has a value of "MEMORY" + EXADATA_RESOURCE_METRIC_MEMORY = "MEMORY" + + #: A constant which can be used with the exadata_resource_metric property of a SummarizeExadataInsightResourceUsageCollection. + #: This constant has a value of "IOPS" + EXADATA_RESOURCE_METRIC_IOPS = "IOPS" + + #: A constant which can be used with the exadata_resource_metric property of a SummarizeExadataInsightResourceUsageCollection. + #: This constant has a value of "THROUGHPUT" + EXADATA_RESOURCE_METRIC_THROUGHPUT = "THROUGHPUT" + + #: A constant which can be used with the exadata_resource_type property of a SummarizeExadataInsightResourceUsageCollection. + #: This constant has a value of "DATABASE" + EXADATA_RESOURCE_TYPE_DATABASE = "DATABASE" + + #: A constant which can be used with the exadata_resource_type property of a SummarizeExadataInsightResourceUsageCollection. + #: This constant has a value of "HOST" + EXADATA_RESOURCE_TYPE_HOST = "HOST" + + #: A constant which can be used with the exadata_resource_type property of a SummarizeExadataInsightResourceUsageCollection. + #: This constant has a value of "STORAGE_SERVER" + EXADATA_RESOURCE_TYPE_STORAGE_SERVER = "STORAGE_SERVER" + + #: A constant which can be used with the exadata_resource_type property of a SummarizeExadataInsightResourceUsageCollection. + #: This constant has a value of "DISKGROUP" + EXADATA_RESOURCE_TYPE_DISKGROUP = "DISKGROUP" + + #: A constant which can be used with the usage_unit property of a SummarizeExadataInsightResourceUsageCollection. + #: This constant has a value of "CORES" + USAGE_UNIT_CORES = "CORES" + + #: A constant which can be used with the usage_unit property of a SummarizeExadataInsightResourceUsageCollection. + #: This constant has a value of "GB" + USAGE_UNIT_GB = "GB" + + #: A constant which can be used with the usage_unit property of a SummarizeExadataInsightResourceUsageCollection. + #: This constant has a value of "MBPS" + USAGE_UNIT_MBPS = "MBPS" + + #: A constant which can be used with the usage_unit property of a SummarizeExadataInsightResourceUsageCollection. + #: This constant has a value of "IOPS" + USAGE_UNIT_IOPS = "IOPS" + + #: A constant which can be used with the usage_unit property of a SummarizeExadataInsightResourceUsageCollection. + #: This constant has a value of "PERCENT" + USAGE_UNIT_PERCENT = "PERCENT" + + def __init__(self, **kwargs): + """ + Initializes a new SummarizeExadataInsightResourceUsageCollection object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param time_interval_start: + The value to assign to the time_interval_start property of this SummarizeExadataInsightResourceUsageCollection. + :type time_interval_start: datetime + + :param time_interval_end: + The value to assign to the time_interval_end property of this SummarizeExadataInsightResourceUsageCollection. + :type time_interval_end: datetime + + :param exadata_resource_metric: + The value to assign to the exadata_resource_metric property of this SummarizeExadataInsightResourceUsageCollection. + Allowed values for this property are: "CPU", "STORAGE", "IO", "MEMORY", "IOPS", "THROUGHPUT", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type exadata_resource_metric: str + + :param exadata_resource_type: + The value to assign to the exadata_resource_type property of this SummarizeExadataInsightResourceUsageCollection. + Allowed values for this property are: "DATABASE", "HOST", "STORAGE_SERVER", "DISKGROUP", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type exadata_resource_type: str + + :param usage_unit: + The value to assign to the usage_unit property of this SummarizeExadataInsightResourceUsageCollection. + Allowed values for this property are: "CORES", "GB", "MBPS", "IOPS", "PERCENT", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type usage_unit: str + + :param items: + The value to assign to the items property of this SummarizeExadataInsightResourceUsageCollection. + :type items: list[oci.opsi.models.ResourceUsageSummary] + + """ + self.swagger_types = { + 'time_interval_start': 'datetime', + 'time_interval_end': 'datetime', + 'exadata_resource_metric': 'str', + 'exadata_resource_type': 'str', + 'usage_unit': 'str', + 'items': 'list[ResourceUsageSummary]' + } + + self.attribute_map = { + 'time_interval_start': 'timeIntervalStart', + 'time_interval_end': 'timeIntervalEnd', + 'exadata_resource_metric': 'exadataResourceMetric', + 'exadata_resource_type': 'exadataResourceType', + 'usage_unit': 'usageUnit', + 'items': 'items' + } + + self._time_interval_start = None + self._time_interval_end = None + self._exadata_resource_metric = None + self._exadata_resource_type = None + self._usage_unit = None + self._items = None + + @property + def time_interval_start(self): + """ + **[Required]** Gets the time_interval_start of this SummarizeExadataInsightResourceUsageCollection. + The start timestamp that was passed into the request. + + + :return: The time_interval_start of this SummarizeExadataInsightResourceUsageCollection. + :rtype: datetime + """ + return self._time_interval_start + + @time_interval_start.setter + def time_interval_start(self, time_interval_start): + """ + Sets the time_interval_start of this SummarizeExadataInsightResourceUsageCollection. + The start timestamp that was passed into the request. + + + :param time_interval_start: The time_interval_start of this SummarizeExadataInsightResourceUsageCollection. + :type: datetime + """ + self._time_interval_start = time_interval_start + + @property + def time_interval_end(self): + """ + **[Required]** Gets the time_interval_end of this SummarizeExadataInsightResourceUsageCollection. + The end timestamp that was passed into the request. + + + :return: The time_interval_end of this SummarizeExadataInsightResourceUsageCollection. + :rtype: datetime + """ + return self._time_interval_end + + @time_interval_end.setter + def time_interval_end(self, time_interval_end): + """ + Sets the time_interval_end of this SummarizeExadataInsightResourceUsageCollection. + The end timestamp that was passed into the request. + + + :param time_interval_end: The time_interval_end of this SummarizeExadataInsightResourceUsageCollection. + :type: datetime + """ + self._time_interval_end = time_interval_end + + @property + def exadata_resource_metric(self): + """ + **[Required]** Gets the exadata_resource_metric of this SummarizeExadataInsightResourceUsageCollection. + Defines the type of exadata resource metric (example: CPU, STORAGE) + + Allowed values for this property are: "CPU", "STORAGE", "IO", "MEMORY", "IOPS", "THROUGHPUT", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The exadata_resource_metric of this SummarizeExadataInsightResourceUsageCollection. + :rtype: str + """ + return self._exadata_resource_metric + + @exadata_resource_metric.setter + def exadata_resource_metric(self, exadata_resource_metric): + """ + Sets the exadata_resource_metric of this SummarizeExadataInsightResourceUsageCollection. + Defines the type of exadata resource metric (example: CPU, STORAGE) + + + :param exadata_resource_metric: The exadata_resource_metric of this SummarizeExadataInsightResourceUsageCollection. + :type: str + """ + allowed_values = ["CPU", "STORAGE", "IO", "MEMORY", "IOPS", "THROUGHPUT"] + if not value_allowed_none_or_none_sentinel(exadata_resource_metric, allowed_values): + exadata_resource_metric = 'UNKNOWN_ENUM_VALUE' + self._exadata_resource_metric = exadata_resource_metric + + @property + def exadata_resource_type(self): + """ + **[Required]** Gets the exadata_resource_type of this SummarizeExadataInsightResourceUsageCollection. + Defines the resource type for an exadata (example: DATABASE, STORAGE_SERVER, HOST, DISKGROUP) + + Allowed values for this property are: "DATABASE", "HOST", "STORAGE_SERVER", "DISKGROUP", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The exadata_resource_type of this SummarizeExadataInsightResourceUsageCollection. + :rtype: str + """ + return self._exadata_resource_type + + @exadata_resource_type.setter + def exadata_resource_type(self, exadata_resource_type): + """ + Sets the exadata_resource_type of this SummarizeExadataInsightResourceUsageCollection. + Defines the resource type for an exadata (example: DATABASE, STORAGE_SERVER, HOST, DISKGROUP) + + + :param exadata_resource_type: The exadata_resource_type of this SummarizeExadataInsightResourceUsageCollection. + :type: str + """ + allowed_values = ["DATABASE", "HOST", "STORAGE_SERVER", "DISKGROUP"] + if not value_allowed_none_or_none_sentinel(exadata_resource_type, allowed_values): + exadata_resource_type = 'UNKNOWN_ENUM_VALUE' + self._exadata_resource_type = exadata_resource_type + + @property + def usage_unit(self): + """ + **[Required]** Gets the usage_unit of this SummarizeExadataInsightResourceUsageCollection. + Displays usage unit (CORES, GB) + + Allowed values for this property are: "CORES", "GB", "MBPS", "IOPS", "PERCENT", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The usage_unit of this SummarizeExadataInsightResourceUsageCollection. + :rtype: str + """ + return self._usage_unit + + @usage_unit.setter + def usage_unit(self, usage_unit): + """ + Sets the usage_unit of this SummarizeExadataInsightResourceUsageCollection. + Displays usage unit (CORES, GB) + + + :param usage_unit: The usage_unit of this SummarizeExadataInsightResourceUsageCollection. + :type: str + """ + allowed_values = ["CORES", "GB", "MBPS", "IOPS", "PERCENT"] + if not value_allowed_none_or_none_sentinel(usage_unit, allowed_values): + usage_unit = 'UNKNOWN_ENUM_VALUE' + self._usage_unit = usage_unit + + @property + def items(self): + """ + **[Required]** Gets the items of this SummarizeExadataInsightResourceUsageCollection. + Collection of Resource Usage Summary items + + + :return: The items of this SummarizeExadataInsightResourceUsageCollection. + :rtype: list[oci.opsi.models.ResourceUsageSummary] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this SummarizeExadataInsightResourceUsageCollection. + Collection of Resource Usage Summary items + + + :param items: The items of this SummarizeExadataInsightResourceUsageCollection. + :type: list[oci.opsi.models.ResourceUsageSummary] + """ + self._items = items + + 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/opsi/models/summarize_exadata_insight_resource_utilization_insight_aggregation.py b/src/oci/opsi/models/summarize_exadata_insight_resource_utilization_insight_aggregation.py new file mode 100644 index 0000000000..8f59b659a1 --- /dev/null +++ b/src/oci/opsi/models/summarize_exadata_insight_resource_utilization_insight_aggregation.py @@ -0,0 +1,250 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 SummarizeExadataInsightResourceUtilizationInsightAggregation(object): + """ + Insights response containing utilization values for exadata systems. + """ + + #: A constant which can be used with the exadata_resource_metric property of a SummarizeExadataInsightResourceUtilizationInsightAggregation. + #: This constant has a value of "CPU" + EXADATA_RESOURCE_METRIC_CPU = "CPU" + + #: A constant which can be used with the exadata_resource_metric property of a SummarizeExadataInsightResourceUtilizationInsightAggregation. + #: This constant has a value of "STORAGE" + EXADATA_RESOURCE_METRIC_STORAGE = "STORAGE" + + #: A constant which can be used with the exadata_resource_metric property of a SummarizeExadataInsightResourceUtilizationInsightAggregation. + #: This constant has a value of "IO" + EXADATA_RESOURCE_METRIC_IO = "IO" + + #: A constant which can be used with the exadata_resource_metric property of a SummarizeExadataInsightResourceUtilizationInsightAggregation. + #: This constant has a value of "MEMORY" + EXADATA_RESOURCE_METRIC_MEMORY = "MEMORY" + + #: A constant which can be used with the exadata_resource_metric property of a SummarizeExadataInsightResourceUtilizationInsightAggregation. + #: This constant has a value of "IOPS" + EXADATA_RESOURCE_METRIC_IOPS = "IOPS" + + #: A constant which can be used with the exadata_resource_metric property of a SummarizeExadataInsightResourceUtilizationInsightAggregation. + #: This constant has a value of "THROUGHPUT" + EXADATA_RESOURCE_METRIC_THROUGHPUT = "THROUGHPUT" + + #: A constant which can be used with the exadata_resource_type property of a SummarizeExadataInsightResourceUtilizationInsightAggregation. + #: This constant has a value of "DATABASE" + EXADATA_RESOURCE_TYPE_DATABASE = "DATABASE" + + #: A constant which can be used with the exadata_resource_type property of a SummarizeExadataInsightResourceUtilizationInsightAggregation. + #: This constant has a value of "HOST" + EXADATA_RESOURCE_TYPE_HOST = "HOST" + + #: A constant which can be used with the exadata_resource_type property of a SummarizeExadataInsightResourceUtilizationInsightAggregation. + #: This constant has a value of "STORAGE_SERVER" + EXADATA_RESOURCE_TYPE_STORAGE_SERVER = "STORAGE_SERVER" + + #: A constant which can be used with the exadata_resource_type property of a SummarizeExadataInsightResourceUtilizationInsightAggregation. + #: This constant has a value of "DISKGROUP" + EXADATA_RESOURCE_TYPE_DISKGROUP = "DISKGROUP" + + def __init__(self, **kwargs): + """ + Initializes a new SummarizeExadataInsightResourceUtilizationInsightAggregation object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param time_interval_start: + The value to assign to the time_interval_start property of this SummarizeExadataInsightResourceUtilizationInsightAggregation. + :type time_interval_start: datetime + + :param time_interval_end: + The value to assign to the time_interval_end property of this SummarizeExadataInsightResourceUtilizationInsightAggregation. + :type time_interval_end: datetime + + :param exadata_resource_metric: + The value to assign to the exadata_resource_metric property of this SummarizeExadataInsightResourceUtilizationInsightAggregation. + Allowed values for this property are: "CPU", "STORAGE", "IO", "MEMORY", "IOPS", "THROUGHPUT", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type exadata_resource_metric: str + + :param exadata_resource_type: + The value to assign to the exadata_resource_type property of this SummarizeExadataInsightResourceUtilizationInsightAggregation. + Allowed values for this property are: "DATABASE", "HOST", "STORAGE_SERVER", "DISKGROUP", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type exadata_resource_type: str + + :param utilization: + The value to assign to the utilization property of this SummarizeExadataInsightResourceUtilizationInsightAggregation. + :type utilization: list[oci.opsi.models.ExadataInsightResourceInsightUtilizationItem] + + """ + self.swagger_types = { + 'time_interval_start': 'datetime', + 'time_interval_end': 'datetime', + 'exadata_resource_metric': 'str', + 'exadata_resource_type': 'str', + 'utilization': 'list[ExadataInsightResourceInsightUtilizationItem]' + } + + self.attribute_map = { + 'time_interval_start': 'timeIntervalStart', + 'time_interval_end': 'timeIntervalEnd', + 'exadata_resource_metric': 'exadataResourceMetric', + 'exadata_resource_type': 'exadataResourceType', + 'utilization': 'utilization' + } + + self._time_interval_start = None + self._time_interval_end = None + self._exadata_resource_metric = None + self._exadata_resource_type = None + self._utilization = None + + @property + def time_interval_start(self): + """ + **[Required]** Gets the time_interval_start of this SummarizeExadataInsightResourceUtilizationInsightAggregation. + The start timestamp that was passed into the request. + + + :return: The time_interval_start of this SummarizeExadataInsightResourceUtilizationInsightAggregation. + :rtype: datetime + """ + return self._time_interval_start + + @time_interval_start.setter + def time_interval_start(self, time_interval_start): + """ + Sets the time_interval_start of this SummarizeExadataInsightResourceUtilizationInsightAggregation. + The start timestamp that was passed into the request. + + + :param time_interval_start: The time_interval_start of this SummarizeExadataInsightResourceUtilizationInsightAggregation. + :type: datetime + """ + self._time_interval_start = time_interval_start + + @property + def time_interval_end(self): + """ + **[Required]** Gets the time_interval_end of this SummarizeExadataInsightResourceUtilizationInsightAggregation. + The end timestamp that was passed into the request. + + + :return: The time_interval_end of this SummarizeExadataInsightResourceUtilizationInsightAggregation. + :rtype: datetime + """ + return self._time_interval_end + + @time_interval_end.setter + def time_interval_end(self, time_interval_end): + """ + Sets the time_interval_end of this SummarizeExadataInsightResourceUtilizationInsightAggregation. + The end timestamp that was passed into the request. + + + :param time_interval_end: The time_interval_end of this SummarizeExadataInsightResourceUtilizationInsightAggregation. + :type: datetime + """ + self._time_interval_end = time_interval_end + + @property + def exadata_resource_metric(self): + """ + **[Required]** Gets the exadata_resource_metric of this SummarizeExadataInsightResourceUtilizationInsightAggregation. + Defines the type of exadata resource metric (example: CPU, STORAGE) + + Allowed values for this property are: "CPU", "STORAGE", "IO", "MEMORY", "IOPS", "THROUGHPUT", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The exadata_resource_metric of this SummarizeExadataInsightResourceUtilizationInsightAggregation. + :rtype: str + """ + return self._exadata_resource_metric + + @exadata_resource_metric.setter + def exadata_resource_metric(self, exadata_resource_metric): + """ + Sets the exadata_resource_metric of this SummarizeExadataInsightResourceUtilizationInsightAggregation. + Defines the type of exadata resource metric (example: CPU, STORAGE) + + + :param exadata_resource_metric: The exadata_resource_metric of this SummarizeExadataInsightResourceUtilizationInsightAggregation. + :type: str + """ + allowed_values = ["CPU", "STORAGE", "IO", "MEMORY", "IOPS", "THROUGHPUT"] + if not value_allowed_none_or_none_sentinel(exadata_resource_metric, allowed_values): + exadata_resource_metric = 'UNKNOWN_ENUM_VALUE' + self._exadata_resource_metric = exadata_resource_metric + + @property + def exadata_resource_type(self): + """ + **[Required]** Gets the exadata_resource_type of this SummarizeExadataInsightResourceUtilizationInsightAggregation. + Defines the resource type for an exadata (example: DATABASE, STORAGE_SERVER, HOST, DISKGROUP) + + Allowed values for this property are: "DATABASE", "HOST", "STORAGE_SERVER", "DISKGROUP", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The exadata_resource_type of this SummarizeExadataInsightResourceUtilizationInsightAggregation. + :rtype: str + """ + return self._exadata_resource_type + + @exadata_resource_type.setter + def exadata_resource_type(self, exadata_resource_type): + """ + Sets the exadata_resource_type of this SummarizeExadataInsightResourceUtilizationInsightAggregation. + Defines the resource type for an exadata (example: DATABASE, STORAGE_SERVER, HOST, DISKGROUP) + + + :param exadata_resource_type: The exadata_resource_type of this SummarizeExadataInsightResourceUtilizationInsightAggregation. + :type: str + """ + allowed_values = ["DATABASE", "HOST", "STORAGE_SERVER", "DISKGROUP"] + if not value_allowed_none_or_none_sentinel(exadata_resource_type, allowed_values): + exadata_resource_type = 'UNKNOWN_ENUM_VALUE' + self._exadata_resource_type = exadata_resource_type + + @property + def utilization(self): + """ + **[Required]** Gets the utilization of this SummarizeExadataInsightResourceUtilizationInsightAggregation. + Collection of Exadata system utilization + + + :return: The utilization of this SummarizeExadataInsightResourceUtilizationInsightAggregation. + :rtype: list[oci.opsi.models.ExadataInsightResourceInsightUtilizationItem] + """ + return self._utilization + + @utilization.setter + def utilization(self, utilization): + """ + Sets the utilization of this SummarizeExadataInsightResourceUtilizationInsightAggregation. + Collection of Exadata system utilization + + + :param utilization: The utilization of this SummarizeExadataInsightResourceUtilizationInsightAggregation. + :type: list[oci.opsi.models.ExadataInsightResourceInsightUtilizationItem] + """ + self._utilization = utilization + + 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/opsi/models/summarize_host_insight_resource_capacity_trend_aggregation_collection.py b/src/oci/opsi/models/summarize_host_insight_resource_capacity_trend_aggregation_collection.py index 872ba78483..64e731df9d 100644 --- a/src/oci/opsi/models/summarize_host_insight_resource_capacity_trend_aggregation_collection.py +++ b/src/oci/opsi/models/summarize_host_insight_resource_capacity_trend_aggregation_collection.py @@ -37,6 +37,10 @@ class SummarizeHostInsightResourceCapacityTrendAggregationCollection(object): #: This constant has a value of "MBPS" USAGE_UNIT_MBPS = "MBPS" + #: A constant which can be used with the usage_unit property of a SummarizeHostInsightResourceCapacityTrendAggregationCollection. + #: This constant has a value of "IOPS" + USAGE_UNIT_IOPS = "IOPS" + #: A constant which can be used with the usage_unit property of a SummarizeHostInsightResourceCapacityTrendAggregationCollection. #: This constant has a value of "PERCENT" USAGE_UNIT_PERCENT = "PERCENT" @@ -62,7 +66,7 @@ def __init__(self, **kwargs): :param usage_unit: The value to assign to the usage_unit property of this SummarizeHostInsightResourceCapacityTrendAggregationCollection. - Allowed values for this property are: "CORES", "GB", "MBPS", "PERCENT", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "CORES", "GB", "MBPS", "IOPS", "PERCENT", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type usage_unit: str @@ -184,7 +188,7 @@ def usage_unit(self): **[Required]** Gets the usage_unit of this SummarizeHostInsightResourceCapacityTrendAggregationCollection. Displays usage unit (CORES, GB) - Allowed values for this property are: "CORES", "GB", "MBPS", "PERCENT", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "CORES", "GB", "MBPS", "IOPS", "PERCENT", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. @@ -203,7 +207,7 @@ def usage_unit(self, usage_unit): :param usage_unit: The usage_unit of this SummarizeHostInsightResourceCapacityTrendAggregationCollection. :type: str """ - allowed_values = ["CORES", "GB", "MBPS", "PERCENT"] + allowed_values = ["CORES", "GB", "MBPS", "IOPS", "PERCENT"] if not value_allowed_none_or_none_sentinel(usage_unit, allowed_values): usage_unit = 'UNKNOWN_ENUM_VALUE' self._usage_unit = usage_unit diff --git a/src/oci/opsi/models/summarize_host_insight_resource_forecast_trend_aggregation.py b/src/oci/opsi/models/summarize_host_insight_resource_forecast_trend_aggregation.py index 4f893db4f4..4dbf834738 100644 --- a/src/oci/opsi/models/summarize_host_insight_resource_forecast_trend_aggregation.py +++ b/src/oci/opsi/models/summarize_host_insight_resource_forecast_trend_aggregation.py @@ -37,6 +37,10 @@ class SummarizeHostInsightResourceForecastTrendAggregation(object): #: This constant has a value of "MBPS" USAGE_UNIT_MBPS = "MBPS" + #: A constant which can be used with the usage_unit property of a SummarizeHostInsightResourceForecastTrendAggregation. + #: This constant has a value of "IOPS" + USAGE_UNIT_IOPS = "IOPS" + #: A constant which can be used with the usage_unit property of a SummarizeHostInsightResourceForecastTrendAggregation. #: This constant has a value of "PERCENT" USAGE_UNIT_PERCENT = "PERCENT" @@ -94,7 +98,7 @@ def __init__(self, **kwargs): :param usage_unit: The value to assign to the usage_unit property of this SummarizeHostInsightResourceForecastTrendAggregation. - Allowed values for this property are: "CORES", "GB", "MBPS", "PERCENT", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "CORES", "GB", "MBPS", "IOPS", "PERCENT", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type usage_unit: str @@ -225,7 +229,7 @@ def usage_unit(self): **[Required]** Gets the usage_unit of this SummarizeHostInsightResourceForecastTrendAggregation. Displays usage unit (CORES, GB) - Allowed values for this property are: "CORES", "GB", "MBPS", "PERCENT", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "CORES", "GB", "MBPS", "IOPS", "PERCENT", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. @@ -244,7 +248,7 @@ def usage_unit(self, usage_unit): :param usage_unit: The usage_unit of this SummarizeHostInsightResourceForecastTrendAggregation. :type: str """ - allowed_values = ["CORES", "GB", "MBPS", "PERCENT"] + allowed_values = ["CORES", "GB", "MBPS", "IOPS", "PERCENT"] if not value_allowed_none_or_none_sentinel(usage_unit, allowed_values): usage_unit = 'UNKNOWN_ENUM_VALUE' self._usage_unit = usage_unit diff --git a/src/oci/opsi/models/summarize_host_insight_resource_statistics_aggregation_collection.py b/src/oci/opsi/models/summarize_host_insight_resource_statistics_aggregation_collection.py index e721be15fa..b209c5bb7d 100644 --- a/src/oci/opsi/models/summarize_host_insight_resource_statistics_aggregation_collection.py +++ b/src/oci/opsi/models/summarize_host_insight_resource_statistics_aggregation_collection.py @@ -37,6 +37,10 @@ class SummarizeHostInsightResourceStatisticsAggregationCollection(object): #: This constant has a value of "MBPS" USAGE_UNIT_MBPS = "MBPS" + #: A constant which can be used with the usage_unit property of a SummarizeHostInsightResourceStatisticsAggregationCollection. + #: This constant has a value of "IOPS" + USAGE_UNIT_IOPS = "IOPS" + #: A constant which can be used with the usage_unit property of a SummarizeHostInsightResourceStatisticsAggregationCollection. #: This constant has a value of "PERCENT" USAGE_UNIT_PERCENT = "PERCENT" @@ -62,7 +66,7 @@ def __init__(self, **kwargs): :param usage_unit: The value to assign to the usage_unit property of this SummarizeHostInsightResourceStatisticsAggregationCollection. - Allowed values for this property are: "CORES", "GB", "MBPS", "PERCENT", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "CORES", "GB", "MBPS", "IOPS", "PERCENT", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type usage_unit: str @@ -177,7 +181,7 @@ def usage_unit(self): **[Required]** Gets the usage_unit of this SummarizeHostInsightResourceStatisticsAggregationCollection. Displays usage unit. - Allowed values for this property are: "CORES", "GB", "MBPS", "PERCENT", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "CORES", "GB", "MBPS", "IOPS", "PERCENT", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. @@ -196,7 +200,7 @@ def usage_unit(self, usage_unit): :param usage_unit: The usage_unit of this SummarizeHostInsightResourceStatisticsAggregationCollection. :type: str """ - allowed_values = ["CORES", "GB", "MBPS", "PERCENT"] + allowed_values = ["CORES", "GB", "MBPS", "IOPS", "PERCENT"] if not value_allowed_none_or_none_sentinel(usage_unit, allowed_values): usage_unit = 'UNKNOWN_ENUM_VALUE' self._usage_unit = usage_unit diff --git a/src/oci/opsi/models/summarize_host_insight_resource_usage_aggregation.py b/src/oci/opsi/models/summarize_host_insight_resource_usage_aggregation.py index f3fa46d233..bff54c956c 100644 --- a/src/oci/opsi/models/summarize_host_insight_resource_usage_aggregation.py +++ b/src/oci/opsi/models/summarize_host_insight_resource_usage_aggregation.py @@ -37,6 +37,10 @@ class SummarizeHostInsightResourceUsageAggregation(object): #: This constant has a value of "MBPS" USAGE_UNIT_MBPS = "MBPS" + #: A constant which can be used with the usage_unit property of a SummarizeHostInsightResourceUsageAggregation. + #: This constant has a value of "IOPS" + USAGE_UNIT_IOPS = "IOPS" + #: A constant which can be used with the usage_unit property of a SummarizeHostInsightResourceUsageAggregation. #: This constant has a value of "PERCENT" USAGE_UNIT_PERCENT = "PERCENT" @@ -62,7 +66,7 @@ def __init__(self, **kwargs): :param usage_unit: The value to assign to the usage_unit property of this SummarizeHostInsightResourceUsageAggregation. - Allowed values for this property are: "CORES", "GB", "MBPS", "PERCENT", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "CORES", "GB", "MBPS", "IOPS", "PERCENT", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type usage_unit: str @@ -191,7 +195,7 @@ def usage_unit(self): **[Required]** Gets the usage_unit of this SummarizeHostInsightResourceUsageAggregation. Displays usage unit (CORES, GB) - Allowed values for this property are: "CORES", "GB", "MBPS", "PERCENT", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "CORES", "GB", "MBPS", "IOPS", "PERCENT", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. @@ -210,7 +214,7 @@ def usage_unit(self, usage_unit): :param usage_unit: The usage_unit of this SummarizeHostInsightResourceUsageAggregation. :type: str """ - allowed_values = ["CORES", "GB", "MBPS", "PERCENT"] + allowed_values = ["CORES", "GB", "MBPS", "IOPS", "PERCENT"] if not value_allowed_none_or_none_sentinel(usage_unit, allowed_values): usage_unit = 'UNKNOWN_ENUM_VALUE' self._usage_unit = usage_unit diff --git a/src/oci/opsi/models/summarize_host_insight_resource_usage_trend_aggregation_collection.py b/src/oci/opsi/models/summarize_host_insight_resource_usage_trend_aggregation_collection.py index 1885e2dc74..6db4bfa2de 100644 --- a/src/oci/opsi/models/summarize_host_insight_resource_usage_trend_aggregation_collection.py +++ b/src/oci/opsi/models/summarize_host_insight_resource_usage_trend_aggregation_collection.py @@ -37,6 +37,10 @@ class SummarizeHostInsightResourceUsageTrendAggregationCollection(object): #: This constant has a value of "MBPS" USAGE_UNIT_MBPS = "MBPS" + #: A constant which can be used with the usage_unit property of a SummarizeHostInsightResourceUsageTrendAggregationCollection. + #: This constant has a value of "IOPS" + USAGE_UNIT_IOPS = "IOPS" + #: A constant which can be used with the usage_unit property of a SummarizeHostInsightResourceUsageTrendAggregationCollection. #: This constant has a value of "PERCENT" USAGE_UNIT_PERCENT = "PERCENT" @@ -62,7 +66,7 @@ def __init__(self, **kwargs): :param usage_unit: The value to assign to the usage_unit property of this SummarizeHostInsightResourceUsageTrendAggregationCollection. - Allowed values for this property are: "CORES", "GB", "MBPS", "PERCENT", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "CORES", "GB", "MBPS", "IOPS", "PERCENT", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type usage_unit: str @@ -184,7 +188,7 @@ def usage_unit(self): **[Required]** Gets the usage_unit of this SummarizeHostInsightResourceUsageTrendAggregationCollection. Displays usage unit (CORES, GB) - Allowed values for this property are: "CORES", "GB", "MBPS", "PERCENT", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "CORES", "GB", "MBPS", "IOPS", "PERCENT", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. @@ -203,7 +207,7 @@ def usage_unit(self, usage_unit): :param usage_unit: The usage_unit of this SummarizeHostInsightResourceUsageTrendAggregationCollection. :type: str """ - allowed_values = ["CORES", "GB", "MBPS", "PERCENT"] + allowed_values = ["CORES", "GB", "MBPS", "IOPS", "PERCENT"] if not value_allowed_none_or_none_sentinel(usage_unit, allowed_values): usage_unit = 'UNKNOWN_ENUM_VALUE' self._usage_unit = usage_unit diff --git a/src/oci/opsi/models/update_em_managed_external_exadata_insight_details.py b/src/oci/opsi/models/update_em_managed_external_exadata_insight_details.py new file mode 100644 index 0000000000..bf982a4a90 --- /dev/null +++ b/src/oci/opsi/models/update_em_managed_external_exadata_insight_details.py @@ -0,0 +1,94 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .update_exadata_insight_details import UpdateExadataInsightDetails +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 UpdateEmManagedExternalExadataInsightDetails(UpdateExadataInsightDetails): + """ + The information to be updated. + """ + + def __init__(self, **kwargs): + """ + Initializes a new UpdateEmManagedExternalExadataInsightDetails object with values from keyword arguments. The default value of the :py:attr:`~oci.opsi.models.UpdateEmManagedExternalExadataInsightDetails.entity_source` attribute + of this class is ``EM_MANAGED_EXTERNAL_EXADATA`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param entity_source: + The value to assign to the entity_source property of this UpdateEmManagedExternalExadataInsightDetails. + Allowed values for this property are: "EM_MANAGED_EXTERNAL_EXADATA" + :type entity_source: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this UpdateEmManagedExternalExadataInsightDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this UpdateEmManagedExternalExadataInsightDetails. + :type defined_tags: dict(str, dict(str, object)) + + :param is_auto_sync_enabled: + The value to assign to the is_auto_sync_enabled property of this UpdateEmManagedExternalExadataInsightDetails. + :type is_auto_sync_enabled: bool + + """ + self.swagger_types = { + 'entity_source': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'is_auto_sync_enabled': 'bool' + } + + self.attribute_map = { + 'entity_source': 'entitySource', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'is_auto_sync_enabled': 'isAutoSyncEnabled' + } + + self._entity_source = None + self._freeform_tags = None + self._defined_tags = None + self._is_auto_sync_enabled = None + self._entity_source = 'EM_MANAGED_EXTERNAL_EXADATA' + + @property + def is_auto_sync_enabled(self): + """ + Gets the is_auto_sync_enabled of this UpdateEmManagedExternalExadataInsightDetails. + Set to true to enable automatic enablement and disablement of related targets from Enterprise Manager. New resources (e.g. Database Insights) will be placed in the same compartment as the related Exadata Insight. + + + :return: The is_auto_sync_enabled of this UpdateEmManagedExternalExadataInsightDetails. + :rtype: bool + """ + return self._is_auto_sync_enabled + + @is_auto_sync_enabled.setter + def is_auto_sync_enabled(self, is_auto_sync_enabled): + """ + Sets the is_auto_sync_enabled of this UpdateEmManagedExternalExadataInsightDetails. + Set to true to enable automatic enablement and disablement of related targets from Enterprise Manager. New resources (e.g. Database Insights) will be placed in the same compartment as the related Exadata Insight. + + + :param is_auto_sync_enabled: The is_auto_sync_enabled of this UpdateEmManagedExternalExadataInsightDetails. + :type: bool + """ + self._is_auto_sync_enabled = is_auto_sync_enabled + + 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/opsi/models/update_em_managed_external_host_insight_details.py b/src/oci/opsi/models/update_em_managed_external_host_insight_details.py new file mode 100644 index 0000000000..c28b2d956c --- /dev/null +++ b/src/oci/opsi/models/update_em_managed_external_host_insight_details.py @@ -0,0 +1,63 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .update_host_insight_details import UpdateHostInsightDetails +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 UpdateEmManagedExternalHostInsightDetails(UpdateHostInsightDetails): + """ + The information to be updated. + """ + + def __init__(self, **kwargs): + """ + Initializes a new UpdateEmManagedExternalHostInsightDetails object with values from keyword arguments. The default value of the :py:attr:`~oci.opsi.models.UpdateEmManagedExternalHostInsightDetails.entity_source` attribute + of this class is ``EM_MANAGED_EXTERNAL_HOST`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param entity_source: + The value to assign to the entity_source property of this UpdateEmManagedExternalHostInsightDetails. + Allowed values for this property are: "MACS_MANAGED_EXTERNAL_HOST", "EM_MANAGED_EXTERNAL_HOST" + :type entity_source: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this UpdateEmManagedExternalHostInsightDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this UpdateEmManagedExternalHostInsightDetails. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'entity_source': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'entity_source': 'entitySource', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._entity_source = None + self._freeform_tags = None + self._defined_tags = None + self._entity_source = 'EM_MANAGED_EXTERNAL_HOST' + + 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/opsi/models/update_exadata_insight_details.py b/src/oci/opsi/models/update_exadata_insight_details.py new file mode 100644 index 0000000000..4d07d0451d --- /dev/null +++ b/src/oci/opsi/models/update_exadata_insight_details.py @@ -0,0 +1,166 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 UpdateExadataInsightDetails(object): + """ + The information to be updated. + """ + + #: A constant which can be used with the entity_source property of a UpdateExadataInsightDetails. + #: This constant has a value of "EM_MANAGED_EXTERNAL_EXADATA" + ENTITY_SOURCE_EM_MANAGED_EXTERNAL_EXADATA = "EM_MANAGED_EXTERNAL_EXADATA" + + def __init__(self, **kwargs): + """ + Initializes a new UpdateExadataInsightDetails object with values from keyword arguments. This class has the following subclasses and if you are using this class as input + to a service operations then you should favor using a subclass over the base class: + + * :class:`~oci.opsi.models.UpdateEmManagedExternalExadataInsightDetails` + + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param entity_source: + The value to assign to the entity_source property of this UpdateExadataInsightDetails. + Allowed values for this property are: "EM_MANAGED_EXTERNAL_EXADATA" + :type entity_source: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this UpdateExadataInsightDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this UpdateExadataInsightDetails. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'entity_source': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'entity_source': 'entitySource', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._entity_source = None + self._freeform_tags = None + self._defined_tags = None + + @staticmethod + def get_subtype(object_dictionary): + """ + Given the hash representation of a subtype of this class, + use the info in the hash to return the class of the subtype. + """ + type = object_dictionary['entitySource'] + + if type == 'EM_MANAGED_EXTERNAL_EXADATA': + return 'UpdateEmManagedExternalExadataInsightDetails' + else: + return 'UpdateExadataInsightDetails' + + @property + def entity_source(self): + """ + **[Required]** Gets the entity_source of this UpdateExadataInsightDetails. + Source of the Exadata system. + + Allowed values for this property are: "EM_MANAGED_EXTERNAL_EXADATA" + + + :return: The entity_source of this UpdateExadataInsightDetails. + :rtype: str + """ + return self._entity_source + + @entity_source.setter + def entity_source(self, entity_source): + """ + Sets the entity_source of this UpdateExadataInsightDetails. + Source of the Exadata system. + + + :param entity_source: The entity_source of this UpdateExadataInsightDetails. + :type: str + """ + allowed_values = ["EM_MANAGED_EXTERNAL_EXADATA"] + if not value_allowed_none_or_none_sentinel(entity_source, allowed_values): + raise ValueError( + "Invalid value for `entity_source`, must be None or one of {0}" + .format(allowed_values) + ) + self._entity_source = entity_source + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this UpdateExadataInsightDetails. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + Example: `{\"bar-key\": \"value\"}` + + + :return: The freeform_tags of this UpdateExadataInsightDetails. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this UpdateExadataInsightDetails. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + Example: `{\"bar-key\": \"value\"}` + + + :param freeform_tags: The freeform_tags of this UpdateExadataInsightDetails. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this UpdateExadataInsightDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. + Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + + :return: The defined_tags of this UpdateExadataInsightDetails. + :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 UpdateExadataInsightDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. + Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + + :param defined_tags: The defined_tags of this UpdateExadataInsightDetails. + :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/opsi/models/update_host_insight_details.py b/src/oci/opsi/models/update_host_insight_details.py index cd41eeb0a5..59de5b2d64 100644 --- a/src/oci/opsi/models/update_host_insight_details.py +++ b/src/oci/opsi/models/update_host_insight_details.py @@ -17,18 +17,23 @@ class UpdateHostInsightDetails(object): #: This constant has a value of "MACS_MANAGED_EXTERNAL_HOST" ENTITY_SOURCE_MACS_MANAGED_EXTERNAL_HOST = "MACS_MANAGED_EXTERNAL_HOST" + #: A constant which can be used with the entity_source property of a UpdateHostInsightDetails. + #: This constant has a value of "EM_MANAGED_EXTERNAL_HOST" + ENTITY_SOURCE_EM_MANAGED_EXTERNAL_HOST = "EM_MANAGED_EXTERNAL_HOST" + def __init__(self, **kwargs): """ Initializes a new UpdateHostInsightDetails object with values from keyword arguments. This class has the following subclasses and if you are using this class as input to a service operations then you should favor using a subclass over the base class: + * :class:`~oci.opsi.models.UpdateEmManagedExternalHostInsightDetails` * :class:`~oci.opsi.models.UpdateMacsManagedExternalHostInsightDetails` The following keyword arguments are supported (corresponding to the getters/setters of this class): :param entity_source: The value to assign to the entity_source property of this UpdateHostInsightDetails. - Allowed values for this property are: "MACS_MANAGED_EXTERNAL_HOST" + Allowed values for this property are: "MACS_MANAGED_EXTERNAL_HOST", "EM_MANAGED_EXTERNAL_HOST" :type entity_source: str :param freeform_tags: @@ -64,6 +69,9 @@ def get_subtype(object_dictionary): """ type = object_dictionary['entitySource'] + if type == 'EM_MANAGED_EXTERNAL_HOST': + return 'UpdateEmManagedExternalHostInsightDetails' + if type == 'MACS_MANAGED_EXTERNAL_HOST': return 'UpdateMacsManagedExternalHostInsightDetails' else: @@ -75,7 +83,7 @@ def entity_source(self): **[Required]** Gets the entity_source of this UpdateHostInsightDetails. Source of the host entity. - Allowed values for this property are: "MACS_MANAGED_EXTERNAL_HOST" + Allowed values for this property are: "MACS_MANAGED_EXTERNAL_HOST", "EM_MANAGED_EXTERNAL_HOST" :return: The entity_source of this UpdateHostInsightDetails. @@ -93,7 +101,7 @@ def entity_source(self, entity_source): :param entity_source: The entity_source of this UpdateHostInsightDetails. :type: str """ - allowed_values = ["MACS_MANAGED_EXTERNAL_HOST"] + allowed_values = ["MACS_MANAGED_EXTERNAL_HOST", "EM_MANAGED_EXTERNAL_HOST"] if not value_allowed_none_or_none_sentinel(entity_source, allowed_values): raise ValueError( "Invalid value for `entity_source`, must be None or one of {0}" diff --git a/src/oci/opsi/models/update_macs_managed_external_host_insight_details.py b/src/oci/opsi/models/update_macs_managed_external_host_insight_details.py index 682610663b..27273a3c13 100644 --- a/src/oci/opsi/models/update_macs_managed_external_host_insight_details.py +++ b/src/oci/opsi/models/update_macs_managed_external_host_insight_details.py @@ -21,7 +21,7 @@ def __init__(self, **kwargs): :param entity_source: The value to assign to the entity_source property of this UpdateMacsManagedExternalHostInsightDetails. - Allowed values for this property are: "MACS_MANAGED_EXTERNAL_HOST" + Allowed values for this property are: "MACS_MANAGED_EXTERNAL_HOST", "EM_MANAGED_EXTERNAL_HOST" :type entity_source: str :param freeform_tags: diff --git a/src/oci/opsi/models/work_request.py b/src/oci/opsi/models/work_request.py index 25a8d30cb1..31cef983e6 100644 --- a/src/oci/opsi/models/work_request.py +++ b/src/oci/opsi/models/work_request.py @@ -77,6 +77,38 @@ class WorkRequest(object): #: This constant has a value of "DELETE_HOST_INSIGHT" OPERATION_TYPE_DELETE_HOST_INSIGHT = "DELETE_HOST_INSIGHT" + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "CREATE_EXADATA_INSIGHT" + OPERATION_TYPE_CREATE_EXADATA_INSIGHT = "CREATE_EXADATA_INSIGHT" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "ENABLE_EXADATA_INSIGHT" + OPERATION_TYPE_ENABLE_EXADATA_INSIGHT = "ENABLE_EXADATA_INSIGHT" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "DISABLE_EXADATA_INSIGHT" + OPERATION_TYPE_DISABLE_EXADATA_INSIGHT = "DISABLE_EXADATA_INSIGHT" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "UPDATE_EXADATA_INSIGHT" + OPERATION_TYPE_UPDATE_EXADATA_INSIGHT = "UPDATE_EXADATA_INSIGHT" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "MOVE_EXADATA_INSIGHT" + OPERATION_TYPE_MOVE_EXADATA_INSIGHT = "MOVE_EXADATA_INSIGHT" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "DELETE_EXADATA_INSIGHT" + OPERATION_TYPE_DELETE_EXADATA_INSIGHT = "DELETE_EXADATA_INSIGHT" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "ADD_EXADATA_INSIGHT_MEMBERS" + OPERATION_TYPE_ADD_EXADATA_INSIGHT_MEMBERS = "ADD_EXADATA_INSIGHT_MEMBERS" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "EXADATA_AUTO_SYNC" + OPERATION_TYPE_EXADATA_AUTO_SYNC = "EXADATA_AUTO_SYNC" + #: A constant which can be used with the status property of a WorkRequest. #: This constant has a value of "ACCEPTED" STATUS_ACCEPTED = "ACCEPTED" @@ -85,6 +117,10 @@ class WorkRequest(object): #: 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 "WAITING" + STATUS_WAITING = "WAITING" + #: A constant which can be used with the status property of a WorkRequest. #: This constant has a value of "FAILED" STATUS_FAILED = "FAILED" @@ -108,13 +144,13 @@ def __init__(self, **kwargs): :param operation_type: The value to assign to the operation_type property of this WorkRequest. - Allowed values for this property are: "ENABLE_DATABASE_INSIGHT", "DISABLE_DATABASE_INSIGHT", "UPDATE_DATABASE_INSIGHT", "CREATE_DATABASE_INSIGHT", "MOVE_DATABASE_INSIGHT", "DELETE_DATABASE_INSIGHT", "CREATE_ENTERPRISE_MANAGER_BRIDGE", "UDPATE_ENTERPRISE_MANAGER_BRIDGE", "MOVE_ENTERPRISE_MANAGER_BRIDGE", "DELETE_ENTERPRISE_MANAGER_BRIDGE", "ENABLE_HOST_INSIGHT", "DISABLE_HOST_INSIGHT", "UPDATE_HOST_INSIGHT", "CREATE_HOST_INSIGHT", "MOVE_HOST_INSIGHT", "DELETE_HOST_INSIGHT", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "ENABLE_DATABASE_INSIGHT", "DISABLE_DATABASE_INSIGHT", "UPDATE_DATABASE_INSIGHT", "CREATE_DATABASE_INSIGHT", "MOVE_DATABASE_INSIGHT", "DELETE_DATABASE_INSIGHT", "CREATE_ENTERPRISE_MANAGER_BRIDGE", "UDPATE_ENTERPRISE_MANAGER_BRIDGE", "MOVE_ENTERPRISE_MANAGER_BRIDGE", "DELETE_ENTERPRISE_MANAGER_BRIDGE", "ENABLE_HOST_INSIGHT", "DISABLE_HOST_INSIGHT", "UPDATE_HOST_INSIGHT", "CREATE_HOST_INSIGHT", "MOVE_HOST_INSIGHT", "DELETE_HOST_INSIGHT", "CREATE_EXADATA_INSIGHT", "ENABLE_EXADATA_INSIGHT", "DISABLE_EXADATA_INSIGHT", "UPDATE_EXADATA_INSIGHT", "MOVE_EXADATA_INSIGHT", "DELETE_EXADATA_INSIGHT", "ADD_EXADATA_INSIGHT_MEMBERS", "EXADATA_AUTO_SYNC", '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'. + Allowed values for this property are: "ACCEPTED", "IN_PROGRESS", "WAITING", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type status: str @@ -187,7 +223,7 @@ def operation_type(self): **[Required]** Gets the operation_type of this WorkRequest. Type of the work request - Allowed values for this property are: "ENABLE_DATABASE_INSIGHT", "DISABLE_DATABASE_INSIGHT", "UPDATE_DATABASE_INSIGHT", "CREATE_DATABASE_INSIGHT", "MOVE_DATABASE_INSIGHT", "DELETE_DATABASE_INSIGHT", "CREATE_ENTERPRISE_MANAGER_BRIDGE", "UDPATE_ENTERPRISE_MANAGER_BRIDGE", "MOVE_ENTERPRISE_MANAGER_BRIDGE", "DELETE_ENTERPRISE_MANAGER_BRIDGE", "ENABLE_HOST_INSIGHT", "DISABLE_HOST_INSIGHT", "UPDATE_HOST_INSIGHT", "CREATE_HOST_INSIGHT", "MOVE_HOST_INSIGHT", "DELETE_HOST_INSIGHT", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "ENABLE_DATABASE_INSIGHT", "DISABLE_DATABASE_INSIGHT", "UPDATE_DATABASE_INSIGHT", "CREATE_DATABASE_INSIGHT", "MOVE_DATABASE_INSIGHT", "DELETE_DATABASE_INSIGHT", "CREATE_ENTERPRISE_MANAGER_BRIDGE", "UDPATE_ENTERPRISE_MANAGER_BRIDGE", "MOVE_ENTERPRISE_MANAGER_BRIDGE", "DELETE_ENTERPRISE_MANAGER_BRIDGE", "ENABLE_HOST_INSIGHT", "DISABLE_HOST_INSIGHT", "UPDATE_HOST_INSIGHT", "CREATE_HOST_INSIGHT", "MOVE_HOST_INSIGHT", "DELETE_HOST_INSIGHT", "CREATE_EXADATA_INSIGHT", "ENABLE_EXADATA_INSIGHT", "DISABLE_EXADATA_INSIGHT", "UPDATE_EXADATA_INSIGHT", "MOVE_EXADATA_INSIGHT", "DELETE_EXADATA_INSIGHT", "ADD_EXADATA_INSIGHT_MEMBERS", "EXADATA_AUTO_SYNC", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. @@ -206,7 +242,7 @@ def operation_type(self, operation_type): :param operation_type: The operation_type of this WorkRequest. :type: str """ - allowed_values = ["ENABLE_DATABASE_INSIGHT", "DISABLE_DATABASE_INSIGHT", "UPDATE_DATABASE_INSIGHT", "CREATE_DATABASE_INSIGHT", "MOVE_DATABASE_INSIGHT", "DELETE_DATABASE_INSIGHT", "CREATE_ENTERPRISE_MANAGER_BRIDGE", "UDPATE_ENTERPRISE_MANAGER_BRIDGE", "MOVE_ENTERPRISE_MANAGER_BRIDGE", "DELETE_ENTERPRISE_MANAGER_BRIDGE", "ENABLE_HOST_INSIGHT", "DISABLE_HOST_INSIGHT", "UPDATE_HOST_INSIGHT", "CREATE_HOST_INSIGHT", "MOVE_HOST_INSIGHT", "DELETE_HOST_INSIGHT"] + allowed_values = ["ENABLE_DATABASE_INSIGHT", "DISABLE_DATABASE_INSIGHT", "UPDATE_DATABASE_INSIGHT", "CREATE_DATABASE_INSIGHT", "MOVE_DATABASE_INSIGHT", "DELETE_DATABASE_INSIGHT", "CREATE_ENTERPRISE_MANAGER_BRIDGE", "UDPATE_ENTERPRISE_MANAGER_BRIDGE", "MOVE_ENTERPRISE_MANAGER_BRIDGE", "DELETE_ENTERPRISE_MANAGER_BRIDGE", "ENABLE_HOST_INSIGHT", "DISABLE_HOST_INSIGHT", "UPDATE_HOST_INSIGHT", "CREATE_HOST_INSIGHT", "MOVE_HOST_INSIGHT", "DELETE_HOST_INSIGHT", "CREATE_EXADATA_INSIGHT", "ENABLE_EXADATA_INSIGHT", "DISABLE_EXADATA_INSIGHT", "UPDATE_EXADATA_INSIGHT", "MOVE_EXADATA_INSIGHT", "DELETE_EXADATA_INSIGHT", "ADD_EXADATA_INSIGHT_MEMBERS", "EXADATA_AUTO_SYNC"] if not value_allowed_none_or_none_sentinel(operation_type, allowed_values): operation_type = 'UNKNOWN_ENUM_VALUE' self._operation_type = operation_type @@ -217,7 +253,7 @@ def status(self): **[Required]** Gets the status of this WorkRequest. Status of current work request. - Allowed values for this property are: "ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "ACCEPTED", "IN_PROGRESS", "WAITING", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. @@ -236,7 +272,7 @@ def status(self, status): :param status: The status of this WorkRequest. :type: str """ - allowed_values = ["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED"] + allowed_values = ["ACCEPTED", "IN_PROGRESS", "WAITING", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED"] if not value_allowed_none_or_none_sentinel(status, allowed_values): status = 'UNKNOWN_ENUM_VALUE' self._status = status diff --git a/src/oci/opsi/models/work_request_resource.py b/src/oci/opsi/models/work_request_resource.py index 7cf3e57d1c..dfa78b3bd2 100644 --- a/src/oci/opsi/models/work_request_resource.py +++ b/src/oci/opsi/models/work_request_resource.py @@ -33,6 +33,10 @@ class WorkRequestResource(object): #: 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 "FAILED" + ACTION_TYPE_FAILED = "FAILED" + def __init__(self, **kwargs): """ Initializes a new WorkRequestResource object with values from keyword arguments. @@ -44,7 +48,7 @@ def __init__(self, **kwargs): :param action_type: The value to assign to the action_type property of this WorkRequestResource. - Allowed values for this property are: "CREATED", "UPDATED", "DELETED", "IN_PROGRESS", "RELATED", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "CREATED", "UPDATED", "DELETED", "IN_PROGRESS", "RELATED", "FAILED", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type action_type: str @@ -56,25 +60,32 @@ def __init__(self, **kwargs): The value to assign to the entity_uri property of this WorkRequestResource. :type entity_uri: str + :param metadata: + The value to assign to the metadata property of this WorkRequestResource. + :type metadata: dict(str, str) + """ self.swagger_types = { 'entity_type': 'str', 'action_type': 'str', 'identifier': 'str', - 'entity_uri': 'str' + 'entity_uri': 'str', + 'metadata': 'dict(str, str)' } self.attribute_map = { 'entity_type': 'entityType', 'action_type': 'actionType', 'identifier': 'identifier', - 'entity_uri': 'entityUri' + 'entity_uri': 'entityUri', + 'metadata': 'metadata' } self._entity_type = None self._action_type = None self._identifier = None self._entity_uri = None + self._metadata = None @property def entity_type(self): @@ -109,7 +120,7 @@ def action_type(self): work is complete for that resource at which point it will transition to CREATED, UPDATED, or DELETED, respectively. - Allowed values for this property are: "CREATED", "UPDATED", "DELETED", "IN_PROGRESS", "RELATED", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "CREATED", "UPDATED", "DELETED", "IN_PROGRESS", "RELATED", "FAILED", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. @@ -131,7 +142,7 @@ def action_type(self, action_type): :param action_type: The action_type of this WorkRequestResource. :type: str """ - allowed_values = ["CREATED", "UPDATED", "DELETED", "IN_PROGRESS", "RELATED"] + allowed_values = ["CREATED", "UPDATED", "DELETED", "IN_PROGRESS", "RELATED", "FAILED"] if not value_allowed_none_or_none_sentinel(action_type, allowed_values): action_type = 'UNKNOWN_ENUM_VALUE' self._action_type = action_type @@ -184,6 +195,30 @@ def entity_uri(self, entity_uri): """ self._entity_uri = entity_uri + @property + def metadata(self): + """ + Gets the metadata of this WorkRequestResource. + Additional information that helps to explain the resource. + + + :return: The metadata of this WorkRequestResource. + :rtype: dict(str, str) + """ + return self._metadata + + @metadata.setter + def metadata(self, metadata): + """ + Sets the metadata of this WorkRequestResource. + Additional information that helps to explain the resource. + + + :param metadata: The metadata of this WorkRequestResource. + :type: dict(str, str) + """ + self._metadata = metadata + def __repr__(self): return formatted_flat_dict(self) diff --git a/src/oci/opsi/operations_insights_client.py b/src/oci/opsi/operations_insights_client.py index 46b22cddda..2a20c774d9 100644 --- a/src/oci/opsi/operations_insights_client.py +++ b/src/oci/opsi/operations_insights_client.py @@ -98,6 +98,107 @@ def __init__(self, config, **kwargs): self.retry_strategy = kwargs.get('retry_strategy') self.circuit_breaker_callback = kwargs.get('circuit_breaker_callback') + def add_exadata_insight_members(self, add_exadata_insight_members_details, exadata_insight_id, **kwargs): + """ + Add new members (e.g. databases and hosts) to an Exadata system in Operations Insights. Exadata-related metric collection and analysis will be started. + + + :param oci.opsi.models.AddExadataInsightMembersDetails add_exadata_insight_members_details: (required) + Details for the members (e.g. databases and hosts) of an Exadata system to be added in Operations Insights. + + :param str exadata_insight_id: (required) + Unique Exadata insight identifier + + :param str if_match: (optional) + Used for optimistic concurrency control. In the update or delete call for a resource, set the `if-match` + parameter to the value of the etag from a previous get, create, or update 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 that can be retried in case of a timeout or + server error without risk of executing the same action again. Retry tokens expire after 24 + hours. + + *Note:* Retry tokens can be invalidated before the 24 hour time limit due to conflicting + operations, such as a resource being deleted or purged from the system. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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` + + :example: + Click `here `__ to see an example of how to use add_exadata_insight_members API. + """ + resource_path = "/exadataInsights/{exadataInsightId}/actions/addMembers" + 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( + "add_exadata_insight_members got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "exadataInsightId": exadata_insight_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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + 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=add_exadata_insight_members_details) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=add_exadata_insight_members_details) + def change_database_insight_compartment(self, database_insight_id, change_database_insight_compartment_details, **kwargs): """ Moves a DatabaseInsight resource from one compartment identifier to another. When provided, If-Match is checked against ETag values of the resource. @@ -289,6 +390,107 @@ def change_enterprise_manager_bridge_compartment(self, enterprise_manager_bridge header_params=header_params, body=change_enterprise_manager_bridge_compartment_details) + def change_exadata_insight_compartment(self, exadata_insight_id, change_exadata_insight_compartment_details, **kwargs): + """ + Moves an Exadata insight resource from one compartment identifier to another. When provided, If-Match is checked against ETag values of the resource. + + + :param str exadata_insight_id: (required) + Unique Exadata insight identifier + + :param oci.opsi.models.ChangeExadataInsightCompartmentDetails change_exadata_insight_compartment_details: (required) + The information to be updated. + + :param str if_match: (optional) + Used for optimistic concurrency control. In the update or delete call for a resource, set the `if-match` + parameter to the value of the etag from a previous get, create, or update 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 that can be retried in case of a timeout or + server error without risk of executing the same action again. Retry tokens expire after 24 + hours. + + *Note:* Retry tokens can be invalidated before the 24 hour time limit due to conflicting + operations, such as a resource being deleted or purged from the system. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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` + + :example: + Click `here `__ to see an example of how to use change_exadata_insight_compartment API. + """ + resource_path = "/exadataInsights/{exadataInsightId}/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_exadata_insight_compartment got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "exadataInsightId": exadata_insight_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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + 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_exadata_insight_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_exadata_insight_compartment_details) + def change_host_insight_compartment(self, host_insight_id, change_host_insight_compartment_details, **kwargs): """ Moves a HostInsight resource from one compartment identifier to another. When provided, If-Match is checked against ETag values of the resource. @@ -552,6 +754,87 @@ def create_enterprise_manager_bridge(self, create_enterprise_manager_bridge_deta body=create_enterprise_manager_bridge_details, response_type="EnterpriseManagerBridge") + def create_exadata_insight(self, create_exadata_insight_details, **kwargs): + """ + Create an Exadata insight resource for an Exadata system in Operations Insights. The Exadata system will be enabled in Operations Insights. Exadata-related metric collection and analysis will be started. + + + :param oci.opsi.models.CreateExadataInsightDetails create_exadata_insight_details: (required) + Details for the Exadata system for which an Exadata insight resource will be created in Operations Insights. + + :param str opc_retry_token: (optional) + A token that uniquely identifies a request that can be retried in case of a timeout or + server error without risk of executing the same action again. Retry tokens expire after 24 + hours. + + *Note:* Retry tokens can be invalidated before the 24 hour time limit due to conflicting + operations, such as a resource being deleted or purged from the system. + + :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. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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.opsi.models.ExadataInsight` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use create_exadata_insight API. + """ + resource_path = "/exadataInsights" + method = "POST" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "opc_retry_token", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "create_exadata_insight got unknown kwargs: {!r}".format(extra_kwargs)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-retry-token": kwargs.get("opc_retry_token", 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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + header_params=header_params, + body=create_exadata_insight_details, + response_type="ExadataInsight") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + header_params=header_params, + body=create_exadata_insight_details, + response_type="ExadataInsight") + def create_host_insight(self, create_host_insight_details, **kwargs): """ Create a Host Insight resource for a host in Operations Insights. The host will be enabled in Operations Insights. Host metric collection and analysis will be started. @@ -803,13 +1086,13 @@ def delete_enterprise_manager_bridge(self, enterprise_manager_bridge_id, **kwarg path_params=path_params, header_params=header_params) - def delete_host_insight(self, host_insight_id, **kwargs): + def delete_exadata_insight(self, exadata_insight_id, **kwargs): """ - Deletes a host insight. The host insight will be deleted and cannot be enabled again. + Deletes an Exadata insight. The Exadata insight will be deleted and cannot be enabled again. - :param str host_insight_id: (required) - Unique host insight identifier + :param str exadata_insight_id: (required) + Unique Exadata insight identifier :param str if_match: (optional) Used for optimistic concurrency control. In the update or delete call for a resource, set the `if-match` @@ -832,9 +1115,9 @@ def delete_host_insight(self, host_insight_id, **kwargs): :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use delete_host_insight API. + Click `here `__ to see an example of how to use delete_exadata_insight API. """ - resource_path = "/hostInsights/{hostInsightId}" + resource_path = "/exadataInsights/{exadataInsightId}" method = "DELETE" # Don't accept unknown kwargs @@ -846,10 +1129,10 @@ def delete_host_insight(self, host_insight_id, **kwargs): extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "delete_host_insight got unknown kwargs: {!r}".format(extra_kwargs)) + "delete_exadata_insight got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { - "hostInsightId": host_insight_id + "exadataInsightId": exadata_insight_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -888,13 +1171,13 @@ def delete_host_insight(self, host_insight_id, **kwargs): path_params=path_params, header_params=header_params) - def disable_database_insight(self, database_insight_id, **kwargs): + def delete_host_insight(self, host_insight_id, **kwargs): """ - Disables a database in Operations Insights. Database metric collection and analysis will be stopped. + Deletes a host insight. The host insight will be deleted and cannot be enabled again. - :param str database_insight_id: (required) - Unique database insight identifier + :param str host_insight_id: (required) + Unique host insight identifier :param str if_match: (optional) Used for optimistic concurrency control. In the update or delete call for a resource, set the `if-match` @@ -905,14 +1188,6 @@ def disable_database_insight(self, database_insight_id, **kwargs): 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 that can be retried in case of a timeout or - server error without risk of executing the same action again. Retry tokens expire after 24 - hours. - - *Note:* Retry tokens can be invalidated before the 24 hour time limit due to conflicting - operations, such as a resource being deleted or purged from the system. - :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. @@ -925,25 +1200,24 @@ def disable_database_insight(self, database_insight_id, **kwargs): :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use disable_database_insight API. + Click `here `__ to see an example of how to use delete_host_insight API. """ - resource_path = "/databaseInsights/{databaseInsightId}/actions/disable" - method = "POST" + resource_path = "/hostInsights/{hostInsightId}" + method = "DELETE" # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", "if_match", - "opc_request_id", - "opc_retry_token" + "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "disable_database_insight got unknown kwargs: {!r}".format(extra_kwargs)) + "delete_host_insight got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { - "databaseInsightId": database_insight_id + "hostInsightId": host_insight_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -956,8 +1230,7 @@ def disable_database_insight(self, database_insight_id, **kwargs): "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) + "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} @@ -968,7 +1241,6 @@ def disable_database_insight(self, database_insight_id, **kwargs): if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): - self.base_client.add_opc_retry_token_if_needed(header_params) self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( @@ -984,13 +1256,13 @@ def disable_database_insight(self, database_insight_id, **kwargs): path_params=path_params, header_params=header_params) - def disable_host_insight(self, host_insight_id, **kwargs): + def disable_database_insight(self, database_insight_id, **kwargs): """ - Disables a host in Operations Insights. Host metric collection and analysis will be stopped. + Disables a database in Operations Insights. Database metric collection and analysis will be stopped. - :param str host_insight_id: (required) - Unique host insight identifier + :param str database_insight_id: (required) + Unique database insight identifier :param str if_match: (optional) Used for optimistic concurrency control. In the update or delete call for a resource, set the `if-match` @@ -1021,9 +1293,9 @@ def disable_host_insight(self, host_insight_id, **kwargs): :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use disable_host_insight API. + Click `here `__ to see an example of how to use disable_database_insight API. """ - resource_path = "/hostInsights/{hostInsightId}/actions/disable" + resource_path = "/databaseInsights/{databaseInsightId}/actions/disable" method = "POST" # Don't accept unknown kwargs @@ -1036,10 +1308,10 @@ def disable_host_insight(self, host_insight_id, **kwargs): extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "disable_host_insight got unknown kwargs: {!r}".format(extra_kwargs)) + "disable_database_insight got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { - "hostInsightId": host_insight_id + "databaseInsightId": database_insight_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -1080,16 +1352,13 @@ def disable_host_insight(self, host_insight_id, **kwargs): path_params=path_params, header_params=header_params) - def enable_database_insight(self, enable_database_insight_details, database_insight_id, **kwargs): + def disable_exadata_insight(self, exadata_insight_id, **kwargs): """ - Enables a database in Operations Insights. Database metric collection and analysis will be started. - + Disables an Exadata system in Operations Insights. Exadata-related metric collection and analysis will be stopped. - :param oci.opsi.models.EnableDatabaseInsightDetails enable_database_insight_details: (required) - Details for the database to be enabled in Operations Insights. - :param str database_insight_id: (required) - Unique database insight identifier + :param str exadata_insight_id: (required) + Unique Exadata insight identifier :param str if_match: (optional) Used for optimistic concurrency control. In the update or delete call for a resource, set the `if-match` @@ -1120,9 +1389,9 @@ def enable_database_insight(self, enable_database_insight_details, database_insi :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use enable_database_insight API. + Click `here `__ to see an example of how to use disable_exadata_insight API. """ - resource_path = "/databaseInsights/{databaseInsightId}/actions/enable" + resource_path = "/exadataInsights/{exadataInsightId}/actions/disable" method = "POST" # Don't accept unknown kwargs @@ -1135,10 +1404,10 @@ def enable_database_insight(self, enable_database_insight_details, database_insi extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "enable_database_insight got unknown kwargs: {!r}".format(extra_kwargs)) + "disable_exadata_insight got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { - "databaseInsightId": database_insight_id + "exadataInsightId": exadata_insight_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -1171,23 +1440,18 @@ def enable_database_insight(self, enable_database_insight_details, database_insi resource_path=resource_path, method=method, path_params=path_params, - header_params=header_params, - body=enable_database_insight_details) + 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, - body=enable_database_insight_details) + header_params=header_params) - def enable_host_insight(self, enable_host_insight_details, host_insight_id, **kwargs): + def disable_host_insight(self, host_insight_id, **kwargs): """ - Enables a host in Operations Insights. Host metric collection and analysis will be started. - + Disables a host in Operations Insights. Host metric collection and analysis will be stopped. - :param oci.opsi.models.EnableHostInsightDetails enable_host_insight_details: (required) - Details for the host to be enabled in Operations Insights. :param str host_insight_id: (required) Unique host insight identifier @@ -1221,9 +1485,9 @@ def enable_host_insight(self, enable_host_insight_details, host_insight_id, **kw :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use enable_host_insight API. + Click `here `__ to see an example of how to use disable_host_insight API. """ - resource_path = "/hostInsights/{hostInsightId}/actions/enable" + resource_path = "/hostInsights/{hostInsightId}/actions/disable" method = "POST" # Don't accept unknown kwargs @@ -1236,7 +1500,7 @@ def enable_host_insight(self, enable_host_insight_details, host_insight_id, **kw extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "enable_host_insight got unknown kwargs: {!r}".format(extra_kwargs)) + "disable_host_insight got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "hostInsightId": host_insight_id @@ -1272,28 +1536,42 @@ def enable_host_insight(self, enable_host_insight_details, host_insight_id, **kw resource_path=resource_path, method=method, path_params=path_params, - header_params=header_params, - body=enable_host_insight_details) + 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, - body=enable_host_insight_details) + header_params=header_params) - def get_database_insight(self, database_insight_id, **kwargs): + def enable_database_insight(self, enable_database_insight_details, database_insight_id, **kwargs): """ - Gets details of a database insight. + Enables a database in Operations Insights. Database metric collection and analysis will be started. + + :param oci.opsi.models.EnableDatabaseInsightDetails enable_database_insight_details: (required) + Details for the database to be enabled in Operations Insights. :param str database_insight_id: (required) Unique database insight identifier + :param str if_match: (optional) + Used for optimistic concurrency control. In the update or delete call for a resource, set the `if-match` + parameter to the value of the etag from a previous get, create, or update 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 that can be retried in case of a timeout or + server error without risk of executing the same action again. Retry tokens expire after 24 + hours. + + *Note:* Retry tokens can be invalidated before the 24 hour time limit due to conflicting + operations, such as a resource being deleted or purged from the system. + :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. @@ -1302,24 +1580,26 @@ def get_database_insight(self, database_insight_id, **kwargs): 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.opsi.models.DatabaseInsight` + :return: A :class:`~oci.response.Response` object with data of type None :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use get_database_insight API. + Click `here `__ to see an example of how to use enable_database_insight API. """ - resource_path = "/databaseInsights/{databaseInsightId}" - method = "GET" + resource_path = "/databaseInsights/{databaseInsightId}/actions/enable" + method = "POST" # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", - "opc_request_id" + "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( - "get_database_insight got unknown kwargs: {!r}".format(extra_kwargs)) + "enable_database_insight got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "databaseInsightId": database_insight_id @@ -1334,7 +1614,9 @@ def get_database_insight(self, database_insight_id, **kwargs): 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), + "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} @@ -1345,6 +1627,7 @@ def get_database_insight(self, database_insight_id, **kwargs): if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( @@ -1353,27 +1636,43 @@ def get_database_insight(self, database_insight_id, **kwargs): method=method, path_params=path_params, header_params=header_params, - response_type="DatabaseInsight") + body=enable_database_insight_details) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, - response_type="DatabaseInsight") + body=enable_database_insight_details) - def get_enterprise_manager_bridge(self, enterprise_manager_bridge_id, **kwargs): + def enable_exadata_insight(self, enable_exadata_insight_details, exadata_insight_id, **kwargs): """ - Gets details of an Operations Insights Enterprise Manager bridge. + Enables an Exadata system in Operations Insights. Exadata-related metric collection and analysis will be started. - :param str enterprise_manager_bridge_id: (required) - Unique Enterprise Manager bridge identifier + :param oci.opsi.models.EnableExadataInsightDetails enable_exadata_insight_details: (required) + Details for the Exadata system to be enabled in Operations Insights. + + :param str exadata_insight_id: (required) + Unique Exadata insight identifier + + :param str if_match: (optional) + Used for optimistic concurrency control. In the update or delete call for a resource, set the `if-match` + parameter to the value of the etag from a previous get, create, or update 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 that can be retried in case of a timeout or + server error without risk of executing the same action again. Retry tokens expire after 24 + hours. + + *Note:* Retry tokens can be invalidated before the 24 hour time limit due to conflicting + operations, such as a resource being deleted or purged from the system. + :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. @@ -1382,27 +1681,29 @@ def get_enterprise_manager_bridge(self, enterprise_manager_bridge_id, **kwargs): 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.opsi.models.EnterpriseManagerBridge` + :return: A :class:`~oci.response.Response` object with data of type None :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use get_enterprise_manager_bridge API. + Click `here `__ to see an example of how to use enable_exadata_insight API. """ - resource_path = "/enterpriseManagerBridges/{enterpriseManagerBridgeId}" - method = "GET" + resource_path = "/exadataInsights/{exadataInsightId}/actions/enable" + method = "POST" # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", - "opc_request_id" + "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( - "get_enterprise_manager_bridge got unknown kwargs: {!r}".format(extra_kwargs)) + "enable_exadata_insight got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { - "enterpriseManagerBridgeId": enterprise_manager_bridge_id + "exadataInsightId": exadata_insight_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -1414,7 +1715,9 @@ def get_enterprise_manager_bridge(self, enterprise_manager_bridge_id, **kwargs): 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), + "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} @@ -1425,6 +1728,7 @@ def get_enterprise_manager_bridge(self, enterprise_manager_bridge_id, **kwargs): if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( @@ -1433,27 +1737,43 @@ def get_enterprise_manager_bridge(self, enterprise_manager_bridge_id, **kwargs): method=method, path_params=path_params, header_params=header_params, - response_type="EnterpriseManagerBridge") + body=enable_exadata_insight_details) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, - response_type="EnterpriseManagerBridge") + body=enable_exadata_insight_details) - def get_host_insight(self, host_insight_id, **kwargs): + def enable_host_insight(self, enable_host_insight_details, host_insight_id, **kwargs): """ - Gets details of a host insight. + Enables a host in Operations Insights. Host metric collection and analysis will be started. + + :param oci.opsi.models.EnableHostInsightDetails enable_host_insight_details: (required) + Details for the host to be enabled in Operations Insights. :param str host_insight_id: (required) Unique host insight identifier + :param str if_match: (optional) + Used for optimistic concurrency control. In the update or delete call for a resource, set the `if-match` + parameter to the value of the etag from a previous get, create, or update 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 that can be retried in case of a timeout or + server error without risk of executing the same action again. Retry tokens expire after 24 + hours. + + *Note:* Retry tokens can be invalidated before the 24 hour time limit due to conflicting + operations, such as a resource being deleted or purged from the system. + :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. @@ -1462,24 +1782,26 @@ def get_host_insight(self, host_insight_id, **kwargs): 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.opsi.models.HostInsight` + :return: A :class:`~oci.response.Response` object with data of type None :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use get_host_insight API. + Click `here `__ to see an example of how to use enable_host_insight API. """ - resource_path = "/hostInsights/{hostInsightId}" - method = "GET" + resource_path = "/hostInsights/{hostInsightId}/actions/enable" + method = "POST" # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", - "opc_request_id" + "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( - "get_host_insight got unknown kwargs: {!r}".format(extra_kwargs)) + "enable_host_insight got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "hostInsightId": host_insight_id @@ -1494,7 +1816,9 @@ def get_host_insight(self, host_insight_id, **kwargs): 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), + "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} @@ -1505,6 +1829,7 @@ def get_host_insight(self, host_insight_id, **kwargs): if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( @@ -1513,22 +1838,22 @@ def get_host_insight(self, host_insight_id, **kwargs): method=method, path_params=path_params, header_params=header_params, - response_type="HostInsight") + body=enable_host_insight_details) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, - response_type="HostInsight") + body=enable_host_insight_details) - def get_work_request(self, work_request_id, **kwargs): + def get_database_insight(self, database_insight_id, **kwargs): """ - Gets the status of the work request with the given ID. + Gets details of a database insight. - :param str work_request_id: (required) - The ID of the asynchronous request. + :param str database_insight_id: (required) + Unique database insight identifier :param str opc_request_id: (optional) Unique Oracle-assigned identifier for the request. If you need to contact @@ -1542,13 +1867,13 @@ def get_work_request(self, work_request_id, **kwargs): 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.opsi.models.WorkRequest` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.opsi.models.DatabaseInsight` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use get_work_request API. + Click `here `__ to see an example of how to use get_database_insight API. """ - resource_path = "/workRequests/{workRequestId}" + resource_path = "/databaseInsights/{databaseInsightId}" method = "GET" # Don't accept unknown kwargs @@ -1559,10 +1884,10 @@ def get_work_request(self, work_request_id, **kwargs): 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)) + "get_database_insight got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { - "workRequestId": work_request_id + "databaseInsightId": database_insight_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -1593,93 +1918,68 @@ def get_work_request(self, work_request_id, **kwargs): method=method, path_params=path_params, header_params=header_params, - response_type="WorkRequest") + response_type="DatabaseInsight") else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, - response_type="WorkRequest") + response_type="DatabaseInsight") - def ingest_database_configuration(self, ingest_database_configuration_details, **kwargs): + def get_enterprise_manager_bridge(self, enterprise_manager_bridge_id, **kwargs): """ - This is a generic ingest endpoint for all database configuration metrics. - - - :param oci.opsi.models.IngestDatabaseConfigurationDetails ingest_database_configuration_details: (required) - Payload for one or more database configuration metrics for a particular database. - - :param str database_id: (optional) - Optional `OCID`__ of the associated DBaaS entity. - - __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + Gets details of an Operations Insights Enterprise Manager bridge. - :param str id: (optional) - `OCID`__ of the database insight resource. - __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + :param str enterprise_manager_bridge_id: (required) + Unique Enterprise Manager bridge identifier :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) - Used for optimistic concurrency control. In the update or delete call for a resource, set the `if-match` - parameter to the value of the etag from a previous get, create, or update response for that resource. The resource - will be updated or deleted only if the etag you provide matches the resource's current etag value. - - :param str opc_retry_token: (optional) - A token that uniquely identifies a request that can be retried in case of a timeout or - server error without risk of executing the same action again. Retry tokens expire after 24 - hours. - - *Note:* Retry tokens can be invalidated before the 24 hour time limit due to conflicting - operations, such as a resource being deleted or purged from the system. - - :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. + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here `__. 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.opsi.models.IngestDatabaseConfigurationResponseDetails` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.opsi.models.EnterpriseManagerBridge` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use ingest_database_configuration API. + Click `here `__ to see an example of how to use get_enterprise_manager_bridge API. """ - resource_path = "/databaseInsights/actions/ingestDatabaseConfiguration" - method = "POST" + resource_path = "/enterpriseManagerBridges/{enterpriseManagerBridgeId}" + method = "GET" # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", - "database_id", - "id", - "opc_request_id", - "if_match", - "opc_retry_token" + "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "ingest_database_configuration got unknown kwargs: {!r}".format(extra_kwargs)) + "get_enterprise_manager_bridge got unknown kwargs: {!r}".format(extra_kwargs)) - query_params = { - "databaseId": kwargs.get("database_id", missing), - "id": kwargs.get("id", missing) + path_params = { + "enterpriseManagerBridgeId": enterprise_manager_bridge_id } - query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + + 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), - "opc-retry-token": kwargs.get("opc_retry_token", 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} @@ -1690,56 +1990,35 @@ def ingest_database_configuration(self, ingest_database_configuration_details, * if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): - self.base_client.add_opc_retry_token_if_needed(header_params) self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, - query_params=query_params, + path_params=path_params, header_params=header_params, - body=ingest_database_configuration_details, - response_type="IngestDatabaseConfigurationResponseDetails") + response_type="EnterpriseManagerBridge") else: return self.base_client.call_api( resource_path=resource_path, method=method, - query_params=query_params, + path_params=path_params, header_params=header_params, - body=ingest_database_configuration_details, - response_type="IngestDatabaseConfigurationResponseDetails") + response_type="EnterpriseManagerBridge") - def ingest_host_configuration(self, id, ingest_host_configuration_details, **kwargs): + def get_exadata_insight(self, exadata_insight_id, **kwargs): """ - This is a generic ingest endpoint for all the host configuration metrics - - - :param str id: (required) - Required `OCID`__ of the host insight resource. + Gets details of an Exadata insight. - __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm - :param oci.opsi.models.IngestHostConfigurationDetails ingest_host_configuration_details: (required) - Payload for one or more host configuration metrics for a particular host. + :param str exadata_insight_id: (required) + Unique Exadata insight identifier :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) - Used for optimistic concurrency control. In the update or delete call for a resource, set the `if-match` - parameter to the value of the etag from a previous get, create, or update response for that resource. The resource - will be updated or deleted only if the etag you provide matches the resource's current etag value. - - :param str opc_retry_token: (optional) - A token that uniquely identifies a request that can be retried in case of a timeout or - server error without risk of executing the same action again. Retry tokens expire after 24 - hours. - - *Note:* Retry tokens can be invalidated before the 24 hour time limit due to conflicting - operations, such as a resource being deleted or purged from the system. - :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. @@ -1748,38 +2027,39 @@ def ingest_host_configuration(self, id, ingest_host_configuration_details, **kwa 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.opsi.models.IngestHostConfigurationResponseDetails` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.opsi.models.ExadataInsight` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use ingest_host_configuration API. + Click `here `__ to see an example of how to use get_exadata_insight API. """ - resource_path = "/hostInsights/actions/ingestHostConfiguration" - method = "POST" + resource_path = "/exadataInsights/{exadataInsightId}" + method = "GET" # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", - "opc_request_id", - "if_match", - "opc_retry_token" + "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "ingest_host_configuration got unknown kwargs: {!r}".format(extra_kwargs)) + "get_exadata_insight got unknown kwargs: {!r}".format(extra_kwargs)) - query_params = { - "id": id + path_params = { + "exadataInsightId": exadata_insight_id } - query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + + 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), - "opc-retry-token": kwargs.get("opc_retry_token", 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} @@ -1790,56 +2070,35 @@ def ingest_host_configuration(self, id, ingest_host_configuration_details, **kwa if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): - self.base_client.add_opc_retry_token_if_needed(header_params) self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, - query_params=query_params, + path_params=path_params, header_params=header_params, - body=ingest_host_configuration_details, - response_type="IngestHostConfigurationResponseDetails") + response_type="ExadataInsight") else: return self.base_client.call_api( resource_path=resource_path, method=method, - query_params=query_params, + path_params=path_params, header_params=header_params, - body=ingest_host_configuration_details, - response_type="IngestHostConfigurationResponseDetails") + response_type="ExadataInsight") - def ingest_host_metrics(self, id, ingest_host_metrics_details, **kwargs): + def get_host_insight(self, host_insight_id, **kwargs): """ - This is a generic ingest endpoint for all the host performance metrics - - - :param str id: (required) - Required `OCID`__ of the host insight resource. + Gets details of a host insight. - __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm - :param oci.opsi.models.IngestHostMetricsDetails ingest_host_metrics_details: (required) - Payload for one or more host performance metrics for a particular host. + :param str host_insight_id: (required) + Unique host insight identifier :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) - Used for optimistic concurrency control. In the update or delete call for a resource, set the `if-match` - parameter to the value of the etag from a previous get, create, or update response for that resource. The resource - will be updated or deleted only if the etag you provide matches the resource's current etag value. - - :param str opc_retry_token: (optional) - A token that uniquely identifies a request that can be retried in case of a timeout or - server error without risk of executing the same action again. Retry tokens expire after 24 - hours. - - *Note:* Retry tokens can be invalidated before the 24 hour time limit due to conflicting - operations, such as a resource being deleted or purged from the system. - :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. @@ -1848,38 +2107,39 @@ def ingest_host_metrics(self, id, ingest_host_metrics_details, **kwargs): 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.opsi.models.IngestHostMetricsResponseDetails` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.opsi.models.HostInsight` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use ingest_host_metrics API. + Click `here `__ to see an example of how to use get_host_insight API. """ - resource_path = "/hostInsights/actions/ingestHostMetrics" - method = "POST" + resource_path = "/hostInsights/{hostInsightId}" + method = "GET" # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", - "opc_request_id", - "if_match", - "opc_retry_token" + "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "ingest_host_metrics got unknown kwargs: {!r}".format(extra_kwargs)) + "get_host_insight got unknown kwargs: {!r}".format(extra_kwargs)) - query_params = { - "id": id + path_params = { + "hostInsightId": host_insight_id } - query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + + 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), - "opc-retry-token": kwargs.get("opc_retry_token", 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} @@ -1890,67 +2150,35 @@ def ingest_host_metrics(self, id, ingest_host_metrics_details, **kwargs): if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): - self.base_client.add_opc_retry_token_if_needed(header_params) self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, - query_params=query_params, + path_params=path_params, header_params=header_params, - body=ingest_host_metrics_details, - response_type="IngestHostMetricsResponseDetails") + response_type="HostInsight") else: return self.base_client.call_api( resource_path=resource_path, method=method, - query_params=query_params, + path_params=path_params, header_params=header_params, - body=ingest_host_metrics_details, - response_type="IngestHostMetricsResponseDetails") + response_type="HostInsight") - def ingest_sql_bucket(self, ingest_sql_bucket_details, **kwargs): + def get_work_request(self, work_request_id, **kwargs): """ - The sqlbucket endpoint takes in a JSON payload, persists it in Operations Insights ingest pipeline. - Either databaseId or id must be specified. - - - :param oci.opsi.models.IngestSqlBucketDetails ingest_sql_bucket_details: (required) - Collection of SQL bucket objects for a particular database. - - :param str compartment_id: (optional) - The `OCID`__ of the compartment. - - __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm - - :param str database_id: (optional) - Optional `OCID`__ of the associated DBaaS entity. - - __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + Gets the status of the work request with the given ID. - :param str id: (optional) - `OCID`__ of the database insight resource. - __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + :param str work_request_id: (required) + The ID of the asynchronous request. :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) - Used for optimistic concurrency control. In the update or delete call for a resource, set the `if-match` - parameter to the value of the etag from a previous get, create, or update response for that resource. The resource - will be updated or deleted only if the etag you provide matches the resource's current etag value. - - :param str opc_retry_token: (optional) - A token that uniquely identifies a request that can be retried in case of a timeout or - server error without risk of executing the same action again. Retry tokens expire after 24 - hours. - - *Note:* Retry tokens can be invalidated before the 24 hour time limit due to conflicting - operations, such as a resource being deleted or purged from the system. - :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. @@ -1959,43 +2187,39 @@ def ingest_sql_bucket(self, ingest_sql_bucket_details, **kwargs): 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.opsi.models.IngestSqlBucketResponseDetails` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.opsi.models.WorkRequest` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use ingest_sql_bucket API. + Click `here `__ to see an example of how to use get_work_request API. """ - resource_path = "/databaseInsights/actions/ingestSqlBucket" - method = "POST" + resource_path = "/workRequests/{workRequestId}" + method = "GET" # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", - "compartment_id", - "database_id", - "id", - "opc_request_id", - "if_match", - "opc_retry_token" + "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "ingest_sql_bucket got unknown kwargs: {!r}".format(extra_kwargs)) + "get_work_request got unknown kwargs: {!r}".format(extra_kwargs)) - query_params = { - "compartmentId": kwargs.get("compartment_id", missing), - "databaseId": kwargs.get("database_id", missing), - "id": kwargs.get("id", missing) + path_params = { + "workRequestId": work_request_id } - query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + + 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), - "opc-retry-token": kwargs.get("opc_retry_token", 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} @@ -2006,39 +2230,30 @@ def ingest_sql_bucket(self, ingest_sql_bucket_details, **kwargs): if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): - self.base_client.add_opc_retry_token_if_needed(header_params) self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, - query_params=query_params, + path_params=path_params, header_params=header_params, - body=ingest_sql_bucket_details, - response_type="IngestSqlBucketResponseDetails") + response_type="WorkRequest") else: return self.base_client.call_api( resource_path=resource_path, method=method, - query_params=query_params, + path_params=path_params, header_params=header_params, - body=ingest_sql_bucket_details, - response_type="IngestSqlBucketResponseDetails") + response_type="WorkRequest") - def ingest_sql_plan_lines(self, ingest_sql_plan_lines_details, **kwargs): + def ingest_database_configuration(self, ingest_database_configuration_details, **kwargs): """ - The SqlPlanLines endpoint takes in a JSON payload, persists it in Operation Insights ingest pipeline. - Either databaseId or id must be specified. - - - :param oci.opsi.models.IngestSqlPlanLinesDetails ingest_sql_plan_lines_details: (required) - Collection of SQL plan line objects for a particular database. + This is a generic ingest endpoint for all database configuration metrics. - :param str compartment_id: (optional) - The `OCID`__ of the compartment. - __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + :param oci.opsi.models.IngestDatabaseConfigurationDetails ingest_database_configuration_details: (required) + Payload for one or more database configuration metrics for a particular database. :param str database_id: (optional) Optional `OCID`__ of the associated DBaaS entity. @@ -2075,19 +2290,18 @@ def ingest_sql_plan_lines(self, ingest_sql_plan_lines_details, **kwargs): 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.opsi.models.IngestSqlPlanLinesResponseDetails` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.opsi.models.IngestDatabaseConfigurationResponseDetails` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use ingest_sql_plan_lines API. + Click `here `__ to see an example of how to use ingest_database_configuration API. """ - resource_path = "/databaseInsights/actions/ingestSqlPlanLines" + resource_path = "/databaseInsights/actions/ingestDatabaseConfiguration" method = "POST" # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", - "compartment_id", "database_id", "id", "opc_request_id", @@ -2097,10 +2311,9 @@ def ingest_sql_plan_lines(self, ingest_sql_plan_lines_details, **kwargs): extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "ingest_sql_plan_lines got unknown kwargs: {!r}".format(extra_kwargs)) + "ingest_database_configuration got unknown kwargs: {!r}".format(extra_kwargs)) query_params = { - "compartmentId": kwargs.get("compartment_id", missing), "databaseId": kwargs.get("database_id", missing), "id": kwargs.get("id", missing) } @@ -2131,41 +2344,29 @@ def ingest_sql_plan_lines(self, ingest_sql_plan_lines_details, **kwargs): method=method, query_params=query_params, header_params=header_params, - body=ingest_sql_plan_lines_details, - response_type="IngestSqlPlanLinesResponseDetails") + body=ingest_database_configuration_details, + response_type="IngestDatabaseConfigurationResponseDetails") else: return self.base_client.call_api( resource_path=resource_path, method=method, query_params=query_params, header_params=header_params, - body=ingest_sql_plan_lines_details, - response_type="IngestSqlPlanLinesResponseDetails") + body=ingest_database_configuration_details, + response_type="IngestDatabaseConfigurationResponseDetails") - def ingest_sql_text(self, ingest_sql_text_details, **kwargs): + def ingest_host_configuration(self, id, ingest_host_configuration_details, **kwargs): """ - The SqlText endpoint takes in a JSON payload, persists it in Operation Insights ingest pipeline. - Either databaseId or id must be specified. - Disclaimer: SQL text being uploaded explicitly via APIs is not masked. Any sensitive literals contained in the sqlFullText column should be masked prior to ingestion. - - - :param oci.opsi.models.IngestSqlTextDetails ingest_sql_text_details: (required) - Collection of SQL text objects for a particular database. - - :param str compartment_id: (optional) - The `OCID`__ of the compartment. + This is a generic ingest endpoint for all the host configuration metrics - __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm - :param str database_id: (optional) - Optional `OCID`__ of the associated DBaaS entity. + :param str id: (required) + Required `OCID`__ of the host insight resource. __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm - :param str id: (optional) - `OCID`__ of the database insight resource. - - __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + :param oci.opsi.models.IngestHostConfigurationDetails ingest_host_configuration_details: (required) + Payload for one or more host configuration metrics for a particular host. :param str opc_request_id: (optional) Unique Oracle-assigned identifier for the request. If you need to contact @@ -2192,21 +2393,18 @@ def ingest_sql_text(self, ingest_sql_text_details, **kwargs): 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.opsi.models.IngestSqlTextResponseDetails` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.opsi.models.IngestHostConfigurationResponseDetails` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use ingest_sql_text API. + Click `here `__ to see an example of how to use ingest_host_configuration API. """ - resource_path = "/databaseInsights/actions/ingestSqlText" + resource_path = "/hostInsights/actions/ingestHostConfiguration" method = "POST" # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", - "compartment_id", - "database_id", - "id", "opc_request_id", "if_match", "opc_retry_token" @@ -2214,12 +2412,10 @@ def ingest_sql_text(self, ingest_sql_text_details, **kwargs): extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "ingest_sql_text got unknown kwargs: {!r}".format(extra_kwargs)) + "ingest_host_configuration got unknown kwargs: {!r}".format(extra_kwargs)) query_params = { - "compartmentId": kwargs.get("compartment_id", missing), - "databaseId": kwargs.get("database_id", missing), - "id": kwargs.get("id", missing) + "id": id } query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} @@ -2248,103 +2444,46 @@ def ingest_sql_text(self, ingest_sql_text_details, **kwargs): method=method, query_params=query_params, header_params=header_params, - body=ingest_sql_text_details, - response_type="IngestSqlTextResponseDetails") + body=ingest_host_configuration_details, + response_type="IngestHostConfigurationResponseDetails") else: return self.base_client.call_api( resource_path=resource_path, method=method, query_params=query_params, header_params=header_params, - body=ingest_sql_text_details, - response_type="IngestSqlTextResponseDetails") + body=ingest_host_configuration_details, + response_type="IngestHostConfigurationResponseDetails") - def list_database_configurations(self, **kwargs): + def ingest_host_metrics(self, id, ingest_host_metrics_details, **kwargs): """ - Gets a list of database insight configurations based on the query parameters specified. Either compartmentId or databaseInsightId query parameter must be specified. - - - :param str compartment_id: (optional) - The `OCID`__ of the compartment. - - __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm - - :param str enterprise_manager_bridge_id: (optional) - Unique Enterprise Manager bridge identifier - - :param list[str] id: (optional) - Optional list of database insight resource `OCIDs`__. + This is a generic ingest endpoint for all the host performance metrics - __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm - :param list[str] database_id: (optional) - Optional list of database `OCIDs`__ of the associated DBaaS entity. + :param str id: (required) + Required `OCID`__ of the host insight resource. __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm - :param list[str] database_type: (optional) - Filter by one or more database type. - Possible values are ADW-S, ATP-S, ADW-D, ATP-D, EXTERNAL-PDB, EXTERNAL-NONCDB. - - Allowed values are: "ADW-S", "ATP-S", "ADW-D", "ATP-D", "EXTERNAL-PDB", "EXTERNAL-NONCDB" - - :param int limit: (optional) - For list pagination. The maximum number of results per page, or items to - return in a paginated \"List\" call. - For important details about how pagination works, see - `List Pagination`__. - Example: `50` - - __ https://docs.cloud.oracle.com/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. For important details about how pagination works, - see `List Pagination`__. - - __ https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine - - :param str sort_order: (optional) - The sort order to use, either ascending (`ASC`) or descending (`DESC`). - - Allowed values are: "ASC", "DESC" - - :param str sort_by: (optional) - Database configuration list sort options. If `fields` parameter is selected, the `sortBy` parameter must be one of the fields specified. - - Allowed values are: "databaseName", "databaseDisplayName", "databaseType" - - :param list[str] host_name: (optional) - Filter by one or more hostname. + :param oci.opsi.models.IngestHostMetricsDetails ingest_host_metrics_details: (required) + Payload for one or more host performance metrics for a particular host. :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 list[str] defined_tag_equals: (optional) - A list of tag filters to apply. Only resources with a defined tag matching the value will be returned. - Each item in the list has the format \"{namespace}.{tagName}.{value}\". All inputs are case-insensitive. - Multiple values for the same key (i.e. same namespace and tag name) are interpreted as \"OR\". - Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as \"AND\". - - :param list[str] freeform_tag_equals: (optional) - A list of tag filters to apply. Only resources with a freeform tag matching the value will be returned. - The key for each tag is \"{tagName}.{value}\". All inputs are case-insensitive. - Multiple values for the same tag name are interpreted as \"OR\". Values for different tag names are interpreted as \"AND\". + :param str if_match: (optional) + Used for optimistic concurrency control. In the update or delete call for a resource, set the `if-match` + parameter to the value of the etag from a previous get, create, or update 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 list[str] defined_tag_exists: (optional) - A list of tag existence filters to apply. Only resources for which the specified defined tags exist will be returned. - Each item in the list has the format \"{namespace}.{tagName}.true\" (for checking existence of a defined tag) - or \"{namespace}.true\". All inputs are case-insensitive. - Currently, only existence (\"true\" at the end) is supported. Absence (\"false\" at the end) is not supported. - Multiple values for the same key (i.e. same namespace and tag name) are interpreted as \"OR\". - Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as \"AND\". + :param str opc_retry_token: (optional) + A token that uniquely identifies a request that can be retried in case of a timeout or + server error without risk of executing the same action again. Retry tokens expire after 24 + hours. - :param list[str] freeform_tag_exists: (optional) - A list of tag existence filters to apply. Only resources for which the specified freeform tags exist the value will be returned. - The key for each tag is \"{tagName}.true\". All inputs are case-insensitive. - Currently, only existence (\"true\" at the end) is supported. Absence (\"false\" at the end) is not supported. - Multiple values for different tag names are interpreted as \"AND\". + *Note:* Retry tokens can be invalidated before the 24 hour time limit due to conflicting + operations, such as a resource being deleted or purged from the system. :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. @@ -2354,83 +2493,38 @@ def list_database_configurations(self, **kwargs): 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.opsi.models.DatabaseConfigurationCollection` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.opsi.models.IngestHostMetricsResponseDetails` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use list_database_configurations API. + Click `here `__ to see an example of how to use ingest_host_metrics API. """ - resource_path = "/databaseInsights/databaseConfigurations" - method = "GET" + resource_path = "/hostInsights/actions/ingestHostMetrics" + method = "POST" # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", - "compartment_id", - "enterprise_manager_bridge_id", - "id", - "database_id", - "database_type", - "limit", - "page", - "sort_order", - "sort_by", - "host_name", "opc_request_id", - "defined_tag_equals", - "freeform_tag_equals", - "defined_tag_exists", - "freeform_tag_exists" + "if_match", + "opc_retry_token" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "list_database_configurations got unknown kwargs: {!r}".format(extra_kwargs)) - - if 'database_type' in kwargs: - database_type_allowed_values = ["ADW-S", "ATP-S", "ADW-D", "ATP-D", "EXTERNAL-PDB", "EXTERNAL-NONCDB"] - for database_type_item in kwargs['database_type']: - if database_type_item not in database_type_allowed_values: - raise ValueError( - "Invalid value for `database_type`, must be one of {0}".format(database_type_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 = ["databaseName", "databaseDisplayName", "databaseType"] - 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) - ) + "ingest_host_metrics got unknown kwargs: {!r}".format(extra_kwargs)) query_params = { - "compartmentId": kwargs.get("compartment_id", missing), - "enterpriseManagerBridgeId": kwargs.get("enterprise_manager_bridge_id", missing), - "id": self.base_client.generate_collection_format_param(kwargs.get("id", missing), 'multi'), - "databaseId": self.base_client.generate_collection_format_param(kwargs.get("database_id", missing), 'multi'), - "databaseType": self.base_client.generate_collection_format_param(kwargs.get("database_type", missing), 'multi'), - "limit": kwargs.get("limit", missing), - "page": kwargs.get("page", missing), - "sortOrder": kwargs.get("sort_order", missing), - "sortBy": kwargs.get("sort_by", missing), - "hostName": self.base_client.generate_collection_format_param(kwargs.get("host_name", missing), 'multi'), - "definedTagEquals": self.base_client.generate_collection_format_param(kwargs.get("defined_tag_equals", missing), 'multi'), - "freeformTagEquals": self.base_client.generate_collection_format_param(kwargs.get("freeform_tag_equals", missing), 'multi'), - "definedTagExists": self.base_client.generate_collection_format_param(kwargs.get("defined_tag_exists", missing), 'multi'), - "freeformTagExists": self.base_client.generate_collection_format_param(kwargs.get("freeform_tag_exists", missing), 'multi') + "id": id } 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) + "opc-request-id": kwargs.get("opc_request_id", missing), + "if-match": kwargs.get("if_match", 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} @@ -2441,6 +2535,7 @@ def list_database_configurations(self, **kwargs): if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( @@ -2449,68 +2544,2518 @@ def list_database_configurations(self, **kwargs): method=method, query_params=query_params, header_params=header_params, - response_type="DatabaseConfigurationCollection") + body=ingest_host_metrics_details, + response_type="IngestHostMetricsResponseDetails") else: return self.base_client.call_api( resource_path=resource_path, method=method, query_params=query_params, header_params=header_params, - response_type="DatabaseConfigurationCollection") + body=ingest_host_metrics_details, + response_type="IngestHostMetricsResponseDetails") - def list_database_insights(self, **kwargs): + def ingest_sql_bucket(self, ingest_sql_bucket_details, **kwargs): """ - Gets a list of database insights based on the query parameters specified. Either compartmentId or id query parameter must be specified. + The sqlbucket endpoint takes in a JSON payload, persists it in Operations Insights ingest pipeline. + Either databaseId or id must be specified. + :param oci.opsi.models.IngestSqlBucketDetails ingest_sql_bucket_details: (required) + Collection of SQL bucket objects for a particular database. + :param str compartment_id: (optional) The `OCID`__ of the compartment. __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm - :param str enterprise_manager_bridge_id: (optional) - Unique Enterprise Manager bridge identifier - - :param list[str] id: (optional) - Optional list of database insight resource `OCIDs`__. + :param str database_id: (optional) + Optional `OCID`__ of the associated DBaaS entity. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param str id: (optional) + `OCID`__ of the database insight resource. + + __ https://docs.cloud.oracle.com/iaas/Content/General/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 if_match: (optional) + Used for optimistic concurrency control. In the update or delete call for a resource, set the `if-match` + parameter to the value of the etag from a previous get, create, or update response for that resource. The resource + will be updated or deleted only if the etag you provide matches the resource's current etag value. + + :param str opc_retry_token: (optional) + A token that uniquely identifies a request that can be retried in case of a timeout or + server error without risk of executing the same action again. Retry tokens expire after 24 + hours. + + *Note:* Retry tokens can be invalidated before the 24 hour time limit due to conflicting + operations, such as a resource being deleted or purged from the system. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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.opsi.models.IngestSqlBucketResponseDetails` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use ingest_sql_bucket API. + """ + resource_path = "/databaseInsights/actions/ingestSqlBucket" + method = "POST" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "compartment_id", + "database_id", + "id", + "opc_request_id", + "if_match", + "opc_retry_token" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "ingest_sql_bucket got unknown kwargs: {!r}".format(extra_kwargs)) + + query_params = { + "compartmentId": kwargs.get("compartment_id", missing), + "databaseId": kwargs.get("database_id", missing), + "id": kwargs.get("id", 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), + "if-match": kwargs.get("if_match", 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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + 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, + body=ingest_sql_bucket_details, + response_type="IngestSqlBucketResponseDetails") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + body=ingest_sql_bucket_details, + response_type="IngestSqlBucketResponseDetails") + + def ingest_sql_plan_lines(self, ingest_sql_plan_lines_details, **kwargs): + """ + The SqlPlanLines endpoint takes in a JSON payload, persists it in Operation Insights ingest pipeline. + Either databaseId or id must be specified. + + + :param oci.opsi.models.IngestSqlPlanLinesDetails ingest_sql_plan_lines_details: (required) + Collection of SQL plan line objects for a particular database. + + :param str compartment_id: (optional) + The `OCID`__ of the compartment. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param str database_id: (optional) + Optional `OCID`__ of the associated DBaaS entity. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param str id: (optional) + `OCID`__ of the database insight resource. + + __ https://docs.cloud.oracle.com/iaas/Content/General/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 if_match: (optional) + Used for optimistic concurrency control. In the update or delete call for a resource, set the `if-match` + parameter to the value of the etag from a previous get, create, or update response for that resource. The resource + will be updated or deleted only if the etag you provide matches the resource's current etag value. + + :param str opc_retry_token: (optional) + A token that uniquely identifies a request that can be retried in case of a timeout or + server error without risk of executing the same action again. Retry tokens expire after 24 + hours. + + *Note:* Retry tokens can be invalidated before the 24 hour time limit due to conflicting + operations, such as a resource being deleted or purged from the system. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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.opsi.models.IngestSqlPlanLinesResponseDetails` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use ingest_sql_plan_lines API. + """ + resource_path = "/databaseInsights/actions/ingestSqlPlanLines" + method = "POST" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "compartment_id", + "database_id", + "id", + "opc_request_id", + "if_match", + "opc_retry_token" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "ingest_sql_plan_lines got unknown kwargs: {!r}".format(extra_kwargs)) + + query_params = { + "compartmentId": kwargs.get("compartment_id", missing), + "databaseId": kwargs.get("database_id", missing), + "id": kwargs.get("id", 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), + "if-match": kwargs.get("if_match", 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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + 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, + body=ingest_sql_plan_lines_details, + response_type="IngestSqlPlanLinesResponseDetails") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + body=ingest_sql_plan_lines_details, + response_type="IngestSqlPlanLinesResponseDetails") + + def ingest_sql_text(self, ingest_sql_text_details, **kwargs): + """ + The SqlText endpoint takes in a JSON payload, persists it in Operation Insights ingest pipeline. + Either databaseId or id must be specified. + Disclaimer: SQL text being uploaded explicitly via APIs is not masked. Any sensitive literals contained in the sqlFullText column should be masked prior to ingestion. + + + :param oci.opsi.models.IngestSqlTextDetails ingest_sql_text_details: (required) + Collection of SQL text objects for a particular database. + + :param str compartment_id: (optional) + The `OCID`__ of the compartment. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param str database_id: (optional) + Optional `OCID`__ of the associated DBaaS entity. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param str id: (optional) + `OCID`__ of the database insight resource. + + __ https://docs.cloud.oracle.com/iaas/Content/General/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 if_match: (optional) + Used for optimistic concurrency control. In the update or delete call for a resource, set the `if-match` + parameter to the value of the etag from a previous get, create, or update response for that resource. The resource + will be updated or deleted only if the etag you provide matches the resource's current etag value. + + :param str opc_retry_token: (optional) + A token that uniquely identifies a request that can be retried in case of a timeout or + server error without risk of executing the same action again. Retry tokens expire after 24 + hours. + + *Note:* Retry tokens can be invalidated before the 24 hour time limit due to conflicting + operations, such as a resource being deleted or purged from the system. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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.opsi.models.IngestSqlTextResponseDetails` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use ingest_sql_text API. + """ + resource_path = "/databaseInsights/actions/ingestSqlText" + method = "POST" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "compartment_id", + "database_id", + "id", + "opc_request_id", + "if_match", + "opc_retry_token" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "ingest_sql_text got unknown kwargs: {!r}".format(extra_kwargs)) + + query_params = { + "compartmentId": kwargs.get("compartment_id", missing), + "databaseId": kwargs.get("database_id", missing), + "id": kwargs.get("id", 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), + "if-match": kwargs.get("if_match", 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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + 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, + body=ingest_sql_text_details, + response_type="IngestSqlTextResponseDetails") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + body=ingest_sql_text_details, + response_type="IngestSqlTextResponseDetails") + + def list_database_configurations(self, **kwargs): + """ + Gets a list of database insight configurations based on the query parameters specified. Either compartmentId or databaseInsightId query parameter must be specified. + + + :param str compartment_id: (optional) + The `OCID`__ of the compartment. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param str enterprise_manager_bridge_id: (optional) + Unique Enterprise Manager bridge identifier + + :param list[str] id: (optional) + Optional list of database insight resource `OCIDs`__. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param list[str] database_id: (optional) + Optional list of database `OCIDs`__ of the associated DBaaS entity. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param list[str] exadata_insight_id: (optional) + Optional list of exadata insight resource `OCIDs`__. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param list[str] cdb_name: (optional) + Filter by one or more cdb name. + + :param list[str] database_type: (optional) + Filter by one or more database type. + Possible values are ADW-S, ATP-S, ADW-D, ATP-D, EXTERNAL-PDB, EXTERNAL-NONCDB. + + Allowed values are: "ADW-S", "ATP-S", "ADW-D", "ATP-D", "EXTERNAL-PDB", "EXTERNAL-NONCDB" + + :param int limit: (optional) + For list pagination. The maximum number of results per page, or items to + return in a paginated \"List\" call. + For important details about how pagination works, see + `List Pagination`__. + Example: `50` + + __ https://docs.cloud.oracle.com/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. For important details about how pagination works, + see `List Pagination`__. + + __ https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine + + :param str sort_order: (optional) + The sort order to use, either ascending (`ASC`) or descending (`DESC`). + + Allowed values are: "ASC", "DESC" + + :param str sort_by: (optional) + Database configuration list sort options. If `fields` parameter is selected, the `sortBy` parameter must be one of the fields specified. + + Allowed values are: "databaseName", "databaseDisplayName", "databaseType" + + :param list[str] host_name: (optional) + Filter by one or more hostname. + + :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 list[str] defined_tag_equals: (optional) + A list of tag filters to apply. Only resources with a defined tag matching the value will be returned. + Each item in the list has the format \"{namespace}.{tagName}.{value}\". All inputs are case-insensitive. + Multiple values for the same key (i.e. same namespace and tag name) are interpreted as \"OR\". + Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as \"AND\". + + :param list[str] freeform_tag_equals: (optional) + A list of tag filters to apply. Only resources with a freeform tag matching the value will be returned. + The key for each tag is \"{tagName}.{value}\". All inputs are case-insensitive. + Multiple values for the same tag name are interpreted as \"OR\". Values for different tag names are interpreted as \"AND\". + + :param list[str] defined_tag_exists: (optional) + A list of tag existence filters to apply. Only resources for which the specified defined tags exist will be returned. + Each item in the list has the format \"{namespace}.{tagName}.true\" (for checking existence of a defined tag) + or \"{namespace}.true\". All inputs are case-insensitive. + Currently, only existence (\"true\" at the end) is supported. Absence (\"false\" at the end) is not supported. + Multiple values for the same key (i.e. same namespace and tag name) are interpreted as \"OR\". + Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as \"AND\". + + :param list[str] freeform_tag_exists: (optional) + A list of tag existence filters to apply. Only resources for which the specified freeform tags exist the value will be returned. + The key for each tag is \"{tagName}.true\". All inputs are case-insensitive. + Currently, only existence (\"true\" at the end) is supported. Absence (\"false\" at the end) is not supported. + Multiple values for different tag names are interpreted as \"AND\". + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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.opsi.models.DatabaseConfigurationCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_database_configurations API. + """ + resource_path = "/databaseInsights/databaseConfigurations" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "compartment_id", + "enterprise_manager_bridge_id", + "id", + "database_id", + "exadata_insight_id", + "cdb_name", + "database_type", + "limit", + "page", + "sort_order", + "sort_by", + "host_name", + "opc_request_id", + "defined_tag_equals", + "freeform_tag_equals", + "defined_tag_exists", + "freeform_tag_exists" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_database_configurations got unknown kwargs: {!r}".format(extra_kwargs)) + + if 'database_type' in kwargs: + database_type_allowed_values = ["ADW-S", "ATP-S", "ADW-D", "ATP-D", "EXTERNAL-PDB", "EXTERNAL-NONCDB"] + for database_type_item in kwargs['database_type']: + if database_type_item not in database_type_allowed_values: + raise ValueError( + "Invalid value for `database_type`, must be one of {0}".format(database_type_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 = ["databaseName", "databaseDisplayName", "databaseType"] + 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": kwargs.get("compartment_id", missing), + "enterpriseManagerBridgeId": kwargs.get("enterprise_manager_bridge_id", missing), + "id": self.base_client.generate_collection_format_param(kwargs.get("id", missing), 'multi'), + "databaseId": self.base_client.generate_collection_format_param(kwargs.get("database_id", missing), 'multi'), + "exadataInsightId": self.base_client.generate_collection_format_param(kwargs.get("exadata_insight_id", missing), 'multi'), + "cdbName": self.base_client.generate_collection_format_param(kwargs.get("cdb_name", missing), 'multi'), + "databaseType": self.base_client.generate_collection_format_param(kwargs.get("database_type", missing), 'multi'), + "limit": kwargs.get("limit", missing), + "page": kwargs.get("page", missing), + "sortOrder": kwargs.get("sort_order", missing), + "sortBy": kwargs.get("sort_by", missing), + "hostName": self.base_client.generate_collection_format_param(kwargs.get("host_name", missing), 'multi'), + "definedTagEquals": self.base_client.generate_collection_format_param(kwargs.get("defined_tag_equals", missing), 'multi'), + "freeformTagEquals": self.base_client.generate_collection_format_param(kwargs.get("freeform_tag_equals", missing), 'multi'), + "definedTagExists": self.base_client.generate_collection_format_param(kwargs.get("defined_tag_exists", missing), 'multi'), + "freeformTagExists": self.base_client.generate_collection_format_param(kwargs.get("freeform_tag_exists", missing), 'multi') + } + 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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + 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="DatabaseConfigurationCollection") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="DatabaseConfigurationCollection") + + def list_database_insights(self, **kwargs): + """ + Gets a list of database insights based on the query parameters specified. Either compartmentId or id query parameter must be specified. + + + :param str compartment_id: (optional) + The `OCID`__ of the compartment. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param str enterprise_manager_bridge_id: (optional) + Unique Enterprise Manager bridge identifier + + :param list[str] id: (optional) + Optional list of database insight resource `OCIDs`__. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param list[str] status: (optional) + Resource Status + + Allowed values are: "DISABLED", "ENABLED", "TERMINATED" + + :param list[str] lifecycle_state: (optional) + Lifecycle states + + Allowed values are: "CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED", "NEEDS_ATTENTION" + + :param list[str] database_type: (optional) + Filter by one or more database type. + Possible values are ADW-S, ATP-S, ADW-D, ATP-D, EXTERNAL-PDB, EXTERNAL-NONCDB. + + Allowed values are: "ADW-S", "ATP-S", "ADW-D", "ATP-D", "EXTERNAL-PDB", "EXTERNAL-NONCDB" + + :param list[str] database_id: (optional) + Optional list of database `OCIDs`__ of the associated DBaaS entity. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param list[str] fields: (optional) + Specifies the fields to return in a database summary response. By default all fields are returned if omitted. + + Allowed values are: "compartmentId", "databaseName", "databaseDisplayName", "databaseType", "databaseVersion", "databaseHostNames", "freeformTags", "definedTags" + + :param int limit: (optional) + For list pagination. The maximum number of results per page, or items to + return in a paginated \"List\" call. + For important details about how pagination works, see + `List Pagination`__. + Example: `50` + + __ https://docs.cloud.oracle.com/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. For important details about how pagination works, + see `List Pagination`__. + + __ https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine + + :param str sort_order: (optional) + The sort order to use, either ascending (`ASC`) or descending (`DESC`). + + Allowed values are: "ASC", "DESC" + + :param str sort_by: (optional) + Database insight list sort options. If `fields` parameter is selected, the `sortBy` parameter must be one of the fields specified. + + Allowed values are: "databaseName", "databaseDisplayName", "databaseType" + + :param str exadata_insight_id: (optional) + `OCID`__ of exadata insight resource. + + __ https://docs.cloud.oracle.com/iaas/Content/General/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. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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.opsi.models.DatabaseInsightsCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_database_insights API. + """ + resource_path = "/databaseInsights" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "compartment_id", + "enterprise_manager_bridge_id", + "id", + "status", + "lifecycle_state", + "database_type", + "database_id", + "fields", + "limit", + "page", + "sort_order", + "sort_by", + "exadata_insight_id", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_database_insights got unknown kwargs: {!r}".format(extra_kwargs)) + + if 'status' in kwargs: + status_allowed_values = ["DISABLED", "ENABLED", "TERMINATED"] + for status_item in kwargs['status']: + if status_item not in status_allowed_values: + raise ValueError( + "Invalid value for `status`, must be one of {0}".format(status_allowed_values) + ) + + if 'lifecycle_state' in kwargs: + lifecycle_state_allowed_values = ["CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED", "NEEDS_ATTENTION"] + for lifecycle_state_item in kwargs['lifecycle_state']: + if lifecycle_state_item not in lifecycle_state_allowed_values: + raise ValueError( + "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values) + ) + + if 'database_type' in kwargs: + database_type_allowed_values = ["ADW-S", "ATP-S", "ADW-D", "ATP-D", "EXTERNAL-PDB", "EXTERNAL-NONCDB"] + for database_type_item in kwargs['database_type']: + if database_type_item not in database_type_allowed_values: + raise ValueError( + "Invalid value for `database_type`, must be one of {0}".format(database_type_allowed_values) + ) + + if 'fields' in kwargs: + fields_allowed_values = ["compartmentId", "databaseName", "databaseDisplayName", "databaseType", "databaseVersion", "databaseHostNames", "freeformTags", "definedTags"] + for fields_item in kwargs['fields']: + if fields_item not in fields_allowed_values: + raise ValueError( + "Invalid value for `fields`, must be one of {0}".format(fields_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 = ["databaseName", "databaseDisplayName", "databaseType"] + 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": kwargs.get("compartment_id", missing), + "enterpriseManagerBridgeId": kwargs.get("enterprise_manager_bridge_id", missing), + "id": self.base_client.generate_collection_format_param(kwargs.get("id", missing), 'multi'), + "status": self.base_client.generate_collection_format_param(kwargs.get("status", missing), 'multi'), + "lifecycleState": self.base_client.generate_collection_format_param(kwargs.get("lifecycle_state", missing), 'multi'), + "databaseType": self.base_client.generate_collection_format_param(kwargs.get("database_type", missing), 'multi'), + "databaseId": self.base_client.generate_collection_format_param(kwargs.get("database_id", missing), 'multi'), + "fields": self.base_client.generate_collection_format_param(kwargs.get("fields", missing), 'multi'), + "limit": kwargs.get("limit", missing), + "page": kwargs.get("page", missing), + "sortOrder": kwargs.get("sort_order", missing), + "sortBy": kwargs.get("sort_by", missing), + "exadataInsightId": kwargs.get("exadata_insight_id", 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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + 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="DatabaseInsightsCollection") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="DatabaseInsightsCollection") + + def list_enterprise_manager_bridges(self, **kwargs): + """ + Gets a list of Operations Insights Enterprise Manager bridges. Either compartmentId or id must be specified. + + + :param str compartment_id: (optional) + The `OCID`__ of the compartment. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param str display_name: (optional) + A filter to return only resources that match the entire display name. + + :param str id: (optional) + Unique Enterprise Manager bridge identifier + + :param list[str] lifecycle_state: (optional) + Lifecycle states + + Allowed values are: "CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED", "NEEDS_ATTENTION" + + :param int limit: (optional) + For list pagination. The maximum number of results per page, or items to + return in a paginated \"List\" call. + For important details about how pagination works, see + `List Pagination`__. + Example: `50` + + __ https://docs.cloud.oracle.com/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. For important details about how pagination works, + see `List Pagination`__. + + __ https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine + + :param str sort_order: (optional) + The sort order to use, either ascending (`ASC`) or descending (`DESC`). + + Allowed values are: "ASC", "DESC" + + :param str sort_by: (optional) + The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. If no value is specified timeCreated is default. + + Allowed values are: "timeCreated", "displayName" + + :param str opc_request_id: (optional) + 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. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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.opsi.models.EnterpriseManagerBridgeCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_enterprise_manager_bridges API. + """ + resource_path = "/enterpriseManagerBridges" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "compartment_id", + "display_name", + "id", + "lifecycle_state", + "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_enterprise_manager_bridges got unknown kwargs: {!r}".format(extra_kwargs)) + + if 'lifecycle_state' in kwargs: + lifecycle_state_allowed_values = ["CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED", "NEEDS_ATTENTION"] + for lifecycle_state_item in kwargs['lifecycle_state']: + if lifecycle_state_item 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": kwargs.get("compartment_id", missing), + "displayName": kwargs.get("display_name", missing), + "id": kwargs.get("id", missing), + "lifecycleState": self.base_client.generate_collection_format_param(kwargs.get("lifecycle_state", missing), 'multi'), + "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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + 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="EnterpriseManagerBridgeCollection") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="EnterpriseManagerBridgeCollection") + + def list_exadata_configurations(self, **kwargs): + """ + Gets a list of exadata insight configurations. Either compartmentId or exadataInsightsId query parameter must be specified. + + + :param str compartment_id: (optional) + The `OCID`__ of the compartment. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param list[str] exadata_insight_id: (optional) + Optional list of exadata insight resource `OCIDs`__. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param list[str] exadata_type: (optional) + Filter by one or more Exadata types. + Possible value are DBMACHINE, EXACS, and EXACC. + + :param int limit: (optional) + For list pagination. The maximum number of results per page, or items to + return in a paginated \"List\" call. + For important details about how pagination works, see + `List Pagination`__. + Example: `50` + + __ https://docs.cloud.oracle.com/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. For important details about how pagination works, + see `List Pagination`__. + + __ https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine + + :param str sort_order: (optional) + The sort order to use, either ascending (`ASC`) or descending (`DESC`). + + Allowed values are: "ASC", "DESC" + + :param str sort_by: (optional) + Exadata configuration list sort options. If `fields` parameter is selected, the `sortBy` parameter must be one of the fields specified. + + Allowed values are: "exadataName", "exadataDisplayName", "exadataType" + + :param list[str] defined_tag_equals: (optional) + A list of tag filters to apply. Only resources with a defined tag matching the value will be returned. + Each item in the list has the format \"{namespace}.{tagName}.{value}\". All inputs are case-insensitive. + Multiple values for the same key (i.e. same namespace and tag name) are interpreted as \"OR\". + Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as \"AND\". + + :param list[str] freeform_tag_equals: (optional) + A list of tag filters to apply. Only resources with a freeform tag matching the value will be returned. + The key for each tag is \"{tagName}.{value}\". All inputs are case-insensitive. + Multiple values for the same tag name are interpreted as \"OR\". Values for different tag names are interpreted as \"AND\". + + :param list[str] defined_tag_exists: (optional) + A list of tag existence filters to apply. Only resources for which the specified defined tags exist will be returned. + Each item in the list has the format \"{namespace}.{tagName}.true\" (for checking existence of a defined tag) + or \"{namespace}.true\". All inputs are case-insensitive. + Currently, only existence (\"true\" at the end) is supported. Absence (\"false\" at the end) is not supported. + Multiple values for the same key (i.e. same namespace and tag name) are interpreted as \"OR\". + Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as \"AND\". + + :param list[str] freeform_tag_exists: (optional) + A list of tag existence filters to apply. Only resources for which the specified freeform tags exist the value will be returned. + The key for each tag is \"{tagName}.true\". All inputs are case-insensitive. + Currently, only existence (\"true\" at the end) is supported. Absence (\"false\" at the end) is not supported. + Multiple values for different tag names are interpreted as \"AND\". + + :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. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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.opsi.models.ExadataConfigurationCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_exadata_configurations API. + """ + resource_path = "/exadataInsights/exadataConfigurations" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "compartment_id", + "exadata_insight_id", + "exadata_type", + "limit", + "page", + "sort_order", + "sort_by", + "defined_tag_equals", + "freeform_tag_equals", + "defined_tag_exists", + "freeform_tag_exists", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_exadata_configurations got unknown kwargs: {!r}".format(extra_kwargs)) + + 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 = ["exadataName", "exadataDisplayName", "exadataType"] + 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": kwargs.get("compartment_id", missing), + "exadataInsightId": self.base_client.generate_collection_format_param(kwargs.get("exadata_insight_id", missing), 'multi'), + "exadataType": self.base_client.generate_collection_format_param(kwargs.get("exadata_type", missing), 'multi'), + "limit": kwargs.get("limit", missing), + "page": kwargs.get("page", missing), + "sortOrder": kwargs.get("sort_order", missing), + "sortBy": kwargs.get("sort_by", missing), + "definedTagEquals": self.base_client.generate_collection_format_param(kwargs.get("defined_tag_equals", missing), 'multi'), + "freeformTagEquals": self.base_client.generate_collection_format_param(kwargs.get("freeform_tag_equals", missing), 'multi'), + "definedTagExists": self.base_client.generate_collection_format_param(kwargs.get("defined_tag_exists", missing), 'multi'), + "freeformTagExists": self.base_client.generate_collection_format_param(kwargs.get("freeform_tag_exists", missing), 'multi') + } + 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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + 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="ExadataConfigurationCollection") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="ExadataConfigurationCollection") + + def list_exadata_insights(self, **kwargs): + """ + Gets a list of Exadata insights based on the query parameters specified. Either compartmentId or id query parameter must be specified. + + + :param str compartment_id: (optional) + The `OCID`__ of the compartment. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param str enterprise_manager_bridge_id: (optional) + Unique Enterprise Manager bridge identifier + + :param list[str] id: (optional) + Optional list of Exadata insight resource `OCIDs`__. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param list[str] status: (optional) + Resource Status + + Allowed values are: "DISABLED", "ENABLED", "TERMINATED" + + :param list[str] lifecycle_state: (optional) + Lifecycle states + + Allowed values are: "CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED", "NEEDS_ATTENTION" + + :param list[str] exadata_type: (optional) + Filter by one or more Exadata types. + Possible value are DBMACHINE, EXACS, and EXACC. + + :param int limit: (optional) + For list pagination. The maximum number of results per page, or items to + return in a paginated \"List\" call. + For important details about how pagination works, see + `List Pagination`__. + Example: `50` + + __ https://docs.cloud.oracle.com/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. For important details about how pagination works, + see `List Pagination`__. + + __ https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine + + :param str sort_order: (optional) + The sort order to use, either ascending (`ASC`) or descending (`DESC`). + + Allowed values are: "ASC", "DESC" + + :param str sort_by: (optional) + Exadata insight list sort options. If `fields` parameter is selected, the `sortBy` parameter must be one of the fields specified. Default order for timeCreated is descending. Default order for exadataName is ascending. If no value is specified timeCreated is default. + + Allowed values are: "timeCreated", "exadataName" + + :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. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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.opsi.models.ExadataInsightSummaryCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_exadata_insights API. + """ + resource_path = "/exadataInsights" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "compartment_id", + "enterprise_manager_bridge_id", + "id", + "status", + "lifecycle_state", + "exadata_type", + "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_exadata_insights got unknown kwargs: {!r}".format(extra_kwargs)) + + if 'status' in kwargs: + status_allowed_values = ["DISABLED", "ENABLED", "TERMINATED"] + for status_item in kwargs['status']: + if status_item not in status_allowed_values: + raise ValueError( + "Invalid value for `status`, must be one of {0}".format(status_allowed_values) + ) + + if 'lifecycle_state' in kwargs: + lifecycle_state_allowed_values = ["CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED", "NEEDS_ATTENTION"] + for lifecycle_state_item in kwargs['lifecycle_state']: + if lifecycle_state_item 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", "exadataName"] + 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": kwargs.get("compartment_id", missing), + "enterpriseManagerBridgeId": kwargs.get("enterprise_manager_bridge_id", missing), + "id": self.base_client.generate_collection_format_param(kwargs.get("id", missing), 'multi'), + "status": self.base_client.generate_collection_format_param(kwargs.get("status", missing), 'multi'), + "lifecycleState": self.base_client.generate_collection_format_param(kwargs.get("lifecycle_state", missing), 'multi'), + "exadataType": self.base_client.generate_collection_format_param(kwargs.get("exadata_type", missing), 'multi'), + "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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + 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="ExadataInsightSummaryCollection") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="ExadataInsightSummaryCollection") + + def list_host_configurations(self, **kwargs): + """ + Gets a list of host insight configurations based on the query parameters specified. Either compartmentId or hostInsightId query parameter must be specified. + When both compartmentId and compartmentIdInSubtree are specified, a list of host insight configurations in that compartment and in all sub-compartments will be returned. + + + :param str compartment_id: (optional) + The `OCID`__ of the compartment. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param str enterprise_manager_bridge_id: (optional) + Unique Enterprise Manager bridge identifier + + :param list[str] id: (optional) + Optional list of host insight resource `OCIDs`__. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param list[str] exadata_insight_id: (optional) + Optional list of exadata insight resource `OCIDs`__. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param list[str] platform_type: (optional) + Filter by one or more platform types. + Possible value is LINUX. + + Allowed values are: "LINUX" + + :param int limit: (optional) + For list pagination. The maximum number of results per page, or items to + return in a paginated \"List\" call. + For important details about how pagination works, see + `List Pagination`__. + Example: `50` + + __ https://docs.cloud.oracle.com/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. For important details about how pagination works, + see `List Pagination`__. + + __ https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine + + :param str sort_order: (optional) + The sort order to use, either ascending (`ASC`) or descending (`DESC`). + + Allowed values are: "ASC", "DESC" + + :param str sort_by: (optional) + Host configuration list sort options. + + Allowed values are: "hostName", "platformType" + + :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 list[str] defined_tag_equals: (optional) + A list of tag filters to apply. Only resources with a defined tag matching the value will be returned. + Each item in the list has the format \"{namespace}.{tagName}.{value}\". All inputs are case-insensitive. + Multiple values for the same key (i.e. same namespace and tag name) are interpreted as \"OR\". + Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as \"AND\". + + :param list[str] freeform_tag_equals: (optional) + A list of tag filters to apply. Only resources with a freeform tag matching the value will be returned. + The key for each tag is \"{tagName}.{value}\". All inputs are case-insensitive. + Multiple values for the same tag name are interpreted as \"OR\". Values for different tag names are interpreted as \"AND\". + + :param list[str] defined_tag_exists: (optional) + A list of tag existence filters to apply. Only resources for which the specified defined tags exist will be returned. + Each item in the list has the format \"{namespace}.{tagName}.true\" (for checking existence of a defined tag) + or \"{namespace}.true\". All inputs are case-insensitive. + Currently, only existence (\"true\" at the end) is supported. Absence (\"false\" at the end) is not supported. + Multiple values for the same key (i.e. same namespace and tag name) are interpreted as \"OR\". + Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as \"AND\". + + :param list[str] freeform_tag_exists: (optional) + A list of tag existence filters to apply. Only resources for which the specified freeform tags exist the value will be returned. + The key for each tag is \"{tagName}.true\". All inputs are case-insensitive. + Currently, only existence (\"true\" at the end) is supported. Absence (\"false\" at the end) is not supported. + Multiple values for different tag names are interpreted as \"AND\". + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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.opsi.models.HostConfigurationCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_host_configurations API. + """ + resource_path = "/hostInsights/hostConfigurations" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "compartment_id", + "enterprise_manager_bridge_id", + "id", + "exadata_insight_id", + "platform_type", + "limit", + "page", + "sort_order", + "sort_by", + "opc_request_id", + "defined_tag_equals", + "freeform_tag_equals", + "defined_tag_exists", + "freeform_tag_exists" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_host_configurations got unknown kwargs: {!r}".format(extra_kwargs)) + + if 'platform_type' in kwargs: + platform_type_allowed_values = ["LINUX"] + for platform_type_item in kwargs['platform_type']: + if platform_type_item not in platform_type_allowed_values: + raise ValueError( + "Invalid value for `platform_type`, must be one of {0}".format(platform_type_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 = ["hostName", "platformType"] + 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": kwargs.get("compartment_id", missing), + "enterpriseManagerBridgeId": kwargs.get("enterprise_manager_bridge_id", missing), + "id": self.base_client.generate_collection_format_param(kwargs.get("id", missing), 'multi'), + "exadataInsightId": self.base_client.generate_collection_format_param(kwargs.get("exadata_insight_id", missing), 'multi'), + "platformType": self.base_client.generate_collection_format_param(kwargs.get("platform_type", missing), 'multi'), + "limit": kwargs.get("limit", missing), + "page": kwargs.get("page", missing), + "sortOrder": kwargs.get("sort_order", missing), + "sortBy": kwargs.get("sort_by", missing), + "definedTagEquals": self.base_client.generate_collection_format_param(kwargs.get("defined_tag_equals", missing), 'multi'), + "freeformTagEquals": self.base_client.generate_collection_format_param(kwargs.get("freeform_tag_equals", missing), 'multi'), + "definedTagExists": self.base_client.generate_collection_format_param(kwargs.get("defined_tag_exists", missing), 'multi'), + "freeformTagExists": self.base_client.generate_collection_format_param(kwargs.get("freeform_tag_exists", missing), 'multi') + } + 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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + 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="HostConfigurationCollection") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="HostConfigurationCollection") + + def list_host_insights(self, **kwargs): + """ + Gets a list of host insights based on the query parameters specified. Either compartmentId or id query parameter must be specified. + + + :param str compartment_id: (optional) + The `OCID`__ of the compartment. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param list[str] id: (optional) + Optional list of host insight resource `OCIDs`__. __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm :param list[str] status: (optional) Resource Status - Allowed values are: "DISABLED", "ENABLED", "TERMINATED" + Allowed values are: "DISABLED", "ENABLED", "TERMINATED" + + :param list[str] lifecycle_state: (optional) + Lifecycle states + + Allowed values are: "CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED", "NEEDS_ATTENTION" + + :param list[str] host_type: (optional) + Filter by one or more host types. + Possible value is EXTERNAL-HOST. + + :param list[str] platform_type: (optional) + Filter by one or more platform types. + Possible value is LINUX. + + Allowed values are: "LINUX" + + :param int limit: (optional) + For list pagination. The maximum number of results per page, or items to + return in a paginated \"List\" call. + For important details about how pagination works, see + `List Pagination`__. + Example: `50` + + __ https://docs.cloud.oracle.com/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. For important details about how pagination works, + see `List Pagination`__. + + __ https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine + + :param str sort_order: (optional) + The sort order to use, either ascending (`ASC`) or descending (`DESC`). + + Allowed values are: "ASC", "DESC" + + :param str sort_by: (optional) + Host insight list sort options. If `fields` parameter is selected, the `sortBy` parameter must be one of the fields specified. + + Allowed values are: "hostName", "hostType" + + :param str enterprise_manager_bridge_id: (optional) + Unique Enterprise Manager bridge identifier + + :param str exadata_insight_id: (optional) + `OCID`__ of exadata insight resource. + + __ https://docs.cloud.oracle.com/iaas/Content/General/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. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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.opsi.models.HostInsightSummaryCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_host_insights API. + """ + resource_path = "/hostInsights" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "compartment_id", + "id", + "status", + "lifecycle_state", + "host_type", + "platform_type", + "limit", + "page", + "sort_order", + "sort_by", + "enterprise_manager_bridge_id", + "exadata_insight_id", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_host_insights got unknown kwargs: {!r}".format(extra_kwargs)) + + if 'status' in kwargs: + status_allowed_values = ["DISABLED", "ENABLED", "TERMINATED"] + for status_item in kwargs['status']: + if status_item not in status_allowed_values: + raise ValueError( + "Invalid value for `status`, must be one of {0}".format(status_allowed_values) + ) + + if 'lifecycle_state' in kwargs: + lifecycle_state_allowed_values = ["CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED", "NEEDS_ATTENTION"] + for lifecycle_state_item in kwargs['lifecycle_state']: + if lifecycle_state_item not in lifecycle_state_allowed_values: + raise ValueError( + "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values) + ) + + if 'platform_type' in kwargs: + platform_type_allowed_values = ["LINUX"] + for platform_type_item in kwargs['platform_type']: + if platform_type_item not in platform_type_allowed_values: + raise ValueError( + "Invalid value for `platform_type`, must be one of {0}".format(platform_type_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 = ["hostName", "hostType"] + 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": kwargs.get("compartment_id", missing), + "id": self.base_client.generate_collection_format_param(kwargs.get("id", missing), 'multi'), + "status": self.base_client.generate_collection_format_param(kwargs.get("status", missing), 'multi'), + "lifecycleState": self.base_client.generate_collection_format_param(kwargs.get("lifecycle_state", missing), 'multi'), + "hostType": self.base_client.generate_collection_format_param(kwargs.get("host_type", missing), 'multi'), + "platformType": self.base_client.generate_collection_format_param(kwargs.get("platform_type", missing), 'multi'), + "limit": kwargs.get("limit", missing), + "page": kwargs.get("page", missing), + "sortOrder": kwargs.get("sort_order", missing), + "sortBy": kwargs.get("sort_by", missing), + "enterpriseManagerBridgeId": kwargs.get("enterprise_manager_bridge_id", missing), + "exadataInsightId": kwargs.get("exadata_insight_id", 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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + 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="HostInsightSummaryCollection") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="HostInsightSummaryCollection") + + def list_hosted_entities(self, compartment_id, id, **kwargs): + """ + Get a list of hosted entities details. + + + :param str compartment_id: (required) + The `OCID`__ of the compartment. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param str id: (required) + Required `OCID`__ of the host insight resource. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param str analysis_time_interval: (optional) + Specify time period in ISO 8601 format with respect to current time. + Default is last 30 days represented by P30D. + If timeInterval is specified, then timeIntervalStart and timeIntervalEnd will be ignored. + Examples P90D (last 90 days), P4W (last 4 weeks), P2M (last 2 months), P1Y (last 12 months), . Maximum value allowed is 25 months prior to current time (P25M). + + :param datetime time_interval_start: (optional) + Analysis start time in UTC in ISO 8601 format(inclusive). + Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). + The minimum allowed value is 2 years prior to the current day. + timeIntervalStart and timeIntervalEnd parameters are used together. + If analysisTimeInterval is specified, this parameter is ignored. + + :param datetime time_interval_end: (optional) + Analysis end time in UTC in ISO 8601 format(exclusive). + Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). + timeIntervalStart and timeIntervalEnd are used together. + If timeIntervalEnd is not specified, current time is used as timeIntervalEnd. + + :param list[str] platform_type: (optional) + Filter by one or more platform types. + Possible value is LINUX. + + Allowed values are: "LINUX" + + :param str exadata_insight_id: (optional) + `OCID`__ of exadata insight resource. + + __ https://docs.cloud.oracle.com/iaas/Content/General/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. + For important details about how pagination works, see + `List Pagination`__. + Example: `50` + + __ https://docs.cloud.oracle.com/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. For important details about how pagination works, + see `List Pagination`__. + + __ https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine + + :param str sort_order: (optional) + The sort order to use, either ascending (`ASC`) or descending (`DESC`). + + Allowed values are: "ASC", "DESC" + + :param str sort_by: (optional) + Hosted entity list sort options. + + Allowed values are: "entityName", "entityType" + + :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. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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.opsi.models.HostedEntityCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_hosted_entities API. + """ + resource_path = "/hostInsights/hostedEntities" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "analysis_time_interval", + "time_interval_start", + "time_interval_end", + "platform_type", + "exadata_insight_id", + "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_hosted_entities got unknown kwargs: {!r}".format(extra_kwargs)) + + if 'platform_type' in kwargs: + platform_type_allowed_values = ["LINUX"] + for platform_type_item in kwargs['platform_type']: + if platform_type_item not in platform_type_allowed_values: + raise ValueError( + "Invalid value for `platform_type`, must be one of {0}".format(platform_type_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 = ["entityName", "entityType"] + 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, + "analysisTimeInterval": kwargs.get("analysis_time_interval", missing), + "timeIntervalStart": kwargs.get("time_interval_start", missing), + "timeIntervalEnd": kwargs.get("time_interval_end", missing), + "platformType": self.base_client.generate_collection_format_param(kwargs.get("platform_type", missing), 'multi'), + "id": id, + "exadataInsightId": kwargs.get("exadata_insight_id", 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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + 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="HostedEntityCollection") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="HostedEntityCollection") + + def list_importable_agent_entities(self, compartment_id, **kwargs): + """ + Gets a list of agent entities available to add a new hostInsight. An agent entity is \"available\" + and will be shown if all the following conditions are true: + 1. The agent OCID is not already being used for an existing hostInsight. + 2. The agent availabilityStatus = 'ACTIVE' + 3. The agent lifecycleState = 'ACTIVE' + + + :param str compartment_id: (required) + The `OCID`__ of the compartment. + + __ https://docs.cloud.oracle.com/iaas/Content/General/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. + For important details about how pagination works, see + `List Pagination`__. + Example: `50` + + __ https://docs.cloud.oracle.com/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. For important details about how pagination works, + see `List Pagination`__. + + __ https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine + + :param str sort_order: (optional) + The sort order to use, either ascending (`ASC`) or descending (`DESC`). + + Allowed values are: "ASC", "DESC" + + :param str sort_by: (optional) + Hosted entity list sort options. + + Allowed values are: "entityName", "entityType" + + :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. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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.opsi.models.ImportableAgentEntitySummaryCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_importable_agent_entities API. + """ + resource_path = "/importableAgentEntities" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "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_importable_agent_entities got unknown kwargs: {!r}".format(extra_kwargs)) + + 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 = ["entityName", "entityType"] + 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, + "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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + 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="ImportableAgentEntitySummaryCollection") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="ImportableAgentEntitySummaryCollection") + + def list_importable_enterprise_manager_entities(self, enterprise_manager_bridge_id, **kwargs): + """ + Gets a list of importable entities for an Operations Insights Enterprise Manager bridge that have not been imported before. + + + :param str enterprise_manager_bridge_id: (required) + Unique Enterprise Manager bridge identifier + + :param int limit: (optional) + For list pagination. The maximum number of results per page, or items to + return in a paginated \"List\" call. + For important details about how pagination works, see + `List Pagination`__. + Example: `50` + + __ https://docs.cloud.oracle.com/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. For important details about how pagination works, + see `List Pagination`__. + + __ https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine + + :param list[str] enterprise_manager_entity_type: (optional) + Filter by one or more Enterprise Manager entity types. Currently, the supported types are \"oracle_pdb\", \"oracle_database\", \"host\", \"oracle_dbmachine\", \"oracle_exa_cloud_service\", and \"oracle_oci_exadata_cloud_service\". If this parameter is not specified, targets of all supported entity types are returned by default. + + :param str enterprise_manager_identifier: (optional) + Used in combination with enterpriseManagerParentEntityIdentifier to return the members of a particular Enterprise Manager parent entity. Both enterpriseManagerIdentifier and enterpriseManagerParentEntityIdentifier must be specified to identify a particular Enterprise Manager parent entity. + + :param str enterprise_manager_parent_entity_identifier: (optional) + Used in combination with enterpriseManagerIdentifier to return the members of a particular Enterprise Manager parent entity. Both enterpriseManagerIdentifier and enterpriseManagerParentEntityIdentifier must be specified to identify a particular Enterprise Manager parent entity. + + :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. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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.opsi.models.ImportableEnterpriseManagerEntityCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_importable_enterprise_manager_entities API. + """ + resource_path = "/enterpriseManagerBridges/{enterpriseManagerBridgeId}/importableEnterpriseManagerEntities" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "limit", + "page", + "enterprise_manager_entity_type", + "enterprise_manager_identifier", + "enterprise_manager_parent_entity_identifier", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_importable_enterprise_manager_entities got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "enterpriseManagerBridgeId": enterprise_manager_bridge_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)) + + query_params = { + "limit": kwargs.get("limit", missing), + "page": kwargs.get("page", missing), + "enterpriseManagerEntityType": self.base_client.generate_collection_format_param(kwargs.get("enterprise_manager_entity_type", missing), 'multi'), + "enterpriseManagerIdentifier": kwargs.get("enterprise_manager_identifier", missing), + "enterpriseManagerParentEntityIdentifier": kwargs.get("enterprise_manager_parent_entity_identifier", 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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="ImportableEnterpriseManagerEntityCollection") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="ImportableEnterpriseManagerEntityCollection") + + def list_sql_plans(self, compartment_id, sql_identifier, plan_hash, **kwargs): + """ + Query SQL Warehouse to list the plan xml for a given SQL execution plan. This returns a SqlPlanCollection object, but is currently limited to a single plan. + Either databaseId or id must be specified. + + + :param str compartment_id: (required) + The `OCID`__ of the compartment. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param str sql_identifier: (required) + Unique SQL_ID for a SQL Statement. + Example: `6rgjh9bjmy2s7` + + :param oci.opsi.models.list[int] plan_hash: (required) + Unique plan hash for a SQL Plan of a particular SQL Statement. + Example: `9820154385` + + :param str database_id: (optional) + Optional `OCID`__ of the associated DBaaS entity. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param str id: (optional) + `OCID`__ of the database insight resource. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param str page: (optional) + For list pagination. The value of the `opc-next-page` response header from + the previous \"List\" call. For important details about how pagination works, + see `List Pagination`__. + + __ https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine + + :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. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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.opsi.models.SqlPlanCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_sql_plans API. + """ + resource_path = "/databaseInsights/sqlPlans" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "database_id", + "id", + "page", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_sql_plans got unknown kwargs: {!r}".format(extra_kwargs)) + + query_params = { + "compartmentId": compartment_id, + "databaseId": kwargs.get("database_id", missing), + "id": kwargs.get("id", missing), + "sqlIdentifier": sql_identifier, + "planHash": self.base_client.generate_collection_format_param(plan_hash, 'multi'), + "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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + 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="SqlPlanCollection") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="SqlPlanCollection") + + def list_sql_searches(self, compartment_id, sql_identifier, **kwargs): + """ + Search SQL by SQL Identifier across databases and get the SQL Text and the details of the databases executing the SQL for a given time period. + + + :param str compartment_id: (required) + The `OCID`__ of the compartment. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param str sql_identifier: (required) + Unique SQL_ID for a SQL Statement. + Example: `6rgjh9bjmy2s7` + + :param str analysis_time_interval: (optional) + Specify time period in ISO 8601 format with respect to current time. + Default is last 30 days represented by P30D. + If timeInterval is specified, then timeIntervalStart and timeIntervalEnd will be ignored. + Examples P90D (last 90 days), P4W (last 4 weeks), P2M (last 2 months), P1Y (last 12 months), . Maximum value allowed is 25 months prior to current time (P25M). + + :param datetime time_interval_start: (optional) + Analysis start time in UTC in ISO 8601 format(inclusive). + Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). + The minimum allowed value is 2 years prior to the current day. + timeIntervalStart and timeIntervalEnd parameters are used together. + If analysisTimeInterval is specified, this parameter is ignored. + + :param datetime time_interval_end: (optional) + Analysis end time in UTC in ISO 8601 format(exclusive). + Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). + timeIntervalStart and timeIntervalEnd are used together. + If timeIntervalEnd is not specified, current time is used as timeIntervalEnd. + + :param str page: (optional) + For list pagination. The value of the `opc-next-page` response header from + the previous \"List\" call. For important details about how pagination works, + see `List Pagination`__. + + __ https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine + + :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 list[str] defined_tag_equals: (optional) + A list of tag filters to apply. Only resources with a defined tag matching the value will be returned. + Each item in the list has the format \"{namespace}.{tagName}.{value}\". All inputs are case-insensitive. + Multiple values for the same key (i.e. same namespace and tag name) are interpreted as \"OR\". + Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as \"AND\". + + :param list[str] freeform_tag_equals: (optional) + A list of tag filters to apply. Only resources with a freeform tag matching the value will be returned. + The key for each tag is \"{tagName}.{value}\". All inputs are case-insensitive. + Multiple values for the same tag name are interpreted as \"OR\". Values for different tag names are interpreted as \"AND\". + + :param list[str] defined_tag_exists: (optional) + A list of tag existence filters to apply. Only resources for which the specified defined tags exist will be returned. + Each item in the list has the format \"{namespace}.{tagName}.true\" (for checking existence of a defined tag) + or \"{namespace}.true\". All inputs are case-insensitive. + Currently, only existence (\"true\" at the end) is supported. Absence (\"false\" at the end) is not supported. + Multiple values for the same key (i.e. same namespace and tag name) are interpreted as \"OR\". + Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as \"AND\". + + :param list[str] freeform_tag_exists: (optional) + A list of tag existence filters to apply. Only resources for which the specified freeform tags exist the value will be returned. + The key for each tag is \"{tagName}.true\". All inputs are case-insensitive. + Currently, only existence (\"true\" at the end) is supported. Absence (\"false\" at the end) is not supported. + Multiple values for different tag names are interpreted as \"AND\". + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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.opsi.models.SqlSearchCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_sql_searches API. + """ + resource_path = "/databaseInsights/sqlSearches" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "analysis_time_interval", + "time_interval_start", + "time_interval_end", + "page", + "opc_request_id", + "defined_tag_equals", + "freeform_tag_equals", + "defined_tag_exists", + "freeform_tag_exists" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_sql_searches got unknown kwargs: {!r}".format(extra_kwargs)) + + query_params = { + "compartmentId": compartment_id, + "sqlIdentifier": sql_identifier, + "analysisTimeInterval": kwargs.get("analysis_time_interval", missing), + "timeIntervalStart": kwargs.get("time_interval_start", missing), + "timeIntervalEnd": kwargs.get("time_interval_end", missing), + "page": kwargs.get("page", missing), + "definedTagEquals": self.base_client.generate_collection_format_param(kwargs.get("defined_tag_equals", missing), 'multi'), + "freeformTagEquals": self.base_client.generate_collection_format_param(kwargs.get("freeform_tag_equals", missing), 'multi'), + "definedTagExists": self.base_client.generate_collection_format_param(kwargs.get("defined_tag_exists", missing), 'multi'), + "freeformTagExists": self.base_client.generate_collection_format_param(kwargs.get("freeform_tag_exists", missing), 'multi') + } + 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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + 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="SqlSearchCollection") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="SqlSearchCollection") + + def list_sql_texts(self, compartment_id, sql_identifier, **kwargs): + """ + Query SQL Warehouse to get the full SQL Text for a SQL. - :param list[str] lifecycle_state: (optional) - Lifecycle states - Allowed values are: "CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED", "NEEDS_ATTENTION" + :param str compartment_id: (required) + The `OCID`__ of the compartment. - :param list[str] database_type: (optional) - Filter by one or more database type. - Possible values are ADW-S, ATP-S, ADW-D, ATP-D, EXTERNAL-PDB, EXTERNAL-NONCDB. + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm - Allowed values are: "ADW-S", "ATP-S", "ADW-D", "ATP-D", "EXTERNAL-PDB", "EXTERNAL-NONCDB" + :param oci.opsi.models.list[str] sql_identifier: (required) + One or more unique SQL_IDs for a SQL Statement. + Example: `6rgjh9bjmy2s7` :param list[str] database_id: (optional) - Optional list of database `OCIDs`__ of the associated DBaaS entity. + Optional list of database `OCIDs`__ of the assosicated DBaaS entity. __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm - :param list[str] fields: (optional) - Specifies the fields to return in a database summary response. By default all fields are returned if omitted. + :param list[str] id: (optional) + Optional list of database `OCIDs`__ of the database insight resource. - Allowed values are: "compartmentId", "databaseName", "databaseDisplayName", "databaseType", "databaseVersion", "databaseHostNames", "freeformTags", "definedTags" + __ https://docs.cloud.oracle.com/iaas/Content/General/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. - For important details about how pagination works, see - `List Pagination`__. - Example: `50` + :param str page: (optional) + For list pagination. The value of the `opc-next-page` response header from + the previous \"List\" call. For important details about how pagination works, + see `List Pagination`__. __ https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine + :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 list[str] defined_tag_equals: (optional) + A list of tag filters to apply. Only resources with a defined tag matching the value will be returned. + Each item in the list has the format \"{namespace}.{tagName}.{value}\". All inputs are case-insensitive. + Multiple values for the same key (i.e. same namespace and tag name) are interpreted as \"OR\". + Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as \"AND\". + + :param list[str] freeform_tag_equals: (optional) + A list of tag filters to apply. Only resources with a freeform tag matching the value will be returned. + The key for each tag is \"{tagName}.{value}\". All inputs are case-insensitive. + Multiple values for the same tag name are interpreted as \"OR\". Values for different tag names are interpreted as \"AND\". + + :param list[str] defined_tag_exists: (optional) + A list of tag existence filters to apply. Only resources for which the specified defined tags exist will be returned. + Each item in the list has the format \"{namespace}.{tagName}.true\" (for checking existence of a defined tag) + or \"{namespace}.true\". All inputs are case-insensitive. + Currently, only existence (\"true\" at the end) is supported. Absence (\"false\" at the end) is not supported. + Multiple values for the same key (i.e. same namespace and tag name) are interpreted as \"OR\". + Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as \"AND\". + + :param list[str] freeform_tag_exists: (optional) + A list of tag existence filters to apply. Only resources for which the specified freeform tags exist the value will be returned. + The key for each tag is \"{tagName}.true\". All inputs are case-insensitive. + Currently, only existence (\"true\" at the end) is supported. Absence (\"false\" at the end) is not supported. + Multiple values for different tag names are interpreted as \"AND\". + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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.opsi.models.SqlTextCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_sql_texts API. + """ + resource_path = "/databaseInsights/sqlTexts" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "database_id", + "id", + "page", + "opc_request_id", + "defined_tag_equals", + "freeform_tag_equals", + "defined_tag_exists", + "freeform_tag_exists" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_sql_texts got unknown kwargs: {!r}".format(extra_kwargs)) + + query_params = { + "compartmentId": compartment_id, + "databaseId": self.base_client.generate_collection_format_param(kwargs.get("database_id", missing), 'multi'), + "id": self.base_client.generate_collection_format_param(kwargs.get("id", missing), 'multi'), + "sqlIdentifier": self.base_client.generate_collection_format_param(sql_identifier, 'multi'), + "page": kwargs.get("page", missing), + "definedTagEquals": self.base_client.generate_collection_format_param(kwargs.get("defined_tag_equals", missing), 'multi'), + "freeformTagEquals": self.base_client.generate_collection_format_param(kwargs.get("freeform_tag_equals", missing), 'multi'), + "definedTagExists": self.base_client.generate_collection_format_param(kwargs.get("defined_tag_exists", missing), 'multi'), + "freeformTagExists": self.base_client.generate_collection_format_param(kwargs.get("freeform_tag_exists", missing), 'multi') + } + 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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + 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="SqlTextCollection") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="SqlTextCollection") + + def list_work_request_errors(self, work_request_id, **kwargs): + """ + Return a (paginated) list of errors for a given work request. + + + :param str work_request_id: (required) + The ID of the asynchronous request. + + :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 page: (optional) For list pagination. The value of the `opc-next-page` response header from the previous \"List\" call. For important details about how pagination works, @@ -2518,19 +5063,24 @@ def list_database_insights(self, **kwargs): __ https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine - :param str sort_order: (optional) - The sort order to use, either ascending (`ASC`) or descending (`DESC`). + :param int limit: (optional) + For list pagination. The maximum number of results per page, or items to + return in a paginated \"List\" call. + For important details about how pagination works, see + `List Pagination`__. + Example: `50` - Allowed values are: "ASC", "DESC" + __ https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine :param str sort_by: (optional) - Database insight list sort options. If `fields` parameter is selected, the `sortBy` parameter must be one of the fields specified. + The field to sort by. Only one sort order may be provided. Default order for timeAccepted is descending. - Allowed values are: "databaseName", "databaseDisplayName", "databaseType" + Allowed values are: "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 str sort_order: (optional) + The sort order to use, either ascending (`ASC`) or descending (`DESC`). + + Allowed values are: "ASC", "DESC" :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. @@ -2540,68 +5090,45 @@ def list_database_insights(self, **kwargs): 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.opsi.models.DatabaseInsightsCollection` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.opsi.models.WorkRequestErrorCollection` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use list_database_insights API. + Click `here `__ to see an example of how to use list_work_request_errors API. """ - resource_path = "/databaseInsights" + resource_path = "/workRequests/{workRequestId}/errors" method = "GET" # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", - "compartment_id", - "enterprise_manager_bridge_id", - "id", - "status", - "lifecycle_state", - "database_type", - "database_id", - "fields", - "limit", + "opc_request_id", "page", - "sort_order", + "limit", "sort_by", - "opc_request_id" + "sort_order" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "list_database_insights got unknown kwargs: {!r}".format(extra_kwargs)) + "list_work_request_errors got unknown kwargs: {!r}".format(extra_kwargs)) - if 'status' in kwargs: - status_allowed_values = ["DISABLED", "ENABLED", "TERMINATED"] - for status_item in kwargs['status']: - if status_item not in status_allowed_values: - raise ValueError( - "Invalid value for `status`, must be one of {0}".format(status_allowed_values) - ) + path_params = { + "workRequestId": work_request_id + } - if 'lifecycle_state' in kwargs: - lifecycle_state_allowed_values = ["CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED", "NEEDS_ATTENTION"] - for lifecycle_state_item in kwargs['lifecycle_state']: - if lifecycle_state_item not in lifecycle_state_allowed_values: - raise ValueError( - "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values) - ) + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} - if 'database_type' in kwargs: - database_type_allowed_values = ["ADW-S", "ATP-S", "ADW-D", "ATP-D", "EXTERNAL-PDB", "EXTERNAL-NONCDB"] - for database_type_item in kwargs['database_type']: - if database_type_item not in database_type_allowed_values: - raise ValueError( - "Invalid value for `database_type`, must be one of {0}".format(database_type_allowed_values) - ) + 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)) - if 'fields' in kwargs: - fields_allowed_values = ["compartmentId", "databaseName", "databaseDisplayName", "databaseType", "databaseVersion", "databaseHostNames", "freeformTags", "definedTags"] - for fields_item in kwargs['fields']: - if fields_item not in fields_allowed_values: - raise ValueError( - "Invalid value for `fields`, must be one of {0}".format(fields_allowed_values) - ) + if 'sort_by' in kwargs: + sort_by_allowed_values = ["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) + ) if 'sort_order' in kwargs: sort_order_allowed_values = ["ASC", "DESC"] @@ -2609,27 +5136,12 @@ def list_database_insights(self, **kwargs): 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 = ["databaseName", "databaseDisplayName", "databaseType"] - 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": kwargs.get("compartment_id", missing), - "enterpriseManagerBridgeId": kwargs.get("enterprise_manager_bridge_id", missing), - "id": self.base_client.generate_collection_format_param(kwargs.get("id", missing), 'multi'), - "status": self.base_client.generate_collection_format_param(kwargs.get("status", missing), 'multi'), - "lifecycleState": self.base_client.generate_collection_format_param(kwargs.get("lifecycle_state", missing), 'multi'), - "databaseType": self.base_client.generate_collection_format_param(kwargs.get("database_type", missing), 'multi'), - "databaseId": self.base_client.generate_collection_format_param(kwargs.get("database_id", missing), 'multi'), - "fields": self.base_client.generate_collection_format_param(kwargs.get("fields", missing), 'multi'), - "limit": kwargs.get("limit", missing), + + query_params = { "page": kwargs.get("page", missing), - "sortOrder": kwargs.get("sort_order", missing), - "sortBy": kwargs.get("sort_by", missing) + "limit": kwargs.get("limit", missing), + "sortBy": kwargs.get("sort_by", missing), + "sortOrder": kwargs.get("sort_order", missing) } query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} @@ -2653,37 +5165,37 @@ def list_database_insights(self, **kwargs): self.base_client.call_api, resource_path=resource_path, method=method, + path_params=path_params, query_params=query_params, header_params=header_params, - response_type="DatabaseInsightsCollection") + response_type="WorkRequestErrorCollection") else: return self.base_client.call_api( resource_path=resource_path, method=method, + path_params=path_params, query_params=query_params, header_params=header_params, - response_type="DatabaseInsightsCollection") + response_type="WorkRequestErrorCollection") - def list_enterprise_manager_bridges(self, **kwargs): + def list_work_request_logs(self, work_request_id, **kwargs): """ - Gets a list of Operations Insights Enterprise Manager bridges. Either compartmentId or id must be specified. - - - :param str compartment_id: (optional) - The `OCID`__ of the compartment. + Return a (paginated) list of logs for a given work request. - __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm - :param str display_name: (optional) - A filter to return only resources that match the entire display name. + :param str work_request_id: (required) + The ID of the asynchronous request. - :param str id: (optional) - Unique Enterprise Manager bridge identifier + :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 list[str] lifecycle_state: (optional) - Lifecycle states + :param str page: (optional) + For list pagination. The value of the `opc-next-page` response header from + the previous \"List\" call. For important details about how pagination works, + see `List Pagination`__. - Allowed values are: "CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED", "NEEDS_ATTENTION" + __ https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine :param int limit: (optional) For list pagination. The maximum number of results per page, or items to @@ -2694,27 +5206,16 @@ def list_enterprise_manager_bridges(self, **kwargs): __ https://docs.cloud.oracle.com/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. For important details about how pagination works, - see `List Pagination`__. + :param str sort_by: (optional) + The field to sort by. Only one sort order may be provided. Default order for timeAccepted is descending. - __ https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine + Allowed values are: "timeAccepted" :param str sort_order: (optional) The sort order to use, either ascending (`ASC`) or descending (`DESC`). Allowed values are: "ASC", "DESC" - :param str sort_by: (optional) - The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. If no value is specified timeCreated is default. - - Allowed values are: "timeCreated", "displayName" - - :param str opc_request_id: (optional) - 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. @@ -2723,64 +5224,58 @@ def list_enterprise_manager_bridges(self, **kwargs): 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.opsi.models.EnterpriseManagerBridgeCollection` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.opsi.models.WorkRequestLogEntryCollection` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use list_enterprise_manager_bridges API. + Click `here `__ to see an example of how to use list_work_request_logs API. """ - resource_path = "/enterpriseManagerBridges" + resource_path = "/workRequests/{workRequestId}/logs" method = "GET" # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", - "compartment_id", - "display_name", - "id", - "lifecycle_state", - "limit", + "opc_request_id", "page", - "sort_order", + "limit", "sort_by", - "opc_request_id" + "sort_order" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "list_enterprise_manager_bridges got unknown kwargs: {!r}".format(extra_kwargs)) + "list_work_request_logs got unknown kwargs: {!r}".format(extra_kwargs)) - if 'lifecycle_state' in kwargs: - lifecycle_state_allowed_values = ["CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED", "NEEDS_ATTENTION"] - for lifecycle_state_item in kwargs['lifecycle_state']: - if lifecycle_state_item not in lifecycle_state_allowed_values: - raise ValueError( - "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values) - ) + path_params = { + "workRequestId": work_request_id + } - 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) - ) + 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)) if 'sort_by' in kwargs: - sort_by_allowed_values = ["timeCreated", "displayName"] + sort_by_allowed_values = ["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) ) + 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) + ) + query_params = { - "compartmentId": kwargs.get("compartment_id", missing), - "displayName": kwargs.get("display_name", missing), - "id": kwargs.get("id", missing), - "lifecycleState": self.base_client.generate_collection_format_param(kwargs.get("lifecycle_state", missing), 'multi'), - "limit": kwargs.get("limit", missing), "page": kwargs.get("page", missing), - "sortOrder": kwargs.get("sort_order", missing), - "sortBy": kwargs.get("sort_by", missing) + "limit": kwargs.get("limit", missing), + "sortBy": kwargs.get("sort_by", missing), + "sortOrder": kwargs.get("sort_order", missing) } query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} @@ -2804,51 +5299,34 @@ def list_enterprise_manager_bridges(self, **kwargs): self.base_client.call_api, resource_path=resource_path, method=method, + path_params=path_params, query_params=query_params, header_params=header_params, - response_type="EnterpriseManagerBridgeCollection") + response_type="WorkRequestLogEntryCollection") else: return self.base_client.call_api( resource_path=resource_path, method=method, + path_params=path_params, query_params=query_params, header_params=header_params, - response_type="EnterpriseManagerBridgeCollection") + response_type="WorkRequestLogEntryCollection") - def list_host_insights(self, **kwargs): + def list_work_requests(self, **kwargs): """ - Gets a list of host insights based on the query parameters specified. Either compartmentId or id query parameter must be specified. - - - :param str compartment_id: (optional) - The `OCID`__ of the compartment. - - __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm - - :param list[str] id: (optional) - Optional list of host insight resource `OCIDs`__. - - __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm - - :param list[str] status: (optional) - Resource Status - - Allowed values are: "DISABLED", "ENABLED", "TERMINATED" + Lists the work requests in a compartment. Either compartmentId or id must be specified. Only one of id, resourceId or relatedResourceId can be specified optionally. - :param list[str] lifecycle_state: (optional) - Lifecycle states - - Allowed values are: "CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED", "NEEDS_ATTENTION" - :param list[str] host_type: (optional) - Filter by one or more host types. - Possible value is EXTERNAL-HOST. + :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 list[str] platform_type: (optional) - Filter by one or more platform types. - Possible value is LINUX. + :param str page: (optional) + For list pagination. The value of the `opc-next-page` response header from + the previous \"List\" call. For important details about how pagination works, + see `List Pagination`__. - Allowed values are: "LINUX" + __ https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine :param int limit: (optional) For list pagination. The maximum number of results per page, or items to @@ -2859,12 +5337,24 @@ def list_host_insights(self, **kwargs): __ https://docs.cloud.oracle.com/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. For important details about how pagination works, - see `List Pagination`__. + :param str compartment_id: (optional) + The `OCID`__ of the compartment. - __ https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param str id: (optional) + The ID of the asynchronous work request. + + :param str status: (optional) + A filter to return only resources their lifecycleState matches the given OperationStatus. + + Allowed values are: "ACCEPTED", "IN_PROGRESS", "WAITING", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED" + + :param str resource_id: (optional) + The ID of the resource affected by the work request. + + :param str related_resource_id: (optional) + The ID of the related resource for the resource affected by the work request, e.g. the related Exadata Insight OCID of the Database Insight work request :param str sort_order: (optional) The sort order to use, either ascending (`ASC`) or descending (`DESC`). @@ -2872,13 +5362,9 @@ def list_host_insights(self, **kwargs): Allowed values are: "ASC", "DESC" :param str sort_by: (optional) - Host insight list sort options. If `fields` parameter is selected, the `sortBy` parameter must be one of the fields specified. - - Allowed values are: "hostName", "hostType" + The field to sort by. Only one sort order may be provided. Default order for timeAccepted is descending. - :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. + Allowed values are: "timeAccepted" :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. @@ -2888,58 +5374,40 @@ def list_host_insights(self, **kwargs): 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.opsi.models.HostInsightSummaryCollection` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.opsi.models.WorkRequestCollection` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use list_host_insights API. + Click `here `__ to see an example of how to use list_work_requests API. """ - resource_path = "/hostInsights" + resource_path = "/workRequests" method = "GET" # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", + "opc_request_id", + "page", + "limit", "compartment_id", "id", "status", - "lifecycle_state", - "host_type", - "platform_type", - "limit", - "page", + "resource_id", + "related_resource_id", "sort_order", - "sort_by", - "opc_request_id" + "sort_by" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "list_host_insights got unknown kwargs: {!r}".format(extra_kwargs)) + "list_work_requests got unknown kwargs: {!r}".format(extra_kwargs)) if 'status' in kwargs: - status_allowed_values = ["DISABLED", "ENABLED", "TERMINATED"] - for status_item in kwargs['status']: - if status_item not in status_allowed_values: - raise ValueError( - "Invalid value for `status`, must be one of {0}".format(status_allowed_values) - ) - - if 'lifecycle_state' in kwargs: - lifecycle_state_allowed_values = ["CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED", "NEEDS_ATTENTION"] - for lifecycle_state_item in kwargs['lifecycle_state']: - if lifecycle_state_item not in lifecycle_state_allowed_values: - raise ValueError( - "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values) - ) - - if 'platform_type' in kwargs: - platform_type_allowed_values = ["LINUX"] - for platform_type_item in kwargs['platform_type']: - if platform_type_item not in platform_type_allowed_values: - raise ValueError( - "Invalid value for `platform_type`, must be one of {0}".format(platform_type_allowed_values) - ) + status_allowed_values = ["ACCEPTED", "IN_PROGRESS", "WAITING", "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"] @@ -2949,21 +5417,20 @@ def list_host_insights(self, **kwargs): ) if 'sort_by' in kwargs: - sort_by_allowed_values = ["hostName", "hostType"] + sort_by_allowed_values = ["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": kwargs.get("compartment_id", missing), - "id": self.base_client.generate_collection_format_param(kwargs.get("id", missing), 'multi'), - "status": self.base_client.generate_collection_format_param(kwargs.get("status", missing), 'multi'), - "lifecycleState": self.base_client.generate_collection_format_param(kwargs.get("lifecycle_state", missing), 'multi'), - "hostType": self.base_client.generate_collection_format_param(kwargs.get("host_type", missing), 'multi'), - "platformType": self.base_client.generate_collection_format_param(kwargs.get("platform_type", missing), 'multi'), - "limit": kwargs.get("limit", missing), "page": kwargs.get("page", missing), + "limit": kwargs.get("limit", missing), + "compartmentId": kwargs.get("compartment_id", missing), + "id": kwargs.get("id", missing), + "status": kwargs.get("status", missing), + "resourceId": kwargs.get("resource_id", missing), + "relatedResourceId": kwargs.get("related_resource_id", missing), "sortOrder": kwargs.get("sort_order", missing), "sortBy": kwargs.get("sort_by", missing) } @@ -2991,18 +5458,19 @@ def list_host_insights(self, **kwargs): method=method, query_params=query_params, header_params=header_params, - response_type="HostInsightSummaryCollection") + response_type="WorkRequestCollection") else: return self.base_client.call_api( resource_path=resource_path, method=method, query_params=query_params, header_params=header_params, - response_type="HostInsightSummaryCollection") + response_type="WorkRequestCollection") - def list_hosted_entities(self, compartment_id, id, **kwargs): + def summarize_database_insight_resource_capacity_trend(self, compartment_id, resource_metric, **kwargs): """ - Get a list of hosted entities details. + Returns response with time series data (endTimestamp, capacity, baseCapacity) for the time period specified. + The maximum time range for analysis is 2 years, hence this is intentionally not paginated. :param str compartment_id: (required) @@ -3010,10 +5478,9 @@ def list_hosted_entities(self, compartment_id, id, **kwargs): __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm - :param str id: (required) - Required `OCID`__ of the host insight resource. - - __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + :param str resource_metric: (required) + Filter by resource metric. + Supported values are CPU , STORAGE, MEMORY and IO. :param str analysis_time_interval: (optional) Specify time period in ISO 8601 format with respect to current time. @@ -3028,26 +5495,44 @@ def list_hosted_entities(self, compartment_id, id, **kwargs): timeIntervalStart and timeIntervalEnd parameters are used together. If analysisTimeInterval is specified, this parameter is ignored. - :param datetime time_interval_end: (optional) - Analysis end time in UTC in ISO 8601 format(exclusive). - Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). - timeIntervalStart and timeIntervalEnd are used together. - If timeIntervalEnd is not specified, current time is used as timeIntervalEnd. + :param datetime time_interval_end: (optional) + Analysis end time in UTC in ISO 8601 format(exclusive). + Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). + timeIntervalStart and timeIntervalEnd are used together. + If timeIntervalEnd is not specified, current time is used as timeIntervalEnd. + + :param list[str] database_type: (optional) + Filter by one or more database type. + Possible values are ADW-S, ATP-S, ADW-D, ATP-D, EXTERNAL-PDB, EXTERNAL-NONCDB. + + Allowed values are: "ADW-S", "ATP-S", "ADW-D", "ATP-D", "EXTERNAL-PDB", "EXTERNAL-NONCDB" + + :param list[str] database_id: (optional) + Optional list of database `OCIDs`__ of the associated DBaaS entity. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param list[str] id: (optional) + Optional list of database insight resource `OCIDs`__. - :param list[str] platform_type: (optional) - Filter by one or more platform types. - Possible value is LINUX. + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm - Allowed values are: "LINUX" + :param list[str] exadata_insight_id: (optional) + Optional list of exadata insight resource `OCIDs`__. - :param int limit: (optional) - For list pagination. The maximum number of results per page, or items to - return in a paginated \"List\" call. - For important details about how pagination works, see - `List Pagination`__. - Example: `50` + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm - __ https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine + :param list[str] cdb_name: (optional) + Filter by one or more cdb name. + + :param str utilization_level: (optional) + Filter by utilization level by the following buckets: + - HIGH_UTILIZATION: DBs with utilization greater or equal than 75. + - LOW_UTILIZATION: DBs with utilization lower than 25. + - MEDIUM_HIGH_UTILIZATION: DBs with utilization greater or equal than 50 but lower than 75. + - MEDIUM_LOW_UTILIZATION: DBs with utilization greater or equal than 25 but lower than 50. + + Allowed values are: "HIGH_UTILIZATION", "LOW_UTILIZATION", "MEDIUM_HIGH_UTILIZATION", "MEDIUM_LOW_UTILIZATION" :param str page: (optional) For list pagination. The value of the `opc-next-page` response header from @@ -3062,14 +5547,50 @@ def list_hosted_entities(self, compartment_id, id, **kwargs): Allowed values are: "ASC", "DESC" :param str sort_by: (optional) - Hosted entity list sort options. + Sorts using end timestamp , capacity or baseCapacity - Allowed values are: "entityName", "entityType" + Allowed values are: "endTimestamp", "capacity", "baseCapacity" + + :param str tablespace_name: (optional) + Tablespace name for a database + + :param list[str] host_name: (optional) + Filter by one or more hostname. + + :param bool is_database_instance_level_metrics: (optional) + Flag to indicate if database instance level metrics should be returned. The flag is ignored when a host name filter is not applied. + When a hostname filter is applied this flag will determine whether to return metrics for the instances located on the specified host or for the + whole database which contains an instance on this host. :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 list[str] defined_tag_equals: (optional) + A list of tag filters to apply. Only resources with a defined tag matching the value will be returned. + Each item in the list has the format \"{namespace}.{tagName}.{value}\". All inputs are case-insensitive. + Multiple values for the same key (i.e. same namespace and tag name) are interpreted as \"OR\". + Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as \"AND\". + + :param list[str] freeform_tag_equals: (optional) + A list of tag filters to apply. Only resources with a freeform tag matching the value will be returned. + The key for each tag is \"{tagName}.{value}\". All inputs are case-insensitive. + Multiple values for the same tag name are interpreted as \"OR\". Values for different tag names are interpreted as \"AND\". + + :param list[str] defined_tag_exists: (optional) + A list of tag existence filters to apply. Only resources for which the specified defined tags exist will be returned. + Each item in the list has the format \"{namespace}.{tagName}.true\" (for checking existence of a defined tag) + or \"{namespace}.true\". All inputs are case-insensitive. + Currently, only existence (\"true\" at the end) is supported. Absence (\"false\" at the end) is not supported. + Multiple values for the same key (i.e. same namespace and tag name) are interpreted as \"OR\". + Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as \"AND\". + + :param list[str] freeform_tag_exists: (optional) + A list of tag existence filters to apply. Only resources for which the specified freeform tags exist the value will be returned. + The key for each tag is \"{tagName}.true\". All inputs are case-insensitive. + Currently, only existence (\"true\" at the end) is supported. Absence (\"false\" at the end) is not supported. + Multiple values for different tag names are interpreted as \"AND\". + :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. @@ -3078,13 +5599,13 @@ def list_hosted_entities(self, compartment_id, id, **kwargs): 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.opsi.models.HostedEntityCollection` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.opsi.models.SummarizeDatabaseInsightResourceCapacityTrendAggregationCollection` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use list_hosted_entities API. + Click `here `__ to see an example of how to use summarize_database_insight_resource_capacity_trend API. """ - resource_path = "/hostInsights/hostedEntities" + resource_path = "/databaseInsights/resourceCapacityTrend" method = "GET" # Don't accept unknown kwargs @@ -3093,26 +5614,44 @@ def list_hosted_entities(self, compartment_id, id, **kwargs): "analysis_time_interval", "time_interval_start", "time_interval_end", - "platform_type", - "limit", + "database_type", + "database_id", + "id", + "exadata_insight_id", + "cdb_name", + "utilization_level", "page", "sort_order", "sort_by", - "opc_request_id" + "tablespace_name", + "host_name", + "is_database_instance_level_metrics", + "opc_request_id", + "defined_tag_equals", + "freeform_tag_equals", + "defined_tag_exists", + "freeform_tag_exists" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "list_hosted_entities got unknown kwargs: {!r}".format(extra_kwargs)) + "summarize_database_insight_resource_capacity_trend got unknown kwargs: {!r}".format(extra_kwargs)) - if 'platform_type' in kwargs: - platform_type_allowed_values = ["LINUX"] - for platform_type_item in kwargs['platform_type']: - if platform_type_item not in platform_type_allowed_values: + if 'database_type' in kwargs: + database_type_allowed_values = ["ADW-S", "ATP-S", "ADW-D", "ATP-D", "EXTERNAL-PDB", "EXTERNAL-NONCDB"] + for database_type_item in kwargs['database_type']: + if database_type_item not in database_type_allowed_values: raise ValueError( - "Invalid value for `platform_type`, must be one of {0}".format(platform_type_allowed_values) + "Invalid value for `database_type`, must be one of {0}".format(database_type_allowed_values) ) + if 'utilization_level' in kwargs: + utilization_level_allowed_values = ["HIGH_UTILIZATION", "LOW_UTILIZATION", "MEDIUM_HIGH_UTILIZATION", "MEDIUM_LOW_UTILIZATION"] + if kwargs['utilization_level'] not in utilization_level_allowed_values: + raise ValueError( + "Invalid value for `utilization_level`, must be one of {0}".format(utilization_level_allowed_values) + ) + if 'sort_order' in kwargs: sort_order_allowed_values = ["ASC", "DESC"] if kwargs['sort_order'] not in sort_order_allowed_values: @@ -3121,7 +5660,7 @@ def list_hosted_entities(self, compartment_id, id, **kwargs): ) if 'sort_by' in kwargs: - sort_by_allowed_values = ["entityName", "entityType"] + sort_by_allowed_values = ["endTimestamp", "capacity", "baseCapacity"] 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) @@ -3129,15 +5668,26 @@ def list_hosted_entities(self, compartment_id, id, **kwargs): query_params = { "compartmentId": compartment_id, + "resourceMetric": resource_metric, "analysisTimeInterval": kwargs.get("analysis_time_interval", missing), "timeIntervalStart": kwargs.get("time_interval_start", missing), "timeIntervalEnd": kwargs.get("time_interval_end", missing), - "platformType": self.base_client.generate_collection_format_param(kwargs.get("platform_type", missing), 'multi'), - "id": id, - "limit": kwargs.get("limit", missing), + "databaseType": self.base_client.generate_collection_format_param(kwargs.get("database_type", missing), 'multi'), + "databaseId": self.base_client.generate_collection_format_param(kwargs.get("database_id", missing), 'multi'), + "id": self.base_client.generate_collection_format_param(kwargs.get("id", missing), 'multi'), + "exadataInsightId": self.base_client.generate_collection_format_param(kwargs.get("exadata_insight_id", missing), 'multi'), + "cdbName": self.base_client.generate_collection_format_param(kwargs.get("cdb_name", missing), 'multi'), + "utilizationLevel": kwargs.get("utilization_level", missing), "page": kwargs.get("page", missing), "sortOrder": kwargs.get("sort_order", missing), - "sortBy": kwargs.get("sort_by", missing) + "sortBy": kwargs.get("sort_by", missing), + "tablespaceName": kwargs.get("tablespace_name", missing), + "hostName": self.base_client.generate_collection_format_param(kwargs.get("host_name", missing), 'multi'), + "isDatabaseInstanceLevelMetrics": kwargs.get("is_database_instance_level_metrics", missing), + "definedTagEquals": self.base_client.generate_collection_format_param(kwargs.get("defined_tag_equals", missing), 'multi'), + "freeformTagEquals": self.base_client.generate_collection_format_param(kwargs.get("freeform_tag_equals", missing), 'multi'), + "definedTagExists": self.base_client.generate_collection_format_param(kwargs.get("defined_tag_exists", missing), 'multi'), + "freeformTagExists": self.base_client.generate_collection_format_param(kwargs.get("freeform_tag_exists", missing), 'multi') } query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} @@ -3163,22 +5713,18 @@ def list_hosted_entities(self, compartment_id, id, **kwargs): method=method, query_params=query_params, header_params=header_params, - response_type="HostedEntityCollection") + response_type="SummarizeDatabaseInsightResourceCapacityTrendAggregationCollection") else: return self.base_client.call_api( resource_path=resource_path, method=method, query_params=query_params, header_params=header_params, - response_type="HostedEntityCollection") + response_type="SummarizeDatabaseInsightResourceCapacityTrendAggregationCollection") - def list_importable_agent_entities(self, compartment_id, **kwargs): + def summarize_database_insight_resource_forecast_trend(self, compartment_id, resource_metric, **kwargs): """ - Gets a list of agent entities available to add a new hostInsight. An agent entity is \"available\" - and will be shown if all the following conditions are true: - 1. The agent OCID is not already being used for an existing hostInsight. - 2. The agent availabilityStatus = 'ACTIVE' - 3. The agent lifecycleState = 'ACTIVE' + Get Forecast predictions for CPU and Storage resources since a time in the past. :param str compartment_id: (required) @@ -3186,14 +5732,85 @@ def list_importable_agent_entities(self, compartment_id, **kwargs): __ https://docs.cloud.oracle.com/iaas/Content/General/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. - For important details about how pagination works, see - `List Pagination`__. - Example: `50` + :param str resource_metric: (required) + Filter by resource metric. + Supported values are CPU , STORAGE, MEMORY and IO. - __ https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine + :param str analysis_time_interval: (optional) + Specify time period in ISO 8601 format with respect to current time. + Default is last 30 days represented by P30D. + If timeInterval is specified, then timeIntervalStart and timeIntervalEnd will be ignored. + Examples P90D (last 90 days), P4W (last 4 weeks), P2M (last 2 months), P1Y (last 12 months), . Maximum value allowed is 25 months prior to current time (P25M). + + :param datetime time_interval_start: (optional) + Analysis start time in UTC in ISO 8601 format(inclusive). + Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). + The minimum allowed value is 2 years prior to the current day. + timeIntervalStart and timeIntervalEnd parameters are used together. + If analysisTimeInterval is specified, this parameter is ignored. + + :param datetime time_interval_end: (optional) + Analysis end time in UTC in ISO 8601 format(exclusive). + Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). + timeIntervalStart and timeIntervalEnd are used together. + If timeIntervalEnd is not specified, current time is used as timeIntervalEnd. + + :param list[str] database_type: (optional) + Filter by one or more database type. + Possible values are ADW-S, ATP-S, ADW-D, ATP-D, EXTERNAL-PDB, EXTERNAL-NONCDB. + + Allowed values are: "ADW-S", "ATP-S", "ADW-D", "ATP-D", "EXTERNAL-PDB", "EXTERNAL-NONCDB" + + :param list[str] database_id: (optional) + Optional list of database `OCIDs`__ of the associated DBaaS entity. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param list[str] id: (optional) + Optional list of database insight resource `OCIDs`__. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param list[str] exadata_insight_id: (optional) + Optional list of exadata insight resource `OCIDs`__. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param list[str] cdb_name: (optional) + Filter by one or more cdb name. + + :param str statistic: (optional) + Choose the type of statistic metric data to be used for forecasting. + + Allowed values are: "AVG", "MAX" + + :param int forecast_days: (optional) + Number of days used for utilization forecast analysis. + + :param str forecast_model: (optional) + Choose algorithm model for the forecasting. + Possible values: + - LINEAR: Uses linear regression algorithm for forecasting. + - ML_AUTO: Automatically detects best algorithm to use for forecasting. + - ML_NO_AUTO: Automatically detects seasonality of the data for forecasting using linear or seasonal algorithm. + + Allowed values are: "LINEAR", "ML_AUTO", "ML_NO_AUTO" + + :param str utilization_level: (optional) + Filter by utilization level by the following buckets: + - HIGH_UTILIZATION: DBs with utilization greater or equal than 75. + - LOW_UTILIZATION: DBs with utilization lower than 25. + - MEDIUM_HIGH_UTILIZATION: DBs with utilization greater or equal than 50 but lower than 75. + - MEDIUM_LOW_UTILIZATION: DBs with utilization greater or equal than 25 but lower than 50. + + Allowed values are: "HIGH_UTILIZATION", "LOW_UTILIZATION", "MEDIUM_HIGH_UTILIZATION", "MEDIUM_LOW_UTILIZATION" + + :param int confidence: (optional) + This parameter is used to change data's confidence level, this data is ingested by the + forecast algorithm. + Confidence is the probability of an interval to contain the expected population parameter. + Manipulation of this value will lead to different results. + If not set, default confidence value is 95%. :param str page: (optional) For list pagination. The value of the `opc-next-page` response header from @@ -3202,19 +5819,45 @@ def list_importable_agent_entities(self, compartment_id, **kwargs): __ https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine - :param str sort_order: (optional) - The sort order to use, either ascending (`ASC`) or descending (`DESC`). + :param list[str] host_name: (optional) + Filter by one or more hostname. - Allowed values are: "ASC", "DESC" + :param str tablespace_name: (optional) + Tablespace name for a database - :param str sort_by: (optional) - Hosted entity list sort options. + :param bool is_database_instance_level_metrics: (optional) + Flag to indicate if database instance level metrics should be returned. The flag is ignored when a host name filter is not applied. + When a hostname filter is applied this flag will determine whether to return metrics for the instances located on the specified host or for the + whole database which contains an instance on this host. - Allowed values are: "entityName", "entityType" + :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 list[str] defined_tag_equals: (optional) + A list of tag filters to apply. Only resources with a defined tag matching the value will be returned. + Each item in the list has the format \"{namespace}.{tagName}.{value}\". All inputs are case-insensitive. + Multiple values for the same key (i.e. same namespace and tag name) are interpreted as \"OR\". + Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as \"AND\". + + :param list[str] freeform_tag_equals: (optional) + A list of tag filters to apply. Only resources with a freeform tag matching the value will be returned. + The key for each tag is \"{tagName}.{value}\". All inputs are case-insensitive. + Multiple values for the same tag name are interpreted as \"OR\". Values for different tag names are interpreted as \"AND\". + + :param list[str] defined_tag_exists: (optional) + A list of tag existence filters to apply. Only resources for which the specified defined tags exist will be returned. + Each item in the list has the format \"{namespace}.{tagName}.true\" (for checking existence of a defined tag) + or \"{namespace}.true\". All inputs are case-insensitive. + Currently, only existence (\"true\" at the end) is supported. Absence (\"false\" at the end) is not supported. + Multiple values for the same key (i.e. same namespace and tag name) are interpreted as \"OR\". + Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as \"AND\". - :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 list[str] freeform_tag_exists: (optional) + A list of tag existence filters to apply. Only resources for which the specified freeform tags exist the value will be returned. + The key for each tag is \"{tagName}.true\". All inputs are case-insensitive. + Currently, only existence (\"true\" at the end) is supported. Absence (\"false\" at the end) is not supported. + Multiple values for different tag names are interpreted as \"AND\". :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. @@ -3224,49 +5867,99 @@ def list_importable_agent_entities(self, compartment_id, **kwargs): 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.opsi.models.ImportableAgentEntitySummaryCollection` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.opsi.models.SummarizeDatabaseInsightResourceForecastTrendAggregation` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use list_importable_agent_entities API. + Click `here `__ to see an example of how to use summarize_database_insight_resource_forecast_trend API. """ - resource_path = "/importableAgentEntities" + resource_path = "/databaseInsights/resourceForecastTrend" method = "GET" # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", - "limit", + "analysis_time_interval", + "time_interval_start", + "time_interval_end", + "database_type", + "database_id", + "id", + "exadata_insight_id", + "cdb_name", + "statistic", + "forecast_days", + "forecast_model", + "utilization_level", + "confidence", "page", - "sort_order", - "sort_by", - "opc_request_id" + "host_name", + "tablespace_name", + "is_database_instance_level_metrics", + "opc_request_id", + "defined_tag_equals", + "freeform_tag_equals", + "defined_tag_exists", + "freeform_tag_exists" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "list_importable_agent_entities got unknown kwargs: {!r}".format(extra_kwargs)) + "summarize_database_insight_resource_forecast_trend got unknown kwargs: {!r}".format(extra_kwargs)) - if 'sort_order' in kwargs: - sort_order_allowed_values = ["ASC", "DESC"] - if kwargs['sort_order'] not in sort_order_allowed_values: + if 'database_type' in kwargs: + database_type_allowed_values = ["ADW-S", "ATP-S", "ADW-D", "ATP-D", "EXTERNAL-PDB", "EXTERNAL-NONCDB"] + for database_type_item in kwargs['database_type']: + if database_type_item not in database_type_allowed_values: + raise ValueError( + "Invalid value for `database_type`, must be one of {0}".format(database_type_allowed_values) + ) + + if 'statistic' in kwargs: + statistic_allowed_values = ["AVG", "MAX"] + if kwargs['statistic'] not in statistic_allowed_values: raise ValueError( - "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) + "Invalid value for `statistic`, must be one of {0}".format(statistic_allowed_values) ) - if 'sort_by' in kwargs: - sort_by_allowed_values = ["entityName", "entityType"] - if kwargs['sort_by'] not in sort_by_allowed_values: + if 'forecast_model' in kwargs: + forecast_model_allowed_values = ["LINEAR", "ML_AUTO", "ML_NO_AUTO"] + if kwargs['forecast_model'] not in forecast_model_allowed_values: raise ValueError( - "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) + "Invalid value for `forecast_model`, must be one of {0}".format(forecast_model_allowed_values) + ) + + if 'utilization_level' in kwargs: + utilization_level_allowed_values = ["HIGH_UTILIZATION", "LOW_UTILIZATION", "MEDIUM_HIGH_UTILIZATION", "MEDIUM_LOW_UTILIZATION"] + if kwargs['utilization_level'] not in utilization_level_allowed_values: + raise ValueError( + "Invalid value for `utilization_level`, must be one of {0}".format(utilization_level_allowed_values) ) query_params = { "compartmentId": compartment_id, - "limit": kwargs.get("limit", missing), + "resourceMetric": resource_metric, + "analysisTimeInterval": kwargs.get("analysis_time_interval", missing), + "timeIntervalStart": kwargs.get("time_interval_start", missing), + "timeIntervalEnd": kwargs.get("time_interval_end", missing), + "databaseType": self.base_client.generate_collection_format_param(kwargs.get("database_type", missing), 'multi'), + "databaseId": self.base_client.generate_collection_format_param(kwargs.get("database_id", missing), 'multi'), + "id": self.base_client.generate_collection_format_param(kwargs.get("id", missing), 'multi'), + "exadataInsightId": self.base_client.generate_collection_format_param(kwargs.get("exadata_insight_id", missing), 'multi'), + "cdbName": self.base_client.generate_collection_format_param(kwargs.get("cdb_name", missing), 'multi'), + "statistic": kwargs.get("statistic", missing), + "forecastDays": kwargs.get("forecast_days", missing), + "forecastModel": kwargs.get("forecast_model", missing), + "utilizationLevel": kwargs.get("utilization_level", missing), + "confidence": kwargs.get("confidence", missing), "page": kwargs.get("page", missing), - "sortOrder": kwargs.get("sort_order", missing), - "sortBy": kwargs.get("sort_by", missing) + "hostName": self.base_client.generate_collection_format_param(kwargs.get("host_name", missing), 'multi'), + "tablespaceName": kwargs.get("tablespace_name", missing), + "isDatabaseInstanceLevelMetrics": kwargs.get("is_database_instance_level_metrics", missing), + "definedTagEquals": self.base_client.generate_collection_format_param(kwargs.get("defined_tag_equals", missing), 'multi'), + "freeformTagEquals": self.base_client.generate_collection_format_param(kwargs.get("freeform_tag_equals", missing), 'multi'), + "definedTagExists": self.base_client.generate_collection_format_param(kwargs.get("defined_tag_exists", missing), 'multi'), + "freeformTagExists": self.base_client.generate_collection_format_param(kwargs.get("freeform_tag_exists", missing), 'multi') } query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} @@ -3292,22 +5985,83 @@ def list_importable_agent_entities(self, compartment_id, **kwargs): method=method, query_params=query_params, header_params=header_params, - response_type="ImportableAgentEntitySummaryCollection") + response_type="SummarizeDatabaseInsightResourceForecastTrendAggregation") else: return self.base_client.call_api( resource_path=resource_path, method=method, query_params=query_params, header_params=header_params, - response_type="ImportableAgentEntitySummaryCollection") + response_type="SummarizeDatabaseInsightResourceForecastTrendAggregation") - def list_importable_enterprise_manager_entities(self, enterprise_manager_bridge_id, **kwargs): + def summarize_database_insight_resource_statistics(self, compartment_id, resource_metric, **kwargs): """ - Gets a list of importable entities for an Operations Insights Enterprise Manager bridge that have not been imported before. + Lists the Resource statistics (usage,capacity, usage change percent, utilization percent, base capacity, isAutoScalingEnabled) + for each database filtered by utilization level. - :param str enterprise_manager_bridge_id: (required) - Unique Enterprise Manager bridge identifier + :param str compartment_id: (required) + The `OCID`__ of the compartment. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param str resource_metric: (required) + Filter by resource metric. + Supported values are CPU , STORAGE, MEMORY and IO. + + :param str analysis_time_interval: (optional) + Specify time period in ISO 8601 format with respect to current time. + Default is last 30 days represented by P30D. + If timeInterval is specified, then timeIntervalStart and timeIntervalEnd will be ignored. + Examples P90D (last 90 days), P4W (last 4 weeks), P2M (last 2 months), P1Y (last 12 months), . Maximum value allowed is 25 months prior to current time (P25M). + + :param datetime time_interval_start: (optional) + Analysis start time in UTC in ISO 8601 format(inclusive). + Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). + The minimum allowed value is 2 years prior to the current day. + timeIntervalStart and timeIntervalEnd parameters are used together. + If analysisTimeInterval is specified, this parameter is ignored. + + :param datetime time_interval_end: (optional) + Analysis end time in UTC in ISO 8601 format(exclusive). + Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). + timeIntervalStart and timeIntervalEnd are used together. + If timeIntervalEnd is not specified, current time is used as timeIntervalEnd. + + :param list[str] database_type: (optional) + Filter by one or more database type. + Possible values are ADW-S, ATP-S, ADW-D, ATP-D, EXTERNAL-PDB, EXTERNAL-NONCDB. + + Allowed values are: "ADW-S", "ATP-S", "ADW-D", "ATP-D", "EXTERNAL-PDB", "EXTERNAL-NONCDB" + + :param list[str] database_id: (optional) + Optional list of database `OCIDs`__ of the associated DBaaS entity. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param list[str] id: (optional) + Optional list of database insight resource `OCIDs`__. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param list[str] exadata_insight_id: (optional) + Optional list of exadata insight resource `OCIDs`__. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param list[str] cdb_name: (optional) + Filter by one or more cdb name. + + :param int percentile: (optional) + Percentile values of daily usage to be used for computing the aggregate resource usage. + + :param str insight_by: (optional) + Return data of a specific insight + Possible values are High Utilization, Low Utilization, Any ,High Utilization Forecast, + Low Utilization Forecast + + :param int forecast_days: (optional) + Number of days used for utilization forecast analysis. :param int limit: (optional) For list pagination. The maximum number of results per page, or items to @@ -3325,10 +6079,53 @@ def list_importable_enterprise_manager_entities(self, enterprise_manager_bridge_ __ https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine + :param str sort_order: (optional) + The sort order to use, either ascending (`ASC`) or descending (`DESC`). + + Allowed values are: "ASC", "DESC" + + :param str sort_by: (optional) + The order in which resource statistics records are listed + + Allowed values are: "utilizationPercent", "usage", "usageChangePercent", "databaseName", "databaseType" + + :param list[str] host_name: (optional) + Filter by one or more hostname. + + :param bool is_database_instance_level_metrics: (optional) + Flag to indicate if database instance level metrics should be returned. The flag is ignored when a host name filter is not applied. + When a hostname filter is applied this flag will determine whether to return metrics for the instances located on the specified host or for the + whole database which contains an instance on this host. + :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 list[str] defined_tag_equals: (optional) + A list of tag filters to apply. Only resources with a defined tag matching the value will be returned. + Each item in the list has the format \"{namespace}.{tagName}.{value}\". All inputs are case-insensitive. + Multiple values for the same key (i.e. same namespace and tag name) are interpreted as \"OR\". + Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as \"AND\". + + :param list[str] freeform_tag_equals: (optional) + A list of tag filters to apply. Only resources with a freeform tag matching the value will be returned. + The key for each tag is \"{tagName}.{value}\". All inputs are case-insensitive. + Multiple values for the same tag name are interpreted as \"OR\". Values for different tag names are interpreted as \"AND\". + + :param list[str] defined_tag_exists: (optional) + A list of tag existence filters to apply. Only resources for which the specified defined tags exist will be returned. + Each item in the list has the format \"{namespace}.{tagName}.true\" (for checking existence of a defined tag) + or \"{namespace}.true\". All inputs are case-insensitive. + Currently, only existence (\"true\" at the end) is supported. Absence (\"false\" at the end) is not supported. + Multiple values for the same key (i.e. same namespace and tag name) are interpreted as \"OR\". + Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as \"AND\". + + :param list[str] freeform_tag_exists: (optional) + A list of tag existence filters to apply. Only resources for which the specified freeform tags exist the value will be returned. + The key for each tag is \"{tagName}.true\". All inputs are case-insensitive. + Currently, only existence (\"true\" at the end) is supported. Absence (\"false\" at the end) is not supported. + Multiple values for different tag names are interpreted as \"AND\". + :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. @@ -3337,40 +6134,92 @@ def list_importable_enterprise_manager_entities(self, enterprise_manager_bridge_ 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.opsi.models.ImportableEnterpriseManagerEntityCollection` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.opsi.models.SummarizeDatabaseInsightResourceStatisticsAggregationCollection` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use list_importable_enterprise_manager_entities API. + Click `here `__ to see an example of how to use summarize_database_insight_resource_statistics API. """ - resource_path = "/enterpriseManagerBridges/{enterpriseManagerBridgeId}/importableEnterpriseManagerEntities" + resource_path = "/databaseInsights/resourceStatistics" method = "GET" # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", + "analysis_time_interval", + "time_interval_start", + "time_interval_end", + "database_type", + "database_id", + "id", + "exadata_insight_id", + "cdb_name", + "percentile", + "insight_by", + "forecast_days", "limit", "page", - "opc_request_id" + "sort_order", + "sort_by", + "host_name", + "is_database_instance_level_metrics", + "opc_request_id", + "defined_tag_equals", + "freeform_tag_equals", + "defined_tag_exists", + "freeform_tag_exists" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "list_importable_enterprise_manager_entities got unknown kwargs: {!r}".format(extra_kwargs)) + "summarize_database_insight_resource_statistics got unknown kwargs: {!r}".format(extra_kwargs)) - path_params = { - "enterpriseManagerBridgeId": enterprise_manager_bridge_id - } + if 'database_type' in kwargs: + database_type_allowed_values = ["ADW-S", "ATP-S", "ADW-D", "ATP-D", "EXTERNAL-PDB", "EXTERNAL-NONCDB"] + for database_type_item in kwargs['database_type']: + if database_type_item not in database_type_allowed_values: + raise ValueError( + "Invalid value for `database_type`, must be one of {0}".format(database_type_allowed_values) + ) - path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + 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) + ) - 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)) + if 'sort_by' in kwargs: + sort_by_allowed_values = ["utilizationPercent", "usage", "usageChangePercent", "databaseName", "databaseType"] + 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, + "resourceMetric": resource_metric, + "analysisTimeInterval": kwargs.get("analysis_time_interval", missing), + "timeIntervalStart": kwargs.get("time_interval_start", missing), + "timeIntervalEnd": kwargs.get("time_interval_end", missing), + "databaseType": self.base_client.generate_collection_format_param(kwargs.get("database_type", missing), 'multi'), + "databaseId": self.base_client.generate_collection_format_param(kwargs.get("database_id", missing), 'multi'), + "id": self.base_client.generate_collection_format_param(kwargs.get("id", missing), 'multi'), + "exadataInsightId": self.base_client.generate_collection_format_param(kwargs.get("exadata_insight_id", missing), 'multi'), + "cdbName": self.base_client.generate_collection_format_param(kwargs.get("cdb_name", missing), 'multi'), + "percentile": kwargs.get("percentile", missing), + "insightBy": kwargs.get("insight_by", missing), + "forecastDays": kwargs.get("forecast_days", missing), "limit": kwargs.get("limit", missing), - "page": kwargs.get("page", missing) + "page": kwargs.get("page", missing), + "sortOrder": kwargs.get("sort_order", missing), + "sortBy": kwargs.get("sort_by", missing), + "hostName": self.base_client.generate_collection_format_param(kwargs.get("host_name", missing), 'multi'), + "isDatabaseInstanceLevelMetrics": kwargs.get("is_database_instance_level_metrics", missing), + "definedTagEquals": self.base_client.generate_collection_format_param(kwargs.get("defined_tag_equals", missing), 'multi'), + "freeformTagEquals": self.base_client.generate_collection_format_param(kwargs.get("freeform_tag_equals", missing), 'multi'), + "definedTagExists": self.base_client.generate_collection_format_param(kwargs.get("defined_tag_exists", missing), 'multi'), + "freeformTagExists": self.base_client.generate_collection_format_param(kwargs.get("freeform_tag_exists", missing), 'multi') } query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} @@ -3394,23 +6243,22 @@ def list_importable_enterprise_manager_entities(self, enterprise_manager_bridge_ self.base_client.call_api, resource_path=resource_path, method=method, - path_params=path_params, query_params=query_params, header_params=header_params, - response_type="ImportableEnterpriseManagerEntityCollection") + response_type="SummarizeDatabaseInsightResourceStatisticsAggregationCollection") else: return self.base_client.call_api( resource_path=resource_path, method=method, - path_params=path_params, query_params=query_params, header_params=header_params, - response_type="ImportableEnterpriseManagerEntityCollection") + response_type="SummarizeDatabaseInsightResourceStatisticsAggregationCollection") - def list_sql_plans(self, compartment_id, sql_identifier, plan_hash, **kwargs): + def summarize_database_insight_resource_usage(self, compartment_id, resource_metric, **kwargs): """ - Query SQL Warehouse to list the plan xml for a given SQL execution plan. This returns a SqlPlanCollection object, but is currently limited to a single plan. - Either databaseId or id must be specified. + A cumulative distribution function is used to rank the usage data points per database within the specified time period. + For each database, the minimum data point with a ranking > the percentile value is included in the summation. + Linear regression functions are used to calculate the usage change percentage. :param str compartment_id: (required) @@ -3418,24 +6266,58 @@ def list_sql_plans(self, compartment_id, sql_identifier, plan_hash, **kwargs): __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm - :param str sql_identifier: (required) - Unique SQL_ID for a SQL Statement. - Example: `6rgjh9bjmy2s7` + :param str resource_metric: (required) + Filter by resource metric. + Supported values are CPU , STORAGE, MEMORY and IO. - :param oci.opsi.models.list[int] plan_hash: (required) - Unique plan hash for a SQL Plan of a particular SQL Statement. - Example: `9820154385` + :param str analysis_time_interval: (optional) + Specify time period in ISO 8601 format with respect to current time. + Default is last 30 days represented by P30D. + If timeInterval is specified, then timeIntervalStart and timeIntervalEnd will be ignored. + Examples P90D (last 90 days), P4W (last 4 weeks), P2M (last 2 months), P1Y (last 12 months), . Maximum value allowed is 25 months prior to current time (P25M). - :param str database_id: (optional) - Optional `OCID`__ of the associated DBaaS entity. + :param datetime time_interval_start: (optional) + Analysis start time in UTC in ISO 8601 format(inclusive). + Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). + The minimum allowed value is 2 years prior to the current day. + timeIntervalStart and timeIntervalEnd parameters are used together. + If analysisTimeInterval is specified, this parameter is ignored. + + :param datetime time_interval_end: (optional) + Analysis end time in UTC in ISO 8601 format(exclusive). + Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). + timeIntervalStart and timeIntervalEnd are used together. + If timeIntervalEnd is not specified, current time is used as timeIntervalEnd. + + :param list[str] database_type: (optional) + Filter by one or more database type. + Possible values are ADW-S, ATP-S, ADW-D, ATP-D, EXTERNAL-PDB, EXTERNAL-NONCDB. + + Allowed values are: "ADW-S", "ATP-S", "ADW-D", "ATP-D", "EXTERNAL-PDB", "EXTERNAL-NONCDB" + + :param list[str] database_id: (optional) + Optional list of database `OCIDs`__ of the associated DBaaS entity. __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm - :param str id: (optional) - `OCID`__ of the database insight resource. + :param list[str] id: (optional) + Optional list of database insight resource `OCIDs`__. __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + :param list[str] exadata_insight_id: (optional) + Optional list of exadata insight resource `OCIDs`__. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param list[str] host_name: (optional) + Filter by one or more hostname. + + :param bool is_database_instance_level_metrics: (optional) + Flag to indicate if database instance level metrics should be returned. The flag is ignored when a host name filter is not applied. + When a hostname filter is applied this flag will determine whether to return metrics for the instances located on the specified host or for the + whole database which contains an instance on this host. + :param str page: (optional) For list pagination. The value of the `opc-next-page` response header from the previous \"List\" call. For important details about how pagination works, @@ -3443,10 +6325,38 @@ def list_sql_plans(self, compartment_id, sql_identifier, plan_hash, **kwargs): __ https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine + :param int percentile: (optional) + Percentile values of daily usage to be used for computing the aggregate resource usage. + :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 list[str] defined_tag_equals: (optional) + A list of tag filters to apply. Only resources with a defined tag matching the value will be returned. + Each item in the list has the format \"{namespace}.{tagName}.{value}\". All inputs are case-insensitive. + Multiple values for the same key (i.e. same namespace and tag name) are interpreted as \"OR\". + Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as \"AND\". + + :param list[str] freeform_tag_equals: (optional) + A list of tag filters to apply. Only resources with a freeform tag matching the value will be returned. + The key for each tag is \"{tagName}.{value}\". All inputs are case-insensitive. + Multiple values for the same tag name are interpreted as \"OR\". Values for different tag names are interpreted as \"AND\". + + :param list[str] defined_tag_exists: (optional) + A list of tag existence filters to apply. Only resources for which the specified defined tags exist will be returned. + Each item in the list has the format \"{namespace}.{tagName}.true\" (for checking existence of a defined tag) + or \"{namespace}.true\". All inputs are case-insensitive. + Currently, only existence (\"true\" at the end) is supported. Absence (\"false\" at the end) is not supported. + Multiple values for the same key (i.e. same namespace and tag name) are interpreted as \"OR\". + Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as \"AND\". + + :param list[str] freeform_tag_exists: (optional) + A list of tag existence filters to apply. Only resources for which the specified freeform tags exist the value will be returned. + The key for each tag is \"{tagName}.true\". All inputs are case-insensitive. + Currently, only existence (\"true\" at the end) is supported. Absence (\"false\" at the end) is not supported. + Multiple values for different tag names are interpreted as \"AND\". + :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. @@ -3455,35 +6365,66 @@ def list_sql_plans(self, compartment_id, sql_identifier, plan_hash, **kwargs): 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.opsi.models.SqlPlanCollection` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.opsi.models.SummarizeDatabaseInsightResourceUsageAggregation` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use list_sql_plans API. + Click `here `__ to see an example of how to use summarize_database_insight_resource_usage API. """ - resource_path = "/databaseInsights/sqlPlans" + resource_path = "/databaseInsights/resourceUsageSummary" method = "GET" # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", + "analysis_time_interval", + "time_interval_start", + "time_interval_end", + "database_type", "database_id", "id", + "exadata_insight_id", + "host_name", + "is_database_instance_level_metrics", "page", - "opc_request_id" + "percentile", + "opc_request_id", + "defined_tag_equals", + "freeform_tag_equals", + "defined_tag_exists", + "freeform_tag_exists" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "list_sql_plans got unknown kwargs: {!r}".format(extra_kwargs)) + "summarize_database_insight_resource_usage got unknown kwargs: {!r}".format(extra_kwargs)) + + if 'database_type' in kwargs: + database_type_allowed_values = ["ADW-S", "ATP-S", "ADW-D", "ATP-D", "EXTERNAL-PDB", "EXTERNAL-NONCDB"] + for database_type_item in kwargs['database_type']: + if database_type_item not in database_type_allowed_values: + raise ValueError( + "Invalid value for `database_type`, must be one of {0}".format(database_type_allowed_values) + ) query_params = { "compartmentId": compartment_id, - "databaseId": kwargs.get("database_id", missing), - "id": kwargs.get("id", missing), - "sqlIdentifier": sql_identifier, - "planHash": self.base_client.generate_collection_format_param(plan_hash, 'multi'), - "page": kwargs.get("page", missing) + "resourceMetric": resource_metric, + "analysisTimeInterval": kwargs.get("analysis_time_interval", missing), + "timeIntervalStart": kwargs.get("time_interval_start", missing), + "timeIntervalEnd": kwargs.get("time_interval_end", missing), + "databaseType": self.base_client.generate_collection_format_param(kwargs.get("database_type", missing), 'multi'), + "databaseId": self.base_client.generate_collection_format_param(kwargs.get("database_id", missing), 'multi'), + "id": self.base_client.generate_collection_format_param(kwargs.get("id", missing), 'multi'), + "exadataInsightId": self.base_client.generate_collection_format_param(kwargs.get("exadata_insight_id", missing), 'multi'), + "hostName": self.base_client.generate_collection_format_param(kwargs.get("host_name", missing), 'multi'), + "isDatabaseInstanceLevelMetrics": kwargs.get("is_database_instance_level_metrics", missing), + "page": kwargs.get("page", missing), + "percentile": kwargs.get("percentile", missing), + "definedTagEquals": self.base_client.generate_collection_format_param(kwargs.get("defined_tag_equals", missing), 'multi'), + "freeformTagEquals": self.base_client.generate_collection_format_param(kwargs.get("freeform_tag_equals", missing), 'multi'), + "definedTagExists": self.base_client.generate_collection_format_param(kwargs.get("defined_tag_exists", missing), 'multi'), + "freeformTagExists": self.base_client.generate_collection_format_param(kwargs.get("freeform_tag_exists", missing), 'multi') } query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} @@ -3509,18 +6450,19 @@ def list_sql_plans(self, compartment_id, sql_identifier, plan_hash, **kwargs): method=method, query_params=query_params, header_params=header_params, - response_type="SqlPlanCollection") + response_type="SummarizeDatabaseInsightResourceUsageAggregation") else: return self.base_client.call_api( resource_path=resource_path, method=method, query_params=query_params, header_params=header_params, - response_type="SqlPlanCollection") + response_type="SummarizeDatabaseInsightResourceUsageAggregation") - def list_sql_searches(self, compartment_id, sql_identifier, **kwargs): + def summarize_database_insight_resource_usage_trend(self, compartment_id, resource_metric, **kwargs): """ - Search SQL by SQL Identifier across databases and get the SQL Text and the details of the databases executing the SQL for a given time period. + Returns response with time series data (endTimestamp, usage, capacity) for the time period specified. + The maximum time range for analysis is 2 years, hence this is intentionally not paginated. :param str compartment_id: (required) @@ -3528,9 +6470,9 @@ def list_sql_searches(self, compartment_id, sql_identifier, **kwargs): __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm - :param str sql_identifier: (required) - Unique SQL_ID for a SQL Statement. - Example: `6rgjh9bjmy2s7` + :param str resource_metric: (required) + Filter by resource metric. + Supported values are CPU , STORAGE, MEMORY and IO. :param str analysis_time_interval: (optional) Specify time period in ISO 8601 format with respect to current time. @@ -3551,6 +6493,27 @@ def list_sql_searches(self, compartment_id, sql_identifier, **kwargs): timeIntervalStart and timeIntervalEnd are used together. If timeIntervalEnd is not specified, current time is used as timeIntervalEnd. + :param list[str] database_type: (optional) + Filter by one or more database type. + Possible values are ADW-S, ATP-S, ADW-D, ATP-D, EXTERNAL-PDB, EXTERNAL-NONCDB. + + Allowed values are: "ADW-S", "ATP-S", "ADW-D", "ATP-D", "EXTERNAL-PDB", "EXTERNAL-NONCDB" + + :param list[str] database_id: (optional) + Optional list of database `OCIDs`__ of the associated DBaaS entity. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param list[str] id: (optional) + Optional list of database insight resource `OCIDs`__. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param list[str] exadata_insight_id: (optional) + Optional list of exadata insight resource `OCIDs`__. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + :param str page: (optional) For list pagination. The value of the `opc-next-page` response header from the previous \"List\" call. For important details about how pagination works, @@ -3558,6 +6521,24 @@ def list_sql_searches(self, compartment_id, sql_identifier, **kwargs): __ https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine + :param str sort_order: (optional) + The sort order to use, either ascending (`ASC`) or descending (`DESC`). + + Allowed values are: "ASC", "DESC" + + :param str sort_by: (optional) + Sorts using end timestamp, usage or capacity + + Allowed values are: "endTimestamp", "usage", "capacity" + + :param list[str] host_name: (optional) + Filter by one or more hostname. + + :param bool is_database_instance_level_metrics: (optional) + Flag to indicate if database instance level metrics should be returned. The flag is ignored when a host name filter is not applied. + When a hostname filter is applied this flag will determine whether to return metrics for the instances located on the specified host or for the + whole database which contains an instance on this host. + :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. @@ -3595,13 +6576,13 @@ def list_sql_searches(self, compartment_id, sql_identifier, **kwargs): 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.opsi.models.SqlSearchCollection` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.opsi.models.SummarizeDatabaseInsightResourceUsageTrendAggregationCollection` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use list_sql_searches API. + Click `here `__ to see an example of how to use summarize_database_insight_resource_usage_trend API. """ - resource_path = "/databaseInsights/sqlSearches" + resource_path = "/databaseInsights/resourceUsageTrend" method = "GET" # Don't accept unknown kwargs @@ -3610,7 +6591,15 @@ def list_sql_searches(self, compartment_id, sql_identifier, **kwargs): "analysis_time_interval", "time_interval_start", "time_interval_end", + "database_type", + "database_id", + "id", + "exadata_insight_id", "page", + "sort_order", + "sort_by", + "host_name", + "is_database_instance_level_metrics", "opc_request_id", "defined_tag_equals", "freeform_tag_equals", @@ -3620,15 +6609,45 @@ def list_sql_searches(self, compartment_id, sql_identifier, **kwargs): extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "list_sql_searches got unknown kwargs: {!r}".format(extra_kwargs)) + "summarize_database_insight_resource_usage_trend got unknown kwargs: {!r}".format(extra_kwargs)) + + if 'database_type' in kwargs: + database_type_allowed_values = ["ADW-S", "ATP-S", "ADW-D", "ATP-D", "EXTERNAL-PDB", "EXTERNAL-NONCDB"] + for database_type_item in kwargs['database_type']: + if database_type_item not in database_type_allowed_values: + raise ValueError( + "Invalid value for `database_type`, must be one of {0}".format(database_type_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 = ["endTimestamp", "usage", "capacity"] + 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, - "sqlIdentifier": sql_identifier, + "resourceMetric": resource_metric, "analysisTimeInterval": kwargs.get("analysis_time_interval", missing), "timeIntervalStart": kwargs.get("time_interval_start", missing), "timeIntervalEnd": kwargs.get("time_interval_end", missing), + "databaseType": self.base_client.generate_collection_format_param(kwargs.get("database_type", missing), 'multi'), + "databaseId": self.base_client.generate_collection_format_param(kwargs.get("database_id", missing), 'multi'), + "id": self.base_client.generate_collection_format_param(kwargs.get("id", missing), 'multi'), + "exadataInsightId": self.base_client.generate_collection_format_param(kwargs.get("exadata_insight_id", missing), 'multi'), "page": kwargs.get("page", missing), + "sortOrder": kwargs.get("sort_order", missing), + "sortBy": kwargs.get("sort_by", missing), + "hostName": self.base_client.generate_collection_format_param(kwargs.get("host_name", missing), 'multi'), + "isDatabaseInstanceLevelMetrics": kwargs.get("is_database_instance_level_metrics", missing), "definedTagEquals": self.base_client.generate_collection_format_param(kwargs.get("defined_tag_equals", missing), 'multi'), "freeformTagEquals": self.base_client.generate_collection_format_param(kwargs.get("freeform_tag_equals", missing), 'multi'), "definedTagExists": self.base_client.generate_collection_format_param(kwargs.get("defined_tag_exists", missing), 'multi'), @@ -3658,18 +6677,18 @@ def list_sql_searches(self, compartment_id, sql_identifier, **kwargs): method=method, query_params=query_params, header_params=header_params, - response_type="SqlSearchCollection") + response_type="SummarizeDatabaseInsightResourceUsageTrendAggregationCollection") else: return self.base_client.call_api( resource_path=resource_path, method=method, query_params=query_params, header_params=header_params, - response_type="SqlSearchCollection") + response_type="SummarizeDatabaseInsightResourceUsageTrendAggregationCollection") - def list_sql_texts(self, compartment_id, sql_identifier, **kwargs): + def summarize_database_insight_resource_utilization_insight(self, compartment_id, resource_metric, **kwargs): """ - Query SQL Warehouse to get the full SQL Text for a SQL. + Gets resources with current utilization (high and low) and projected utilization (high and low) for a resource type over specified time period. :param str compartment_id: (required) @@ -3677,20 +6696,61 @@ def list_sql_texts(self, compartment_id, sql_identifier, **kwargs): __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm - :param oci.opsi.models.list[str] sql_identifier: (required) - One or more unique SQL_IDs for a SQL Statement. - Example: `6rgjh9bjmy2s7` + :param str resource_metric: (required) + Filter by resource metric. + Supported values are CPU , STORAGE, MEMORY and IO. + + :param str analysis_time_interval: (optional) + Specify time period in ISO 8601 format with respect to current time. + Default is last 30 days represented by P30D. + If timeInterval is specified, then timeIntervalStart and timeIntervalEnd will be ignored. + Examples P90D (last 90 days), P4W (last 4 weeks), P2M (last 2 months), P1Y (last 12 months), . Maximum value allowed is 25 months prior to current time (P25M). + + :param datetime time_interval_start: (optional) + Analysis start time in UTC in ISO 8601 format(inclusive). + Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). + The minimum allowed value is 2 years prior to the current day. + timeIntervalStart and timeIntervalEnd parameters are used together. + If analysisTimeInterval is specified, this parameter is ignored. + + :param datetime time_interval_end: (optional) + Analysis end time in UTC in ISO 8601 format(exclusive). + Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). + timeIntervalStart and timeIntervalEnd are used together. + If timeIntervalEnd is not specified, current time is used as timeIntervalEnd. + + :param list[str] database_type: (optional) + Filter by one or more database type. + Possible values are ADW-S, ATP-S, ADW-D, ATP-D, EXTERNAL-PDB, EXTERNAL-NONCDB. + + Allowed values are: "ADW-S", "ATP-S", "ADW-D", "ATP-D", "EXTERNAL-PDB", "EXTERNAL-NONCDB" :param list[str] database_id: (optional) - Optional list of database `OCIDs`__ of the assosicated DBaaS entity. + Optional list of database `OCIDs`__ of the associated DBaaS entity. __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm :param list[str] id: (optional) - Optional list of database `OCIDs`__ of the database insight resource. + Optional list of database insight resource `OCIDs`__. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param list[str] exadata_insight_id: (optional) + Optional list of exadata insight resource `OCIDs`__. __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + :param int forecast_days: (optional) + Number of days used for utilization forecast analysis. + + :param list[str] host_name: (optional) + Filter by one or more hostname. + + :param bool is_database_instance_level_metrics: (optional) + Flag to indicate if database instance level metrics should be returned. The flag is ignored when a host name filter is not applied. + When a hostname filter is applied this flag will determine whether to return metrics for the instances located on the specified host or for the + whole database which contains an instance on this host. + :param str page: (optional) For list pagination. The value of the `opc-next-page` response header from the previous \"List\" call. For important details about how pagination works, @@ -3735,20 +6795,28 @@ def list_sql_texts(self, compartment_id, sql_identifier, **kwargs): 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.opsi.models.SqlTextCollection` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.opsi.models.SummarizeDatabaseInsightResourceUtilizationInsightAggregation` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use list_sql_texts API. + Click `here `__ to see an example of how to use summarize_database_insight_resource_utilization_insight API. """ - resource_path = "/databaseInsights/sqlTexts" + resource_path = "/databaseInsights/resourceUtilizationInsight" method = "GET" # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", + "analysis_time_interval", + "time_interval_start", + "time_interval_end", + "database_type", "database_id", "id", + "exadata_insight_id", + "forecast_days", + "host_name", + "is_database_instance_level_metrics", "page", "opc_request_id", "defined_tag_equals", @@ -3759,13 +6827,29 @@ def list_sql_texts(self, compartment_id, sql_identifier, **kwargs): extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "list_sql_texts got unknown kwargs: {!r}".format(extra_kwargs)) + "summarize_database_insight_resource_utilization_insight got unknown kwargs: {!r}".format(extra_kwargs)) + + if 'database_type' in kwargs: + database_type_allowed_values = ["ADW-S", "ATP-S", "ADW-D", "ATP-D", "EXTERNAL-PDB", "EXTERNAL-NONCDB"] + for database_type_item in kwargs['database_type']: + if database_type_item not in database_type_allowed_values: + raise ValueError( + "Invalid value for `database_type`, must be one of {0}".format(database_type_allowed_values) + ) query_params = { "compartmentId": compartment_id, + "resourceMetric": resource_metric, + "analysisTimeInterval": kwargs.get("analysis_time_interval", missing), + "timeIntervalStart": kwargs.get("time_interval_start", missing), + "timeIntervalEnd": kwargs.get("time_interval_end", missing), + "databaseType": self.base_client.generate_collection_format_param(kwargs.get("database_type", missing), 'multi'), "databaseId": self.base_client.generate_collection_format_param(kwargs.get("database_id", missing), 'multi'), "id": self.base_client.generate_collection_format_param(kwargs.get("id", missing), 'multi'), - "sqlIdentifier": self.base_client.generate_collection_format_param(sql_identifier, 'multi'), + "exadataInsightId": self.base_client.generate_collection_format_param(kwargs.get("exadata_insight_id", missing), 'multi'), + "forecastDays": kwargs.get("forecast_days", missing), + "hostName": self.base_client.generate_collection_format_param(kwargs.get("host_name", missing), 'multi'), + "isDatabaseInstanceLevelMetrics": kwargs.get("is_database_instance_level_metrics", missing), "page": kwargs.get("page", missing), "definedTagEquals": self.base_client.generate_collection_format_param(kwargs.get("defined_tag_equals", missing), 'multi'), "freeformTagEquals": self.base_client.generate_collection_format_param(kwargs.get("freeform_tag_equals", missing), 'multi'), @@ -3796,26 +6880,55 @@ def list_sql_texts(self, compartment_id, sql_identifier, **kwargs): method=method, query_params=query_params, header_params=header_params, - response_type="SqlTextCollection") + response_type="SummarizeDatabaseInsightResourceUtilizationInsightAggregation") else: return self.base_client.call_api( resource_path=resource_path, method=method, query_params=query_params, header_params=header_params, - response_type="SqlTextCollection") + response_type="SummarizeDatabaseInsightResourceUtilizationInsightAggregation") - def list_work_request_errors(self, work_request_id, **kwargs): + def summarize_database_insight_tablespace_usage_trend(self, compartment_id, **kwargs): """ - Return a (paginated) list of errors for a given work request. + Returns response with usage time series data (endTimestamp, usage, capacity) with breakdown by tablespaceName for the time period specified. + The maximum time range for analysis is 2 years, hence this is intentionally not paginated. + Either databaseId or id must be specified. - :param str work_request_id: (required) - The ID of the asynchronous request. + :param str compartment_id: (required) + The `OCID`__ of the compartment. - :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. + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param str analysis_time_interval: (optional) + Specify time period in ISO 8601 format with respect to current time. + Default is last 30 days represented by P30D. + If timeInterval is specified, then timeIntervalStart and timeIntervalEnd will be ignored. + Examples P90D (last 90 days), P4W (last 4 weeks), P2M (last 2 months), P1Y (last 12 months), . Maximum value allowed is 25 months prior to current time (P25M). + + :param datetime time_interval_start: (optional) + Analysis start time in UTC in ISO 8601 format(inclusive). + Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). + The minimum allowed value is 2 years prior to the current day. + timeIntervalStart and timeIntervalEnd parameters are used together. + If analysisTimeInterval is specified, this parameter is ignored. + + :param datetime time_interval_end: (optional) + Analysis end time in UTC in ISO 8601 format(exclusive). + Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). + timeIntervalStart and timeIntervalEnd are used together. + If timeIntervalEnd is not specified, current time is used as timeIntervalEnd. + + :param str database_id: (optional) + Optional `OCID`__ of the associated DBaaS entity. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param str id: (optional) + `OCID`__ of the database insight resource. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm :param str page: (optional) For list pagination. The value of the `opc-next-page` response header from @@ -3833,6 +6946,10 @@ def list_work_request_errors(self, work_request_id, **kwargs): __ https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine + :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. @@ -3841,38 +6958,39 @@ def list_work_request_errors(self, work_request_id, **kwargs): 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.opsi.models.WorkRequestErrorCollection` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.opsi.models.SummarizeDatabaseInsightTablespaceUsageTrendAggregationCollection` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use list_work_request_errors API. + Click `here `__ to see an example of how to use summarize_database_insight_tablespace_usage_trend API. """ - resource_path = "/workRequests/{workRequestId}/errors" + resource_path = "/databaseInsights/tablespaceUsageTrend" method = "GET" # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", - "opc_request_id", + "analysis_time_interval", + "time_interval_start", + "time_interval_end", + "database_id", + "id", "page", - "limit" + "limit", + "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)) + "summarize_database_insight_tablespace_usage_trend got unknown kwargs: {!r}".format(extra_kwargs)) query_params = { + "compartmentId": compartment_id, + "analysisTimeInterval": kwargs.get("analysis_time_interval", missing), + "timeIntervalStart": kwargs.get("time_interval_start", missing), + "timeIntervalEnd": kwargs.get("time_interval_end", missing), + "databaseId": kwargs.get("database_id", missing), + "id": kwargs.get("id", missing), "page": kwargs.get("page", missing), "limit": kwargs.get("limit", missing) } @@ -3898,30 +7016,88 @@ def list_work_request_errors(self, work_request_id, **kwargs): self.base_client.call_api, resource_path=resource_path, method=method, - path_params=path_params, query_params=query_params, header_params=header_params, - response_type="WorkRequestErrorCollection") + response_type="SummarizeDatabaseInsightTablespaceUsageTrendAggregationCollection") else: return self.base_client.call_api( resource_path=resource_path, method=method, - path_params=path_params, query_params=query_params, header_params=header_params, - response_type="WorkRequestErrorCollection") + response_type="SummarizeDatabaseInsightTablespaceUsageTrendAggregationCollection") - def list_work_request_logs(self, work_request_id, **kwargs): + def summarize_exadata_insight_resource_capacity_trend(self, resource_type, resource_metric, exadata_insight_id, **kwargs): """ - Return a (paginated) list of logs for a given work request. + Returns response with time series data (endTimestamp, capacity) for the time period specified for an exadata system for a resource metric. + Additionally resources can be filtered using databaseInsightId, hostInsightId or storageServerName query parameters. + Top five resources are returned if total exceeds the limit specified. + Valid values for ResourceType DATABASE are CPU,MEMORY,IO and STORAGE. Database name is returned in name field. DatabaseInsightId, cdbName and hostName query parameter applies to ResourceType DATABASE. + Valid values for ResourceType HOST are CPU and MEMORY. HostName is returned in name field. HostInsightId and hostName query parameter applies to ResourceType HOST. + Valid values for ResourceType STORAGE_SERVER are STORAGE, IOPS and THROUGHPUT. Storage server name is returned in name field for resourceMetric IOPS and THROUGHPUT + and asmName is returned in name field for resourceMetric STORAGE. StorageServerName query parameter applies to ResourceType STORAGE_SERVER. + Valid values for ResourceType DISKGROUP is STORAGE. Comma delimited (asmName,diskgroupName) is returned in name field. - :param str work_request_id: (required) - The ID of the asynchronous request. + :param str resource_type: (required) + Filter by resource. + Supported values are HOST , STORAGE_SERVER and DATABASE - :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 resource_metric: (required) + Filter by resource metric. + Supported values are CPU , STORAGE, MEMORY, IO, IOPS, THROUGHPUT + + :param str exadata_insight_id: (required) + `OCID`__ of exadata insight resource. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param str compartment_id: (optional) + The `OCID`__ of the compartment. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param str analysis_time_interval: (optional) + Specify time period in ISO 8601 format with respect to current time. + Default is last 30 days represented by P30D. + If timeInterval is specified, then timeIntervalStart and timeIntervalEnd will be ignored. + Examples P90D (last 90 days), P4W (last 4 weeks), P2M (last 2 months), P1Y (last 12 months), . Maximum value allowed is 25 months prior to current time (P25M). + + :param datetime time_interval_start: (optional) + Analysis start time in UTC in ISO 8601 format(inclusive). + Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). + The minimum allowed value is 2 years prior to the current day. + timeIntervalStart and timeIntervalEnd parameters are used together. + If analysisTimeInterval is specified, this parameter is ignored. + + :param datetime time_interval_end: (optional) + Analysis end time in UTC in ISO 8601 format(exclusive). + Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). + timeIntervalStart and timeIntervalEnd are used together. + If timeIntervalEnd is not specified, current time is used as timeIntervalEnd. + + :param list[str] database_insight_id: (optional) + Optional list of database insight resource `OCIDs`__. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param list[str] host_insight_id: (optional) + Optional list of host insight resource `OCIDs`__. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param list[str] storage_server_name: (optional) + Optional storage server name on an exadata system. + + :param list[str] exadata_type: (optional) + Filter by one or more Exadata types. + Possible value are DBMACHINE, EXACS, and EXACC. + + :param list[str] cdb_name: (optional) + Filter by one or more cdb name. + + :param list[str] host_name: (optional) + Filter by hostname. :param str page: (optional) For list pagination. The value of the `opc-next-page` response header from @@ -3939,6 +7115,20 @@ def list_work_request_logs(self, work_request_id, **kwargs): __ https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine + :param str sort_order: (optional) + The sort order to use, either ascending (`ASC`) or descending (`DESC`). + + Allowed values are: "ASC", "DESC" + + :param str sort_by: (optional) + The order in which resource capacity trend records are listed + + Allowed values are: "id", "name" + + :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. @@ -3947,40 +7137,71 @@ def list_work_request_logs(self, work_request_id, **kwargs): 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.opsi.models.WorkRequestLogEntryCollection` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.opsi.models.SummarizeExadataInsightResourceCapacityTrendCollection` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use list_work_request_logs API. + Click `here `__ to see an example of how to use summarize_exadata_insight_resource_capacity_trend API. """ - resource_path = "/workRequests/{workRequestId}/logs" + resource_path = "/exadataInsights/resourceCapacityTrend" method = "GET" # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", - "opc_request_id", + "compartment_id", + "analysis_time_interval", + "time_interval_start", + "time_interval_end", + "database_insight_id", + "host_insight_id", + "storage_server_name", + "exadata_type", + "cdb_name", + "host_name", "page", - "limit" + "limit", + "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_request_logs got unknown kwargs: {!r}".format(extra_kwargs)) - - path_params = { - "workRequestId": work_request_id - } + "summarize_exadata_insight_resource_capacity_trend got unknown kwargs: {!r}".format(extra_kwargs)) - path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + 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) + ) - 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)) + if 'sort_by' in kwargs: + sort_by_allowed_values = ["id", "name"] + 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": kwargs.get("compartment_id", missing), + "resourceType": resource_type, + "resourceMetric": resource_metric, + "analysisTimeInterval": kwargs.get("analysis_time_interval", missing), + "timeIntervalStart": kwargs.get("time_interval_start", missing), + "timeIntervalEnd": kwargs.get("time_interval_end", missing), + "exadataInsightId": exadata_insight_id, + "databaseInsightId": self.base_client.generate_collection_format_param(kwargs.get("database_insight_id", missing), 'multi'), + "hostInsightId": self.base_client.generate_collection_format_param(kwargs.get("host_insight_id", missing), 'multi'), + "storageServerName": self.base_client.generate_collection_format_param(kwargs.get("storage_server_name", missing), 'multi'), + "exadataType": self.base_client.generate_collection_format_param(kwargs.get("exadata_type", missing), 'multi'), + "cdbName": self.base_client.generate_collection_format_param(kwargs.get("cdb_name", missing), 'multi'), + "hostName": self.base_client.generate_collection_format_param(kwargs.get("host_name", missing), 'multi'), "page": kwargs.get("page", missing), - "limit": kwargs.get("limit", missing) + "limit": kwargs.get("limit", 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} @@ -4004,32 +7225,72 @@ def list_work_request_logs(self, work_request_id, **kwargs): self.base_client.call_api, resource_path=resource_path, method=method, - path_params=path_params, query_params=query_params, header_params=header_params, - response_type="WorkRequestLogEntryCollection") + response_type="SummarizeExadataInsightResourceCapacityTrendCollection") else: return self.base_client.call_api( resource_path=resource_path, method=method, - path_params=path_params, query_params=query_params, header_params=header_params, - response_type="WorkRequestLogEntryCollection") + response_type="SummarizeExadataInsightResourceCapacityTrendCollection") - def list_work_requests(self, compartment_id, **kwargs): + def summarize_exadata_insight_resource_capacity_trend_aggregated(self, resource_type, resource_metric, **kwargs): """ - Lists the work requests in a compartment. + Returns response with time series data (endTimestamp, capacity) for the time period specified for an exadata system or fleet aggregation for a resource metric. + The maximum time range for analysis is 2 years, hence this is intentionally not paginated. + Valid values for ResourceType DATABASE are CPU,MEMORY,IO and STORAGE. + Valid values for ResourceType HOST are CPU and MEMORY. + Valid values for ResourceType STORAGE_SERVER are STORAGE, IOPS and THROUGHPUT. - :param str compartment_id: (required) + :param str resource_type: (required) + Filter by resource. + Supported values are HOST , STORAGE_SERVER and DATABASE + + :param str resource_metric: (required) + Filter by resource metric. + Supported values are CPU , STORAGE, MEMORY, IO, IOPS, THROUGHPUT + + :param str compartment_id: (optional) The `OCID`__ of the compartment. __ https://docs.cloud.oracle.com/iaas/Content/General/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 analysis_time_interval: (optional) + Specify time period in ISO 8601 format with respect to current time. + Default is last 30 days represented by P30D. + If timeInterval is specified, then timeIntervalStart and timeIntervalEnd will be ignored. + Examples P90D (last 90 days), P4W (last 4 weeks), P2M (last 2 months), P1Y (last 12 months), . Maximum value allowed is 25 months prior to current time (P25M). + + :param datetime time_interval_start: (optional) + Analysis start time in UTC in ISO 8601 format(inclusive). + Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). + The minimum allowed value is 2 years prior to the current day. + timeIntervalStart and timeIntervalEnd parameters are used together. + If analysisTimeInterval is specified, this parameter is ignored. + + :param datetime time_interval_end: (optional) + Analysis end time in UTC in ISO 8601 format(exclusive). + Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). + timeIntervalStart and timeIntervalEnd are used together. + If timeIntervalEnd is not specified, current time is used as timeIntervalEnd. + + :param list[str] exadata_insight_id: (optional) + Optional list of exadata insight resource `OCIDs`__. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param list[str] exadata_type: (optional) + Filter by one or more Exadata types. + Possible value are DBMACHINE, EXACS, and EXACC. + + :param list[str] cdb_name: (optional) + Filter by one or more cdb name. + + :param list[str] host_name: (optional) + Filter by hostname. :param str page: (optional) For list pagination. The value of the `opc-next-page` response header from @@ -4038,14 +7299,44 @@ def list_work_requests(self, compartment_id, **kwargs): __ https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine - :param int limit: (optional) - For list pagination. The maximum number of results per page, or items to - return in a paginated \"List\" call. - For important details about how pagination works, see - `List Pagination`__. - Example: `50` + :param str sort_order: (optional) + The sort order to use, either ascending (`ASC`) or descending (`DESC`). - __ https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine + Allowed values are: "ASC", "DESC" + + :param str sort_by: (optional) + Sorts using end timestamp or capacity. + + Allowed values are: "endTimestamp", "capacity" + + :param list[str] defined_tag_equals: (optional) + A list of tag filters to apply. Only resources with a defined tag matching the value will be returned. + Each item in the list has the format \"{namespace}.{tagName}.{value}\". All inputs are case-insensitive. + Multiple values for the same key (i.e. same namespace and tag name) are interpreted as \"OR\". + Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as \"AND\". + + :param list[str] freeform_tag_equals: (optional) + A list of tag filters to apply. Only resources with a freeform tag matching the value will be returned. + The key for each tag is \"{tagName}.{value}\". All inputs are case-insensitive. + Multiple values for the same tag name are interpreted as \"OR\". Values for different tag names are interpreted as \"AND\". + + :param list[str] defined_tag_exists: (optional) + A list of tag existence filters to apply. Only resources for which the specified defined tags exist will be returned. + Each item in the list has the format \"{namespace}.{tagName}.true\" (for checking existence of a defined tag) + or \"{namespace}.true\". All inputs are case-insensitive. + Currently, only existence (\"true\" at the end) is supported. Absence (\"false\" at the end) is not supported. + Multiple values for the same key (i.e. same namespace and tag name) are interpreted as \"OR\". + Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as \"AND\". + + :param list[str] freeform_tag_exists: (optional) + A list of tag existence filters to apply. Only resources for which the specified freeform tags exist the value will be returned. + The key for each tag is \"{tagName}.true\". All inputs are case-insensitive. + Currently, only existence (\"true\" at the end) is supported. Absence (\"false\" at the end) is not supported. + Multiple values for different tag names are interpreted as \"AND\". + + :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. @@ -4055,31 +7346,72 @@ def list_work_requests(self, compartment_id, **kwargs): 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.opsi.models.WorkRequestCollection` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.opsi.models.SummarizeExadataInsightResourceCapacityTrendAggregation` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use list_work_requests API. + Click `here `__ to see an example of how to use summarize_exadata_insight_resource_capacity_trend_aggregated API. """ - resource_path = "/workRequests" + resource_path = "/exadataInsights/resourceCapacityTrendAggregated" method = "GET" # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", - "opc_request_id", + "compartment_id", + "analysis_time_interval", + "time_interval_start", + "time_interval_end", + "exadata_insight_id", + "exadata_type", + "cdb_name", + "host_name", "page", - "limit" + "sort_order", + "sort_by", + "defined_tag_equals", + "freeform_tag_equals", + "defined_tag_exists", + "freeform_tag_exists", + "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)) + "summarize_exadata_insight_resource_capacity_trend_aggregated got unknown kwargs: {!r}".format(extra_kwargs)) + + 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 = ["endTimestamp", "capacity"] + 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, + "compartmentId": kwargs.get("compartment_id", missing), + "resourceType": resource_type, + "resourceMetric": resource_metric, + "analysisTimeInterval": kwargs.get("analysis_time_interval", missing), + "timeIntervalStart": kwargs.get("time_interval_start", missing), + "timeIntervalEnd": kwargs.get("time_interval_end", missing), + "exadataInsightId": self.base_client.generate_collection_format_param(kwargs.get("exadata_insight_id", missing), 'multi'), + "exadataType": self.base_client.generate_collection_format_param(kwargs.get("exadata_type", missing), 'multi'), + "cdbName": self.base_client.generate_collection_format_param(kwargs.get("cdb_name", missing), 'multi'), + "hostName": self.base_client.generate_collection_format_param(kwargs.get("host_name", missing), 'multi'), "page": kwargs.get("page", missing), - "limit": kwargs.get("limit", missing) + "sortOrder": kwargs.get("sort_order", missing), + "sortBy": kwargs.get("sort_by", missing), + "definedTagEquals": self.base_client.generate_collection_format_param(kwargs.get("defined_tag_equals", missing), 'multi'), + "freeformTagEquals": self.base_client.generate_collection_format_param(kwargs.get("freeform_tag_equals", missing), 'multi'), + "definedTagExists": self.base_client.generate_collection_format_param(kwargs.get("defined_tag_exists", missing), 'multi'), + "freeformTagExists": self.base_client.generate_collection_format_param(kwargs.get("freeform_tag_exists", missing), 'multi') } query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} @@ -4105,29 +7437,39 @@ def list_work_requests(self, compartment_id, **kwargs): method=method, query_params=query_params, header_params=header_params, - response_type="WorkRequestCollection") + response_type="SummarizeExadataInsightResourceCapacityTrendAggregation") else: return self.base_client.call_api( resource_path=resource_path, method=method, query_params=query_params, header_params=header_params, - response_type="WorkRequestCollection") + response_type="SummarizeExadataInsightResourceCapacityTrendAggregation") - def summarize_database_insight_resource_capacity_trend(self, compartment_id, resource_metric, **kwargs): + def summarize_exadata_insight_resource_forecast_trend(self, resource_type, resource_metric, exadata_insight_id, **kwargs): """ - Returns response with time series data (endTimestamp, capacity, baseCapacity) for the time period specified. - The maximum time range for analysis is 2 years, hence this is intentionally not paginated. - + Get historical usage and forecast predictions for an exadata system with breakdown by databases, hosts or storage servers. + Additionally resources can be filtered using databaseInsightId, hostInsightId or storageServerName query parameters. + Top five resources are returned if total exceeds the limit specified. + Valid values for ResourceType DATABASE are CPU,MEMORY,IO and STORAGE. Database name is returned in name field. DatabaseInsightId , cdbName and hostName query parameter applies to ResourceType DATABASE. + Valid values for ResourceType HOST are CPU and MEMORY. HostName s returned in name field. HostInsightId and hostName query parameter applies to ResourceType HOST. + Valid values for ResourceType STORAGE_SERVER are STORAGE, IOPS and THROUGHPUT. Storage server name is returned in name field for resourceMetric IOPS and THROUGHPUT + and asmName is returned in name field for resourceMetric STORAGE. StorageServerName query parameter applies to ResourceType STORAGE_SERVER. + Valid value for ResourceType DISKGROUP is STORAGE. Comma delimited (asmName,diskgroupName) is returned in name field. - :param str compartment_id: (required) - The `OCID`__ of the compartment. - __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + :param str resource_type: (required) + Filter by resource. + Supported values are HOST , STORAGE_SERVER and DATABASE :param str resource_metric: (required) Filter by resource metric. - Supported values are CPU , STORAGE, MEMORY and IO. + Supported values are CPU , STORAGE, MEMORY, IO, IOPS, THROUGHPUT + + :param str exadata_insight_id: (required) + `OCID`__ of exadata insight resource. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm :param str analysis_time_interval: (optional) Specify time period in ISO 8601 format with respect to current time. @@ -4148,87 +7490,85 @@ def summarize_database_insight_resource_capacity_trend(self, compartment_id, res timeIntervalStart and timeIntervalEnd are used together. If timeIntervalEnd is not specified, current time is used as timeIntervalEnd. - :param list[str] database_type: (optional) - Filter by one or more database type. - Possible values are ADW-S, ATP-S, ADW-D, ATP-D, EXTERNAL-PDB, EXTERNAL-NONCDB. - - Allowed values are: "ADW-S", "ATP-S", "ADW-D", "ATP-D", "EXTERNAL-PDB", "EXTERNAL-NONCDB" - - :param list[str] database_id: (optional) - Optional list of database `OCIDs`__ of the associated DBaaS entity. + :param list[str] database_insight_id: (optional) + Optional list of database insight resource `OCIDs`__. __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm - :param list[str] id: (optional) - Optional list of database insight resource `OCIDs`__. + :param list[str] host_insight_id: (optional) + Optional list of host insight resource `OCIDs`__. __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm - :param str utilization_level: (optional) - Filter by utilization level by the following buckets: - - HIGH_UTILIZATION: DBs with utilization greater or equal than 75. - - LOW_UTILIZATION: DBs with utilization lower than 25. - - MEDIUM_HIGH_UTILIZATION: DBs with utilization greater or equal than 50 but lower than 75. - - MEDIUM_LOW_UTILIZATION: DBs with utilization greater or equal than 25 but lower than 50. + :param list[str] storage_server_name: (optional) + Optional storage server name on an exadata system. - Allowed values are: "HIGH_UTILIZATION", "LOW_UTILIZATION", "MEDIUM_HIGH_UTILIZATION", "MEDIUM_LOW_UTILIZATION" + :param list[str] exadata_type: (optional) + Filter by one or more Exadata types. + Possible value are DBMACHINE, EXACS, and EXACC. - :param str page: (optional) - For list pagination. The value of the `opc-next-page` response header from - the previous \"List\" call. For important details about how pagination works, - see `List Pagination`__. + :param str statistic: (optional) + Choose the type of statistic metric data to be used for forecasting. - __ https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine + Allowed values are: "AVG", "MAX" - :param str sort_order: (optional) - The sort order to use, either ascending (`ASC`) or descending (`DESC`). + :param int forecast_start_day: (optional) + Number of days used for utilization forecast analysis. - Allowed values are: "ASC", "DESC" + :param int forecast_days: (optional) + Number of days used for utilization forecast analysis. - :param str sort_by: (optional) - Sorts using end timestamp , capacity or baseCapacity + :param str forecast_model: (optional) + Choose algorithm model for the forecasting. + Possible values: + - LINEAR: Uses linear regression algorithm for forecasting. + - ML_AUTO: Automatically detects best algorithm to use for forecasting. + - ML_NO_AUTO: Automatically detects seasonality of the data for forecasting using linear or seasonal algorithm. - Allowed values are: "endTimestamp", "capacity", "baseCapacity" + Allowed values are: "LINEAR", "ML_AUTO", "ML_NO_AUTO" - :param str tablespace_name: (optional) - Tablespace name for a database + :param list[str] cdb_name: (optional) + Filter by one or more cdb name. :param list[str] host_name: (optional) - Filter by one or more hostname. + Filter by hostname. - :param bool is_database_instance_level_metrics: (optional) - Flag to indicate if database instance level metrics should be returned. The flag is ignored when a host name filter is not applied. - When a hostname filter is applied this flag will determine whether to return metrics for the instances located on the specified host or for the - whole database which contains an instance on this host. + :param int limit: (optional) + For list pagination. The maximum number of results per page, or items to + return in a paginated \"List\" call. + For important details about how pagination works, see + `List Pagination`__. + Example: `50` - :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. + __ https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine - :param list[str] defined_tag_equals: (optional) - A list of tag filters to apply. Only resources with a defined tag matching the value will be returned. - Each item in the list has the format \"{namespace}.{tagName}.{value}\". All inputs are case-insensitive. - Multiple values for the same key (i.e. same namespace and tag name) are interpreted as \"OR\". - Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as \"AND\". + :param int confidence: (optional) + This parameter is used to change data's confidence level, this data is ingested by the + forecast algorithm. + Confidence is the probability of an interval to contain the expected population parameter. + Manipulation of this value will lead to different results. + If not set, default confidence value is 95%. - :param list[str] freeform_tag_equals: (optional) - A list of tag filters to apply. Only resources with a freeform tag matching the value will be returned. - The key for each tag is \"{tagName}.{value}\". All inputs are case-insensitive. - Multiple values for the same tag name are interpreted as \"OR\". Values for different tag names are interpreted as \"AND\". + :param str sort_order: (optional) + The sort order to use, either ascending (`ASC`) or descending (`DESC`). + + Allowed values are: "ASC", "DESC" + + :param str sort_by: (optional) + The order in which resource Forecast trend records are listed + + Allowed values are: "id", "name", "daysToReachCapacity" + + :param str page: (optional) + For list pagination. The value of the `opc-next-page` response header from + the previous \"List\" call. For important details about how pagination works, + see `List Pagination`__. - :param list[str] defined_tag_exists: (optional) - A list of tag existence filters to apply. Only resources for which the specified defined tags exist will be returned. - Each item in the list has the format \"{namespace}.{tagName}.true\" (for checking existence of a defined tag) - or \"{namespace}.true\". All inputs are case-insensitive. - Currently, only existence (\"true\" at the end) is supported. Absence (\"false\" at the end) is not supported. - Multiple values for the same key (i.e. same namespace and tag name) are interpreted as \"OR\". - Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as \"AND\". + __ https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine - :param list[str] freeform_tag_exists: (optional) - A list of tag existence filters to apply. Only resources for which the specified freeform tags exist the value will be returned. - The key for each tag is \"{tagName}.true\". All inputs are case-insensitive. - Currently, only existence (\"true\" at the end) is supported. Absence (\"false\" at the end) is not supported. - Multiple values for different tag names are interpreted as \"AND\". + :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. @@ -4238,13 +7578,13 @@ def summarize_database_insight_resource_capacity_trend(self, compartment_id, res 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.opsi.models.SummarizeDatabaseInsightResourceCapacityTrendAggregationCollection` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.opsi.models.SummarizeExadataInsightResourceForecastTrendCollection` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use summarize_database_insight_resource_capacity_trend API. + Click `here `__ to see an example of how to use summarize_exadata_insight_resource_forecast_trend API. """ - resource_path = "/databaseInsights/resourceCapacityTrend" + resource_path = "/exadataInsights/resourceForecastTrend" method = "GET" # Don't accept unknown kwargs @@ -4253,40 +7593,40 @@ def summarize_database_insight_resource_capacity_trend(self, compartment_id, res "analysis_time_interval", "time_interval_start", "time_interval_end", - "database_type", - "database_id", - "id", - "utilization_level", - "page", + "database_insight_id", + "host_insight_id", + "storage_server_name", + "exadata_type", + "statistic", + "forecast_start_day", + "forecast_days", + "forecast_model", + "cdb_name", + "host_name", + "limit", + "confidence", "sort_order", "sort_by", - "tablespace_name", - "host_name", - "is_database_instance_level_metrics", - "opc_request_id", - "defined_tag_equals", - "freeform_tag_equals", - "defined_tag_exists", - "freeform_tag_exists" + "page", + "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "summarize_database_insight_resource_capacity_trend got unknown kwargs: {!r}".format(extra_kwargs)) + "summarize_exadata_insight_resource_forecast_trend got unknown kwargs: {!r}".format(extra_kwargs)) - if 'database_type' in kwargs: - database_type_allowed_values = ["ADW-S", "ATP-S", "ADW-D", "ATP-D", "EXTERNAL-PDB", "EXTERNAL-NONCDB"] - for database_type_item in kwargs['database_type']: - if database_type_item not in database_type_allowed_values: - raise ValueError( - "Invalid value for `database_type`, must be one of {0}".format(database_type_allowed_values) - ) + if 'statistic' in kwargs: + statistic_allowed_values = ["AVG", "MAX"] + if kwargs['statistic'] not in statistic_allowed_values: + raise ValueError( + "Invalid value for `statistic`, must be one of {0}".format(statistic_allowed_values) + ) - if 'utilization_level' in kwargs: - utilization_level_allowed_values = ["HIGH_UTILIZATION", "LOW_UTILIZATION", "MEDIUM_HIGH_UTILIZATION", "MEDIUM_LOW_UTILIZATION"] - if kwargs['utilization_level'] not in utilization_level_allowed_values: + if 'forecast_model' in kwargs: + forecast_model_allowed_values = ["LINEAR", "ML_AUTO", "ML_NO_AUTO"] + if kwargs['forecast_model'] not in forecast_model_allowed_values: raise ValueError( - "Invalid value for `utilization_level`, must be one of {0}".format(utilization_level_allowed_values) + "Invalid value for `forecast_model`, must be one of {0}".format(forecast_model_allowed_values) ) if 'sort_order' in kwargs: @@ -4297,32 +7637,34 @@ def summarize_database_insight_resource_capacity_trend(self, compartment_id, res ) if 'sort_by' in kwargs: - sort_by_allowed_values = ["endTimestamp", "capacity", "baseCapacity"] + sort_by_allowed_values = ["id", "name", "daysToReachCapacity"] 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, + "resourceType": resource_type, "resourceMetric": resource_metric, "analysisTimeInterval": kwargs.get("analysis_time_interval", missing), "timeIntervalStart": kwargs.get("time_interval_start", missing), "timeIntervalEnd": kwargs.get("time_interval_end", missing), - "databaseType": self.base_client.generate_collection_format_param(kwargs.get("database_type", missing), 'multi'), - "databaseId": self.base_client.generate_collection_format_param(kwargs.get("database_id", missing), 'multi'), - "id": self.base_client.generate_collection_format_param(kwargs.get("id", missing), 'multi'), - "utilizationLevel": kwargs.get("utilization_level", missing), - "page": kwargs.get("page", missing), + "exadataInsightId": exadata_insight_id, + "databaseInsightId": self.base_client.generate_collection_format_param(kwargs.get("database_insight_id", missing), 'multi'), + "hostInsightId": self.base_client.generate_collection_format_param(kwargs.get("host_insight_id", missing), 'multi'), + "storageServerName": self.base_client.generate_collection_format_param(kwargs.get("storage_server_name", missing), 'multi'), + "exadataType": self.base_client.generate_collection_format_param(kwargs.get("exadata_type", missing), 'multi'), + "statistic": kwargs.get("statistic", missing), + "forecastStartDay": kwargs.get("forecast_start_day", missing), + "forecastDays": kwargs.get("forecast_days", missing), + "forecastModel": kwargs.get("forecast_model", missing), + "cdbName": self.base_client.generate_collection_format_param(kwargs.get("cdb_name", missing), 'multi'), + "hostName": self.base_client.generate_collection_format_param(kwargs.get("host_name", missing), 'multi'), + "limit": kwargs.get("limit", missing), + "confidence": kwargs.get("confidence", missing), "sortOrder": kwargs.get("sort_order", missing), "sortBy": kwargs.get("sort_by", missing), - "tablespaceName": kwargs.get("tablespace_name", missing), - "hostName": self.base_client.generate_collection_format_param(kwargs.get("host_name", missing), 'multi'), - "isDatabaseInstanceLevelMetrics": kwargs.get("is_database_instance_level_metrics", missing), - "definedTagEquals": self.base_client.generate_collection_format_param(kwargs.get("defined_tag_equals", missing), 'multi'), - "freeformTagEquals": self.base_client.generate_collection_format_param(kwargs.get("freeform_tag_equals", missing), 'multi'), - "definedTagExists": self.base_client.generate_collection_format_param(kwargs.get("defined_tag_exists", missing), 'multi'), - "freeformTagExists": self.base_client.generate_collection_format_param(kwargs.get("freeform_tag_exists", missing), 'multi') + "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} @@ -4348,28 +7690,35 @@ def summarize_database_insight_resource_capacity_trend(self, compartment_id, res method=method, query_params=query_params, header_params=header_params, - response_type="SummarizeDatabaseInsightResourceCapacityTrendAggregationCollection") + response_type="SummarizeExadataInsightResourceForecastTrendCollection") else: return self.base_client.call_api( resource_path=resource_path, method=method, query_params=query_params, header_params=header_params, - response_type="SummarizeDatabaseInsightResourceCapacityTrendAggregationCollection") + response_type="SummarizeExadataInsightResourceForecastTrendCollection") - def summarize_database_insight_resource_forecast_trend(self, compartment_id, resource_metric, **kwargs): + def summarize_exadata_insight_resource_forecast_trend_aggregated(self, resource_type, resource_metric, **kwargs): """ - Get Forecast predictions for CPU and Storage resources since a time in the past. - + Get aggregated historical usage and forecast predictions for resources. Either compartmentId or exadataInsightsId query parameter must be specified. + Valid values for ResourceType DATABASE are CPU,MEMORY,IO and STORAGE. + Valid values for ResourceType HOST are CPU and MEMORY. + Valid values for ResourceType STORAGE_SERVER are STORAGE, IOPS and THROUGHPUT. - :param str compartment_id: (required) - The `OCID`__ of the compartment. - __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + :param str resource_type: (required) + Filter by resource. + Supported values are HOST , STORAGE_SERVER and DATABASE :param str resource_metric: (required) Filter by resource metric. - Supported values are CPU , STORAGE, MEMORY and IO. + Supported values are CPU , STORAGE, MEMORY, IO, IOPS, THROUGHPUT + + :param str compartment_id: (optional) + The `OCID`__ of the compartment. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm :param str analysis_time_interval: (optional) Specify time period in ISO 8601 format with respect to current time. @@ -4390,27 +7739,23 @@ def summarize_database_insight_resource_forecast_trend(self, compartment_id, res timeIntervalStart and timeIntervalEnd are used together. If timeIntervalEnd is not specified, current time is used as timeIntervalEnd. - :param list[str] database_type: (optional) - Filter by one or more database type. - Possible values are ADW-S, ATP-S, ADW-D, ATP-D, EXTERNAL-PDB, EXTERNAL-NONCDB. - - Allowed values are: "ADW-S", "ATP-S", "ADW-D", "ATP-D", "EXTERNAL-PDB", "EXTERNAL-NONCDB" - - :param list[str] database_id: (optional) - Optional list of database `OCIDs`__ of the associated DBaaS entity. + :param list[str] exadata_insight_id: (optional) + Optional list of exadata insight resource `OCIDs`__. __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm - :param list[str] id: (optional) - Optional list of database insight resource `OCIDs`__. - - __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + :param list[str] exadata_type: (optional) + Filter by one or more Exadata types. + Possible value are DBMACHINE, EXACS, and EXACC. :param str statistic: (optional) Choose the type of statistic metric data to be used for forecasting. Allowed values are: "AVG", "MAX" + :param int forecast_start_day: (optional) + Number of days used for utilization forecast analysis. + :param int forecast_days: (optional) Number of days used for utilization forecast analysis. @@ -4423,14 +7768,11 @@ def summarize_database_insight_resource_forecast_trend(self, compartment_id, res Allowed values are: "LINEAR", "ML_AUTO", "ML_NO_AUTO" - :param str utilization_level: (optional) - Filter by utilization level by the following buckets: - - HIGH_UTILIZATION: DBs with utilization greater or equal than 75. - - LOW_UTILIZATION: DBs with utilization lower than 25. - - MEDIUM_HIGH_UTILIZATION: DBs with utilization greater or equal than 50 but lower than 75. - - MEDIUM_LOW_UTILIZATION: DBs with utilization greater or equal than 25 but lower than 50. + :param list[str] cdb_name: (optional) + Filter by one or more cdb name. - Allowed values are: "HIGH_UTILIZATION", "LOW_UTILIZATION", "MEDIUM_HIGH_UTILIZATION", "MEDIUM_LOW_UTILIZATION" + :param list[str] host_name: (optional) + Filter by hostname. :param int confidence: (optional) This parameter is used to change data's confidence level, this data is ingested by the @@ -4446,21 +7788,6 @@ def summarize_database_insight_resource_forecast_trend(self, compartment_id, res __ https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine - :param list[str] host_name: (optional) - Filter by one or more hostname. - - :param str tablespace_name: (optional) - Tablespace name for a database - - :param bool is_database_instance_level_metrics: (optional) - Flag to indicate if database instance level metrics should be returned. The flag is ignored when a host name filter is not applied. - When a hostname filter is applied this flag will determine whether to return metrics for the instances located on the specified host or for the - whole database which contains an instance on this host. - - :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 list[str] defined_tag_equals: (optional) A list of tag filters to apply. Only resources with a defined tag matching the value will be returned. Each item in the list has the format \"{namespace}.{tagName}.{value}\". All inputs are case-insensitive. @@ -4486,6 +7813,10 @@ def summarize_database_insight_resource_forecast_trend(self, compartment_id, res Currently, only existence (\"true\" at the end) is supported. Absence (\"false\" at the end) is not supported. Multiple values for different tag names are interpreted as \"AND\". + :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. @@ -4494,51 +7825,42 @@ def summarize_database_insight_resource_forecast_trend(self, compartment_id, res 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.opsi.models.SummarizeDatabaseInsightResourceForecastTrendAggregation` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.opsi.models.SummarizeExadataInsightResourceForecastTrendAggregation` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use summarize_database_insight_resource_forecast_trend API. + Click `here `__ to see an example of how to use summarize_exadata_insight_resource_forecast_trend_aggregated API. """ - resource_path = "/databaseInsights/resourceForecastTrend" + resource_path = "/exadataInsights/resourceForecastTrendAggregated" method = "GET" # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", + "compartment_id", "analysis_time_interval", "time_interval_start", "time_interval_end", - "database_type", - "database_id", - "id", + "exadata_insight_id", + "exadata_type", "statistic", + "forecast_start_day", "forecast_days", "forecast_model", - "utilization_level", + "cdb_name", + "host_name", "confidence", "page", - "host_name", - "tablespace_name", - "is_database_instance_level_metrics", - "opc_request_id", "defined_tag_equals", "freeform_tag_equals", "defined_tag_exists", - "freeform_tag_exists" + "freeform_tag_exists", + "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "summarize_database_insight_resource_forecast_trend got unknown kwargs: {!r}".format(extra_kwargs)) - - if 'database_type' in kwargs: - database_type_allowed_values = ["ADW-S", "ATP-S", "ADW-D", "ATP-D", "EXTERNAL-PDB", "EXTERNAL-NONCDB"] - for database_type_item in kwargs['database_type']: - if database_type_item not in database_type_allowed_values: - raise ValueError( - "Invalid value for `database_type`, must be one of {0}".format(database_type_allowed_values) - ) + "summarize_exadata_insight_resource_forecast_trend_aggregated got unknown kwargs: {!r}".format(extra_kwargs)) if 'statistic' in kwargs: statistic_allowed_values = ["AVG", "MAX"] @@ -4554,31 +7876,23 @@ def summarize_database_insight_resource_forecast_trend(self, compartment_id, res "Invalid value for `forecast_model`, must be one of {0}".format(forecast_model_allowed_values) ) - if 'utilization_level' in kwargs: - utilization_level_allowed_values = ["HIGH_UTILIZATION", "LOW_UTILIZATION", "MEDIUM_HIGH_UTILIZATION", "MEDIUM_LOW_UTILIZATION"] - if kwargs['utilization_level'] not in utilization_level_allowed_values: - raise ValueError( - "Invalid value for `utilization_level`, must be one of {0}".format(utilization_level_allowed_values) - ) - query_params = { - "compartmentId": compartment_id, + "compartmentId": kwargs.get("compartment_id", missing), + "resourceType": resource_type, "resourceMetric": resource_metric, "analysisTimeInterval": kwargs.get("analysis_time_interval", missing), "timeIntervalStart": kwargs.get("time_interval_start", missing), "timeIntervalEnd": kwargs.get("time_interval_end", missing), - "databaseType": self.base_client.generate_collection_format_param(kwargs.get("database_type", missing), 'multi'), - "databaseId": self.base_client.generate_collection_format_param(kwargs.get("database_id", missing), 'multi'), - "id": self.base_client.generate_collection_format_param(kwargs.get("id", missing), 'multi'), + "exadataInsightId": self.base_client.generate_collection_format_param(kwargs.get("exadata_insight_id", missing), 'multi'), + "exadataType": self.base_client.generate_collection_format_param(kwargs.get("exadata_type", missing), 'multi'), "statistic": kwargs.get("statistic", missing), + "forecastStartDay": kwargs.get("forecast_start_day", missing), "forecastDays": kwargs.get("forecast_days", missing), "forecastModel": kwargs.get("forecast_model", missing), - "utilizationLevel": kwargs.get("utilization_level", missing), + "cdbName": self.base_client.generate_collection_format_param(kwargs.get("cdb_name", missing), 'multi'), + "hostName": self.base_client.generate_collection_format_param(kwargs.get("host_name", missing), 'multi'), "confidence": kwargs.get("confidence", missing), "page": kwargs.get("page", missing), - "hostName": self.base_client.generate_collection_format_param(kwargs.get("host_name", missing), 'multi'), - "tablespaceName": kwargs.get("tablespace_name", missing), - "isDatabaseInstanceLevelMetrics": kwargs.get("is_database_instance_level_metrics", missing), "definedTagEquals": self.base_client.generate_collection_format_param(kwargs.get("defined_tag_equals", missing), 'multi'), "freeformTagEquals": self.base_client.generate_collection_format_param(kwargs.get("freeform_tag_equals", missing), 'multi'), "definedTagExists": self.base_client.generate_collection_format_param(kwargs.get("defined_tag_exists", missing), 'multi'), @@ -4608,28 +7922,36 @@ def summarize_database_insight_resource_forecast_trend(self, compartment_id, res method=method, query_params=query_params, header_params=header_params, - response_type="SummarizeDatabaseInsightResourceForecastTrendAggregation") + response_type="SummarizeExadataInsightResourceForecastTrendAggregation") else: return self.base_client.call_api( resource_path=resource_path, method=method, query_params=query_params, header_params=header_params, - response_type="SummarizeDatabaseInsightResourceForecastTrendAggregation") + response_type="SummarizeExadataInsightResourceForecastTrendAggregation") - def summarize_database_insight_resource_statistics(self, compartment_id, resource_metric, **kwargs): + def summarize_exadata_insight_resource_statistics(self, exadata_insight_id, resource_type, resource_metric, **kwargs): """ - Lists the Resource statistics (usage,capacity, usage change percent, utilization percent, base capacity, isAutoScalingEnabled) for each database filtered by utilization level + Lists the Resource statistics (usage, capacity, usage change percent, utilization percent) for each resource based on resourceMetric filtered by utilization level. + Valid values for ResourceType DATABASE are CPU,MEMORY,IO and STORAGE. + Valid values for ResourceType HOST are CPU and MEMORY. + Valid values for ResourceType STORAGE_SERVER are STORAGE, IOPS, THROUGHPUT. + Valid value for ResourceType DISKGROUP is STORAGE. - :param str compartment_id: (required) - The `OCID`__ of the compartment. + :param str exadata_insight_id: (required) + `OCID`__ of exadata insight resource. __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + :param str resource_type: (required) + Filter by resource. + Supported values are HOST , STORAGE_SERVER and DATABASE + :param str resource_metric: (required) Filter by resource metric. - Supported values are CPU , STORAGE, MEMORY and IO. + Supported values are CPU , STORAGE, MEMORY, IO, IOPS, THROUGHPUT :param str analysis_time_interval: (optional) Specify time period in ISO 8601 format with respect to current time. @@ -4650,32 +7972,28 @@ def summarize_database_insight_resource_statistics(self, compartment_id, resourc timeIntervalStart and timeIntervalEnd are used together. If timeIntervalEnd is not specified, current time is used as timeIntervalEnd. - :param list[str] database_type: (optional) - Filter by one or more database type. - Possible values are ADW-S, ATP-S, ADW-D, ATP-D, EXTERNAL-PDB, EXTERNAL-NONCDB. - - Allowed values are: "ADW-S", "ATP-S", "ADW-D", "ATP-D", "EXTERNAL-PDB", "EXTERNAL-NONCDB" - - :param list[str] database_id: (optional) - Optional list of database `OCIDs`__ of the associated DBaaS entity. + :param list[str] exadata_type: (optional) + Filter by one or more Exadata types. + Possible value are DBMACHINE, EXACS, and EXACC. - __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm - - :param list[str] id: (optional) - Optional list of database insight resource `OCIDs`__. + :param list[str] cdb_name: (optional) + Filter by one or more cdb name. - __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + :param list[str] host_name: (optional) + Filter by hostname. :param int percentile: (optional) Percentile values of daily usage to be used for computing the aggregate resource usage. - :param str insight_by: (optional) - Return data of a specific insight - Possible values are High Utilization, Low Utilization, Any ,High Utilization Forecast, - Low Utilization Forecast + :param str sort_order: (optional) + The sort order to use, either ascending (`ASC`) or descending (`DESC`). - :param int forecast_days: (optional) - Number of days used for utilization forecast analysis. + Allowed values are: "ASC", "DESC" + + :param str sort_by: (optional) + The order in which resource statistics records are listed + + Allowed values are: "utilizationPercent", "usage", "usageChangePercent" :param int limit: (optional) For list pagination. The maximum number of results per page, or items to @@ -4693,52 +8011,9 @@ def summarize_database_insight_resource_statistics(self, compartment_id, resourc __ https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine - :param str sort_order: (optional) - The sort order to use, either ascending (`ASC`) or descending (`DESC`). - - Allowed values are: "ASC", "DESC" - - :param str sort_by: (optional) - The order in which resource statistics records are listed - - Allowed values are: "utilizationPercent", "usage", "usageChangePercent", "databaseName", "databaseType" - - :param list[str] host_name: (optional) - Filter by one or more hostname. - - :param bool is_database_instance_level_metrics: (optional) - Flag to indicate if database instance level metrics should be returned. The flag is ignored when a host name filter is not applied. - When a hostname filter is applied this flag will determine whether to return metrics for the instances located on the specified host or for the - whole database which contains an instance on this host. - - :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 list[str] defined_tag_equals: (optional) - A list of tag filters to apply. Only resources with a defined tag matching the value will be returned. - Each item in the list has the format \"{namespace}.{tagName}.{value}\". All inputs are case-insensitive. - Multiple values for the same key (i.e. same namespace and tag name) are interpreted as \"OR\". - Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as \"AND\". - - :param list[str] freeform_tag_equals: (optional) - A list of tag filters to apply. Only resources with a freeform tag matching the value will be returned. - The key for each tag is \"{tagName}.{value}\". All inputs are case-insensitive. - Multiple values for the same tag name are interpreted as \"OR\". Values for different tag names are interpreted as \"AND\". - - :param list[str] defined_tag_exists: (optional) - A list of tag existence filters to apply. Only resources for which the specified defined tags exist will be returned. - Each item in the list has the format \"{namespace}.{tagName}.true\" (for checking existence of a defined tag) - or \"{namespace}.true\". All inputs are case-insensitive. - Currently, only existence (\"true\" at the end) is supported. Absence (\"false\" at the end) is not supported. - Multiple values for the same key (i.e. same namespace and tag name) are interpreted as \"OR\". - Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as \"AND\". - - :param list[str] freeform_tag_exists: (optional) - A list of tag existence filters to apply. Only resources for which the specified freeform tags exist the value will be returned. - The key for each tag is \"{tagName}.true\". All inputs are case-insensitive. - Currently, only existence (\"true\" at the end) is supported. Absence (\"false\" at the end) is not supported. - Multiple values for different tag names are interpreted as \"AND\". + :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. @@ -4748,13 +8023,13 @@ def summarize_database_insight_resource_statistics(self, compartment_id, resourc 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.opsi.models.SummarizeDatabaseInsightResourceStatisticsAggregationCollection` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.opsi.models.SummarizeExadataInsightResourceStatisticsAggregationCollection` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use summarize_database_insight_resource_statistics API. + Click `here `__ to see an example of how to use summarize_exadata_insight_resource_statistics API. """ - resource_path = "/databaseInsights/resourceStatistics" + resource_path = "/exadataInsights/resourceStatistics" method = "GET" # Don't accept unknown kwargs @@ -4763,36 +8038,20 @@ def summarize_database_insight_resource_statistics(self, compartment_id, resourc "analysis_time_interval", "time_interval_start", "time_interval_end", - "database_type", - "database_id", - "id", + "exadata_type", + "cdb_name", + "host_name", "percentile", - "insight_by", - "forecast_days", - "limit", - "page", "sort_order", "sort_by", - "host_name", - "is_database_instance_level_metrics", - "opc_request_id", - "defined_tag_equals", - "freeform_tag_equals", - "defined_tag_exists", - "freeform_tag_exists" + "limit", + "page", + "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "summarize_database_insight_resource_statistics got unknown kwargs: {!r}".format(extra_kwargs)) - - if 'database_type' in kwargs: - database_type_allowed_values = ["ADW-S", "ATP-S", "ADW-D", "ATP-D", "EXTERNAL-PDB", "EXTERNAL-NONCDB"] - for database_type_item in kwargs['database_type']: - if database_type_item not in database_type_allowed_values: - raise ValueError( - "Invalid value for `database_type`, must be one of {0}".format(database_type_allowed_values) - ) + "summarize_exadata_insight_resource_statistics got unknown kwargs: {!r}".format(extra_kwargs)) if 'sort_order' in kwargs: sort_order_allowed_values = ["ASC", "DESC"] @@ -4802,34 +8061,27 @@ def summarize_database_insight_resource_statistics(self, compartment_id, resourc ) if 'sort_by' in kwargs: - sort_by_allowed_values = ["utilizationPercent", "usage", "usageChangePercent", "databaseName", "databaseType"] + sort_by_allowed_values = ["utilizationPercent", "usage", "usageChangePercent"] 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, + "exadataInsightId": exadata_insight_id, + "resourceType": resource_type, "resourceMetric": resource_metric, "analysisTimeInterval": kwargs.get("analysis_time_interval", missing), "timeIntervalStart": kwargs.get("time_interval_start", missing), "timeIntervalEnd": kwargs.get("time_interval_end", missing), - "databaseType": self.base_client.generate_collection_format_param(kwargs.get("database_type", missing), 'multi'), - "databaseId": self.base_client.generate_collection_format_param(kwargs.get("database_id", missing), 'multi'), - "id": self.base_client.generate_collection_format_param(kwargs.get("id", missing), 'multi'), + "exadataType": self.base_client.generate_collection_format_param(kwargs.get("exadata_type", missing), 'multi'), + "cdbName": self.base_client.generate_collection_format_param(kwargs.get("cdb_name", missing), 'multi'), + "hostName": self.base_client.generate_collection_format_param(kwargs.get("host_name", missing), 'multi'), "percentile": kwargs.get("percentile", missing), - "insightBy": kwargs.get("insight_by", missing), - "forecastDays": kwargs.get("forecast_days", missing), - "limit": kwargs.get("limit", missing), - "page": kwargs.get("page", missing), "sortOrder": kwargs.get("sort_order", missing), "sortBy": kwargs.get("sort_by", missing), - "hostName": self.base_client.generate_collection_format_param(kwargs.get("host_name", missing), 'multi'), - "isDatabaseInstanceLevelMetrics": kwargs.get("is_database_instance_level_metrics", missing), - "definedTagEquals": self.base_client.generate_collection_format_param(kwargs.get("defined_tag_equals", missing), 'multi'), - "freeformTagEquals": self.base_client.generate_collection_format_param(kwargs.get("freeform_tag_equals", missing), 'multi'), - "definedTagExists": self.base_client.generate_collection_format_param(kwargs.get("defined_tag_exists", missing), 'multi'), - "freeformTagExists": self.base_client.generate_collection_format_param(kwargs.get("freeform_tag_exists", missing), 'multi') + "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} @@ -4855,20 +8107,23 @@ def summarize_database_insight_resource_statistics(self, compartment_id, resourc method=method, query_params=query_params, header_params=header_params, - response_type="SummarizeDatabaseInsightResourceStatisticsAggregationCollection") + response_type="SummarizeExadataInsightResourceStatisticsAggregationCollection") else: return self.base_client.call_api( resource_path=resource_path, method=method, query_params=query_params, header_params=header_params, - response_type="SummarizeDatabaseInsightResourceStatisticsAggregationCollection") + response_type="SummarizeExadataInsightResourceStatisticsAggregationCollection") - def summarize_database_insight_resource_usage(self, compartment_id, resource_metric, **kwargs): + def summarize_exadata_insight_resource_usage(self, compartment_id, resource_type, resource_metric, **kwargs): """ - A cumulative distribution function is used to rank the usage data points per database within the specified time period. - For each database, the minimum data point with a ranking > the percentile value is included in the summation. + A cumulative distribution function is used to rank the usage data points per resource within the specified time period. + For each resource, the minimum data point with a ranking > the percentile value is included in the summation. Linear regression functions are used to calculate the usage change percentage. + Valid values for ResourceType DATABASE are CPU,MEMORY,IO and STORAGE. + Valid values for ResourceType HOST are CPU and MEMORY. + Valid values for ResourceType STORAGE_SERVER are STORAGE, IOPS and THROUGHPUT. :param str compartment_id: (required) @@ -4876,9 +8131,13 @@ def summarize_database_insight_resource_usage(self, compartment_id, resource_met __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + :param str resource_type: (required) + Filter by resource. + Supported values are HOST , STORAGE_SERVER and DATABASE + :param str resource_metric: (required) Filter by resource metric. - Supported values are CPU , STORAGE, MEMORY and IO. + Supported values are CPU , STORAGE, MEMORY, IO, IOPS, THROUGHPUT :param str analysis_time_interval: (optional) Specify time period in ISO 8601 format with respect to current time. @@ -4899,29 +8158,30 @@ def summarize_database_insight_resource_usage(self, compartment_id, resource_met timeIntervalStart and timeIntervalEnd are used together. If timeIntervalEnd is not specified, current time is used as timeIntervalEnd. - :param list[str] database_type: (optional) - Filter by one or more database type. - Possible values are ADW-S, ATP-S, ADW-D, ATP-D, EXTERNAL-PDB, EXTERNAL-NONCDB. - - Allowed values are: "ADW-S", "ATP-S", "ADW-D", "ATP-D", "EXTERNAL-PDB", "EXTERNAL-NONCDB" - - :param list[str] database_id: (optional) - Optional list of database `OCIDs`__ of the associated DBaaS entity. + :param list[str] exadata_insight_id: (optional) + Optional list of exadata insight resource `OCIDs`__. __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm - :param list[str] id: (optional) - Optional list of database insight resource `OCIDs`__. + :param list[str] exadata_type: (optional) + Filter by one or more Exadata types. + Possible value are DBMACHINE, EXACS, and EXACC. - __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + :param list[str] cdb_name: (optional) + Filter by one or more cdb name. :param list[str] host_name: (optional) - Filter by one or more hostname. + Filter by hostname. - :param bool is_database_instance_level_metrics: (optional) - Flag to indicate if database instance level metrics should be returned. The flag is ignored when a host name filter is not applied. - When a hostname filter is applied this flag will determine whether to return metrics for the instances located on the specified host or for the - whole database which contains an instance on this host. + :param str sort_order: (optional) + The sort order to use, either ascending (`ASC`) or descending (`DESC`). + + Allowed values are: "ASC", "DESC" + + :param str sort_by: (optional) + The order in which resource usage summary records are listed + + Allowed values are: "utilizationPercent", "usage", "capacity", "usageChangePercent" :param str page: (optional) For list pagination. The value of the `opc-next-page` response header from @@ -4930,13 +8190,18 @@ def summarize_database_insight_resource_usage(self, compartment_id, resource_met __ https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine + :param int limit: (optional) + For list pagination. The maximum number of results per page, or items to + return in a paginated \"List\" call. + For important details about how pagination works, see + `List Pagination`__. + Example: `50` + + __ https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine + :param int percentile: (optional) Percentile values of daily usage to be used for computing the aggregate resource usage. - :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 list[str] defined_tag_equals: (optional) A list of tag filters to apply. Only resources with a defined tag matching the value will be returned. Each item in the list has the format \"{namespace}.{tagName}.{value}\". All inputs are case-insensitive. @@ -4962,6 +8227,10 @@ def summarize_database_insight_resource_usage(self, compartment_id, resource_met Currently, only existence (\"true\" at the end) is supported. Absence (\"false\" at the end) is not supported. Multiple values for different tag names are interpreted as \"AND\". + :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. @@ -4970,13 +8239,13 @@ def summarize_database_insight_resource_usage(self, compartment_id, resource_met 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.opsi.models.SummarizeDatabaseInsightResourceUsageAggregation` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.opsi.models.SummarizeExadataInsightResourceUsageCollection` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use summarize_database_insight_resource_usage API. + Click `here `__ to see an example of how to use summarize_exadata_insight_resource_usage API. """ - resource_path = "/databaseInsights/resourceUsageSummary" + resource_path = "/exadataInsights/resourceUsageSummary" method = "GET" # Don't accept unknown kwargs @@ -4985,44 +8254,55 @@ def summarize_database_insight_resource_usage(self, compartment_id, resource_met "analysis_time_interval", "time_interval_start", "time_interval_end", - "database_type", - "database_id", - "id", + "exadata_insight_id", + "exadata_type", + "cdb_name", "host_name", - "is_database_instance_level_metrics", + "sort_order", + "sort_by", "page", + "limit", "percentile", - "opc_request_id", "defined_tag_equals", "freeform_tag_equals", "defined_tag_exists", - "freeform_tag_exists" + "freeform_tag_exists", + "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "summarize_database_insight_resource_usage got unknown kwargs: {!r}".format(extra_kwargs)) + "summarize_exadata_insight_resource_usage got unknown kwargs: {!r}".format(extra_kwargs)) - if 'database_type' in kwargs: - database_type_allowed_values = ["ADW-S", "ATP-S", "ADW-D", "ATP-D", "EXTERNAL-PDB", "EXTERNAL-NONCDB"] - for database_type_item in kwargs['database_type']: - if database_type_item not in database_type_allowed_values: - raise ValueError( - "Invalid value for `database_type`, must be one of {0}".format(database_type_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 = ["utilizationPercent", "usage", "capacity", "usageChangePercent"] + 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, + "resourceType": resource_type, "resourceMetric": resource_metric, "analysisTimeInterval": kwargs.get("analysis_time_interval", missing), "timeIntervalStart": kwargs.get("time_interval_start", missing), "timeIntervalEnd": kwargs.get("time_interval_end", missing), - "databaseType": self.base_client.generate_collection_format_param(kwargs.get("database_type", missing), 'multi'), - "databaseId": self.base_client.generate_collection_format_param(kwargs.get("database_id", missing), 'multi'), - "id": self.base_client.generate_collection_format_param(kwargs.get("id", missing), 'multi'), + "exadataInsightId": self.base_client.generate_collection_format_param(kwargs.get("exadata_insight_id", missing), 'multi'), + "exadataType": self.base_client.generate_collection_format_param(kwargs.get("exadata_type", missing), 'multi'), + "cdbName": self.base_client.generate_collection_format_param(kwargs.get("cdb_name", missing), 'multi'), "hostName": self.base_client.generate_collection_format_param(kwargs.get("host_name", missing), 'multi'), - "isDatabaseInstanceLevelMetrics": kwargs.get("is_database_instance_level_metrics", missing), + "sortOrder": kwargs.get("sort_order", missing), + "sortBy": kwargs.get("sort_by", missing), "page": kwargs.get("page", missing), + "limit": kwargs.get("limit", missing), "percentile": kwargs.get("percentile", missing), "definedTagEquals": self.base_client.generate_collection_format_param(kwargs.get("defined_tag_equals", missing), 'multi'), "freeformTagEquals": self.base_client.generate_collection_format_param(kwargs.get("freeform_tag_equals", missing), 'multi'), @@ -5053,19 +8333,23 @@ def summarize_database_insight_resource_usage(self, compartment_id, resource_met method=method, query_params=query_params, header_params=header_params, - response_type="SummarizeDatabaseInsightResourceUsageAggregation") + response_type="SummarizeExadataInsightResourceUsageCollection") else: return self.base_client.call_api( resource_path=resource_path, method=method, query_params=query_params, header_params=header_params, - response_type="SummarizeDatabaseInsightResourceUsageAggregation") + response_type="SummarizeExadataInsightResourceUsageCollection") - def summarize_database_insight_resource_usage_trend(self, compartment_id, resource_metric, **kwargs): + def summarize_exadata_insight_resource_usage_aggregated(self, compartment_id, resource_type, resource_metric, **kwargs): """ - Returns response with time series data (endTimestamp, usage, capacity) for the time period specified. - The maximum time range for analysis is 2 years, hence this is intentionally not paginated. + A cumulative distribution function is used to rank the usage data points per database within the specified time period. + For each database, the minimum data point with a ranking > the percentile value is included in the summation. + Linear regression functions are used to calculate the usage change percentage. + Valid values for ResourceType DATABASE are CPU,MEMORY,IO and STORAGE. + Valid values for ResourceType HOST are CPU and MEMORY. + Valid values for ResourceType STORAGE_SERVER are STORAGE, IOPS and THROUGHPUT. :param str compartment_id: (required) @@ -5073,9 +8357,13 @@ def summarize_database_insight_resource_usage_trend(self, compartment_id, resour __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + :param str resource_type: (required) + Filter by resource. + Supported values are HOST , STORAGE_SERVER and DATABASE + :param str resource_metric: (required) Filter by resource metric. - Supported values are CPU , STORAGE, MEMORY and IO. + Supported values are CPU , STORAGE, MEMORY, IO, IOPS, THROUGHPUT :param str analysis_time_interval: (optional) Specify time period in ISO 8601 format with respect to current time. @@ -5096,21 +8384,20 @@ def summarize_database_insight_resource_usage_trend(self, compartment_id, resour timeIntervalStart and timeIntervalEnd are used together. If timeIntervalEnd is not specified, current time is used as timeIntervalEnd. - :param list[str] database_type: (optional) - Filter by one or more database type. - Possible values are ADW-S, ATP-S, ADW-D, ATP-D, EXTERNAL-PDB, EXTERNAL-NONCDB. - - Allowed values are: "ADW-S", "ATP-S", "ADW-D", "ATP-D", "EXTERNAL-PDB", "EXTERNAL-NONCDB" - - :param list[str] database_id: (optional) - Optional list of database `OCIDs`__ of the associated DBaaS entity. + :param list[str] exadata_insight_id: (optional) + Optional list of exadata insight resource `OCIDs`__. __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm - :param list[str] id: (optional) - Optional list of database insight resource `OCIDs`__. + :param list[str] exadata_type: (optional) + Filter by one or more Exadata types. + Possible value are DBMACHINE, EXACS, and EXACC. - __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + :param list[str] cdb_name: (optional) + Filter by one or more cdb name. + + :param list[str] host_name: (optional) + Filter by hostname. :param str page: (optional) For list pagination. The value of the `opc-next-page` response header from @@ -5119,27 +8406,8 @@ def summarize_database_insight_resource_usage_trend(self, compartment_id, resour __ https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine - :param str sort_order: (optional) - The sort order to use, either ascending (`ASC`) or descending (`DESC`). - - Allowed values are: "ASC", "DESC" - - :param str sort_by: (optional) - Sorts using end timestamp, usage or capacity - - Allowed values are: "endTimestamp", "usage", "capacity" - - :param list[str] host_name: (optional) - Filter by one or more hostname. - - :param bool is_database_instance_level_metrics: (optional) - Flag to indicate if database instance level metrics should be returned. The flag is ignored when a host name filter is not applied. - When a hostname filter is applied this flag will determine whether to return metrics for the instances located on the specified host or for the - whole database which contains an instance on this host. - - :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 percentile: (optional) + Percentile values of daily usage to be used for computing the aggregate resource usage. :param list[str] defined_tag_equals: (optional) A list of tag filters to apply. Only resources with a defined tag matching the value will be returned. @@ -5166,6 +8434,10 @@ def summarize_database_insight_resource_usage_trend(self, compartment_id, resour Currently, only existence (\"true\" at the end) is supported. Absence (\"false\" at the end) is not supported. Multiple values for different tag names are interpreted as \"AND\". + :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. @@ -5174,13 +8446,13 @@ def summarize_database_insight_resource_usage_trend(self, compartment_id, resour 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.opsi.models.SummarizeDatabaseInsightResourceUsageTrendAggregationCollection` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.opsi.models.SummarizeExadataInsightResourceUsageAggregation` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use summarize_database_insight_resource_usage_trend API. + Click `here `__ to see an example of how to use summarize_exadata_insight_resource_usage_aggregated API. """ - resource_path = "/databaseInsights/resourceUsageTrend" + resource_path = "/exadataInsights/resourceUsageSummaryAggregated" method = "GET" # Don't accept unknown kwargs @@ -5189,61 +8461,36 @@ def summarize_database_insight_resource_usage_trend(self, compartment_id, resour "analysis_time_interval", "time_interval_start", "time_interval_end", - "database_type", - "database_id", - "id", - "page", - "sort_order", - "sort_by", + "exadata_insight_id", + "exadata_type", + "cdb_name", "host_name", - "is_database_instance_level_metrics", - "opc_request_id", + "page", + "percentile", "defined_tag_equals", "freeform_tag_equals", "defined_tag_exists", - "freeform_tag_exists" + "freeform_tag_exists", + "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "summarize_database_insight_resource_usage_trend got unknown kwargs: {!r}".format(extra_kwargs)) - - if 'database_type' in kwargs: - database_type_allowed_values = ["ADW-S", "ATP-S", "ADW-D", "ATP-D", "EXTERNAL-PDB", "EXTERNAL-NONCDB"] - for database_type_item in kwargs['database_type']: - if database_type_item not in database_type_allowed_values: - raise ValueError( - "Invalid value for `database_type`, must be one of {0}".format(database_type_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 = ["endTimestamp", "usage", "capacity"] - 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) - ) + "summarize_exadata_insight_resource_usage_aggregated got unknown kwargs: {!r}".format(extra_kwargs)) query_params = { "compartmentId": compartment_id, + "resourceType": resource_type, "resourceMetric": resource_metric, "analysisTimeInterval": kwargs.get("analysis_time_interval", missing), "timeIntervalStart": kwargs.get("time_interval_start", missing), "timeIntervalEnd": kwargs.get("time_interval_end", missing), - "databaseType": self.base_client.generate_collection_format_param(kwargs.get("database_type", missing), 'multi'), - "databaseId": self.base_client.generate_collection_format_param(kwargs.get("database_id", missing), 'multi'), - "id": self.base_client.generate_collection_format_param(kwargs.get("id", missing), 'multi'), - "page": kwargs.get("page", missing), - "sortOrder": kwargs.get("sort_order", missing), - "sortBy": kwargs.get("sort_by", missing), + "exadataInsightId": self.base_client.generate_collection_format_param(kwargs.get("exadata_insight_id", missing), 'multi'), + "exadataType": self.base_client.generate_collection_format_param(kwargs.get("exadata_type", missing), 'multi'), + "cdbName": self.base_client.generate_collection_format_param(kwargs.get("cdb_name", missing), 'multi'), "hostName": self.base_client.generate_collection_format_param(kwargs.get("host_name", missing), 'multi'), - "isDatabaseInstanceLevelMetrics": kwargs.get("is_database_instance_level_metrics", missing), + "page": kwargs.get("page", missing), + "percentile": kwargs.get("percentile", missing), "definedTagEquals": self.base_client.generate_collection_format_param(kwargs.get("defined_tag_equals", missing), 'multi'), "freeformTagEquals": self.base_client.generate_collection_format_param(kwargs.get("freeform_tag_equals", missing), 'multi'), "definedTagExists": self.base_client.generate_collection_format_param(kwargs.get("defined_tag_exists", missing), 'multi'), @@ -5273,18 +8520,18 @@ def summarize_database_insight_resource_usage_trend(self, compartment_id, resour method=method, query_params=query_params, header_params=header_params, - response_type="SummarizeDatabaseInsightResourceUsageTrendAggregationCollection") + response_type="SummarizeExadataInsightResourceUsageAggregation") else: return self.base_client.call_api( resource_path=resource_path, method=method, query_params=query_params, header_params=header_params, - response_type="SummarizeDatabaseInsightResourceUsageTrendAggregationCollection") + response_type="SummarizeExadataInsightResourceUsageAggregation") - def summarize_database_insight_resource_utilization_insight(self, compartment_id, resource_metric, **kwargs): + def summarize_exadata_insight_resource_utilization_insight(self, compartment_id, resource_type, resource_metric, **kwargs): """ - Gets resources with current utilization (high and low) and projected utilization (high and low) for a resource type over specified time period. + Gets current utilization, projected utilization and days to reach projectedUtilization for an exadata system over specified time period. Valid values for ResourceType DATABASE are CPU,MEMORY,IO and STORAGE. Valid values for ResourceType HOST are CPU and MEMORY. Valid values for ResourceType STORAGE_SERVER are STORAGE, IOPS and THROUGHPUT. :param str compartment_id: (required) @@ -5292,9 +8539,13 @@ def summarize_database_insight_resource_utilization_insight(self, compartment_id __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + :param str resource_type: (required) + Filter by resource. + Supported values are HOST , STORAGE_SERVER and DATABASE + :param str resource_metric: (required) Filter by resource metric. - Supported values are CPU , STORAGE, MEMORY and IO. + Supported values are CPU , STORAGE, MEMORY, IO, IOPS, THROUGHPUT :param str analysis_time_interval: (optional) Specify time period in ISO 8601 format with respect to current time. @@ -5310,37 +8561,40 @@ def summarize_database_insight_resource_utilization_insight(self, compartment_id If analysisTimeInterval is specified, this parameter is ignored. :param datetime time_interval_end: (optional) - Analysis end time in UTC in ISO 8601 format(exclusive). - Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). - timeIntervalStart and timeIntervalEnd are used together. - If timeIntervalEnd is not specified, current time is used as timeIntervalEnd. - - :param list[str] database_type: (optional) - Filter by one or more database type. - Possible values are ADW-S, ATP-S, ADW-D, ATP-D, EXTERNAL-PDB, EXTERNAL-NONCDB. - - Allowed values are: "ADW-S", "ATP-S", "ADW-D", "ATP-D", "EXTERNAL-PDB", "EXTERNAL-NONCDB" + Analysis end time in UTC in ISO 8601 format(exclusive). + Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). + timeIntervalStart and timeIntervalEnd are used together. + If timeIntervalEnd is not specified, current time is used as timeIntervalEnd. - :param list[str] database_id: (optional) - Optional list of database `OCIDs`__ of the associated DBaaS entity. + :param list[str] exadata_insight_id: (optional) + Optional list of exadata insight resource `OCIDs`__. __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm - :param list[str] id: (optional) - Optional list of database insight resource `OCIDs`__. + :param list[str] exadata_type: (optional) + Filter by one or more Exadata types. + Possible value are DBMACHINE, EXACS, and EXACC. - __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + :param int forecast_start_day: (optional) + Number of days used for utilization forecast analysis. :param int forecast_days: (optional) Number of days used for utilization forecast analysis. + :param list[str] cdb_name: (optional) + Filter by one or more cdb name. + :param list[str] host_name: (optional) - Filter by one or more hostname. + Filter by hostname. - :param bool is_database_instance_level_metrics: (optional) - Flag to indicate if database instance level metrics should be returned. The flag is ignored when a host name filter is not applied. - When a hostname filter is applied this flag will determine whether to return metrics for the instances located on the specified host or for the - whole database which contains an instance on this host. + :param int limit: (optional) + For list pagination. The maximum number of results per page, or items to + return in a paginated \"List\" call. + For important details about how pagination works, see + `List Pagination`__. + Example: `50` + + __ https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine :param str page: (optional) For list pagination. The value of the `opc-next-page` response header from @@ -5349,10 +8603,6 @@ def summarize_database_insight_resource_utilization_insight(self, compartment_id __ https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine - :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 list[str] defined_tag_equals: (optional) A list of tag filters to apply. Only resources with a defined tag matching the value will be returned. Each item in the list has the format \"{namespace}.{tagName}.{value}\". All inputs are case-insensitive. @@ -5378,6 +8628,10 @@ def summarize_database_insight_resource_utilization_insight(self, compartment_id Currently, only existence (\"true\" at the end) is supported. Absence (\"false\" at the end) is not supported. Multiple values for different tag names are interpreted as \"AND\". + :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. @@ -5386,13 +8640,13 @@ def summarize_database_insight_resource_utilization_insight(self, compartment_id 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.opsi.models.SummarizeDatabaseInsightResourceUtilizationInsightAggregation` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.opsi.models.SummarizeExadataInsightResourceUtilizationInsightAggregation` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use summarize_database_insight_resource_utilization_insight API. + Click `here `__ to see an example of how to use summarize_exadata_insight_resource_utilization_insight API. """ - resource_path = "/databaseInsights/resourceUtilizationInsight" + resource_path = "/exadataInsights/resourceUtilizationInsight" method = "GET" # Don't accept unknown kwargs @@ -5401,44 +8655,39 @@ def summarize_database_insight_resource_utilization_insight(self, compartment_id "analysis_time_interval", "time_interval_start", "time_interval_end", - "database_type", - "database_id", - "id", + "exadata_insight_id", + "exadata_type", + "forecast_start_day", "forecast_days", + "cdb_name", "host_name", - "is_database_instance_level_metrics", + "limit", "page", - "opc_request_id", "defined_tag_equals", "freeform_tag_equals", "defined_tag_exists", - "freeform_tag_exists" + "freeform_tag_exists", + "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "summarize_database_insight_resource_utilization_insight got unknown kwargs: {!r}".format(extra_kwargs)) - - if 'database_type' in kwargs: - database_type_allowed_values = ["ADW-S", "ATP-S", "ADW-D", "ATP-D", "EXTERNAL-PDB", "EXTERNAL-NONCDB"] - for database_type_item in kwargs['database_type']: - if database_type_item not in database_type_allowed_values: - raise ValueError( - "Invalid value for `database_type`, must be one of {0}".format(database_type_allowed_values) - ) + "summarize_exadata_insight_resource_utilization_insight got unknown kwargs: {!r}".format(extra_kwargs)) query_params = { "compartmentId": compartment_id, + "resourceType": resource_type, "resourceMetric": resource_metric, "analysisTimeInterval": kwargs.get("analysis_time_interval", missing), "timeIntervalStart": kwargs.get("time_interval_start", missing), "timeIntervalEnd": kwargs.get("time_interval_end", missing), - "databaseType": self.base_client.generate_collection_format_param(kwargs.get("database_type", missing), 'multi'), - "databaseId": self.base_client.generate_collection_format_param(kwargs.get("database_id", missing), 'multi'), - "id": self.base_client.generate_collection_format_param(kwargs.get("id", missing), 'multi'), + "exadataInsightId": self.base_client.generate_collection_format_param(kwargs.get("exadata_insight_id", missing), 'multi'), + "exadataType": self.base_client.generate_collection_format_param(kwargs.get("exadata_type", missing), 'multi'), + "forecastStartDay": kwargs.get("forecast_start_day", missing), "forecastDays": kwargs.get("forecast_days", missing), + "cdbName": self.base_client.generate_collection_format_param(kwargs.get("cdb_name", missing), 'multi'), "hostName": self.base_client.generate_collection_format_param(kwargs.get("host_name", missing), 'multi'), - "isDatabaseInstanceLevelMetrics": kwargs.get("is_database_instance_level_metrics", missing), + "limit": kwargs.get("limit", missing), "page": kwargs.get("page", missing), "definedTagEquals": self.base_client.generate_collection_format_param(kwargs.get("defined_tag_equals", missing), 'multi'), "freeformTagEquals": self.base_client.generate_collection_format_param(kwargs.get("freeform_tag_equals", missing), 'multi'), @@ -5469,62 +8718,38 @@ def summarize_database_insight_resource_utilization_insight(self, compartment_id method=method, query_params=query_params, header_params=header_params, - response_type="SummarizeDatabaseInsightResourceUtilizationInsightAggregation") + response_type="SummarizeExadataInsightResourceUtilizationInsightAggregation") else: return self.base_client.call_api( resource_path=resource_path, method=method, query_params=query_params, header_params=header_params, - response_type="SummarizeDatabaseInsightResourceUtilizationInsightAggregation") + response_type="SummarizeExadataInsightResourceUtilizationInsightAggregation") - def summarize_database_insight_tablespace_usage_trend(self, compartment_id, **kwargs): + def summarize_exadata_members(self, exadata_insight_id, **kwargs): """ - Returns response with usage time series data (endTimestamp, usage, capacity) with breakdown by tablespaceName for the time period specified. - The maximum time range for analysis is 2 years, hence this is intentionally not paginated. - Either databaseId or id must be specified. + Lists the software and hardware inventory of the Exadata System. - :param str compartment_id: (required) - The `OCID`__ of the compartment. + :param str exadata_insight_id: (required) + `OCID`__ of exadata insight resource. __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm - :param str analysis_time_interval: (optional) - Specify time period in ISO 8601 format with respect to current time. - Default is last 30 days represented by P30D. - If timeInterval is specified, then timeIntervalStart and timeIntervalEnd will be ignored. - Examples P90D (last 90 days), P4W (last 4 weeks), P2M (last 2 months), P1Y (last 12 months), . Maximum value allowed is 25 months prior to current time (P25M). - - :param datetime time_interval_start: (optional) - Analysis start time in UTC in ISO 8601 format(inclusive). - Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). - The minimum allowed value is 2 years prior to the current day. - timeIntervalStart and timeIntervalEnd parameters are used together. - If analysisTimeInterval is specified, this parameter is ignored. - - :param datetime time_interval_end: (optional) - Analysis end time in UTC in ISO 8601 format(exclusive). - Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). - timeIntervalStart and timeIntervalEnd are used together. - If timeIntervalEnd is not specified, current time is used as timeIntervalEnd. - - :param str database_id: (optional) - Optional `OCID`__ of the associated DBaaS entity. - - __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + :param list[str] exadata_type: (optional) + Filter by one or more Exadata types. + Possible value are DBMACHINE, EXACS, and EXACC. - :param str id: (optional) - `OCID`__ of the database insight resource. + :param str sort_order: (optional) + The sort order to use, either ascending (`ASC`) or descending (`DESC`). - __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + Allowed values are: "ASC", "DESC" - :param str page: (optional) - For list pagination. The value of the `opc-next-page` response header from - the previous \"List\" call. For important details about how pagination works, - see `List Pagination`__. + :param str sort_by: (optional) + The order in which exadata member records are listed - __ https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine + Allowed values are: "name", "displayName", "entityType" :param int limit: (optional) For list pagination. The maximum number of results per page, or items to @@ -5535,6 +8760,13 @@ def summarize_database_insight_tablespace_usage_trend(self, compartment_id, **kw __ https://docs.cloud.oracle.com/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. For important details about how pagination works, + see `List Pagination`__. + + __ https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine + :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. @@ -5547,41 +8779,51 @@ def summarize_database_insight_tablespace_usage_trend(self, compartment_id, **kw 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.opsi.models.SummarizeDatabaseInsightTablespaceUsageTrendAggregationCollection` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.opsi.models.ExadataMemberCollection` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use summarize_database_insight_tablespace_usage_trend API. + Click `here `__ to see an example of how to use summarize_exadata_members API. """ - resource_path = "/databaseInsights/tablespaceUsageTrend" + resource_path = "/exadataInsights/exadataMembers" method = "GET" # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", - "analysis_time_interval", - "time_interval_start", - "time_interval_end", - "database_id", - "id", - "page", + "exadata_type", + "sort_order", + "sort_by", "limit", + "page", "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "summarize_database_insight_tablespace_usage_trend got unknown kwargs: {!r}".format(extra_kwargs)) + "summarize_exadata_members got unknown kwargs: {!r}".format(extra_kwargs)) + + 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 = ["name", "displayName", "entityType"] + 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, - "analysisTimeInterval": kwargs.get("analysis_time_interval", missing), - "timeIntervalStart": kwargs.get("time_interval_start", missing), - "timeIntervalEnd": kwargs.get("time_interval_end", missing), - "databaseId": kwargs.get("database_id", missing), - "id": kwargs.get("id", missing), - "page": kwargs.get("page", missing), - "limit": kwargs.get("limit", missing) + "exadataInsightId": exadata_insight_id, + "exadataType": self.base_client.generate_collection_format_param(kwargs.get("exadata_type", missing), 'multi'), + "sortOrder": kwargs.get("sort_order", missing), + "sortBy": kwargs.get("sort_by", missing), + "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} @@ -5607,14 +8849,14 @@ def summarize_database_insight_tablespace_usage_trend(self, compartment_id, **kw method=method, query_params=query_params, header_params=header_params, - response_type="SummarizeDatabaseInsightTablespaceUsageTrendAggregationCollection") + response_type="ExadataMemberCollection") else: return self.base_client.call_api( resource_path=resource_path, method=method, query_params=query_params, header_params=header_params, - response_type="SummarizeDatabaseInsightTablespaceUsageTrendAggregationCollection") + response_type="ExadataMemberCollection") def summarize_host_insight_resource_capacity_trend(self, compartment_id, resource_metric, **kwargs): """ @@ -5661,6 +8903,11 @@ def summarize_host_insight_resource_capacity_trend(self, compartment_id, resourc __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + :param list[str] exadata_insight_id: (optional) + Optional list of exadata insight resource `OCIDs`__. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + :param str utilization_level: (optional) Filter by utilization level by the following buckets: - HIGH_UTILIZATION: DBs with utilization greater or equal than 75. @@ -5741,6 +8988,7 @@ def summarize_host_insight_resource_capacity_trend(self, compartment_id, resourc "time_interval_end", "platform_type", "id", + "exadata_insight_id", "utilization_level", "page", "sort_order", @@ -5793,6 +9041,7 @@ def summarize_host_insight_resource_capacity_trend(self, compartment_id, resourc "timeIntervalEnd": kwargs.get("time_interval_end", missing), "platformType": self.base_client.generate_collection_format_param(kwargs.get("platform_type", missing), 'multi'), "id": self.base_client.generate_collection_format_param(kwargs.get("id", missing), 'multi'), + "exadataInsightId": self.base_client.generate_collection_format_param(kwargs.get("exadata_insight_id", missing), 'multi'), "utilizationLevel": kwargs.get("utilization_level", missing), "page": kwargs.get("page", missing), "sortOrder": kwargs.get("sort_order", missing), @@ -5879,6 +9128,11 @@ def summarize_host_insight_resource_forecast_trend(self, compartment_id, resourc __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + :param list[str] exadata_insight_id: (optional) + Optional list of exadata insight resource `OCIDs`__. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + :param str statistic: (optional) Choose the type of statistic metric data to be used for forecasting. @@ -5973,6 +9227,7 @@ def summarize_host_insight_resource_forecast_trend(self, compartment_id, resourc "time_interval_end", "platform_type", "id", + "exadata_insight_id", "statistic", "forecast_days", "forecast_model", @@ -6027,6 +9282,7 @@ def summarize_host_insight_resource_forecast_trend(self, compartment_id, resourc "timeIntervalEnd": kwargs.get("time_interval_end", missing), "platformType": self.base_client.generate_collection_format_param(kwargs.get("platform_type", missing), 'multi'), "id": self.base_client.generate_collection_format_param(kwargs.get("id", missing), 'multi'), + "exadataInsightId": self.base_client.generate_collection_format_param(kwargs.get("exadata_insight_id", missing), 'multi'), "statistic": kwargs.get("statistic", missing), "forecastDays": kwargs.get("forecast_days", missing), "forecastModel": kwargs.get("forecast_model", missing), @@ -6116,6 +9372,11 @@ def summarize_host_insight_resource_statistics(self, compartment_id, resource_me __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + :param list[str] exadata_insight_id: (optional) + Optional list of exadata insight resource `OCIDs`__. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + :param int percentile: (optional) Percentile values of daily usage to be used for computing the aggregate resource usage. @@ -6207,6 +9468,7 @@ def summarize_host_insight_resource_statistics(self, compartment_id, resource_me "time_interval_end", "platform_type", "id", + "exadata_insight_id", "percentile", "insight_by", "forecast_days", @@ -6255,6 +9517,7 @@ def summarize_host_insight_resource_statistics(self, compartment_id, resource_me "timeIntervalEnd": kwargs.get("time_interval_end", missing), "platformType": self.base_client.generate_collection_format_param(kwargs.get("platform_type", missing), 'multi'), "id": self.base_client.generate_collection_format_param(kwargs.get("id", missing), 'multi'), + "exadataInsightId": self.base_client.generate_collection_format_param(kwargs.get("exadata_insight_id", missing), 'multi'), "percentile": kwargs.get("percentile", missing), "insightBy": kwargs.get("insight_by", missing), "forecastDays": kwargs.get("forecast_days", missing), @@ -6346,6 +9609,11 @@ def summarize_host_insight_resource_usage(self, compartment_id, resource_metric, __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + :param list[str] exadata_insight_id: (optional) + Optional list of exadata insight resource `OCIDs`__. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + :param str page: (optional) For list pagination. The value of the `opc-next-page` response header from the previous \"List\" call. For important details about how pagination works, @@ -6410,6 +9678,7 @@ def summarize_host_insight_resource_usage(self, compartment_id, resource_metric, "time_interval_end", "platform_type", "id", + "exadata_insight_id", "page", "percentile", "opc_request_id", @@ -6439,6 +9708,7 @@ def summarize_host_insight_resource_usage(self, compartment_id, resource_metric, "timeIntervalEnd": kwargs.get("time_interval_end", missing), "platformType": self.base_client.generate_collection_format_param(kwargs.get("platform_type", missing), 'multi'), "id": self.base_client.generate_collection_format_param(kwargs.get("id", missing), 'multi'), + "exadataInsightId": self.base_client.generate_collection_format_param(kwargs.get("exadata_insight_id", missing), 'multi'), "page": kwargs.get("page", missing), "percentile": kwargs.get("percentile", missing), "definedTagEquals": self.base_client.generate_collection_format_param(kwargs.get("defined_tag_equals", missing), 'multi'), @@ -6524,6 +9794,11 @@ def summarize_host_insight_resource_usage_trend(self, compartment_id, resource_m __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + :param list[str] exadata_insight_id: (optional) + Optional list of exadata insight resource `OCIDs`__. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + :param str page: (optional) For list pagination. The value of the `opc-next-page` response header from the previous \"List\" call. For important details about how pagination works, @@ -6595,6 +9870,7 @@ def summarize_host_insight_resource_usage_trend(self, compartment_id, resource_m "time_interval_end", "platform_type", "id", + "exadata_insight_id", "page", "sort_order", "sort_by", @@ -6639,6 +9915,7 @@ def summarize_host_insight_resource_usage_trend(self, compartment_id, resource_m "timeIntervalEnd": kwargs.get("time_interval_end", missing), "platformType": self.base_client.generate_collection_format_param(kwargs.get("platform_type", missing), 'multi'), "id": self.base_client.generate_collection_format_param(kwargs.get("id", missing), 'multi'), + "exadataInsightId": self.base_client.generate_collection_format_param(kwargs.get("exadata_insight_id", missing), 'multi'), "page": kwargs.get("page", missing), "sortOrder": kwargs.get("sort_order", missing), "sortBy": kwargs.get("sort_by", missing), @@ -6724,6 +10001,11 @@ def summarize_host_insight_resource_utilization_insight(self, compartment_id, re __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + :param list[str] exadata_insight_id: (optional) + Optional list of exadata insight resource `OCIDs`__. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + :param int forecast_days: (optional) Number of days used for utilization forecast analysis. @@ -6788,6 +10070,7 @@ def summarize_host_insight_resource_utilization_insight(self, compartment_id, re "time_interval_end", "platform_type", "id", + "exadata_insight_id", "forecast_days", "page", "opc_request_id", @@ -6817,6 +10100,7 @@ def summarize_host_insight_resource_utilization_insight(self, compartment_id, re "timeIntervalEnd": kwargs.get("time_interval_end", missing), "platformType": self.base_client.generate_collection_format_param(kwargs.get("platform_type", missing), 'multi'), "id": self.base_client.generate_collection_format_param(kwargs.get("id", missing), 'multi'), + "exadataInsightId": self.base_client.generate_collection_format_param(kwargs.get("exadata_insight_id", missing), 'multi'), "forecastDays": kwargs.get("forecast_days", missing), "page": kwargs.get("page", missing), "definedTagEquals": self.base_client.generate_collection_format_param(kwargs.get("defined_tag_equals", missing), 'multi'), @@ -6859,7 +10143,8 @@ def summarize_host_insight_resource_utilization_insight(self, compartment_id, re def summarize_sql_insights(self, compartment_id, **kwargs): """ - Query SQL Warehouse to get the performance insights for SQLs taking greater than X% database time for a given time period across the given databases or database types. + Query SQL Warehouse to get the performance insights for SQLs taking greater than X% database time for a given + time period across the given databases or database types. :param str compartment_id: (required) @@ -6883,6 +10168,14 @@ def summarize_sql_insights(self, compartment_id, **kwargs): __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + :param list[str] exadata_insight_id: (optional) + Optional list of exadata insight resource `OCIDs`__. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param list[str] cdb_name: (optional) + Filter by one or more cdb name. + :param list[str] host_name: (optional) Filter by one or more hostname. @@ -6967,6 +10260,8 @@ def summarize_sql_insights(self, compartment_id, **kwargs): "database_type", "database_id", "id", + "exadata_insight_id", + "cdb_name", "host_name", "database_time_pct_greater_than", "analysis_time_interval", @@ -6997,6 +10292,8 @@ def summarize_sql_insights(self, compartment_id, **kwargs): "databaseType": self.base_client.generate_collection_format_param(kwargs.get("database_type", missing), 'multi'), "databaseId": self.base_client.generate_collection_format_param(kwargs.get("database_id", missing), 'multi'), "id": self.base_client.generate_collection_format_param(kwargs.get("id", missing), 'multi'), + "exadataInsightId": self.base_client.generate_collection_format_param(kwargs.get("exadata_insight_id", missing), 'multi'), + "cdbName": self.base_client.generate_collection_format_param(kwargs.get("cdb_name", missing), 'multi'), "hostName": self.base_client.generate_collection_format_param(kwargs.get("host_name", missing), 'multi'), "databaseTimePctGreaterThan": kwargs.get("database_time_pct_greater_than", missing), "analysisTimeInterval": kwargs.get("analysis_time_interval", missing), @@ -7305,7 +10602,8 @@ def summarize_sql_response_time_distributions(self, compartment_id, sql_identifi def summarize_sql_statistics(self, compartment_id, **kwargs): """ - Query SQL Warehouse to get the performance statistics for SQLs taking greater than X% database time for a given time period across the given databases or database types. + Query SQL Warehouse to get the performance statistics for SQLs taking greater than X% database time for a given + time period across the given databases or database types. :param str compartment_id: (required) @@ -7329,6 +10627,14 @@ def summarize_sql_statistics(self, compartment_id, **kwargs): __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + :param list[str] exadata_insight_id: (optional) + Optional list of exadata insight resource `OCIDs`__. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param list[str] cdb_name: (optional) + Filter by one or more cdb name. + :param list[str] host_name: (optional) Filter by one or more hostname. @@ -7442,6 +10748,8 @@ def summarize_sql_statistics(self, compartment_id, **kwargs): "database_type", "database_id", "id", + "exadata_insight_id", + "cdb_name", "host_name", "database_time_pct_greater_than", "sql_identifier", @@ -7499,6 +10807,8 @@ def summarize_sql_statistics(self, compartment_id, **kwargs): "databaseType": self.base_client.generate_collection_format_param(kwargs.get("database_type", missing), 'multi'), "databaseId": self.base_client.generate_collection_format_param(kwargs.get("database_id", missing), 'multi'), "id": self.base_client.generate_collection_format_param(kwargs.get("id", missing), 'multi'), + "exadataInsightId": self.base_client.generate_collection_format_param(kwargs.get("exadata_insight_id", missing), 'multi'), + "cdbName": self.base_client.generate_collection_format_param(kwargs.get("cdb_name", missing), 'multi'), "hostName": self.base_client.generate_collection_format_param(kwargs.get("host_name", missing), 'multi'), "databaseTimePctGreaterThan": kwargs.get("database_time_pct_greater_than", missing), "sqlIdentifier": self.base_client.generate_collection_format_param(kwargs.get("sql_identifier", missing), 'multi'), @@ -7572,6 +10882,14 @@ def summarize_sql_statistics_time_series(self, compartment_id, sql_identifier, * __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + :param list[str] exadata_insight_id: (optional) + Optional list of exadata insight resource `OCIDs`__. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param list[str] cdb_name: (optional) + Filter by one or more cdb name. + :param list[str] host_name: (optional) Filter by one or more hostname. @@ -7652,6 +10970,8 @@ def summarize_sql_statistics_time_series(self, compartment_id, sql_identifier, * "retry_strategy", "database_id", "id", + "exadata_insight_id", + "cdb_name", "host_name", "analysis_time_interval", "time_interval_start", @@ -7672,6 +10992,8 @@ def summarize_sql_statistics_time_series(self, compartment_id, sql_identifier, * "compartmentId": compartment_id, "databaseId": self.base_client.generate_collection_format_param(kwargs.get("database_id", missing), 'multi'), "id": self.base_client.generate_collection_format_param(kwargs.get("id", missing), 'multi'), + "exadataInsightId": self.base_client.generate_collection_format_param(kwargs.get("exadata_insight_id", missing), 'multi'), + "cdbName": self.base_client.generate_collection_format_param(kwargs.get("cdb_name", missing), 'multi'), "hostName": self.base_client.generate_collection_format_param(kwargs.get("host_name", missing), 'multi'), "sqlIdentifier": sql_identifier, "analysisTimeInterval": kwargs.get("analysis_time_interval", missing), @@ -8027,6 +11349,96 @@ def update_enterprise_manager_bridge(self, enterprise_manager_bridge_id, update_ header_params=header_params, body=update_enterprise_manager_bridge_details) + def update_exadata_insight(self, exadata_insight_id, update_exadata_insight_details, **kwargs): + """ + Updates configuration of an Exadata insight. + + + :param str exadata_insight_id: (required) + Unique Exadata insight identifier + + :param oci.opsi.models.UpdateExadataInsightDetails update_exadata_insight_details: (required) + The configuration to be updated. + + :param str if_match: (optional) + Used for optimistic concurrency control. In the update or delete call for a resource, set the `if-match` + parameter to the value of the etag from a previous get, create, or update 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. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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` + + :example: + Click `here `__ to see an example of how to use update_exadata_insight API. + """ + resource_path = "/exadataInsights/{exadataInsightId}" + 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_exadata_insight got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "exadataInsightId": exadata_insight_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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + 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_exadata_insight_details) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=update_exadata_insight_details) + def update_host_insight(self, host_insight_id, update_host_insight_details, **kwargs): """ Updates configuration of a host insight. diff --git a/src/oci/opsi/operations_insights_client_composite_operations.py b/src/oci/opsi/operations_insights_client_composite_operations.py index b4c8df096c..62d7a37c5f 100644 --- a/src/oci/opsi/operations_insights_client_composite_operations.py +++ b/src/oci/opsi/operations_insights_client_composite_operations.py @@ -23,6 +23,47 @@ def __init__(self, client, **kwargs): """ self.client = client + def add_exadata_insight_members_and_wait_for_state(self, add_exadata_insight_members_details, exadata_insight_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.opsi.OperationsInsightsClient.add_exadata_insight_members` and waits for the :py:class:`~oci.opsi.models.WorkRequest` + to enter the given state(s). + + :param oci.opsi.models.AddExadataInsightMembersDetails add_exadata_insight_members_details: (required) + Details for the members (e.g. databases and hosts) of an Exadata system to be added in Operations Insights. + + :param str exadata_insight_id: (required) + Unique Exadata insight identifier + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.opsi.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.opsi.OperationsInsightsClient.add_exadata_insight_members` + + :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.add_exadata_insight_members(add_exadata_insight_members_details, exadata_insight_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 change_database_insight_compartment_and_wait_for_state(self, database_insight_id, change_database_insight_compartment_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ Calls :py:func:`~oci.opsi.OperationsInsightsClient.change_database_insight_compartment` and waits for the :py:class:`~oci.opsi.models.WorkRequest` @@ -105,6 +146,47 @@ def change_enterprise_manager_bridge_compartment_and_wait_for_state(self, enterp except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def change_exadata_insight_compartment_and_wait_for_state(self, exadata_insight_id, change_exadata_insight_compartment_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.opsi.OperationsInsightsClient.change_exadata_insight_compartment` and waits for the :py:class:`~oci.opsi.models.WorkRequest` + to enter the given state(s). + + :param str exadata_insight_id: (required) + Unique Exadata insight identifier + + :param oci.opsi.models.ChangeExadataInsightCompartmentDetails change_exadata_insight_compartment_details: (required) + The information to be updated. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.opsi.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.opsi.OperationsInsightsClient.change_exadata_insight_compartment` + + :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.change_exadata_insight_compartment(exadata_insight_id, change_exadata_insight_compartment_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 change_host_insight_compartment_and_wait_for_state(self, host_insight_id, change_host_insight_compartment_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ Calls :py:func:`~oci.opsi.OperationsInsightsClient.change_host_insight_compartment` and waits for the :py:class:`~oci.opsi.models.WorkRequest` @@ -222,6 +304,44 @@ def create_enterprise_manager_bridge_and_wait_for_state(self, create_enterprise_ except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def create_exadata_insight_and_wait_for_state(self, create_exadata_insight_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.opsi.OperationsInsightsClient.create_exadata_insight` and waits for the :py:class:`~oci.opsi.models.WorkRequest` + to enter the given state(s). + + :param oci.opsi.models.CreateExadataInsightDetails create_exadata_insight_details: (required) + Details for the Exadata system for which an Exadata insight resource will be created in Operations Insights. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.opsi.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.opsi.OperationsInsightsClient.create_exadata_insight` + + :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_exadata_insight(create_exadata_insight_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_host_insight_and_wait_for_state(self, create_host_insight_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ Calls :py:func:`~oci.opsi.OperationsInsightsClient.create_host_insight` and waits for the :py:class:`~oci.opsi.models.WorkRequest` @@ -352,6 +472,52 @@ def delete_enterprise_manager_bridge_and_wait_for_state(self, enterprise_manager except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def delete_exadata_insight_and_wait_for_state(self, exadata_insight_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.opsi.OperationsInsightsClient.delete_exadata_insight` and waits for the :py:class:`~oci.opsi.models.WorkRequest` + to enter the given state(s). + + :param str exadata_insight_id: (required) + Unique Exadata insight identifier + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.opsi.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.opsi.OperationsInsightsClient.delete_exadata_insight` + + :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_exadata_insight(exadata_insight_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_host_insight_and_wait_for_state(self, host_insight_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ Calls :py:func:`~oci.opsi.OperationsInsightsClient.delete_host_insight` and waits for the :py:class:`~oci.opsi.models.WorkRequest` @@ -436,6 +602,44 @@ def disable_database_insight_and_wait_for_state(self, database_insight_id, wait_ except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def disable_exadata_insight_and_wait_for_state(self, exadata_insight_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.opsi.OperationsInsightsClient.disable_exadata_insight` and waits for the :py:class:`~oci.opsi.models.WorkRequest` + to enter the given state(s). + + :param str exadata_insight_id: (required) + Unique Exadata insight identifier + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.opsi.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.opsi.OperationsInsightsClient.disable_exadata_insight` + + :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.disable_exadata_insight(exadata_insight_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 disable_host_insight_and_wait_for_state(self, host_insight_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ Calls :py:func:`~oci.opsi.OperationsInsightsClient.disable_host_insight` and waits for the :py:class:`~oci.opsi.models.WorkRequest` @@ -515,6 +719,47 @@ def enable_database_insight_and_wait_for_state(self, enable_database_insight_det except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def enable_exadata_insight_and_wait_for_state(self, enable_exadata_insight_details, exadata_insight_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.opsi.OperationsInsightsClient.enable_exadata_insight` and waits for the :py:class:`~oci.opsi.models.WorkRequest` + to enter the given state(s). + + :param oci.opsi.models.EnableExadataInsightDetails enable_exadata_insight_details: (required) + Details for the Exadata system to be enabled in Operations Insights. + + :param str exadata_insight_id: (required) + Unique Exadata insight identifier + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.opsi.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.opsi.OperationsInsightsClient.enable_exadata_insight` + + :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.enable_exadata_insight(enable_exadata_insight_details, exadata_insight_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 enable_host_insight_and_wait_for_state(self, enable_host_insight_details, host_insight_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ Calls :py:func:`~oci.opsi.OperationsInsightsClient.enable_host_insight` and waits for the :py:class:`~oci.opsi.models.WorkRequest` @@ -638,6 +883,47 @@ def update_enterprise_manager_bridge_and_wait_for_state(self, enterprise_manager except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def update_exadata_insight_and_wait_for_state(self, exadata_insight_id, update_exadata_insight_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.opsi.OperationsInsightsClient.update_exadata_insight` and waits for the :py:class:`~oci.opsi.models.WorkRequest` + to enter the given state(s). + + :param str exadata_insight_id: (required) + Unique Exadata insight identifier + + :param oci.opsi.models.UpdateExadataInsightDetails update_exadata_insight_details: (required) + The configuration to be updated. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.opsi.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.opsi.OperationsInsightsClient.update_exadata_insight` + + :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_exadata_insight(exadata_insight_id, update_exadata_insight_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 update_host_insight_and_wait_for_state(self, host_insight_id, update_host_insight_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ Calls :py:func:`~oci.opsi.OperationsInsightsClient.update_host_insight` and waits for the :py:class:`~oci.opsi.models.WorkRequest` diff --git a/src/oci/tenant_manager_control_plane/__init__.py b/src/oci/tenant_manager_control_plane/__init__.py index c3708acb6f..6f486adb92 100644 --- a/src/oci/tenant_manager_control_plane/__init__.py +++ b/src/oci/tenant_manager_control_plane/__init__.py @@ -13,12 +13,16 @@ from .link_client_composite_operations import LinkClientCompositeOperations from .orders_client import OrdersClient from .orders_client_composite_operations import OrdersClientCompositeOperations +from .organization_client import OrganizationClient +from .organization_client_composite_operations import OrganizationClientCompositeOperations from .recipient_invitation_client import RecipientInvitationClient from .recipient_invitation_client_composite_operations import RecipientInvitationClientCompositeOperations from .sender_invitation_client import SenderInvitationClient from .sender_invitation_client_composite_operations import SenderInvitationClientCompositeOperations +from .subscription_client import SubscriptionClient +from .subscription_client_composite_operations import SubscriptionClientCompositeOperations from .work_request_client import WorkRequestClient from .work_request_client_composite_operations import WorkRequestClientCompositeOperations from . import models -__all__ = ["DomainClient", "DomainClientCompositeOperations", "DomainGovernanceClient", "DomainGovernanceClientCompositeOperations", "LinkClient", "LinkClientCompositeOperations", "OrdersClient", "OrdersClientCompositeOperations", "RecipientInvitationClient", "RecipientInvitationClientCompositeOperations", "SenderInvitationClient", "SenderInvitationClientCompositeOperations", "WorkRequestClient", "WorkRequestClientCompositeOperations", "models"] +__all__ = ["DomainClient", "DomainClientCompositeOperations", "DomainGovernanceClient", "DomainGovernanceClientCompositeOperations", "LinkClient", "LinkClientCompositeOperations", "OrdersClient", "OrdersClientCompositeOperations", "OrganizationClient", "OrganizationClientCompositeOperations", "RecipientInvitationClient", "RecipientInvitationClientCompositeOperations", "SenderInvitationClient", "SenderInvitationClientCompositeOperations", "SubscriptionClient", "SubscriptionClientCompositeOperations", "WorkRequestClient", "WorkRequestClientCompositeOperations", "models"] diff --git a/src/oci/tenant_manager_control_plane/link_client.py b/src/oci/tenant_manager_control_plane/link_client.py index e97beba99e..5403da7737 100644 --- a/src/oci/tenant_manager_control_plane/link_client.py +++ b/src/oci/tenant_manager_control_plane/link_client.py @@ -98,7 +98,7 @@ def __init__(self, config, **kwargs): def delete_link(self, link_id, **kwargs): """ - Terminate the link. + Starts the link termination workflow. :param str link_id: (required) diff --git a/src/oci/tenant_manager_control_plane/link_client_composite_operations.py b/src/oci/tenant_manager_control_plane/link_client_composite_operations.py index 32b54eb16c..b4179161cc 100644 --- a/src/oci/tenant_manager_control_plane/link_client_composite_operations.py +++ b/src/oci/tenant_manager_control_plane/link_client_composite_operations.py @@ -25,14 +25,14 @@ def __init__(self, client, **kwargs): def delete_link_and_wait_for_state(self, link_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ - Calls :py:func:`~oci.tenant_manager_control_plane.LinkClient.delete_link` and waits for the :py:class:`~oci.tenant_manager_control_plane.models.Link` acted upon + Calls :py:func:`~oci.tenant_manager_control_plane.LinkClient.delete_link` and waits for the :py:class:`~oci.tenant_manager_control_plane.models.WorkRequest` to enter the given state(s). :param str link_id: (required) OCID of the link to terminate. :param list[str] wait_for_states: - An array of states to wait on. These should be valid values for :py:attr:`~oci.tenant_manager_control_plane.models.Link.lifecycle_state` + An array of states to wait on. These should be valid values for :py:attr:`~oci.tenant_manager_control_plane.models.WorkRequest.status` :param dict operation_kwargs: A dictionary of keyword arguments to pass to :py:func:`~oci.tenant_manager_control_plane.LinkClient.delete_link` @@ -41,7 +41,6 @@ def delete_link_and_wait_for_state(self, link_id, wait_for_states=[], operation_ 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_link(link_id) operation_result = None try: operation_result = self.client.delete_link(link_id, **operation_kwargs) @@ -55,13 +54,13 @@ def delete_link_and_wait_for_state(self, link_id, wait_for_states=[], operation_ 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, - 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, + 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 diff --git a/src/oci/tenant_manager_control_plane/models/__init__.py b/src/oci/tenant_manager_control_plane/models/__init__.py index 027592591b..b21ab91751 100644 --- a/src/oci/tenant_manager_control_plane/models/__init__.py +++ b/src/oci/tenant_manager_control_plane/models/__init__.py @@ -5,9 +5,16 @@ from __future__ import absolute_import from .activate_order_details import ActivateOrderDetails +from .assigned_subscription import AssignedSubscription +from .assigned_subscription_collection import AssignedSubscriptionCollection +from .assigned_subscription_summary import AssignedSubscriptionSummary +from .available_region_collection import AvailableRegionCollection +from .available_region_summary import AvailableRegionSummary +from .create_child_tenancy_details import CreateChildTenancyDetails from .create_domain_details import CreateDomainDetails from .create_domain_governance_details import CreateDomainGovernanceDetails from .create_sender_invitation_details import CreateSenderInvitationDetails +from .create_subscription_mapping_details import CreateSubscriptionMappingDetails from .domain import Domain from .domain_collection import DomainCollection from .domain_governance import DomainGovernance @@ -18,6 +25,12 @@ from .link_collection import LinkCollection from .link_summary import LinkSummary from .order import Order +from .organization import Organization +from .organization_collection import OrganizationCollection +from .organization_summary import OrganizationSummary +from .organization_tenancy import OrganizationTenancy +from .organization_tenancy_collection import OrganizationTenancyCollection +from .organization_tenancy_summary import OrganizationTenancySummary from .recipient_invitation import RecipientInvitation from .recipient_invitation_collection import RecipientInvitationCollection from .recipient_invitation_summary import RecipientInvitationSummary @@ -25,9 +38,17 @@ from .sender_invitation_collection import SenderInvitationCollection from .sender_invitation_summary import SenderInvitationSummary from .sku import Sku +from .subscription import Subscription +from .subscription_collection import SubscriptionCollection from .subscription_info import SubscriptionInfo +from .subscription_mapping import SubscriptionMapping +from .subscription_mapping_collection import SubscriptionMappingCollection +from .subscription_mapping_summary import SubscriptionMappingSummary +from .subscription_sku import SubscriptionSku +from .subscription_summary import SubscriptionSummary from .update_domain_details import UpdateDomainDetails from .update_domain_governance_details import UpdateDomainGovernanceDetails +from .update_organization_details import UpdateOrganizationDetails from .update_recipient_invitation_details import UpdateRecipientInvitationDetails from .update_sender_invitation_details import UpdateSenderInvitationDetails from .work_request import WorkRequest @@ -42,9 +63,16 @@ # Maps type names to classes for tenant_manager_control_plane services. tenant_manager_control_plane_type_mapping = { "ActivateOrderDetails": ActivateOrderDetails, + "AssignedSubscription": AssignedSubscription, + "AssignedSubscriptionCollection": AssignedSubscriptionCollection, + "AssignedSubscriptionSummary": AssignedSubscriptionSummary, + "AvailableRegionCollection": AvailableRegionCollection, + "AvailableRegionSummary": AvailableRegionSummary, + "CreateChildTenancyDetails": CreateChildTenancyDetails, "CreateDomainDetails": CreateDomainDetails, "CreateDomainGovernanceDetails": CreateDomainGovernanceDetails, "CreateSenderInvitationDetails": CreateSenderInvitationDetails, + "CreateSubscriptionMappingDetails": CreateSubscriptionMappingDetails, "Domain": Domain, "DomainCollection": DomainCollection, "DomainGovernance": DomainGovernance, @@ -55,6 +83,12 @@ "LinkCollection": LinkCollection, "LinkSummary": LinkSummary, "Order": Order, + "Organization": Organization, + "OrganizationCollection": OrganizationCollection, + "OrganizationSummary": OrganizationSummary, + "OrganizationTenancy": OrganizationTenancy, + "OrganizationTenancyCollection": OrganizationTenancyCollection, + "OrganizationTenancySummary": OrganizationTenancySummary, "RecipientInvitation": RecipientInvitation, "RecipientInvitationCollection": RecipientInvitationCollection, "RecipientInvitationSummary": RecipientInvitationSummary, @@ -62,9 +96,17 @@ "SenderInvitationCollection": SenderInvitationCollection, "SenderInvitationSummary": SenderInvitationSummary, "Sku": Sku, + "Subscription": Subscription, + "SubscriptionCollection": SubscriptionCollection, "SubscriptionInfo": SubscriptionInfo, + "SubscriptionMapping": SubscriptionMapping, + "SubscriptionMappingCollection": SubscriptionMappingCollection, + "SubscriptionMappingSummary": SubscriptionMappingSummary, + "SubscriptionSku": SubscriptionSku, + "SubscriptionSummary": SubscriptionSummary, "UpdateDomainDetails": UpdateDomainDetails, "UpdateDomainGovernanceDetails": UpdateDomainGovernanceDetails, + "UpdateOrganizationDetails": UpdateOrganizationDetails, "UpdateRecipientInvitationDetails": UpdateRecipientInvitationDetails, "UpdateSenderInvitationDetails": UpdateSenderInvitationDetails, "WorkRequest": WorkRequest, diff --git a/src/oci/tenant_manager_control_plane/models/activate_order_details.py b/src/oci/tenant_manager_control_plane/models/activate_order_details.py index 25824549ad..374895d90a 100644 --- a/src/oci/tenant_manager_control_plane/models/activate_order_details.py +++ b/src/oci/tenant_manager_control_plane/models/activate_order_details.py @@ -10,7 +10,7 @@ @init_model_state_from_kwargs class ActivateOrderDetails(object): """ - The parameters for activating an order subscription in a tenancy + The parameters for activating an order subscription in a tenancy. """ def __init__(self, **kwargs): @@ -37,7 +37,7 @@ def __init__(self, **kwargs): def compartment_id(self): """ **[Required]** Gets the compartment_id of this ActivateOrderDetails. - Tenant Id to activate the Order. + Tenant ID to activate the order. :return: The compartment_id of this ActivateOrderDetails. @@ -49,7 +49,7 @@ def compartment_id(self): def compartment_id(self, compartment_id): """ Sets the compartment_id of this ActivateOrderDetails. - Tenant Id to activate the Order. + Tenant ID to activate the order. :param compartment_id: The compartment_id of this ActivateOrderDetails. diff --git a/src/oci/tenant_manager_control_plane/models/assigned_subscription.py b/src/oci/tenant_manager_control_plane/models/assigned_subscription.py new file mode 100644 index 0000000000..dee0ce9362 --- /dev/null +++ b/src/oci/tenant_manager_control_plane/models/assigned_subscription.py @@ -0,0 +1,478 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 AssignedSubscription(object): + """ + Assigned subscription information. + """ + + #: A constant which can be used with the lifecycle_state property of a AssignedSubscription. + #: This constant has a value of "CREATING" + LIFECYCLE_STATE_CREATING = "CREATING" + + #: A constant which can be used with the lifecycle_state property of a AssignedSubscription. + #: This constant has a value of "ACTIVE" + LIFECYCLE_STATE_ACTIVE = "ACTIVE" + + #: A constant which can be used with the lifecycle_state property of a AssignedSubscription. + #: This constant has a value of "INACTIVE" + LIFECYCLE_STATE_INACTIVE = "INACTIVE" + + #: A constant which can be used with the lifecycle_state property of a AssignedSubscription. + #: This constant has a value of "UPDATING" + LIFECYCLE_STATE_UPDATING = "UPDATING" + + #: A constant which can be used with the lifecycle_state property of a AssignedSubscription. + #: This constant has a value of "DELETING" + LIFECYCLE_STATE_DELETING = "DELETING" + + #: A constant which can be used with the lifecycle_state property of a AssignedSubscription. + #: This constant has a value of "DELETED" + LIFECYCLE_STATE_DELETED = "DELETED" + + #: A constant which can be used with the lifecycle_state property of a AssignedSubscription. + #: This constant has a value of "FAILED" + LIFECYCLE_STATE_FAILED = "FAILED" + + def __init__(self, **kwargs): + """ + Initializes a new AssignedSubscription 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 AssignedSubscription. + :type id: str + + :param compartment_id: + The value to assign to the compartment_id property of this AssignedSubscription. + :type compartment_id: str + + :param classic_subscription_id: + The value to assign to the classic_subscription_id property of this AssignedSubscription. + :type classic_subscription_id: str + + :param service_name: + The value to assign to the service_name property of this AssignedSubscription. + :type service_name: str + + :param is_classic_subscription: + The value to assign to the is_classic_subscription property of this AssignedSubscription. + :type is_classic_subscription: bool + + :param region_assignment: + The value to assign to the region_assignment property of this AssignedSubscription. + :type region_assignment: str + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this AssignedSubscription. + Allowed values for this property are: "CREATING", "ACTIVE", "INACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type lifecycle_state: str + + :param skus: + The value to assign to the skus property of this AssignedSubscription. + :type skus: list[oci.tenant_manager_control_plane.models.SubscriptionSku] + + :param order_ids: + The value to assign to the order_ids property of this AssignedSubscription. + :type order_ids: list[str] + + :param start_date: + The value to assign to the start_date property of this AssignedSubscription. + :type start_date: datetime + + :param end_date: + The value to assign to the end_date property of this AssignedSubscription. + :type end_date: datetime + + :param time_updated: + The value to assign to the time_updated property of this AssignedSubscription. + :type time_updated: datetime + + :param time_created: + The value to assign to the time_created property of this AssignedSubscription. + :type time_created: datetime + + """ + self.swagger_types = { + 'id': 'str', + 'compartment_id': 'str', + 'classic_subscription_id': 'str', + 'service_name': 'str', + 'is_classic_subscription': 'bool', + 'region_assignment': 'str', + 'lifecycle_state': 'str', + 'skus': 'list[SubscriptionSku]', + 'order_ids': 'list[str]', + 'start_date': 'datetime', + 'end_date': 'datetime', + 'time_updated': 'datetime', + 'time_created': 'datetime' + } + + self.attribute_map = { + 'id': 'id', + 'compartment_id': 'compartmentId', + 'classic_subscription_id': 'classicSubscriptionId', + 'service_name': 'serviceName', + 'is_classic_subscription': 'isClassicSubscription', + 'region_assignment': 'regionAssignment', + 'lifecycle_state': 'lifecycleState', + 'skus': 'skus', + 'order_ids': 'orderIds', + 'start_date': 'startDate', + 'end_date': 'endDate', + 'time_updated': 'timeUpdated', + 'time_created': 'timeCreated' + } + + self._id = None + self._compartment_id = None + self._classic_subscription_id = None + self._service_name = None + self._is_classic_subscription = None + self._region_assignment = None + self._lifecycle_state = None + self._skus = None + self._order_ids = None + self._start_date = None + self._end_date = None + self._time_updated = None + self._time_created = None + + @property + def id(self): + """ + **[Required]** Gets the id of this AssignedSubscription. + OCID of the subscription. + + + :return: The id of this AssignedSubscription. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this AssignedSubscription. + OCID of the subscription. + + + :param id: The id of this AssignedSubscription. + :type: str + """ + self._id = id + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this AssignedSubscription. + OCID of the compartment. Always a tenancy OCID. + + + :return: The compartment_id of this AssignedSubscription. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this AssignedSubscription. + OCID of the compartment. Always a tenancy OCID. + + + :param compartment_id: The compartment_id of this AssignedSubscription. + :type: str + """ + self._compartment_id = compartment_id + + @property + def classic_subscription_id(self): + """ + **[Required]** Gets the classic_subscription_id of this AssignedSubscription. + Subscription id. + + + :return: The classic_subscription_id of this AssignedSubscription. + :rtype: str + """ + return self._classic_subscription_id + + @classic_subscription_id.setter + def classic_subscription_id(self, classic_subscription_id): + """ + Sets the classic_subscription_id of this AssignedSubscription. + Subscription id. + + + :param classic_subscription_id: The classic_subscription_id of this AssignedSubscription. + :type: str + """ + self._classic_subscription_id = classic_subscription_id + + @property + def service_name(self): + """ + **[Required]** Gets the service_name of this AssignedSubscription. + The type of subscription, such as 'CLOUDCM', 'SAAS', 'ERP', or 'CRM'. + + + :return: The service_name of this AssignedSubscription. + :rtype: str + """ + return self._service_name + + @service_name.setter + def service_name(self, service_name): + """ + Sets the service_name of this AssignedSubscription. + The type of subscription, such as 'CLOUDCM', 'SAAS', 'ERP', or 'CRM'. + + + :param service_name: The service_name of this AssignedSubscription. + :type: str + """ + self._service_name = service_name + + @property + def is_classic_subscription(self): + """ + Gets the is_classic_subscription of this AssignedSubscription. + Denotes if the subscription is legacy or not. + + + :return: The is_classic_subscription of this AssignedSubscription. + :rtype: bool + """ + return self._is_classic_subscription + + @is_classic_subscription.setter + def is_classic_subscription(self, is_classic_subscription): + """ + Sets the is_classic_subscription of this AssignedSubscription. + Denotes if the subscription is legacy or not. + + + :param is_classic_subscription: The is_classic_subscription of this AssignedSubscription. + :type: bool + """ + self._is_classic_subscription = is_classic_subscription + + @property + def region_assignment(self): + """ + Gets the region_assignment of this AssignedSubscription. + Region for the subscription. + + + :return: The region_assignment of this AssignedSubscription. + :rtype: str + """ + return self._region_assignment + + @region_assignment.setter + def region_assignment(self, region_assignment): + """ + Sets the region_assignment of this AssignedSubscription. + Region for the subscription. + + + :param region_assignment: The region_assignment of this AssignedSubscription. + :type: str + """ + self._region_assignment = region_assignment + + @property + def lifecycle_state(self): + """ + Gets the lifecycle_state of this AssignedSubscription. + Lifecycle state of the subscription. + + Allowed values for this property are: "CREATING", "ACTIVE", "INACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The lifecycle_state of this AssignedSubscription. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this AssignedSubscription. + Lifecycle state of the subscription. + + + :param lifecycle_state: The lifecycle_state of this AssignedSubscription. + :type: str + """ + allowed_values = ["CREATING", "ACTIVE", "INACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED"] + if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values): + lifecycle_state = 'UNKNOWN_ENUM_VALUE' + self._lifecycle_state = lifecycle_state + + @property + def skus(self): + """ + Gets the skus of this AssignedSubscription. + List of sku linked to the subscription. + + + :return: The skus of this AssignedSubscription. + :rtype: list[oci.tenant_manager_control_plane.models.SubscriptionSku] + """ + return self._skus + + @skus.setter + def skus(self, skus): + """ + Sets the skus of this AssignedSubscription. + List of sku linked to the subscription. + + + :param skus: The skus of this AssignedSubscription. + :type: list[oci.tenant_manager_control_plane.models.SubscriptionSku] + """ + self._skus = skus + + @property + def order_ids(self): + """ + Gets the order_ids of this AssignedSubscription. + List of subscription order OCIDs that contributed to this subscription. + + + :return: The order_ids of this AssignedSubscription. + :rtype: list[str] + """ + return self._order_ids + + @order_ids.setter + def order_ids(self, order_ids): + """ + Sets the order_ids of this AssignedSubscription. + List of subscription order OCIDs that contributed to this subscription. + + + :param order_ids: The order_ids of this AssignedSubscription. + :type: list[str] + """ + self._order_ids = order_ids + + @property + def start_date(self): + """ + Gets the start_date of this AssignedSubscription. + Subscription start time. + + + :return: The start_date of this AssignedSubscription. + :rtype: datetime + """ + return self._start_date + + @start_date.setter + def start_date(self, start_date): + """ + Sets the start_date of this AssignedSubscription. + Subscription start time. + + + :param start_date: The start_date of this AssignedSubscription. + :type: datetime + """ + self._start_date = start_date + + @property + def end_date(self): + """ + Gets the end_date of this AssignedSubscription. + Subscription end time. + + + :return: The end_date of this AssignedSubscription. + :rtype: datetime + """ + return self._end_date + + @end_date.setter + def end_date(self, end_date): + """ + Sets the end_date of this AssignedSubscription. + Subscription end time. + + + :param end_date: The end_date of this AssignedSubscription. + :type: datetime + """ + self._end_date = end_date + + @property + def time_updated(self): + """ + Gets the time_updated of this AssignedSubscription. + Date-time when subscription is updated. + + + :return: The time_updated of this AssignedSubscription. + :rtype: datetime + """ + return self._time_updated + + @time_updated.setter + def time_updated(self, time_updated): + """ + Sets the time_updated of this AssignedSubscription. + Date-time when subscription is updated. + + + :param time_updated: The time_updated of this AssignedSubscription. + :type: datetime + """ + self._time_updated = time_updated + + @property + def time_created(self): + """ + Gets the time_created of this AssignedSubscription. + Date-time when subscription is created. + + + :return: The time_created of this AssignedSubscription. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this AssignedSubscription. + Date-time when subscription is created. + + + :param time_created: The time_created of this AssignedSubscription. + :type: datetime + """ + self._time_created = time_created + + 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/tenant_manager_control_plane/models/assigned_subscription_collection.py b/src/oci/tenant_manager_control_plane/models/assigned_subscription_collection.py new file mode 100644 index 0000000000..7239dc5671 --- /dev/null +++ b/src/oci/tenant_manager_control_plane/models/assigned_subscription_collection.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 AssignedSubscriptionCollection(object): + """ + List of AssignedSubscription. + """ + + def __init__(self, **kwargs): + """ + Initializes a new AssignedSubscriptionCollection object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param items: + The value to assign to the items property of this AssignedSubscriptionCollection. + :type items: list[oci.tenant_manager_control_plane.models.AssignedSubscriptionSummary] + + """ + self.swagger_types = { + 'items': 'list[AssignedSubscriptionSummary]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this AssignedSubscriptionCollection. + Array containing AssignedSubscription items. + + + :return: The items of this AssignedSubscriptionCollection. + :rtype: list[oci.tenant_manager_control_plane.models.AssignedSubscriptionSummary] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this AssignedSubscriptionCollection. + Array containing AssignedSubscription items. + + + :param items: The items of this AssignedSubscriptionCollection. + :type: list[oci.tenant_manager_control_plane.models.AssignedSubscriptionSummary] + """ + self._items = items + + 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/tenant_manager_control_plane/models/assigned_subscription_summary.py b/src/oci/tenant_manager_control_plane/models/assigned_subscription_summary.py new file mode 100644 index 0000000000..1c81318b8c --- /dev/null +++ b/src/oci/tenant_manager_control_plane/models/assigned_subscription_summary.py @@ -0,0 +1,416 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 AssignedSubscriptionSummary(object): + """ + Summary of AssignedSubscription information. + """ + + #: A constant which can be used with the lifecycle_state property of a AssignedSubscriptionSummary. + #: This constant has a value of "CREATING" + LIFECYCLE_STATE_CREATING = "CREATING" + + #: A constant which can be used with the lifecycle_state property of a AssignedSubscriptionSummary. + #: This constant has a value of "ACTIVE" + LIFECYCLE_STATE_ACTIVE = "ACTIVE" + + #: A constant which can be used with the lifecycle_state property of a AssignedSubscriptionSummary. + #: This constant has a value of "INACTIVE" + LIFECYCLE_STATE_INACTIVE = "INACTIVE" + + #: A constant which can be used with the lifecycle_state property of a AssignedSubscriptionSummary. + #: This constant has a value of "UPDATING" + LIFECYCLE_STATE_UPDATING = "UPDATING" + + #: A constant which can be used with the lifecycle_state property of a AssignedSubscriptionSummary. + #: This constant has a value of "DELETING" + LIFECYCLE_STATE_DELETING = "DELETING" + + #: A constant which can be used with the lifecycle_state property of a AssignedSubscriptionSummary. + #: This constant has a value of "DELETED" + LIFECYCLE_STATE_DELETED = "DELETED" + + #: A constant which can be used with the lifecycle_state property of a AssignedSubscriptionSummary. + #: This constant has a value of "FAILED" + LIFECYCLE_STATE_FAILED = "FAILED" + + def __init__(self, **kwargs): + """ + Initializes a new AssignedSubscriptionSummary 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 AssignedSubscriptionSummary. + :type id: str + + :param compartment_id: + The value to assign to the compartment_id property of this AssignedSubscriptionSummary. + :type compartment_id: str + + :param classic_subscription_id: + The value to assign to the classic_subscription_id property of this AssignedSubscriptionSummary. + :type classic_subscription_id: str + + :param service_name: + The value to assign to the service_name property of this AssignedSubscriptionSummary. + :type service_name: str + + :param is_classic_subscription: + The value to assign to the is_classic_subscription property of this AssignedSubscriptionSummary. + :type is_classic_subscription: bool + + :param region_assignment: + The value to assign to the region_assignment property of this AssignedSubscriptionSummary. + :type region_assignment: str + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this AssignedSubscriptionSummary. + Allowed values for this property are: "CREATING", "ACTIVE", "INACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type lifecycle_state: str + + :param start_date: + The value to assign to the start_date property of this AssignedSubscriptionSummary. + :type start_date: datetime + + :param end_date: + The value to assign to the end_date property of this AssignedSubscriptionSummary. + :type end_date: datetime + + :param time_updated: + The value to assign to the time_updated property of this AssignedSubscriptionSummary. + :type time_updated: datetime + + :param time_created: + The value to assign to the time_created property of this AssignedSubscriptionSummary. + :type time_created: datetime + + """ + self.swagger_types = { + 'id': 'str', + 'compartment_id': 'str', + 'classic_subscription_id': 'str', + 'service_name': 'str', + 'is_classic_subscription': 'bool', + 'region_assignment': 'str', + 'lifecycle_state': 'str', + 'start_date': 'datetime', + 'end_date': 'datetime', + 'time_updated': 'datetime', + 'time_created': 'datetime' + } + + self.attribute_map = { + 'id': 'id', + 'compartment_id': 'compartmentId', + 'classic_subscription_id': 'classicSubscriptionId', + 'service_name': 'serviceName', + 'is_classic_subscription': 'isClassicSubscription', + 'region_assignment': 'regionAssignment', + 'lifecycle_state': 'lifecycleState', + 'start_date': 'startDate', + 'end_date': 'endDate', + 'time_updated': 'timeUpdated', + 'time_created': 'timeCreated' + } + + self._id = None + self._compartment_id = None + self._classic_subscription_id = None + self._service_name = None + self._is_classic_subscription = None + self._region_assignment = None + self._lifecycle_state = None + self._start_date = None + self._end_date = None + self._time_updated = None + self._time_created = None + + @property + def id(self): + """ + **[Required]** Gets the id of this AssignedSubscriptionSummary. + OCID of the subscription. + + + :return: The id of this AssignedSubscriptionSummary. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this AssignedSubscriptionSummary. + OCID of the subscription. + + + :param id: The id of this AssignedSubscriptionSummary. + :type: str + """ + self._id = id + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this AssignedSubscriptionSummary. + OCID of the compartment. Always a tenancy OCID. + + + :return: The compartment_id of this AssignedSubscriptionSummary. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this AssignedSubscriptionSummary. + OCID of the compartment. Always a tenancy OCID. + + + :param compartment_id: The compartment_id of this AssignedSubscriptionSummary. + :type: str + """ + self._compartment_id = compartment_id + + @property + def classic_subscription_id(self): + """ + **[Required]** Gets the classic_subscription_id of this AssignedSubscriptionSummary. + Subscription ID. + + + :return: The classic_subscription_id of this AssignedSubscriptionSummary. + :rtype: str + """ + return self._classic_subscription_id + + @classic_subscription_id.setter + def classic_subscription_id(self, classic_subscription_id): + """ + Sets the classic_subscription_id of this AssignedSubscriptionSummary. + Subscription ID. + + + :param classic_subscription_id: The classic_subscription_id of this AssignedSubscriptionSummary. + :type: str + """ + self._classic_subscription_id = classic_subscription_id + + @property + def service_name(self): + """ + **[Required]** Gets the service_name of this AssignedSubscriptionSummary. + The type of subscription, such as 'CLOUDCM', 'SAAS', 'ERP', or 'CRM'. + + + :return: The service_name of this AssignedSubscriptionSummary. + :rtype: str + """ + return self._service_name + + @service_name.setter + def service_name(self, service_name): + """ + Sets the service_name of this AssignedSubscriptionSummary. + The type of subscription, such as 'CLOUDCM', 'SAAS', 'ERP', or 'CRM'. + + + :param service_name: The service_name of this AssignedSubscriptionSummary. + :type: str + """ + self._service_name = service_name + + @property + def is_classic_subscription(self): + """ + Gets the is_classic_subscription of this AssignedSubscriptionSummary. + Denotes if the subscription is legacy or not. + + + :return: The is_classic_subscription of this AssignedSubscriptionSummary. + :rtype: bool + """ + return self._is_classic_subscription + + @is_classic_subscription.setter + def is_classic_subscription(self, is_classic_subscription): + """ + Sets the is_classic_subscription of this AssignedSubscriptionSummary. + Denotes if the subscription is legacy or not. + + + :param is_classic_subscription: The is_classic_subscription of this AssignedSubscriptionSummary. + :type: bool + """ + self._is_classic_subscription = is_classic_subscription + + @property + def region_assignment(self): + """ + Gets the region_assignment of this AssignedSubscriptionSummary. + Region for the subscription. + + + :return: The region_assignment of this AssignedSubscriptionSummary. + :rtype: str + """ + return self._region_assignment + + @region_assignment.setter + def region_assignment(self, region_assignment): + """ + Sets the region_assignment of this AssignedSubscriptionSummary. + Region for the subscription. + + + :param region_assignment: The region_assignment of this AssignedSubscriptionSummary. + :type: str + """ + self._region_assignment = region_assignment + + @property + def lifecycle_state(self): + """ + Gets the lifecycle_state of this AssignedSubscriptionSummary. + Lifecycle state of the subscription. + + Allowed values for this property are: "CREATING", "ACTIVE", "INACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The lifecycle_state of this AssignedSubscriptionSummary. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this AssignedSubscriptionSummary. + Lifecycle state of the subscription. + + + :param lifecycle_state: The lifecycle_state of this AssignedSubscriptionSummary. + :type: str + """ + allowed_values = ["CREATING", "ACTIVE", "INACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED"] + if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values): + lifecycle_state = 'UNKNOWN_ENUM_VALUE' + self._lifecycle_state = lifecycle_state + + @property + def start_date(self): + """ + Gets the start_date of this AssignedSubscriptionSummary. + Subscription start time. + + + :return: The start_date of this AssignedSubscriptionSummary. + :rtype: datetime + """ + return self._start_date + + @start_date.setter + def start_date(self, start_date): + """ + Sets the start_date of this AssignedSubscriptionSummary. + Subscription start time. + + + :param start_date: The start_date of this AssignedSubscriptionSummary. + :type: datetime + """ + self._start_date = start_date + + @property + def end_date(self): + """ + Gets the end_date of this AssignedSubscriptionSummary. + Subscription end time. + + + :return: The end_date of this AssignedSubscriptionSummary. + :rtype: datetime + """ + return self._end_date + + @end_date.setter + def end_date(self, end_date): + """ + Sets the end_date of this AssignedSubscriptionSummary. + Subscription end time. + + + :param end_date: The end_date of this AssignedSubscriptionSummary. + :type: datetime + """ + self._end_date = end_date + + @property + def time_updated(self): + """ + Gets the time_updated of this AssignedSubscriptionSummary. + Date-time when subscription is updated. + + + :return: The time_updated of this AssignedSubscriptionSummary. + :rtype: datetime + """ + return self._time_updated + + @time_updated.setter + def time_updated(self, time_updated): + """ + Sets the time_updated of this AssignedSubscriptionSummary. + Date-time when subscription is updated. + + + :param time_updated: The time_updated of this AssignedSubscriptionSummary. + :type: datetime + """ + self._time_updated = time_updated + + @property + def time_created(self): + """ + Gets the time_created of this AssignedSubscriptionSummary. + Date-time when subscription is created. + + + :return: The time_created of this AssignedSubscriptionSummary. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this AssignedSubscriptionSummary. + Date-time when subscription is created. + + + :param time_created: The time_created of this AssignedSubscriptionSummary. + :type: datetime + """ + self._time_created = time_created + + 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/tenant_manager_control_plane/models/available_region_collection.py b/src/oci/tenant_manager_control_plane/models/available_region_collection.py new file mode 100644 index 0000000000..1cbb7f42ad --- /dev/null +++ b/src/oci/tenant_manager_control_plane/models/available_region_collection.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 AvailableRegionCollection(object): + """ + List of available regions. + """ + + def __init__(self, **kwargs): + """ + Initializes a new AvailableRegionCollection object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param items: + The value to assign to the items property of this AvailableRegionCollection. + :type items: list[oci.tenant_manager_control_plane.models.AvailableRegionSummary] + + """ + self.swagger_types = { + 'items': 'list[AvailableRegionSummary]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this AvailableRegionCollection. + Array containing available region items. + + + :return: The items of this AvailableRegionCollection. + :rtype: list[oci.tenant_manager_control_plane.models.AvailableRegionSummary] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this AvailableRegionCollection. + Array containing available region items. + + + :param items: The items of this AvailableRegionCollection. + :type: list[oci.tenant_manager_control_plane.models.AvailableRegionSummary] + """ + self._items = items + + 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/tenant_manager_control_plane/models/available_region_summary.py b/src/oci/tenant_manager_control_plane/models/available_region_summary.py new file mode 100644 index 0000000000..1a30f16189 --- /dev/null +++ b/src/oci/tenant_manager_control_plane/models/available_region_summary.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 AvailableRegionSummary(object): + """ + The summary of region availability for a subscription. + """ + + def __init__(self, **kwargs): + """ + Initializes a new AvailableRegionSummary object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param region_name: + The value to assign to the region_name property of this AvailableRegionSummary. + :type region_name: str + + """ + self.swagger_types = { + 'region_name': 'str' + } + + self.attribute_map = { + 'region_name': 'regionName' + } + + self._region_name = None + + @property + def region_name(self): + """ + **[Required]** Gets the region_name of this AvailableRegionSummary. + Region availability for the subscription. + + + :return: The region_name of this AvailableRegionSummary. + :rtype: str + """ + return self._region_name + + @region_name.setter + def region_name(self, region_name): + """ + Sets the region_name of this AvailableRegionSummary. + Region availability for the subscription. + + + :param region_name: The region_name of this AvailableRegionSummary. + :type: str + """ + self._region_name = region_name + + 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/tenant_manager_control_plane/models/create_child_tenancy_details.py b/src/oci/tenant_manager_control_plane/models/create_child_tenancy_details.py new file mode 100644 index 0000000000..a0edf45d12 --- /dev/null +++ b/src/oci/tenant_manager_control_plane/models/create_child_tenancy_details.py @@ -0,0 +1,194 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 CreateChildTenancyDetails(object): + """ + The parameters for creating a child tenancy. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CreateChildTenancyDetails 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 CreateChildTenancyDetails. + :type compartment_id: str + + :param tenancy_name: + The value to assign to the tenancy_name property of this CreateChildTenancyDetails. + :type tenancy_name: str + + :param home_region: + The value to assign to the home_region property of this CreateChildTenancyDetails. + :type home_region: str + + :param admin_email: + The value to assign to the admin_email property of this CreateChildTenancyDetails. + :type admin_email: str + + :param policy_name: + The value to assign to the policy_name property of this CreateChildTenancyDetails. + :type policy_name: str + + """ + self.swagger_types = { + 'compartment_id': 'str', + 'tenancy_name': 'str', + 'home_region': 'str', + 'admin_email': 'str', + 'policy_name': 'str' + } + + self.attribute_map = { + 'compartment_id': 'compartmentId', + 'tenancy_name': 'tenancyName', + 'home_region': 'homeRegion', + 'admin_email': 'adminEmail', + 'policy_name': 'policyName' + } + + self._compartment_id = None + self._tenancy_name = None + self._home_region = None + self._admin_email = None + self._policy_name = None + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this CreateChildTenancyDetails. + The tenancy ID of the parent tenancy. + + + :return: The compartment_id of this CreateChildTenancyDetails. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this CreateChildTenancyDetails. + The tenancy ID of the parent tenancy. + + + :param compartment_id: The compartment_id of this CreateChildTenancyDetails. + :type: str + """ + self._compartment_id = compartment_id + + @property + def tenancy_name(self): + """ + **[Required]** Gets the tenancy_name of this CreateChildTenancyDetails. + The tenancy name to use for the child tenancy. + + + :return: The tenancy_name of this CreateChildTenancyDetails. + :rtype: str + """ + return self._tenancy_name + + @tenancy_name.setter + def tenancy_name(self, tenancy_name): + """ + Sets the tenancy_name of this CreateChildTenancyDetails. + The tenancy name to use for the child tenancy. + + + :param tenancy_name: The tenancy_name of this CreateChildTenancyDetails. + :type: str + """ + self._tenancy_name = tenancy_name + + @property + def home_region(self): + """ + **[Required]** Gets the home_region of this CreateChildTenancyDetails. + The home region to use for the child tenancy. This must be a region where the parent tenancy is subscribed. + + + :return: The home_region of this CreateChildTenancyDetails. + :rtype: str + """ + return self._home_region + + @home_region.setter + def home_region(self, home_region): + """ + Sets the home_region of this CreateChildTenancyDetails. + The home region to use for the child tenancy. This must be a region where the parent tenancy is subscribed. + + + :param home_region: The home_region of this CreateChildTenancyDetails. + :type: str + """ + self._home_region = home_region + + @property + def admin_email(self): + """ + **[Required]** Gets the admin_email of this CreateChildTenancyDetails. + The email address of the administrator of the child tenancy. + + + :return: The admin_email of this CreateChildTenancyDetails. + :rtype: str + """ + return self._admin_email + + @admin_email.setter + def admin_email(self, admin_email): + """ + Sets the admin_email of this CreateChildTenancyDetails. + The email address of the administrator of the child tenancy. + + + :param admin_email: The admin_email of this CreateChildTenancyDetails. + :type: str + """ + self._admin_email = admin_email + + @property + def policy_name(self): + """ + Gets the policy_name of this CreateChildTenancyDetails. + The name to use for the administrator policy in the child tenancy. Must contain only letters and underscores. + + + :return: The policy_name of this CreateChildTenancyDetails. + :rtype: str + """ + return self._policy_name + + @policy_name.setter + def policy_name(self, policy_name): + """ + Sets the policy_name of this CreateChildTenancyDetails. + The name to use for the administrator policy in the child tenancy. Must contain only letters and underscores. + + + :param policy_name: The policy_name of this CreateChildTenancyDetails. + :type: str + """ + self._policy_name = policy_name + + 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/tenant_manager_control_plane/models/create_subscription_mapping_details.py b/src/oci/tenant_manager_control_plane/models/create_subscription_mapping_details.py new file mode 100644 index 0000000000..78ee7fc47a --- /dev/null +++ b/src/oci/tenant_manager_control_plane/models/create_subscription_mapping_details.py @@ -0,0 +1,101 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 CreateSubscriptionMappingDetails(object): + """ + CreateSubscriptionMappingDetails contains subscription and compartment identified by the tenancy, and OCID information. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CreateSubscriptionMappingDetails 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 CreateSubscriptionMappingDetails. + :type compartment_id: str + + :param subscription_id: + The value to assign to the subscription_id property of this CreateSubscriptionMappingDetails. + :type subscription_id: str + + """ + self.swagger_types = { + 'compartment_id': 'str', + 'subscription_id': 'str' + } + + self.attribute_map = { + 'compartment_id': 'compartmentId', + 'subscription_id': 'subscriptionId' + } + + self._compartment_id = None + self._subscription_id = None + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this CreateSubscriptionMappingDetails. + OCID of the compartment. Always a tenancy OCID. + + + :return: The compartment_id of this CreateSubscriptionMappingDetails. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this CreateSubscriptionMappingDetails. + OCID of the compartment. Always a tenancy OCID. + + + :param compartment_id: The compartment_id of this CreateSubscriptionMappingDetails. + :type: str + """ + self._compartment_id = compartment_id + + @property + def subscription_id(self): + """ + **[Required]** Gets the subscription_id of this CreateSubscriptionMappingDetails. + OCID of subscription. + + + :return: The subscription_id of this CreateSubscriptionMappingDetails. + :rtype: str + """ + return self._subscription_id + + @subscription_id.setter + def subscription_id(self, subscription_id): + """ + Sets the subscription_id of this CreateSubscriptionMappingDetails. + OCID of subscription. + + + :param subscription_id: The subscription_id of this CreateSubscriptionMappingDetails. + :type: str + """ + self._subscription_id = subscription_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/tenant_manager_control_plane/models/domain.py b/src/oci/tenant_manager_control_plane/models/domain.py index 0f6abf0f3c..65e2ab0608 100644 --- a/src/oci/tenant_manager_control_plane/models/domain.py +++ b/src/oci/tenant_manager_control_plane/models/domain.py @@ -311,7 +311,7 @@ def txt_record(self, txt_record): def time_created(self): """ Gets the time_created of this Domain. - Date-time when this domain was created. An RFC3339-formatted date and time string. + Date-time when this domain was created. An RFC 3339-formatted date and time string. :return: The time_created of this Domain. @@ -323,7 +323,7 @@ def time_created(self): def time_created(self, time_created): """ Sets the time_created of this Domain. - Date-time when this domain was created. An RFC3339-formatted date and time string. + Date-time when this domain was created. An RFC 3339-formatted date and time string. :param time_created: The time_created of this Domain. @@ -335,7 +335,7 @@ def time_created(self, time_created): def time_updated(self): """ Gets the time_updated of this Domain. - Date-time when this domain was last updated. An RFC3339-formatted date and time string. + Date-time when this domain was last updated. An RFC 3339-formatted date and time string. :return: The time_updated of this Domain. @@ -347,7 +347,7 @@ def time_updated(self): def time_updated(self, time_updated): """ Sets the time_updated of this Domain. - Date-time when this domain was last updated. An RFC3339-formatted date and time string. + Date-time when this domain was last updated. An RFC 3339-formatted date and time string. :param time_updated: The time_updated of this Domain. diff --git a/src/oci/tenant_manager_control_plane/models/domain_governance.py b/src/oci/tenant_manager_control_plane/models/domain_governance.py index b655773a4f..c148f64e25 100644 --- a/src/oci/tenant_manager_control_plane/models/domain_governance.py +++ b/src/oci/tenant_manager_control_plane/models/domain_governance.py @@ -329,7 +329,7 @@ def ons_subscription_id(self, ons_subscription_id): def time_created(self): """ Gets the time_created of this DomainGovernance. - Date-time when this domain governance was created. An RFC3339-formatted date and time string. + Date-time when this domain governance was created. An RFC 3339-formatted date and time string. :return: The time_created of this DomainGovernance. @@ -341,7 +341,7 @@ def time_created(self): def time_created(self, time_created): """ Sets the time_created of this DomainGovernance. - Date-time when this domain governance was created. An RFC3339-formatted date and time string. + Date-time when this domain governance was created. An RFC 3339-formatted date and time string. :param time_created: The time_created of this DomainGovernance. @@ -353,7 +353,7 @@ def time_created(self, time_created): def time_updated(self): """ Gets the time_updated of this DomainGovernance. - Date-time when this domain governance was last updated. An RFC3339-formatted date and time string. + Date-time when this domain governance was last updated. An RFC 3339-formatted date and time string. :return: The time_updated of this DomainGovernance. @@ -365,7 +365,7 @@ def time_updated(self): def time_updated(self, time_updated): """ Sets the time_updated of this DomainGovernance. - Date-time when this domain governance was last updated. An RFC3339-formatted date and time string. + Date-time when this domain governance was last updated. An RFC 3339-formatted date and time string. :param time_updated: The time_updated of this DomainGovernance. diff --git a/src/oci/tenant_manager_control_plane/models/domain_governance_summary.py b/src/oci/tenant_manager_control_plane/models/domain_governance_summary.py index 12c8a3eed8..640f355edd 100644 --- a/src/oci/tenant_manager_control_plane/models/domain_governance_summary.py +++ b/src/oci/tenant_manager_control_plane/models/domain_governance_summary.py @@ -313,7 +313,7 @@ def ons_subscription_id(self, ons_subscription_id): def time_created(self): """ Gets the time_created of this DomainGovernanceSummary. - Date-time when this domain governance was created. An RFC3339-formatted date and time string. + Date-time when this domain governance was created. An RFC 3339-formatted date and time string. :return: The time_created of this DomainGovernanceSummary. @@ -325,7 +325,7 @@ def time_created(self): def time_created(self, time_created): """ Sets the time_created of this DomainGovernanceSummary. - Date-time when this domain governance was created. An RFC3339-formatted date and time string. + Date-time when this domain governance was created. An RFC 3339-formatted date and time string. :param time_created: The time_created of this DomainGovernanceSummary. @@ -337,7 +337,7 @@ def time_created(self, time_created): def time_updated(self): """ Gets the time_updated of this DomainGovernanceSummary. - Date-time when this domain governance was last updated. An RFC3339-formatted date and time string. + Date-time when this domain governance was last updated. An RFC 3339-formatted date and time string. :return: The time_updated of this DomainGovernanceSummary. @@ -349,7 +349,7 @@ def time_updated(self): def time_updated(self, time_updated): """ Sets the time_updated of this DomainGovernanceSummary. - Date-time when this domain governance was last updated. An RFC3339-formatted date and time string. + Date-time when this domain governance was last updated. An RFC 3339-formatted date and time string. :param time_updated: The time_updated of this DomainGovernanceSummary. diff --git a/src/oci/tenant_manager_control_plane/models/domain_summary.py b/src/oci/tenant_manager_control_plane/models/domain_summary.py index bc8b6bbfb1..3d855c3022 100644 --- a/src/oci/tenant_manager_control_plane/models/domain_summary.py +++ b/src/oci/tenant_manager_control_plane/models/domain_summary.py @@ -251,7 +251,7 @@ def txt_record(self, txt_record): def time_created(self): """ Gets the time_created of this DomainSummary. - Date-time when this domain was created. An RFC3339-formatted date and time string. + Date-time when this domain was created. An RFC 3339-formatted date and time string. :return: The time_created of this DomainSummary. @@ -263,7 +263,7 @@ def time_created(self): def time_created(self, time_created): """ Sets the time_created of this DomainSummary. - Date-time when this domain was created. An RFC3339-formatted date and time string. + Date-time when this domain was created. An RFC 3339-formatted date and time string. :param time_created: The time_created of this DomainSummary. @@ -275,7 +275,7 @@ def time_created(self, time_created): def time_updated(self): """ Gets the time_updated of this DomainSummary. - Date-time when this domain was last updated. An RFC3339-formatted date and time string. + Date-time when this domain was last updated. An RFC 3339-formatted date and time string. :return: The time_updated of this DomainSummary. @@ -287,7 +287,7 @@ def time_updated(self): def time_updated(self, time_updated): """ Sets the time_updated of this DomainSummary. - Date-time when this domain was last updated. An RFC3339-formatted date and time string. + Date-time when this domain was last updated. An RFC 3339-formatted date and time string. :param time_updated: The time_updated of this DomainSummary. diff --git a/src/oci/tenant_manager_control_plane/models/link.py b/src/oci/tenant_manager_control_plane/models/link.py index b637816109..b9a30c17d9 100644 --- a/src/oci/tenant_manager_control_plane/models/link.py +++ b/src/oci/tenant_manager_control_plane/models/link.py @@ -153,7 +153,7 @@ def parent_tenancy_id(self, parent_tenancy_id): def child_tenancy_id(self): """ **[Required]** Gets the child_tenancy_id of this Link. - OCID of the child tenancy + OCID of the child tenancy. :return: The child_tenancy_id of this Link. @@ -165,7 +165,7 @@ def child_tenancy_id(self): def child_tenancy_id(self, child_tenancy_id): """ Sets the child_tenancy_id of this Link. - OCID of the child tenancy + OCID of the child tenancy. :param child_tenancy_id: The child_tenancy_id of this Link. diff --git a/src/oci/tenant_manager_control_plane/models/order.py b/src/oci/tenant_manager_control_plane/models/order.py index a528af6f67..8fb3a3a852 100644 --- a/src/oci/tenant_manager_control_plane/models/order.py +++ b/src/oci/tenant_manager_control_plane/models/order.py @@ -10,7 +10,7 @@ @init_model_state_from_kwargs class Order(object): """ - Order Details for Console plugin display + Order details. """ def __init__(self, **kwargs): @@ -65,7 +65,7 @@ def __init__(self, **kwargs): def order_number(self): """ **[Required]** Gets the order_number of this Order. - Immutable and unique order number holding customer subscription information + Immutable and unique order number holding customer subscription information. :return: The order_number of this Order. @@ -77,7 +77,7 @@ def order_number(self): def order_number(self, order_number): """ Sets the order_number of this Order. - Immutable and unique order number holding customer subscription information + Immutable and unique order number holding customer subscription information. :param order_number: The order_number of this Order. @@ -113,7 +113,7 @@ def data_center_region(self, data_center_region): def admin_email(self): """ **[Required]** Gets the admin_email of this Order. - Admin e-mail owning subscription. + Administrator email owning the subscription. :return: The admin_email of this Order. @@ -125,7 +125,7 @@ def admin_email(self): def admin_email(self, admin_email): """ Sets the admin_email of this Order. - Admin e-mail owning subscription. + Administrator email owning the subscription. :param admin_email: The admin_email of this Order. @@ -137,7 +137,7 @@ def admin_email(self, admin_email): def order_state(self): """ **[Required]** Gets the order_state of this Order. - State of order. + State of the order. :return: The order_state of this Order. @@ -149,7 +149,7 @@ def order_state(self): def order_state(self, order_state): """ Sets the order_state of this Order. - State of order. + State of the order. :param order_state: The order_state of this Order. diff --git a/src/oci/tenant_manager_control_plane/models/organization.py b/src/oci/tenant_manager_control_plane/models/organization.py new file mode 100644 index 0000000000..e63ccfc51d --- /dev/null +++ b/src/oci/tenant_manager_control_plane/models/organization.py @@ -0,0 +1,319 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 Organization(object): + """ + An organization entity. + """ + + #: A constant which can be used with the lifecycle_state property of a Organization. + #: This constant has a value of "CREATING" + LIFECYCLE_STATE_CREATING = "CREATING" + + #: A constant which can be used with the lifecycle_state property of a Organization. + #: This constant has a value of "ACTIVE" + LIFECYCLE_STATE_ACTIVE = "ACTIVE" + + #: A constant which can be used with the lifecycle_state property of a Organization. + #: This constant has a value of "UPDATING" + LIFECYCLE_STATE_UPDATING = "UPDATING" + + #: A constant which can be used with the lifecycle_state property of a Organization. + #: This constant has a value of "DELETING" + LIFECYCLE_STATE_DELETING = "DELETING" + + #: A constant which can be used with the lifecycle_state property of a Organization. + #: This constant has a value of "DELETED" + LIFECYCLE_STATE_DELETED = "DELETED" + + #: A constant which can be used with the lifecycle_state property of a Organization. + #: This constant has a value of "FAILED" + LIFECYCLE_STATE_FAILED = "FAILED" + + def __init__(self, **kwargs): + """ + Initializes a new Organization 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 Organization. + :type id: str + + :param display_name: + The value to assign to the display_name property of this Organization. + :type display_name: str + + :param compartment_id: + The value to assign to the compartment_id property of this Organization. + :type compartment_id: str + + :param parent_name: + The value to assign to the parent_name property of this Organization. + :type parent_name: str + + :param default_ucm_subscription_id: + The value to assign to the default_ucm_subscription_id property of this Organization. + :type default_ucm_subscription_id: str + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this Organization. + Allowed values for this property are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type lifecycle_state: str + + :param time_created: + The value to assign to the time_created property of this Organization. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this Organization. + :type time_updated: datetime + + """ + self.swagger_types = { + 'id': 'str', + 'display_name': 'str', + 'compartment_id': 'str', + 'parent_name': 'str', + 'default_ucm_subscription_id': 'str', + 'lifecycle_state': 'str', + 'time_created': 'datetime', + 'time_updated': 'datetime' + } + + self.attribute_map = { + 'id': 'id', + 'display_name': 'displayName', + 'compartment_id': 'compartmentId', + 'parent_name': 'parentName', + 'default_ucm_subscription_id': 'defaultUcmSubscriptionId', + 'lifecycle_state': 'lifecycleState', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated' + } + + self._id = None + self._display_name = None + self._compartment_id = None + self._parent_name = None + self._default_ucm_subscription_id = None + self._lifecycle_state = None + self._time_created = None + self._time_updated = None + + @property + def id(self): + """ + **[Required]** Gets the id of this Organization. + OCID of the organization. + + + :return: The id of this Organization. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this Organization. + OCID of the organization. + + + :param id: The id of this Organization. + :type: str + """ + self._id = id + + @property + def display_name(self): + """ + Gets the display_name of this Organization. + A display name for the organization. Avoid entering confidential information. + + + :return: The display_name of this Organization. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this Organization. + A display name for the organization. Avoid entering confidential information. + + + :param display_name: The display_name of this Organization. + :type: str + """ + self._display_name = display_name + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this Organization. + OCID of the compartment containing the organization. Always a tenancy OCID. + + + :return: The compartment_id of this Organization. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this Organization. + OCID of the compartment containing the organization. Always a tenancy OCID. + + + :param compartment_id: The compartment_id of this Organization. + :type: str + """ + self._compartment_id = compartment_id + + @property + def parent_name(self): + """ + Gets the parent_name of this Organization. + The name of the tenancy that is the organization parent. + + + :return: The parent_name of this Organization. + :rtype: str + """ + return self._parent_name + + @parent_name.setter + def parent_name(self, parent_name): + """ + Sets the parent_name of this Organization. + The name of the tenancy that is the organization parent. + + + :param parent_name: The parent_name of this Organization. + :type: str + """ + self._parent_name = parent_name + + @property + def default_ucm_subscription_id(self): + """ + **[Required]** Gets the default_ucm_subscription_id of this Organization. + OCID of the default Annual Universal Credits subscription. Any tenancy joining the organization will automatically get assigned this subscription if a subscription is not explictly assigned. + + + :return: The default_ucm_subscription_id of this Organization. + :rtype: str + """ + return self._default_ucm_subscription_id + + @default_ucm_subscription_id.setter + def default_ucm_subscription_id(self, default_ucm_subscription_id): + """ + Sets the default_ucm_subscription_id of this Organization. + OCID of the default Annual Universal Credits subscription. Any tenancy joining the organization will automatically get assigned this subscription if a subscription is not explictly assigned. + + + :param default_ucm_subscription_id: The default_ucm_subscription_id of this Organization. + :type: str + """ + self._default_ucm_subscription_id = default_ucm_subscription_id + + @property + def lifecycle_state(self): + """ + **[Required]** Gets the lifecycle_state of this Organization. + Lifecycle state of the organization. + + Allowed values for this property are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The lifecycle_state of this Organization. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this Organization. + Lifecycle state of the organization. + + + :param lifecycle_state: The lifecycle_state of this Organization. + :type: str + """ + allowed_values = ["CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED"] + 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 Organization. + Date-time when this organization was created. + + + :return: The time_created of this Organization. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this Organization. + Date-time when this organization was created. + + + :param time_created: The time_created of this Organization. + :type: datetime + """ + self._time_created = time_created + + @property + def time_updated(self): + """ + Gets the time_updated of this Organization. + Date-time when this organization was last updated. + + + :return: The time_updated of this Organization. + :rtype: datetime + """ + return self._time_updated + + @time_updated.setter + def time_updated(self, time_updated): + """ + Sets the time_updated of this Organization. + Date-time when this organization was last updated. + + + :param time_updated: The time_updated of this Organization. + :type: datetime + """ + self._time_updated = time_updated + + 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/tenant_manager_control_plane/models/organization_collection.py b/src/oci/tenant_manager_control_plane/models/organization_collection.py new file mode 100644 index 0000000000..beda756ecf --- /dev/null +++ b/src/oci/tenant_manager_control_plane/models/organization_collection.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 OrganizationCollection(object): + """ + Result of a query request for a list of organizations. Contains OrganizationSummary items. + """ + + def __init__(self, **kwargs): + """ + Initializes a new OrganizationCollection object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param items: + The value to assign to the items property of this OrganizationCollection. + :type items: list[oci.tenant_manager_control_plane.models.OrganizationSummary] + + """ + self.swagger_types = { + 'items': 'list[OrganizationSummary]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this OrganizationCollection. + Array containing OrganizationSummary items. + + + :return: The items of this OrganizationCollection. + :rtype: list[oci.tenant_manager_control_plane.models.OrganizationSummary] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this OrganizationCollection. + Array containing OrganizationSummary items. + + + :param items: The items of this OrganizationCollection. + :type: list[oci.tenant_manager_control_plane.models.OrganizationSummary] + """ + self._items = items + + 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/tenant_manager_control_plane/models/organization_summary.py b/src/oci/tenant_manager_control_plane/models/organization_summary.py new file mode 100644 index 0000000000..44e5a9d9bb --- /dev/null +++ b/src/oci/tenant_manager_control_plane/models/organization_summary.py @@ -0,0 +1,287 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 OrganizationSummary(object): + """ + An organization entity. + """ + + def __init__(self, **kwargs): + """ + Initializes a new OrganizationSummary 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 OrganizationSummary. + :type id: str + + :param display_name: + The value to assign to the display_name property of this OrganizationSummary. + :type display_name: str + + :param compartment_id: + The value to assign to the compartment_id property of this OrganizationSummary. + :type compartment_id: str + + :param parent_name: + The value to assign to the parent_name property of this OrganizationSummary. + :type parent_name: str + + :param default_ucm_subscription_id: + The value to assign to the default_ucm_subscription_id property of this OrganizationSummary. + :type default_ucm_subscription_id: str + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this OrganizationSummary. + :type lifecycle_state: str + + :param time_created: + The value to assign to the time_created property of this OrganizationSummary. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this OrganizationSummary. + :type time_updated: datetime + + """ + self.swagger_types = { + 'id': 'str', + 'display_name': 'str', + 'compartment_id': 'str', + 'parent_name': 'str', + 'default_ucm_subscription_id': 'str', + 'lifecycle_state': 'str', + 'time_created': 'datetime', + 'time_updated': 'datetime' + } + + self.attribute_map = { + 'id': 'id', + 'display_name': 'displayName', + 'compartment_id': 'compartmentId', + 'parent_name': 'parentName', + 'default_ucm_subscription_id': 'defaultUcmSubscriptionId', + 'lifecycle_state': 'lifecycleState', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated' + } + + self._id = None + self._display_name = None + self._compartment_id = None + self._parent_name = None + self._default_ucm_subscription_id = None + self._lifecycle_state = None + self._time_created = None + self._time_updated = None + + @property + def id(self): + """ + **[Required]** Gets the id of this OrganizationSummary. + OCID of the organization. + + + :return: The id of this OrganizationSummary. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this OrganizationSummary. + OCID of the organization. + + + :param id: The id of this OrganizationSummary. + :type: str + """ + self._id = id + + @property + def display_name(self): + """ + Gets the display_name of this OrganizationSummary. + A display name for the organization. + + + :return: The display_name of this OrganizationSummary. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this OrganizationSummary. + A display name for the organization. + + + :param display_name: The display_name of this OrganizationSummary. + :type: str + """ + self._display_name = display_name + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this OrganizationSummary. + OCID of the compartment containing the organization. Always a tenancy OCID. + + + :return: The compartment_id of this OrganizationSummary. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this OrganizationSummary. + OCID of the compartment containing the organization. Always a tenancy OCID. + + + :param compartment_id: The compartment_id of this OrganizationSummary. + :type: str + """ + self._compartment_id = compartment_id + + @property + def parent_name(self): + """ + Gets the parent_name of this OrganizationSummary. + The name of the tenancy that is the organization parent. + + + :return: The parent_name of this OrganizationSummary. + :rtype: str + """ + return self._parent_name + + @parent_name.setter + def parent_name(self, parent_name): + """ + Sets the parent_name of this OrganizationSummary. + The name of the tenancy that is the organization parent. + + + :param parent_name: The parent_name of this OrganizationSummary. + :type: str + """ + self._parent_name = parent_name + + @property + def default_ucm_subscription_id(self): + """ + **[Required]** Gets the default_ucm_subscription_id of this OrganizationSummary. + OCID of the default Annual Universal Credits subscription. Any tenancy joining the organization will automatically get assigned this subscription, if a subscription is not explictly assigned. + + + :return: The default_ucm_subscription_id of this OrganizationSummary. + :rtype: str + """ + return self._default_ucm_subscription_id + + @default_ucm_subscription_id.setter + def default_ucm_subscription_id(self, default_ucm_subscription_id): + """ + Sets the default_ucm_subscription_id of this OrganizationSummary. + OCID of the default Annual Universal Credits subscription. Any tenancy joining the organization will automatically get assigned this subscription, if a subscription is not explictly assigned. + + + :param default_ucm_subscription_id: The default_ucm_subscription_id of this OrganizationSummary. + :type: str + """ + self._default_ucm_subscription_id = default_ucm_subscription_id + + @property + def lifecycle_state(self): + """ + **[Required]** Gets the lifecycle_state of this OrganizationSummary. + Lifecycle state of the organization. + + + :return: The lifecycle_state of this OrganizationSummary. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this OrganizationSummary. + Lifecycle state of the organization. + + + :param lifecycle_state: The lifecycle_state of this OrganizationSummary. + :type: str + """ + self._lifecycle_state = lifecycle_state + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this OrganizationSummary. + Date-time when this organization was created. + + + :return: The time_created of this OrganizationSummary. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this OrganizationSummary. + Date-time when this organization was created. + + + :param time_created: The time_created of this OrganizationSummary. + :type: datetime + """ + self._time_created = time_created + + @property + def time_updated(self): + """ + Gets the time_updated of this OrganizationSummary. + Date-time when this organization was last updated. + + + :return: The time_updated of this OrganizationSummary. + :rtype: datetime + """ + return self._time_updated + + @time_updated.setter + def time_updated(self, time_updated): + """ + Sets the time_updated of this OrganizationSummary. + Date-time when this organization was last updated. + + + :param time_updated: The time_updated of this OrganizationSummary. + :type: datetime + """ + self._time_updated = time_updated + + 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/tenant_manager_control_plane/models/organization_tenancy.py b/src/oci/tenant_manager_control_plane/models/organization_tenancy.py new file mode 100644 index 0000000000..d2efc2176a --- /dev/null +++ b/src/oci/tenant_manager_control_plane/models/organization_tenancy.py @@ -0,0 +1,308 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 OrganizationTenancy(object): + """ + The information about the OrganizationTenancy. + """ + + #: A constant which can be used with the lifecycle_state property of a OrganizationTenancy. + #: This constant has a value of "CREATING" + LIFECYCLE_STATE_CREATING = "CREATING" + + #: A constant which can be used with the lifecycle_state property of a OrganizationTenancy. + #: This constant has a value of "ACTIVE" + LIFECYCLE_STATE_ACTIVE = "ACTIVE" + + #: A constant which can be used with the lifecycle_state property of a OrganizationTenancy. + #: This constant has a value of "INACTIVE" + LIFECYCLE_STATE_INACTIVE = "INACTIVE" + + #: A constant which can be used with the lifecycle_state property of a OrganizationTenancy. + #: This constant has a value of "DELETED" + LIFECYCLE_STATE_DELETED = "DELETED" + + #: A constant which can be used with the lifecycle_state property of a OrganizationTenancy. + #: This constant has a value of "FAILED" + LIFECYCLE_STATE_FAILED = "FAILED" + + #: A constant which can be used with the lifecycle_state property of a OrganizationTenancy. + #: This constant has a value of "DELETING" + LIFECYCLE_STATE_DELETING = "DELETING" + + #: A constant which can be used with the role property of a OrganizationTenancy. + #: This constant has a value of "PARENT" + ROLE_PARENT = "PARENT" + + #: A constant which can be used with the role property of a OrganizationTenancy. + #: This constant has a value of "CHILD" + ROLE_CHILD = "CHILD" + + #: A constant which can be used with the role property of a OrganizationTenancy. + #: This constant has a value of "NONE" + ROLE_NONE = "NONE" + + def __init__(self, **kwargs): + """ + Initializes a new OrganizationTenancy object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param tenancy_id: + The value to assign to the tenancy_id property of this OrganizationTenancy. + :type tenancy_id: str + + :param name: + The value to assign to the name property of this OrganizationTenancy. + :type name: str + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this OrganizationTenancy. + Allowed values for this property are: "CREATING", "ACTIVE", "INACTIVE", "DELETED", "FAILED", "DELETING", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type lifecycle_state: str + + :param role: + The value to assign to the role property of this OrganizationTenancy. + Allowed values for this property are: "PARENT", "CHILD", "NONE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type role: str + + :param time_joined: + The value to assign to the time_joined property of this OrganizationTenancy. + :type time_joined: datetime + + :param time_left: + The value to assign to the time_left property of this OrganizationTenancy. + :type time_left: datetime + + :param is_approved_for_transfer: + The value to assign to the is_approved_for_transfer property of this OrganizationTenancy. + :type is_approved_for_transfer: bool + + """ + self.swagger_types = { + 'tenancy_id': 'str', + 'name': 'str', + 'lifecycle_state': 'str', + 'role': 'str', + 'time_joined': 'datetime', + 'time_left': 'datetime', + 'is_approved_for_transfer': 'bool' + } + + self.attribute_map = { + 'tenancy_id': 'tenancyId', + 'name': 'name', + 'lifecycle_state': 'lifecycleState', + 'role': 'role', + 'time_joined': 'timeJoined', + 'time_left': 'timeLeft', + 'is_approved_for_transfer': 'isApprovedForTransfer' + } + + self._tenancy_id = None + self._name = None + self._lifecycle_state = None + self._role = None + self._time_joined = None + self._time_left = None + self._is_approved_for_transfer = None + + @property + def tenancy_id(self): + """ + **[Required]** Gets the tenancy_id of this OrganizationTenancy. + OCID of the tenancy. + + + :return: The tenancy_id of this OrganizationTenancy. + :rtype: str + """ + return self._tenancy_id + + @tenancy_id.setter + def tenancy_id(self, tenancy_id): + """ + Sets the tenancy_id of this OrganizationTenancy. + OCID of the tenancy. + + + :param tenancy_id: The tenancy_id of this OrganizationTenancy. + :type: str + """ + self._tenancy_id = tenancy_id + + @property + def name(self): + """ + Gets the name of this OrganizationTenancy. + Name of the tenancy. + + + :return: The name of this OrganizationTenancy. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """ + Sets the name of this OrganizationTenancy. + Name of the tenancy. + + + :param name: The name of this OrganizationTenancy. + :type: str + """ + self._name = name + + @property + def lifecycle_state(self): + """ + Gets the lifecycle_state of this OrganizationTenancy. + Lifecycle state of the OrganizationTenancy. + + Allowed values for this property are: "CREATING", "ACTIVE", "INACTIVE", "DELETED", "FAILED", "DELETING", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The lifecycle_state of this OrganizationTenancy. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this OrganizationTenancy. + Lifecycle state of the OrganizationTenancy. + + + :param lifecycle_state: The lifecycle_state of this OrganizationTenancy. + :type: str + """ + allowed_values = ["CREATING", "ACTIVE", "INACTIVE", "DELETED", "FAILED", "DELETING"] + if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values): + lifecycle_state = 'UNKNOWN_ENUM_VALUE' + self._lifecycle_state = lifecycle_state + + @property + def role(self): + """ + Gets the role of this OrganizationTenancy. + Role of the OrganizationTenancy. + + Allowed values for this property are: "PARENT", "CHILD", "NONE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The role of this OrganizationTenancy. + :rtype: str + """ + return self._role + + @role.setter + def role(self, role): + """ + Sets the role of this OrganizationTenancy. + Role of the OrganizationTenancy. + + + :param role: The role of this OrganizationTenancy. + :type: str + """ + allowed_values = ["PARENT", "CHILD", "NONE"] + if not value_allowed_none_or_none_sentinel(role, allowed_values): + role = 'UNKNOWN_ENUM_VALUE' + self._role = role + + @property + def time_joined(self): + """ + Gets the time_joined of this OrganizationTenancy. + Date-time when this tenancy joined the organization. + + + :return: The time_joined of this OrganizationTenancy. + :rtype: datetime + """ + return self._time_joined + + @time_joined.setter + def time_joined(self, time_joined): + """ + Sets the time_joined of this OrganizationTenancy. + Date-time when this tenancy joined the organization. + + + :param time_joined: The time_joined of this OrganizationTenancy. + :type: datetime + """ + self._time_joined = time_joined + + @property + def time_left(self): + """ + Gets the time_left of this OrganizationTenancy. + Date-time when this tenancy left the organization. + + + :return: The time_left of this OrganizationTenancy. + :rtype: datetime + """ + return self._time_left + + @time_left.setter + def time_left(self, time_left): + """ + Sets the time_left of this OrganizationTenancy. + Date-time when this tenancy left the organization. + + + :param time_left: The time_left of this OrganizationTenancy. + :type: datetime + """ + self._time_left = time_left + + @property + def is_approved_for_transfer(self): + """ + Gets the is_approved_for_transfer of this OrganizationTenancy. + Flag to indicate the tenancy is approved for transfer to another organization. + + + :return: The is_approved_for_transfer of this OrganizationTenancy. + :rtype: bool + """ + return self._is_approved_for_transfer + + @is_approved_for_transfer.setter + def is_approved_for_transfer(self, is_approved_for_transfer): + """ + Sets the is_approved_for_transfer of this OrganizationTenancy. + Flag to indicate the tenancy is approved for transfer to another organization. + + + :param is_approved_for_transfer: The is_approved_for_transfer of this OrganizationTenancy. + :type: bool + """ + self._is_approved_for_transfer = is_approved_for_transfer + + 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/tenant_manager_control_plane/models/organization_tenancy_collection.py b/src/oci/tenant_manager_control_plane/models/organization_tenancy_collection.py new file mode 100644 index 0000000000..2652684e8f --- /dev/null +++ b/src/oci/tenant_manager_control_plane/models/organization_tenancy_collection.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 OrganizationTenancyCollection(object): + """ + Result of a query request for a list of organization tenancies. Contains OrganizationTenancySummary items. + """ + + def __init__(self, **kwargs): + """ + Initializes a new OrganizationTenancyCollection object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param items: + The value to assign to the items property of this OrganizationTenancyCollection. + :type items: list[oci.tenant_manager_control_plane.models.OrganizationTenancySummary] + + """ + self.swagger_types = { + 'items': 'list[OrganizationTenancySummary]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this OrganizationTenancyCollection. + Array containing OrganizationTenancySummary items. + + + :return: The items of this OrganizationTenancyCollection. + :rtype: list[oci.tenant_manager_control_plane.models.OrganizationTenancySummary] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this OrganizationTenancyCollection. + Array containing OrganizationTenancySummary items. + + + :param items: The items of this OrganizationTenancyCollection. + :type: list[oci.tenant_manager_control_plane.models.OrganizationTenancySummary] + """ + self._items = items + + 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/tenant_manager_control_plane/models/organization_tenancy_summary.py b/src/oci/tenant_manager_control_plane/models/organization_tenancy_summary.py new file mode 100644 index 0000000000..d68737990c --- /dev/null +++ b/src/oci/tenant_manager_control_plane/models/organization_tenancy_summary.py @@ -0,0 +1,308 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 OrganizationTenancySummary(object): + """ + An organization tenancy summary entity. + """ + + #: A constant which can be used with the lifecycle_state property of a OrganizationTenancySummary. + #: This constant has a value of "CREATING" + LIFECYCLE_STATE_CREATING = "CREATING" + + #: A constant which can be used with the lifecycle_state property of a OrganizationTenancySummary. + #: This constant has a value of "ACTIVE" + LIFECYCLE_STATE_ACTIVE = "ACTIVE" + + #: A constant which can be used with the lifecycle_state property of a OrganizationTenancySummary. + #: This constant has a value of "INACTIVE" + LIFECYCLE_STATE_INACTIVE = "INACTIVE" + + #: A constant which can be used with the lifecycle_state property of a OrganizationTenancySummary. + #: This constant has a value of "DELETED" + LIFECYCLE_STATE_DELETED = "DELETED" + + #: A constant which can be used with the lifecycle_state property of a OrganizationTenancySummary. + #: This constant has a value of "FAILED" + LIFECYCLE_STATE_FAILED = "FAILED" + + #: A constant which can be used with the lifecycle_state property of a OrganizationTenancySummary. + #: This constant has a value of "DELETING" + LIFECYCLE_STATE_DELETING = "DELETING" + + #: A constant which can be used with the role property of a OrganizationTenancySummary. + #: This constant has a value of "PARENT" + ROLE_PARENT = "PARENT" + + #: A constant which can be used with the role property of a OrganizationTenancySummary. + #: This constant has a value of "CHILD" + ROLE_CHILD = "CHILD" + + #: A constant which can be used with the role property of a OrganizationTenancySummary. + #: This constant has a value of "NONE" + ROLE_NONE = "NONE" + + def __init__(self, **kwargs): + """ + Initializes a new OrganizationTenancySummary object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param tenancy_id: + The value to assign to the tenancy_id property of this OrganizationTenancySummary. + :type tenancy_id: str + + :param name: + The value to assign to the name property of this OrganizationTenancySummary. + :type name: str + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this OrganizationTenancySummary. + Allowed values for this property are: "CREATING", "ACTIVE", "INACTIVE", "DELETED", "FAILED", "DELETING", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type lifecycle_state: str + + :param role: + The value to assign to the role property of this OrganizationTenancySummary. + Allowed values for this property are: "PARENT", "CHILD", "NONE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type role: str + + :param time_joined: + The value to assign to the time_joined property of this OrganizationTenancySummary. + :type time_joined: datetime + + :param time_left: + The value to assign to the time_left property of this OrganizationTenancySummary. + :type time_left: datetime + + :param is_approved_for_transfer: + The value to assign to the is_approved_for_transfer property of this OrganizationTenancySummary. + :type is_approved_for_transfer: bool + + """ + self.swagger_types = { + 'tenancy_id': 'str', + 'name': 'str', + 'lifecycle_state': 'str', + 'role': 'str', + 'time_joined': 'datetime', + 'time_left': 'datetime', + 'is_approved_for_transfer': 'bool' + } + + self.attribute_map = { + 'tenancy_id': 'tenancyId', + 'name': 'name', + 'lifecycle_state': 'lifecycleState', + 'role': 'role', + 'time_joined': 'timeJoined', + 'time_left': 'timeLeft', + 'is_approved_for_transfer': 'isApprovedForTransfer' + } + + self._tenancy_id = None + self._name = None + self._lifecycle_state = None + self._role = None + self._time_joined = None + self._time_left = None + self._is_approved_for_transfer = None + + @property + def tenancy_id(self): + """ + **[Required]** Gets the tenancy_id of this OrganizationTenancySummary. + OCID of the tenancy. + + + :return: The tenancy_id of this OrganizationTenancySummary. + :rtype: str + """ + return self._tenancy_id + + @tenancy_id.setter + def tenancy_id(self, tenancy_id): + """ + Sets the tenancy_id of this OrganizationTenancySummary. + OCID of the tenancy. + + + :param tenancy_id: The tenancy_id of this OrganizationTenancySummary. + :type: str + """ + self._tenancy_id = tenancy_id + + @property + def name(self): + """ + Gets the name of this OrganizationTenancySummary. + Name of the tenancy. + + + :return: The name of this OrganizationTenancySummary. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """ + Sets the name of this OrganizationTenancySummary. + Name of the tenancy. + + + :param name: The name of this OrganizationTenancySummary. + :type: str + """ + self._name = name + + @property + def lifecycle_state(self): + """ + Gets the lifecycle_state of this OrganizationTenancySummary. + Lifecycle state of the OrganizationTenancy. + + Allowed values for this property are: "CREATING", "ACTIVE", "INACTIVE", "DELETED", "FAILED", "DELETING", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The lifecycle_state of this OrganizationTenancySummary. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this OrganizationTenancySummary. + Lifecycle state of the OrganizationTenancy. + + + :param lifecycle_state: The lifecycle_state of this OrganizationTenancySummary. + :type: str + """ + allowed_values = ["CREATING", "ACTIVE", "INACTIVE", "DELETED", "FAILED", "DELETING"] + if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values): + lifecycle_state = 'UNKNOWN_ENUM_VALUE' + self._lifecycle_state = lifecycle_state + + @property + def role(self): + """ + Gets the role of this OrganizationTenancySummary. + Role of the OrganizationTenancy. + + Allowed values for this property are: "PARENT", "CHILD", "NONE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The role of this OrganizationTenancySummary. + :rtype: str + """ + return self._role + + @role.setter + def role(self, role): + """ + Sets the role of this OrganizationTenancySummary. + Role of the OrganizationTenancy. + + + :param role: The role of this OrganizationTenancySummary. + :type: str + """ + allowed_values = ["PARENT", "CHILD", "NONE"] + if not value_allowed_none_or_none_sentinel(role, allowed_values): + role = 'UNKNOWN_ENUM_VALUE' + self._role = role + + @property + def time_joined(self): + """ + Gets the time_joined of this OrganizationTenancySummary. + Date-time when this tenancy joined the organization. + + + :return: The time_joined of this OrganizationTenancySummary. + :rtype: datetime + """ + return self._time_joined + + @time_joined.setter + def time_joined(self, time_joined): + """ + Sets the time_joined of this OrganizationTenancySummary. + Date-time when this tenancy joined the organization. + + + :param time_joined: The time_joined of this OrganizationTenancySummary. + :type: datetime + """ + self._time_joined = time_joined + + @property + def time_left(self): + """ + Gets the time_left of this OrganizationTenancySummary. + Date-time when this tenancy left the organization. + + + :return: The time_left of this OrganizationTenancySummary. + :rtype: datetime + """ + return self._time_left + + @time_left.setter + def time_left(self, time_left): + """ + Sets the time_left of this OrganizationTenancySummary. + Date-time when this tenancy left the organization. + + + :param time_left: The time_left of this OrganizationTenancySummary. + :type: datetime + """ + self._time_left = time_left + + @property + def is_approved_for_transfer(self): + """ + Gets the is_approved_for_transfer of this OrganizationTenancySummary. + Flag to indicate the tenancy is approved for transfer to another organization. + + + :return: The is_approved_for_transfer of this OrganizationTenancySummary. + :rtype: bool + """ + return self._is_approved_for_transfer + + @is_approved_for_transfer.setter + def is_approved_for_transfer(self, is_approved_for_transfer): + """ + Sets the is_approved_for_transfer of this OrganizationTenancySummary. + Flag to indicate the tenancy is approved for transfer to another organization. + + + :param is_approved_for_transfer: The is_approved_for_transfer of this OrganizationTenancySummary. + :type: bool + """ + self._is_approved_for_transfer = is_approved_for_transfer + + 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/tenant_manager_control_plane/models/sku.py b/src/oci/tenant_manager_control_plane/models/sku.py index 2a1a2819b0..f3813940ac 100644 --- a/src/oci/tenant_manager_control_plane/models/sku.py +++ b/src/oci/tenant_manager_control_plane/models/sku.py @@ -10,7 +10,7 @@ @init_model_state_from_kwargs class Sku(object): """ - A single Subscription SKU + A single subscription SKU. """ def __init__(self, **kwargs): @@ -51,7 +51,7 @@ def __init__(self, **kwargs): def number(self): """ Gets the number of this Sku. - SKU number + SKU number. :return: The number of this Sku. @@ -63,7 +63,7 @@ def number(self): def number(self, number): """ Sets the number of this Sku. - SKU number + SKU number. :param number: The number of this Sku. @@ -75,7 +75,7 @@ def number(self, number): def name(self): """ Gets the name of this Sku. - SKU name + SKU name. :return: The name of this Sku. @@ -87,7 +87,7 @@ def name(self): def name(self, name): """ Sets the name of this Sku. - SKU name + SKU name. :param name: The name of this Sku. @@ -99,7 +99,7 @@ def name(self, name): def quantity(self): """ Gets the quantity of this Sku. - SKU quantity + SKU quantity. :return: The quantity of this Sku. @@ -111,7 +111,7 @@ def quantity(self): def quantity(self, quantity): """ Sets the quantity of this Sku. - SKU quantity + SKU quantity. :param quantity: The quantity of this Sku. diff --git a/src/oci/tenant_manager_control_plane/models/subscription.py b/src/oci/tenant_manager_control_plane/models/subscription.py new file mode 100644 index 0000000000..94ba7d4b68 --- /dev/null +++ b/src/oci/tenant_manager_control_plane/models/subscription.py @@ -0,0 +1,478 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 Subscription(object): + """ + Subscription information for compartmentId. Only root compartments are allowed. + """ + + #: A constant which can be used with the lifecycle_state property of a Subscription. + #: This constant has a value of "CREATING" + LIFECYCLE_STATE_CREATING = "CREATING" + + #: A constant which can be used with the lifecycle_state property of a Subscription. + #: This constant has a value of "ACTIVE" + LIFECYCLE_STATE_ACTIVE = "ACTIVE" + + #: A constant which can be used with the lifecycle_state property of a Subscription. + #: This constant has a value of "INACTIVE" + LIFECYCLE_STATE_INACTIVE = "INACTIVE" + + #: A constant which can be used with the lifecycle_state property of a Subscription. + #: This constant has a value of "UPDATING" + LIFECYCLE_STATE_UPDATING = "UPDATING" + + #: A constant which can be used with the lifecycle_state property of a Subscription. + #: This constant has a value of "DELETING" + LIFECYCLE_STATE_DELETING = "DELETING" + + #: A constant which can be used with the lifecycle_state property of a Subscription. + #: This constant has a value of "DELETED" + LIFECYCLE_STATE_DELETED = "DELETED" + + #: A constant which can be used with the lifecycle_state property of a Subscription. + #: This constant has a value of "FAILED" + LIFECYCLE_STATE_FAILED = "FAILED" + + def __init__(self, **kwargs): + """ + Initializes a new Subscription 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 Subscription. + :type id: str + + :param classic_subscription_id: + The value to assign to the classic_subscription_id property of this Subscription. + :type classic_subscription_id: str + + :param compartment_id: + The value to assign to the compartment_id property of this Subscription. + :type compartment_id: str + + :param service_name: + The value to assign to the service_name property of this Subscription. + :type service_name: str + + :param is_classic_subscription: + The value to assign to the is_classic_subscription property of this Subscription. + :type is_classic_subscription: bool + + :param payment_model: + The value to assign to the payment_model property of this Subscription. + :type payment_model: str + + :param region_assignment: + The value to assign to the region_assignment property of this Subscription. + :type region_assignment: str + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this Subscription. + Allowed values for this property are: "CREATING", "ACTIVE", "INACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type lifecycle_state: str + + :param skus: + The value to assign to the skus property of this Subscription. + :type skus: list[oci.tenant_manager_control_plane.models.SubscriptionSku] + + :param start_date: + The value to assign to the start_date property of this Subscription. + :type start_date: datetime + + :param end_date: + The value to assign to the end_date property of this Subscription. + :type end_date: datetime + + :param time_updated: + The value to assign to the time_updated property of this Subscription. + :type time_updated: datetime + + :param time_created: + The value to assign to the time_created property of this Subscription. + :type time_created: datetime + + """ + self.swagger_types = { + 'id': 'str', + 'classic_subscription_id': 'str', + 'compartment_id': 'str', + 'service_name': 'str', + 'is_classic_subscription': 'bool', + 'payment_model': 'str', + 'region_assignment': 'str', + 'lifecycle_state': 'str', + 'skus': 'list[SubscriptionSku]', + 'start_date': 'datetime', + 'end_date': 'datetime', + 'time_updated': 'datetime', + 'time_created': 'datetime' + } + + self.attribute_map = { + 'id': 'id', + 'classic_subscription_id': 'classicSubscriptionId', + 'compartment_id': 'compartmentId', + 'service_name': 'serviceName', + 'is_classic_subscription': 'isClassicSubscription', + 'payment_model': 'paymentModel', + 'region_assignment': 'regionAssignment', + 'lifecycle_state': 'lifecycleState', + 'skus': 'skus', + 'start_date': 'startDate', + 'end_date': 'endDate', + 'time_updated': 'timeUpdated', + 'time_created': 'timeCreated' + } + + self._id = None + self._classic_subscription_id = None + self._compartment_id = None + self._service_name = None + self._is_classic_subscription = None + self._payment_model = None + self._region_assignment = None + self._lifecycle_state = None + self._skus = None + self._start_date = None + self._end_date = None + self._time_updated = None + self._time_created = None + + @property + def id(self): + """ + **[Required]** Gets the id of this Subscription. + OCID of the subscription details for the particular root compartment or tenancy. + + + :return: The id of this Subscription. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this Subscription. + OCID of the subscription details for the particular root compartment or tenancy. + + + :param id: The id of this Subscription. + :type: str + """ + self._id = id + + @property + def classic_subscription_id(self): + """ + **[Required]** Gets the classic_subscription_id of this Subscription. + Classic subscription ID. + + + :return: The classic_subscription_id of this Subscription. + :rtype: str + """ + return self._classic_subscription_id + + @classic_subscription_id.setter + def classic_subscription_id(self, classic_subscription_id): + """ + Sets the classic_subscription_id of this Subscription. + Classic subscription ID. + + + :param classic_subscription_id: The classic_subscription_id of this Subscription. + :type: str + """ + self._classic_subscription_id = classic_subscription_id + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this Subscription. + OCID of the compartment. Always a tenancy OCID. + + + :return: The compartment_id of this Subscription. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this Subscription. + OCID of the compartment. Always a tenancy OCID. + + + :param compartment_id: The compartment_id of this Subscription. + :type: str + """ + self._compartment_id = compartment_id + + @property + def service_name(self): + """ + **[Required]** Gets the service_name of this Subscription. + The type of subscription, such as 'CLOUDCM', 'SAAS', 'ERP', or 'CRM'. + + + :return: The service_name of this Subscription. + :rtype: str + """ + return self._service_name + + @service_name.setter + def service_name(self, service_name): + """ + Sets the service_name of this Subscription. + The type of subscription, such as 'CLOUDCM', 'SAAS', 'ERP', or 'CRM'. + + + :param service_name: The service_name of this Subscription. + :type: str + """ + self._service_name = service_name + + @property + def is_classic_subscription(self): + """ + Gets the is_classic_subscription of this Subscription. + Denotes if the subscription is from classic systems or not. + + + :return: The is_classic_subscription of this Subscription. + :rtype: bool + """ + return self._is_classic_subscription + + @is_classic_subscription.setter + def is_classic_subscription(self, is_classic_subscription): + """ + Sets the is_classic_subscription of this Subscription. + Denotes if the subscription is from classic systems or not. + + + :param is_classic_subscription: The is_classic_subscription of this Subscription. + :type: bool + """ + self._is_classic_subscription = is_classic_subscription + + @property + def payment_model(self): + """ + Gets the payment_model of this Subscription. + The pay model of the subscription, such as 'Pay as you go' or 'Monthly'. + + + :return: The payment_model of this Subscription. + :rtype: str + """ + return self._payment_model + + @payment_model.setter + def payment_model(self, payment_model): + """ + Sets the payment_model of this Subscription. + The pay model of the subscription, such as 'Pay as you go' or 'Monthly'. + + + :param payment_model: The payment_model of this Subscription. + :type: str + """ + self._payment_model = payment_model + + @property + def region_assignment(self): + """ + Gets the region_assignment of this Subscription. + Region for the subscription. + + + :return: The region_assignment of this Subscription. + :rtype: str + """ + return self._region_assignment + + @region_assignment.setter + def region_assignment(self, region_assignment): + """ + Sets the region_assignment of this Subscription. + Region for the subscription. + + + :param region_assignment: The region_assignment of this Subscription. + :type: str + """ + self._region_assignment = region_assignment + + @property + def lifecycle_state(self): + """ + Gets the lifecycle_state of this Subscription. + Lifecycle state of the subscription. + + Allowed values for this property are: "CREATING", "ACTIVE", "INACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The lifecycle_state of this Subscription. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this Subscription. + Lifecycle state of the subscription. + + + :param lifecycle_state: The lifecycle_state of this Subscription. + :type: str + """ + allowed_values = ["CREATING", "ACTIVE", "INACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED"] + if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values): + lifecycle_state = 'UNKNOWN_ENUM_VALUE' + self._lifecycle_state = lifecycle_state + + @property + def skus(self): + """ + Gets the skus of this Subscription. + List of SKUs linked to this subscription. + + + :return: The skus of this Subscription. + :rtype: list[oci.tenant_manager_control_plane.models.SubscriptionSku] + """ + return self._skus + + @skus.setter + def skus(self, skus): + """ + Sets the skus of this Subscription. + List of SKUs linked to this subscription. + + + :param skus: The skus of this Subscription. + :type: list[oci.tenant_manager_control_plane.models.SubscriptionSku] + """ + self._skus = skus + + @property + def start_date(self): + """ + Gets the start_date of this Subscription. + Subscription start time. + + + :return: The start_date of this Subscription. + :rtype: datetime + """ + return self._start_date + + @start_date.setter + def start_date(self, start_date): + """ + Sets the start_date of this Subscription. + Subscription start time. + + + :param start_date: The start_date of this Subscription. + :type: datetime + """ + self._start_date = start_date + + @property + def end_date(self): + """ + Gets the end_date of this Subscription. + Subscription end time. + + + :return: The end_date of this Subscription. + :rtype: datetime + """ + return self._end_date + + @end_date.setter + def end_date(self, end_date): + """ + Sets the end_date of this Subscription. + Subscription end time. + + + :param end_date: The end_date of this Subscription. + :type: datetime + """ + self._end_date = end_date + + @property + def time_updated(self): + """ + Gets the time_updated of this Subscription. + Date-time when subscription is updated. + + + :return: The time_updated of this Subscription. + :rtype: datetime + """ + return self._time_updated + + @time_updated.setter + def time_updated(self, time_updated): + """ + Sets the time_updated of this Subscription. + Date-time when subscription is updated. + + + :param time_updated: The time_updated of this Subscription. + :type: datetime + """ + self._time_updated = time_updated + + @property + def time_created(self): + """ + Gets the time_created of this Subscription. + Date-time when subscription is created. + + + :return: The time_created of this Subscription. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this Subscription. + Date-time when subscription is created. + + + :param time_created: The time_created of this Subscription. + :type: datetime + """ + self._time_created = time_created + + 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/tenant_manager_control_plane/models/subscription_collection.py b/src/oci/tenant_manager_control_plane/models/subscription_collection.py new file mode 100644 index 0000000000..6fc4e3cb68 --- /dev/null +++ b/src/oci/tenant_manager_control_plane/models/subscription_collection.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 SubscriptionCollection(object): + """ + List of subscriptions. + """ + + def __init__(self, **kwargs): + """ + Initializes a new SubscriptionCollection object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param items: + The value to assign to the items property of this SubscriptionCollection. + :type items: list[oci.tenant_manager_control_plane.models.SubscriptionSummary] + + """ + self.swagger_types = { + 'items': 'list[SubscriptionSummary]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this SubscriptionCollection. + Array containing subscription items. + + + :return: The items of this SubscriptionCollection. + :rtype: list[oci.tenant_manager_control_plane.models.SubscriptionSummary] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this SubscriptionCollection. + Array containing subscription items. + + + :param items: The items of this SubscriptionCollection. + :type: list[oci.tenant_manager_control_plane.models.SubscriptionSummary] + """ + self._items = items + + 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/tenant_manager_control_plane/models/subscription_info.py b/src/oci/tenant_manager_control_plane/models/subscription_info.py index 994b6dd83b..b6c2c75af1 100644 --- a/src/oci/tenant_manager_control_plane/models/subscription_info.py +++ b/src/oci/tenant_manager_control_plane/models/subscription_info.py @@ -10,7 +10,7 @@ @init_model_state_from_kwargs class SubscriptionInfo(object): """ - A single subscription's details + A single subscription's details. """ def __init__(self, **kwargs): @@ -65,7 +65,7 @@ def __init__(self, **kwargs): def spm_subscription_id(self): """ **[Required]** Gets the spm_subscription_id of this SubscriptionInfo. - Subscription id. + Subscription ID. :return: The spm_subscription_id of this SubscriptionInfo. @@ -77,7 +77,7 @@ def spm_subscription_id(self): def spm_subscription_id(self, spm_subscription_id): """ Sets the spm_subscription_id of this SubscriptionInfo. - Subscription id. + Subscription ID. :param spm_subscription_id: The spm_subscription_id of this SubscriptionInfo. @@ -89,7 +89,7 @@ def spm_subscription_id(self, spm_subscription_id): def service(self): """ **[Required]** Gets the service of this SubscriptionInfo. - Service name for subscription + Service name for subscription. :return: The service of this SubscriptionInfo. @@ -101,7 +101,7 @@ def service(self): def service(self, service): """ Sets the service of this SubscriptionInfo. - Service name for subscription + Service name for subscription. :param service: The service of this SubscriptionInfo. @@ -113,7 +113,7 @@ def service(self, service): def start_date(self): """ **[Required]** Gets the start_date of this SubscriptionInfo. - Subscription start date. An RFC3339 formatted datetime string + Subscription start date. An RFC 3339-formatted date and time string. :return: The start_date of this SubscriptionInfo. @@ -125,7 +125,7 @@ def start_date(self): def start_date(self, start_date): """ Sets the start_date of this SubscriptionInfo. - Subscription start date. An RFC3339 formatted datetime string + Subscription start date. An RFC 3339-formatted date and time string. :param start_date: The start_date of this SubscriptionInfo. @@ -137,7 +137,7 @@ def start_date(self, start_date): def end_date(self): """ **[Required]** Gets the end_date of this SubscriptionInfo. - Subscription end date. An RFC3339 formatted datetime string + Subscription end date. An RFC 3339-formatted date and time string. :return: The end_date of this SubscriptionInfo. @@ -149,7 +149,7 @@ def end_date(self): def end_date(self, end_date): """ Sets the end_date of this SubscriptionInfo. - Subscription end date. An RFC3339 formatted datetime string + Subscription end date. An RFC 3339-formatted date and time string. :param end_date: The end_date of this SubscriptionInfo. @@ -161,7 +161,7 @@ def end_date(self, end_date): def skus(self): """ **[Required]** Gets the skus of this SubscriptionInfo. - List of SKUs the subscription contains + List of SKUs the subscription contains. :return: The skus of this SubscriptionInfo. @@ -173,7 +173,7 @@ def skus(self): def skus(self, skus): """ Sets the skus of this SubscriptionInfo. - List of SKUs the subscription contains + List of SKUs the subscription contains. :param skus: The skus of this SubscriptionInfo. diff --git a/src/oci/tenant_manager_control_plane/models/subscription_mapping.py b/src/oci/tenant_manager_control_plane/models/subscription_mapping.py new file mode 100644 index 0000000000..d0db53df76 --- /dev/null +++ b/src/oci/tenant_manager_control_plane/models/subscription_mapping.py @@ -0,0 +1,323 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 SubscriptionMapping(object): + """ + Subscription mapping information. + """ + + #: A constant which can be used with the lifecycle_state property of a SubscriptionMapping. + #: This constant has a value of "CREATING" + LIFECYCLE_STATE_CREATING = "CREATING" + + #: A constant which can be used with the lifecycle_state property of a SubscriptionMapping. + #: This constant has a value of "ACTIVE" + LIFECYCLE_STATE_ACTIVE = "ACTIVE" + + #: A constant which can be used with the lifecycle_state property of a SubscriptionMapping. + #: This constant has a value of "INACTIVE" + LIFECYCLE_STATE_INACTIVE = "INACTIVE" + + #: A constant which can be used with the lifecycle_state property of a SubscriptionMapping. + #: This constant has a value of "UPDATING" + LIFECYCLE_STATE_UPDATING = "UPDATING" + + #: A constant which can be used with the lifecycle_state property of a SubscriptionMapping. + #: This constant has a value of "DELETING" + LIFECYCLE_STATE_DELETING = "DELETING" + + #: A constant which can be used with the lifecycle_state property of a SubscriptionMapping. + #: This constant has a value of "DELETED" + LIFECYCLE_STATE_DELETED = "DELETED" + + #: A constant which can be used with the lifecycle_state property of a SubscriptionMapping. + #: This constant has a value of "FAILED" + LIFECYCLE_STATE_FAILED = "FAILED" + + def __init__(self, **kwargs): + """ + Initializes a new SubscriptionMapping 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 SubscriptionMapping. + :type id: str + + :param subscription_id: + The value to assign to the subscription_id property of this SubscriptionMapping. + :type subscription_id: str + + :param compartment_id: + The value to assign to the compartment_id property of this SubscriptionMapping. + :type compartment_id: str + + :param is_explicitly_assigned: + The value to assign to the is_explicitly_assigned property of this SubscriptionMapping. + :type is_explicitly_assigned: bool + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this SubscriptionMapping. + Allowed values for this property are: "CREATING", "ACTIVE", "INACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type lifecycle_state: str + + :param time_terminated: + The value to assign to the time_terminated property of this SubscriptionMapping. + :type time_terminated: datetime + + :param time_created: + The value to assign to the time_created property of this SubscriptionMapping. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this SubscriptionMapping. + :type time_updated: datetime + + """ + self.swagger_types = { + 'id': 'str', + 'subscription_id': 'str', + 'compartment_id': 'str', + 'is_explicitly_assigned': 'bool', + 'lifecycle_state': 'str', + 'time_terminated': 'datetime', + 'time_created': 'datetime', + 'time_updated': 'datetime' + } + + self.attribute_map = { + 'id': 'id', + 'subscription_id': 'subscriptionId', + 'compartment_id': 'compartmentId', + 'is_explicitly_assigned': 'isExplicitlyAssigned', + 'lifecycle_state': 'lifecycleState', + 'time_terminated': 'timeTerminated', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated' + } + + self._id = None + self._subscription_id = None + self._compartment_id = None + self._is_explicitly_assigned = None + self._lifecycle_state = None + self._time_terminated = None + self._time_created = None + self._time_updated = None + + @property + def id(self): + """ + **[Required]** Gets the id of this SubscriptionMapping. + OCID of the mapping between subscription and compartment identified by the tenancy. + + + :return: The id of this SubscriptionMapping. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this SubscriptionMapping. + OCID of the mapping between subscription and compartment identified by the tenancy. + + + :param id: The id of this SubscriptionMapping. + :type: str + """ + self._id = id + + @property + def subscription_id(self): + """ + **[Required]** Gets the subscription_id of this SubscriptionMapping. + OCID of the subscription. + + + :return: The subscription_id of this SubscriptionMapping. + :rtype: str + """ + return self._subscription_id + + @subscription_id.setter + def subscription_id(self, subscription_id): + """ + Sets the subscription_id of this SubscriptionMapping. + OCID of the subscription. + + + :param subscription_id: The subscription_id of this SubscriptionMapping. + :type: str + """ + self._subscription_id = subscription_id + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this SubscriptionMapping. + OCID of the compartment. Always a tenancy OCID. + + + :return: The compartment_id of this SubscriptionMapping. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this SubscriptionMapping. + OCID of the compartment. Always a tenancy OCID. + + + :param compartment_id: The compartment_id of this SubscriptionMapping. + :type: str + """ + self._compartment_id = compartment_id + + @property + def is_explicitly_assigned(self): + """ + **[Required]** Gets the is_explicitly_assigned of this SubscriptionMapping. + Denotes if the subscription is explicity assigned to the root compartment or tenancy. + + + :return: The is_explicitly_assigned of this SubscriptionMapping. + :rtype: bool + """ + return self._is_explicitly_assigned + + @is_explicitly_assigned.setter + def is_explicitly_assigned(self, is_explicitly_assigned): + """ + Sets the is_explicitly_assigned of this SubscriptionMapping. + Denotes if the subscription is explicity assigned to the root compartment or tenancy. + + + :param is_explicitly_assigned: The is_explicitly_assigned of this SubscriptionMapping. + :type: bool + """ + self._is_explicitly_assigned = is_explicitly_assigned + + @property + def lifecycle_state(self): + """ + **[Required]** Gets the lifecycle_state of this SubscriptionMapping. + Lifecycle state of the subscription mapping. + + Allowed values for this property are: "CREATING", "ACTIVE", "INACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The lifecycle_state of this SubscriptionMapping. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this SubscriptionMapping. + Lifecycle state of the subscription mapping. + + + :param lifecycle_state: The lifecycle_state of this SubscriptionMapping. + :type: str + """ + allowed_values = ["CREATING", "ACTIVE", "INACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED"] + 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_terminated(self): + """ + Gets the time_terminated of this SubscriptionMapping. + Date-time when subscription mapping was terminated. + + + :return: The time_terminated of this SubscriptionMapping. + :rtype: datetime + """ + return self._time_terminated + + @time_terminated.setter + def time_terminated(self, time_terminated): + """ + Sets the time_terminated of this SubscriptionMapping. + Date-time when subscription mapping was terminated. + + + :param time_terminated: The time_terminated of this SubscriptionMapping. + :type: datetime + """ + self._time_terminated = time_terminated + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this SubscriptionMapping. + Date-time when subscription mapping was created. + + + :return: The time_created of this SubscriptionMapping. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this SubscriptionMapping. + Date-time when subscription mapping was created. + + + :param time_created: The time_created of this SubscriptionMapping. + :type: datetime + """ + self._time_created = time_created + + @property + def time_updated(self): + """ + **[Required]** Gets the time_updated of this SubscriptionMapping. + Date-time when subscription mapping was updated. + + + :return: The time_updated of this SubscriptionMapping. + :rtype: datetime + """ + return self._time_updated + + @time_updated.setter + def time_updated(self, time_updated): + """ + Sets the time_updated of this SubscriptionMapping. + Date-time when subscription mapping was updated. + + + :param time_updated: The time_updated of this SubscriptionMapping. + :type: datetime + """ + self._time_updated = time_updated + + 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/tenant_manager_control_plane/models/subscription_mapping_collection.py b/src/oci/tenant_manager_control_plane/models/subscription_mapping_collection.py new file mode 100644 index 0000000000..a4097de428 --- /dev/null +++ b/src/oci/tenant_manager_control_plane/models/subscription_mapping_collection.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 SubscriptionMappingCollection(object): + """ + List of subscription mappings. + """ + + def __init__(self, **kwargs): + """ + Initializes a new SubscriptionMappingCollection object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param items: + The value to assign to the items property of this SubscriptionMappingCollection. + :type items: list[oci.tenant_manager_control_plane.models.SubscriptionMappingSummary] + + """ + self.swagger_types = { + 'items': 'list[SubscriptionMappingSummary]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this SubscriptionMappingCollection. + Array containing subscription mapping items. + + + :return: The items of this SubscriptionMappingCollection. + :rtype: list[oci.tenant_manager_control_plane.models.SubscriptionMappingSummary] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this SubscriptionMappingCollection. + Array containing subscription mapping items. + + + :param items: The items of this SubscriptionMappingCollection. + :type: list[oci.tenant_manager_control_plane.models.SubscriptionMappingSummary] + """ + self._items = items + + 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/tenant_manager_control_plane/models/subscription_mapping_summary.py b/src/oci/tenant_manager_control_plane/models/subscription_mapping_summary.py new file mode 100644 index 0000000000..cab3cd1a57 --- /dev/null +++ b/src/oci/tenant_manager_control_plane/models/subscription_mapping_summary.py @@ -0,0 +1,287 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 SubscriptionMappingSummary(object): + """ + Subscription mapping information. + """ + + def __init__(self, **kwargs): + """ + Initializes a new SubscriptionMappingSummary 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 SubscriptionMappingSummary. + :type id: str + + :param subscription_id: + The value to assign to the subscription_id property of this SubscriptionMappingSummary. + :type subscription_id: str + + :param compartment_id: + The value to assign to the compartment_id property of this SubscriptionMappingSummary. + :type compartment_id: str + + :param is_explicitly_assigned: + The value to assign to the is_explicitly_assigned property of this SubscriptionMappingSummary. + :type is_explicitly_assigned: bool + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this SubscriptionMappingSummary. + :type lifecycle_state: str + + :param time_terminated: + The value to assign to the time_terminated property of this SubscriptionMappingSummary. + :type time_terminated: datetime + + :param time_created: + The value to assign to the time_created property of this SubscriptionMappingSummary. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this SubscriptionMappingSummary. + :type time_updated: datetime + + """ + self.swagger_types = { + 'id': 'str', + 'subscription_id': 'str', + 'compartment_id': 'str', + 'is_explicitly_assigned': 'bool', + 'lifecycle_state': 'str', + 'time_terminated': 'datetime', + 'time_created': 'datetime', + 'time_updated': 'datetime' + } + + self.attribute_map = { + 'id': 'id', + 'subscription_id': 'subscriptionId', + 'compartment_id': 'compartmentId', + 'is_explicitly_assigned': 'isExplicitlyAssigned', + 'lifecycle_state': 'lifecycleState', + 'time_terminated': 'timeTerminated', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated' + } + + self._id = None + self._subscription_id = None + self._compartment_id = None + self._is_explicitly_assigned = None + self._lifecycle_state = None + self._time_terminated = None + self._time_created = None + self._time_updated = None + + @property + def id(self): + """ + **[Required]** Gets the id of this SubscriptionMappingSummary. + OCID of the mapping between subscription and compartment identified by the tenancy. + + + :return: The id of this SubscriptionMappingSummary. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this SubscriptionMappingSummary. + OCID of the mapping between subscription and compartment identified by the tenancy. + + + :param id: The id of this SubscriptionMappingSummary. + :type: str + """ + self._id = id + + @property + def subscription_id(self): + """ + **[Required]** Gets the subscription_id of this SubscriptionMappingSummary. + OCID of the subscription. + + + :return: The subscription_id of this SubscriptionMappingSummary. + :rtype: str + """ + return self._subscription_id + + @subscription_id.setter + def subscription_id(self, subscription_id): + """ + Sets the subscription_id of this SubscriptionMappingSummary. + OCID of the subscription. + + + :param subscription_id: The subscription_id of this SubscriptionMappingSummary. + :type: str + """ + self._subscription_id = subscription_id + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this SubscriptionMappingSummary. + OCID of the compartment. Always a tenancy OCID. + + + :return: The compartment_id of this SubscriptionMappingSummary. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this SubscriptionMappingSummary. + OCID of the compartment. Always a tenancy OCID. + + + :param compartment_id: The compartment_id of this SubscriptionMappingSummary. + :type: str + """ + self._compartment_id = compartment_id + + @property + def is_explicitly_assigned(self): + """ + **[Required]** Gets the is_explicitly_assigned of this SubscriptionMappingSummary. + Denotes if the subscription is explicity assigned to the root compartment or tenancy. + + + :return: The is_explicitly_assigned of this SubscriptionMappingSummary. + :rtype: bool + """ + return self._is_explicitly_assigned + + @is_explicitly_assigned.setter + def is_explicitly_assigned(self, is_explicitly_assigned): + """ + Sets the is_explicitly_assigned of this SubscriptionMappingSummary. + Denotes if the subscription is explicity assigned to the root compartment or tenancy. + + + :param is_explicitly_assigned: The is_explicitly_assigned of this SubscriptionMappingSummary. + :type: bool + """ + self._is_explicitly_assigned = is_explicitly_assigned + + @property + def lifecycle_state(self): + """ + **[Required]** Gets the lifecycle_state of this SubscriptionMappingSummary. + Lifecycle state of the subscription mapping. + + + :return: The lifecycle_state of this SubscriptionMappingSummary. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this SubscriptionMappingSummary. + Lifecycle state of the subscription mapping. + + + :param lifecycle_state: The lifecycle_state of this SubscriptionMappingSummary. + :type: str + """ + self._lifecycle_state = lifecycle_state + + @property + def time_terminated(self): + """ + Gets the time_terminated of this SubscriptionMappingSummary. + Date-time when subscription mapping was terminated. + + + :return: The time_terminated of this SubscriptionMappingSummary. + :rtype: datetime + """ + return self._time_terminated + + @time_terminated.setter + def time_terminated(self, time_terminated): + """ + Sets the time_terminated of this SubscriptionMappingSummary. + Date-time when subscription mapping was terminated. + + + :param time_terminated: The time_terminated of this SubscriptionMappingSummary. + :type: datetime + """ + self._time_terminated = time_terminated + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this SubscriptionMappingSummary. + Date-time when subscription mapping was created. + + + :return: The time_created of this SubscriptionMappingSummary. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this SubscriptionMappingSummary. + Date-time when subscription mapping was created. + + + :param time_created: The time_created of this SubscriptionMappingSummary. + :type: datetime + """ + self._time_created = time_created + + @property + def time_updated(self): + """ + **[Required]** Gets the time_updated of this SubscriptionMappingSummary. + Date-time when subscription mapping was updated. + + + :return: The time_updated of this SubscriptionMappingSummary. + :rtype: datetime + """ + return self._time_updated + + @time_updated.setter + def time_updated(self, time_updated): + """ + Sets the time_updated of this SubscriptionMappingSummary. + Date-time when subscription mapping was updated. + + + :param time_updated: The time_updated of this SubscriptionMappingSummary. + :type: datetime + """ + self._time_updated = time_updated + + 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/tenant_manager_control_plane/models/subscription_sku.py b/src/oci/tenant_manager_control_plane/models/subscription_sku.py new file mode 100644 index 0000000000..61c6982773 --- /dev/null +++ b/src/oci/tenant_manager_control_plane/models/subscription_sku.py @@ -0,0 +1,349 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 SubscriptionSku(object): + """ + SKU information. + """ + + def __init__(self, **kwargs): + """ + Initializes a new SubscriptionSku object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param sku: + The value to assign to the sku property of this SubscriptionSku. + :type sku: str + + :param quantity: + The value to assign to the quantity property of this SubscriptionSku. + :type quantity: int + + :param description: + The value to assign to the description property of this SubscriptionSku. + :type description: str + + :param gsi_order_line_id: + The value to assign to the gsi_order_line_id property of this SubscriptionSku. + :type gsi_order_line_id: str + + :param license_part_description: + The value to assign to the license_part_description property of this SubscriptionSku. + :type license_part_description: str + + :param metric_name: + The value to assign to the metric_name property of this SubscriptionSku. + :type metric_name: str + + :param is_base_service_component: + The value to assign to the is_base_service_component property of this SubscriptionSku. + :type is_base_service_component: bool + + :param is_additional_instance: + The value to assign to the is_additional_instance property of this SubscriptionSku. + :type is_additional_instance: bool + + :param start_date: + The value to assign to the start_date property of this SubscriptionSku. + :type start_date: datetime + + :param end_date: + The value to assign to the end_date property of this SubscriptionSku. + :type end_date: datetime + + """ + self.swagger_types = { + 'sku': 'str', + 'quantity': 'int', + 'description': 'str', + 'gsi_order_line_id': 'str', + 'license_part_description': 'str', + 'metric_name': 'str', + 'is_base_service_component': 'bool', + 'is_additional_instance': 'bool', + 'start_date': 'datetime', + 'end_date': 'datetime' + } + + self.attribute_map = { + 'sku': 'sku', + 'quantity': 'quantity', + 'description': 'description', + 'gsi_order_line_id': 'gsiOrderLineId', + 'license_part_description': 'licensePartDescription', + 'metric_name': 'metricName', + 'is_base_service_component': 'isBaseServiceComponent', + 'is_additional_instance': 'isAdditionalInstance', + 'start_date': 'startDate', + 'end_date': 'endDate' + } + + self._sku = None + self._quantity = None + self._description = None + self._gsi_order_line_id = None + self._license_part_description = None + self._metric_name = None + self._is_base_service_component = None + self._is_additional_instance = None + self._start_date = None + self._end_date = None + + @property + def sku(self): + """ + **[Required]** Gets the sku of this SubscriptionSku. + Stock keeping unit ID. + + + :return: The sku of this SubscriptionSku. + :rtype: str + """ + return self._sku + + @sku.setter + def sku(self, sku): + """ + Sets the sku of this SubscriptionSku. + Stock keeping unit ID. + + + :param sku: The sku of this SubscriptionSku. + :type: str + """ + self._sku = sku + + @property + def quantity(self): + """ + Gets the quantity of this SubscriptionSku. + Quantity of the stock units. + + + :return: The quantity of this SubscriptionSku. + :rtype: int + """ + return self._quantity + + @quantity.setter + def quantity(self, quantity): + """ + Sets the quantity of this SubscriptionSku. + Quantity of the stock units. + + + :param quantity: The quantity of this SubscriptionSku. + :type: int + """ + self._quantity = quantity + + @property + def description(self): + """ + Gets the description of this SubscriptionSku. + Description of the stock units. + + + :return: The description of this SubscriptionSku. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this SubscriptionSku. + Description of the stock units. + + + :param description: The description of this SubscriptionSku. + :type: str + """ + self._description = description + + @property + def gsi_order_line_id(self): + """ + Gets the gsi_order_line_id of this SubscriptionSku. + Sales order line identifier. + + + :return: The gsi_order_line_id of this SubscriptionSku. + :rtype: str + """ + return self._gsi_order_line_id + + @gsi_order_line_id.setter + def gsi_order_line_id(self, gsi_order_line_id): + """ + Sets the gsi_order_line_id of this SubscriptionSku. + Sales order line identifier. + + + :param gsi_order_line_id: The gsi_order_line_id of this SubscriptionSku. + :type: str + """ + self._gsi_order_line_id = gsi_order_line_id + + @property + def license_part_description(self): + """ + Gets the license_part_description of this SubscriptionSku. + Description of the covered product belonging to this SKU. + + + :return: The license_part_description of this SubscriptionSku. + :rtype: str + """ + return self._license_part_description + + @license_part_description.setter + def license_part_description(self, license_part_description): + """ + Sets the license_part_description of this SubscriptionSku. + Description of the covered product belonging to this SKU. + + + :param license_part_description: The license_part_description of this SubscriptionSku. + :type: str + """ + self._license_part_description = license_part_description + + @property + def metric_name(self): + """ + Gets the metric_name of this SubscriptionSku. + Base metric for billing the service. + + + :return: The metric_name of this SubscriptionSku. + :rtype: str + """ + return self._metric_name + + @metric_name.setter + def metric_name(self, metric_name): + """ + Sets the metric_name of this SubscriptionSku. + Base metric for billing the service. + + + :param metric_name: The metric_name of this SubscriptionSku. + :type: str + """ + self._metric_name = metric_name + + @property + def is_base_service_component(self): + """ + Gets the is_base_service_component of this SubscriptionSku. + Denotes if the SKU is considered as a parent or child. + + + :return: The is_base_service_component of this SubscriptionSku. + :rtype: bool + """ + return self._is_base_service_component + + @is_base_service_component.setter + def is_base_service_component(self, is_base_service_component): + """ + Sets the is_base_service_component of this SubscriptionSku. + Denotes if the SKU is considered as a parent or child. + + + :param is_base_service_component: The is_base_service_component of this SubscriptionSku. + :type: bool + """ + self._is_base_service_component = is_base_service_component + + @property + def is_additional_instance(self): + """ + Gets the is_additional_instance of this SubscriptionSku. + Denotes if an additional test instance can be provisioned by the SAAS application. + + + :return: The is_additional_instance of this SubscriptionSku. + :rtype: bool + """ + return self._is_additional_instance + + @is_additional_instance.setter + def is_additional_instance(self, is_additional_instance): + """ + Sets the is_additional_instance of this SubscriptionSku. + Denotes if an additional test instance can be provisioned by the SAAS application. + + + :param is_additional_instance: The is_additional_instance of this SubscriptionSku. + :type: bool + """ + self._is_additional_instance = is_additional_instance + + @property + def start_date(self): + """ + Gets the start_date of this SubscriptionSku. + Date-time when the SKU was created. + + + :return: The start_date of this SubscriptionSku. + :rtype: datetime + """ + return self._start_date + + @start_date.setter + def start_date(self, start_date): + """ + Sets the start_date of this SubscriptionSku. + Date-time when the SKU was created. + + + :param start_date: The start_date of this SubscriptionSku. + :type: datetime + """ + self._start_date = start_date + + @property + def end_date(self): + """ + Gets the end_date of this SubscriptionSku. + Date-time when the SKU ended. + + + :return: The end_date of this SubscriptionSku. + :rtype: datetime + """ + return self._end_date + + @end_date.setter + def end_date(self, end_date): + """ + Sets the end_date of this SubscriptionSku. + Date-time when the SKU ended. + + + :param end_date: The end_date of this SubscriptionSku. + :type: datetime + """ + self._end_date = end_date + + 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/tenant_manager_control_plane/models/subscription_summary.py b/src/oci/tenant_manager_control_plane/models/subscription_summary.py new file mode 100644 index 0000000000..d508fe71f0 --- /dev/null +++ b/src/oci/tenant_manager_control_plane/models/subscription_summary.py @@ -0,0 +1,447 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 SubscriptionSummary(object): + """ + Summary of subscription. + """ + + #: A constant which can be used with the lifecycle_state property of a SubscriptionSummary. + #: This constant has a value of "CREATING" + LIFECYCLE_STATE_CREATING = "CREATING" + + #: A constant which can be used with the lifecycle_state property of a SubscriptionSummary. + #: This constant has a value of "ACTIVE" + LIFECYCLE_STATE_ACTIVE = "ACTIVE" + + #: A constant which can be used with the lifecycle_state property of a SubscriptionSummary. + #: This constant has a value of "INACTIVE" + LIFECYCLE_STATE_INACTIVE = "INACTIVE" + + #: A constant which can be used with the lifecycle_state property of a SubscriptionSummary. + #: This constant has a value of "UPDATING" + LIFECYCLE_STATE_UPDATING = "UPDATING" + + #: A constant which can be used with the lifecycle_state property of a SubscriptionSummary. + #: This constant has a value of "DELETING" + LIFECYCLE_STATE_DELETING = "DELETING" + + #: A constant which can be used with the lifecycle_state property of a SubscriptionSummary. + #: This constant has a value of "DELETED" + LIFECYCLE_STATE_DELETED = "DELETED" + + #: A constant which can be used with the lifecycle_state property of a SubscriptionSummary. + #: This constant has a value of "FAILED" + LIFECYCLE_STATE_FAILED = "FAILED" + + def __init__(self, **kwargs): + """ + Initializes a new SubscriptionSummary 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 SubscriptionSummary. + :type id: str + + :param classic_subscription_id: + The value to assign to the classic_subscription_id property of this SubscriptionSummary. + :type classic_subscription_id: str + + :param compartment_id: + The value to assign to the compartment_id property of this SubscriptionSummary. + :type compartment_id: str + + :param service_name: + The value to assign to the service_name property of this SubscriptionSummary. + :type service_name: str + + :param is_classic_subscription: + The value to assign to the is_classic_subscription property of this SubscriptionSummary. + :type is_classic_subscription: bool + + :param payment_model: + The value to assign to the payment_model property of this SubscriptionSummary. + :type payment_model: str + + :param region_assignment: + The value to assign to the region_assignment property of this SubscriptionSummary. + :type region_assignment: str + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this SubscriptionSummary. + Allowed values for this property are: "CREATING", "ACTIVE", "INACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type lifecycle_state: str + + :param start_date: + The value to assign to the start_date property of this SubscriptionSummary. + :type start_date: datetime + + :param end_date: + The value to assign to the end_date property of this SubscriptionSummary. + :type end_date: datetime + + :param time_updated: + The value to assign to the time_updated property of this SubscriptionSummary. + :type time_updated: datetime + + :param time_created: + The value to assign to the time_created property of this SubscriptionSummary. + :type time_created: datetime + + """ + self.swagger_types = { + 'id': 'str', + 'classic_subscription_id': 'str', + 'compartment_id': 'str', + 'service_name': 'str', + 'is_classic_subscription': 'bool', + 'payment_model': 'str', + 'region_assignment': 'str', + 'lifecycle_state': 'str', + 'start_date': 'datetime', + 'end_date': 'datetime', + 'time_updated': 'datetime', + 'time_created': 'datetime' + } + + self.attribute_map = { + 'id': 'id', + 'classic_subscription_id': 'classicSubscriptionId', + 'compartment_id': 'compartmentId', + 'service_name': 'serviceName', + 'is_classic_subscription': 'isClassicSubscription', + 'payment_model': 'paymentModel', + 'region_assignment': 'regionAssignment', + 'lifecycle_state': 'lifecycleState', + 'start_date': 'startDate', + 'end_date': 'endDate', + 'time_updated': 'timeUpdated', + 'time_created': 'timeCreated' + } + + self._id = None + self._classic_subscription_id = None + self._compartment_id = None + self._service_name = None + self._is_classic_subscription = None + self._payment_model = None + self._region_assignment = None + self._lifecycle_state = None + self._start_date = None + self._end_date = None + self._time_updated = None + self._time_created = None + + @property + def id(self): + """ + **[Required]** Gets the id of this SubscriptionSummary. + OCID of the subscription details for a particular root compartment or tenancy. + + + :return: The id of this SubscriptionSummary. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this SubscriptionSummary. + OCID of the subscription details for a particular root compartment or tenancy. + + + :param id: The id of this SubscriptionSummary. + :type: str + """ + self._id = id + + @property + def classic_subscription_id(self): + """ + **[Required]** Gets the classic_subscription_id of this SubscriptionSummary. + Classic subscription ID. + + + :return: The classic_subscription_id of this SubscriptionSummary. + :rtype: str + """ + return self._classic_subscription_id + + @classic_subscription_id.setter + def classic_subscription_id(self, classic_subscription_id): + """ + Sets the classic_subscription_id of this SubscriptionSummary. + Classic subscription ID. + + + :param classic_subscription_id: The classic_subscription_id of this SubscriptionSummary. + :type: str + """ + self._classic_subscription_id = classic_subscription_id + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this SubscriptionSummary. + OCID of the compartment. Always a tenancy OCID. + + + :return: The compartment_id of this SubscriptionSummary. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this SubscriptionSummary. + OCID of the compartment. Always a tenancy OCID. + + + :param compartment_id: The compartment_id of this SubscriptionSummary. + :type: str + """ + self._compartment_id = compartment_id + + @property + def service_name(self): + """ + **[Required]** Gets the service_name of this SubscriptionSummary. + The type of subscription, such as 'CLOUDCM', 'SAAS', 'ERP', or 'CRM'. + + + :return: The service_name of this SubscriptionSummary. + :rtype: str + """ + return self._service_name + + @service_name.setter + def service_name(self, service_name): + """ + Sets the service_name of this SubscriptionSummary. + The type of subscription, such as 'CLOUDCM', 'SAAS', 'ERP', or 'CRM'. + + + :param service_name: The service_name of this SubscriptionSummary. + :type: str + """ + self._service_name = service_name + + @property + def is_classic_subscription(self): + """ + Gets the is_classic_subscription of this SubscriptionSummary. + Denotes if the subscription is from classic systems or not. + + + :return: The is_classic_subscription of this SubscriptionSummary. + :rtype: bool + """ + return self._is_classic_subscription + + @is_classic_subscription.setter + def is_classic_subscription(self, is_classic_subscription): + """ + Sets the is_classic_subscription of this SubscriptionSummary. + Denotes if the subscription is from classic systems or not. + + + :param is_classic_subscription: The is_classic_subscription of this SubscriptionSummary. + :type: bool + """ + self._is_classic_subscription = is_classic_subscription + + @property + def payment_model(self): + """ + Gets the payment_model of this SubscriptionSummary. + The pay model of the subscription, such as 'Pay as you go' or 'Monthly'. + + + :return: The payment_model of this SubscriptionSummary. + :rtype: str + """ + return self._payment_model + + @payment_model.setter + def payment_model(self, payment_model): + """ + Sets the payment_model of this SubscriptionSummary. + The pay model of the subscription, such as 'Pay as you go' or 'Monthly'. + + + :param payment_model: The payment_model of this SubscriptionSummary. + :type: str + """ + self._payment_model = payment_model + + @property + def region_assignment(self): + """ + Gets the region_assignment of this SubscriptionSummary. + Region for the subscription. + + + :return: The region_assignment of this SubscriptionSummary. + :rtype: str + """ + return self._region_assignment + + @region_assignment.setter + def region_assignment(self, region_assignment): + """ + Sets the region_assignment of this SubscriptionSummary. + Region for the subscription. + + + :param region_assignment: The region_assignment of this SubscriptionSummary. + :type: str + """ + self._region_assignment = region_assignment + + @property + def lifecycle_state(self): + """ + Gets the lifecycle_state of this SubscriptionSummary. + Lifecycle state of the subscription. + + Allowed values for this property are: "CREATING", "ACTIVE", "INACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The lifecycle_state of this SubscriptionSummary. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this SubscriptionSummary. + Lifecycle state of the subscription. + + + :param lifecycle_state: The lifecycle_state of this SubscriptionSummary. + :type: str + """ + allowed_values = ["CREATING", "ACTIVE", "INACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED"] + if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values): + lifecycle_state = 'UNKNOWN_ENUM_VALUE' + self._lifecycle_state = lifecycle_state + + @property + def start_date(self): + """ + Gets the start_date of this SubscriptionSummary. + Subscription start time. + + + :return: The start_date of this SubscriptionSummary. + :rtype: datetime + """ + return self._start_date + + @start_date.setter + def start_date(self, start_date): + """ + Sets the start_date of this SubscriptionSummary. + Subscription start time. + + + :param start_date: The start_date of this SubscriptionSummary. + :type: datetime + """ + self._start_date = start_date + + @property + def end_date(self): + """ + Gets the end_date of this SubscriptionSummary. + Subscription end time. + + + :return: The end_date of this SubscriptionSummary. + :rtype: datetime + """ + return self._end_date + + @end_date.setter + def end_date(self, end_date): + """ + Sets the end_date of this SubscriptionSummary. + Subscription end time. + + + :param end_date: The end_date of this SubscriptionSummary. + :type: datetime + """ + self._end_date = end_date + + @property + def time_updated(self): + """ + Gets the time_updated of this SubscriptionSummary. + Date-time when subscription is updated. + + + :return: The time_updated of this SubscriptionSummary. + :rtype: datetime + """ + return self._time_updated + + @time_updated.setter + def time_updated(self, time_updated): + """ + Sets the time_updated of this SubscriptionSummary. + Date-time when subscription is updated. + + + :param time_updated: The time_updated of this SubscriptionSummary. + :type: datetime + """ + self._time_updated = time_updated + + @property + def time_created(self): + """ + Gets the time_created of this SubscriptionSummary. + Date-time when subscription is created. + + + :return: The time_created of this SubscriptionSummary. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this SubscriptionSummary. + Date-time when subscription is created. + + + :param time_created: The time_created of this SubscriptionSummary. + :type: datetime + """ + self._time_created = time_created + + 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/tenant_manager_control_plane/models/update_organization_details.py b/src/oci/tenant_manager_control_plane/models/update_organization_details.py new file mode 100644 index 0000000000..567a5f88d4 --- /dev/null +++ b/src/oci/tenant_manager_control_plane/models/update_organization_details.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +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 UpdateOrganizationDetails(object): + """ + UpdateOrganizationDetails contains subscriptionId information. + """ + + def __init__(self, **kwargs): + """ + Initializes a new UpdateOrganizationDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param default_ucm_subscription_id: + The value to assign to the default_ucm_subscription_id property of this UpdateOrganizationDetails. + :type default_ucm_subscription_id: str + + """ + self.swagger_types = { + 'default_ucm_subscription_id': 'str' + } + + self.attribute_map = { + 'default_ucm_subscription_id': 'defaultUcmSubscriptionId' + } + + self._default_ucm_subscription_id = None + + @property + def default_ucm_subscription_id(self): + """ + **[Required]** Gets the default_ucm_subscription_id of this UpdateOrganizationDetails. + OCID of the default Annual Universal Credits subscription. Any tenancy joining the organization will automatically get assigned this subscription if a subscription is not explictly assigned. + + + :return: The default_ucm_subscription_id of this UpdateOrganizationDetails. + :rtype: str + """ + return self._default_ucm_subscription_id + + @default_ucm_subscription_id.setter + def default_ucm_subscription_id(self, default_ucm_subscription_id): + """ + Sets the default_ucm_subscription_id of this UpdateOrganizationDetails. + OCID of the default Annual Universal Credits subscription. Any tenancy joining the organization will automatically get assigned this subscription if a subscription is not explictly assigned. + + + :param default_ucm_subscription_id: The default_ucm_subscription_id of this UpdateOrganizationDetails. + :type: str + """ + self._default_ucm_subscription_id = default_ucm_subscription_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/tenant_manager_control_plane/models/work_request.py b/src/oci/tenant_manager_control_plane/models/work_request.py index 58084365fc..cbb9e27f6a 100644 --- a/src/oci/tenant_manager_control_plane/models/work_request.py +++ b/src/oci/tenant_manager_control_plane/models/work_request.py @@ -10,7 +10,7 @@ @init_model_state_from_kwargs class WorkRequest(object): """ - A description of work request status. + A description of the work request status. """ #: A constant which can be used with the operation_type property of a WorkRequest. @@ -25,6 +25,10 @@ class WorkRequest(object): #: This constant has a value of "CANCEL_SENDER_INVITATION" OPERATION_TYPE_CANCEL_SENDER_INVITATION = "CANCEL_SENDER_INVITATION" + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "COMPLETE_ORDER_ACTIVATION" + OPERATION_TYPE_COMPLETE_ORDER_ACTIVATION = "COMPLETE_ORDER_ACTIVATION" + #: A constant which can be used with the operation_type property of a WorkRequest. #: This constant has a value of "ACTIVATE_ORDER_EXISTING_TENANCY" OPERATION_TYPE_ACTIVATE_ORDER_EXISTING_TENANCY = "ACTIVATE_ORDER_EXISTING_TENANCY" @@ -41,6 +45,18 @@ class WorkRequest(object): #: This constant has a value of "CREATE_CHILD_TENANCY" OPERATION_TYPE_CREATE_CHILD_TENANCY = "CREATE_CHILD_TENANCY" + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "ASSIGN_DEFAULT_SUBSCRIPTION" + OPERATION_TYPE_ASSIGN_DEFAULT_SUBSCRIPTION = "ASSIGN_DEFAULT_SUBSCRIPTION" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "MANUAL_LINK_CREATION" + OPERATION_TYPE_MANUAL_LINK_CREATION = "MANUAL_LINK_CREATION" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "TERMINATE_ORGANIZATION_TENANCY" + OPERATION_TYPE_TERMINATE_ORGANIZATION_TENANCY = "TERMINATE_ORGANIZATION_TENANCY" + #: A constant which can be used with the status property of a WorkRequest. #: This constant has a value of "ACCEPTED" STATUS_ACCEPTED = "ACCEPTED" @@ -72,7 +88,7 @@ def __init__(self, **kwargs): :param operation_type: The value to assign to the operation_type property of this WorkRequest. - Allowed values for this property are: "CREATE_SENDER_INVITATION", "ACCEPT_RECIPIENT_INVITATION", "CANCEL_SENDER_INVITATION", "ACTIVATE_ORDER_EXISTING_TENANCY", "REGISTER_DOMAIN", "RELEASE_DOMAIN", "CREATE_CHILD_TENANCY", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "CREATE_SENDER_INVITATION", "ACCEPT_RECIPIENT_INVITATION", "CANCEL_SENDER_INVITATION", "COMPLETE_ORDER_ACTIVATION", "ACTIVATE_ORDER_EXISTING_TENANCY", "REGISTER_DOMAIN", "RELEASE_DOMAIN", "CREATE_CHILD_TENANCY", "ASSIGN_DEFAULT_SUBSCRIPTION", "MANUAL_LINK_CREATION", "TERMINATE_ORGANIZATION_TENANCY", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type operation_type: str @@ -151,7 +167,7 @@ def operation_type(self): **[Required]** Gets the operation_type of this WorkRequest. Type of the work request. - Allowed values for this property are: "CREATE_SENDER_INVITATION", "ACCEPT_RECIPIENT_INVITATION", "CANCEL_SENDER_INVITATION", "ACTIVATE_ORDER_EXISTING_TENANCY", "REGISTER_DOMAIN", "RELEASE_DOMAIN", "CREATE_CHILD_TENANCY", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "CREATE_SENDER_INVITATION", "ACCEPT_RECIPIENT_INVITATION", "CANCEL_SENDER_INVITATION", "COMPLETE_ORDER_ACTIVATION", "ACTIVATE_ORDER_EXISTING_TENANCY", "REGISTER_DOMAIN", "RELEASE_DOMAIN", "CREATE_CHILD_TENANCY", "ASSIGN_DEFAULT_SUBSCRIPTION", "MANUAL_LINK_CREATION", "TERMINATE_ORGANIZATION_TENANCY", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. @@ -170,7 +186,7 @@ def operation_type(self, operation_type): :param operation_type: The operation_type of this WorkRequest. :type: str """ - allowed_values = ["CREATE_SENDER_INVITATION", "ACCEPT_RECIPIENT_INVITATION", "CANCEL_SENDER_INVITATION", "ACTIVATE_ORDER_EXISTING_TENANCY", "REGISTER_DOMAIN", "RELEASE_DOMAIN", "CREATE_CHILD_TENANCY"] + allowed_values = ["CREATE_SENDER_INVITATION", "ACCEPT_RECIPIENT_INVITATION", "CANCEL_SENDER_INVITATION", "COMPLETE_ORDER_ACTIVATION", "ACTIVATE_ORDER_EXISTING_TENANCY", "REGISTER_DOMAIN", "RELEASE_DOMAIN", "CREATE_CHILD_TENANCY", "ASSIGN_DEFAULT_SUBSCRIPTION", "MANUAL_LINK_CREATION", "TERMINATE_ORGANIZATION_TENANCY"] if not value_allowed_none_or_none_sentinel(operation_type, allowed_values): operation_type = 'UNKNOWN_ENUM_VALUE' self._operation_type = operation_type @@ -179,7 +195,7 @@ def operation_type(self, operation_type): def status(self): """ **[Required]** Gets the status of this WorkRequest. - Status of current work request. + Status of the current 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'. @@ -194,7 +210,7 @@ def status(self): def status(self, status): """ Sets the status of this WorkRequest. - Status of current work request. + Status of the current work request. :param status: The status of this WorkRequest. diff --git a/src/oci/tenant_manager_control_plane/models/work_request_error.py b/src/oci/tenant_manager_control_plane/models/work_request_error.py index 6d85e17613..51fb3ea607 100644 --- a/src/oci/tenant_manager_control_plane/models/work_request_error.py +++ b/src/oci/tenant_manager_control_plane/models/work_request_error.py @@ -105,7 +105,7 @@ def message(self, message): def timestamp(self): """ **[Required]** Gets the timestamp of this WorkRequestError. - The time the error occured. An RFC3339-formatted date and time string. + The time the error occured. An RFC 3339-formatted date and time string. :return: The timestamp of this WorkRequestError. @@ -117,7 +117,7 @@ def timestamp(self): def timestamp(self, timestamp): """ Sets the timestamp of this WorkRequestError. - The time the error occured. An RFC3339-formatted date and time string. + The time the error occured. An RFC 3339-formatted date and time string. :param timestamp: The timestamp of this WorkRequestError. diff --git a/src/oci/tenant_manager_control_plane/models/work_request_log_entry.py b/src/oci/tenant_manager_control_plane/models/work_request_log_entry.py index c54d26a79a..56700f1ec1 100644 --- a/src/oci/tenant_manager_control_plane/models/work_request_log_entry.py +++ b/src/oci/tenant_manager_control_plane/models/work_request_log_entry.py @@ -68,7 +68,7 @@ def message(self, message): def timestamp(self): """ **[Required]** Gets the timestamp of this WorkRequestLogEntry. - The time the log message was written. An RFC3339-formatted date and time string. + The time the log message was written. An RFC 3339-formatted date and time string. :return: The timestamp of this WorkRequestLogEntry. @@ -80,7 +80,7 @@ def timestamp(self): def timestamp(self, timestamp): """ Sets the timestamp of this WorkRequestLogEntry. - The time the log message was written. An RFC3339-formatted date and time string. + The time the log message was written. An RFC 3339-formatted date and time string. :param timestamp: The timestamp of this WorkRequestLogEntry. diff --git a/src/oci/tenant_manager_control_plane/models/work_request_summary.py b/src/oci/tenant_manager_control_plane/models/work_request_summary.py index 93283a7862..54215f3102 100644 --- a/src/oci/tenant_manager_control_plane/models/work_request_summary.py +++ b/src/oci/tenant_manager_control_plane/models/work_request_summary.py @@ -25,6 +25,10 @@ class WorkRequestSummary(object): #: This constant has a value of "CANCEL_SENDER_INVITATION" OPERATION_TYPE_CANCEL_SENDER_INVITATION = "CANCEL_SENDER_INVITATION" + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "COMPLETE_ORDER_ACTIVATION" + OPERATION_TYPE_COMPLETE_ORDER_ACTIVATION = "COMPLETE_ORDER_ACTIVATION" + #: A constant which can be used with the operation_type property of a WorkRequestSummary. #: This constant has a value of "ACTIVATE_ORDER_EXISTING_TENANCY" OPERATION_TYPE_ACTIVATE_ORDER_EXISTING_TENANCY = "ACTIVATE_ORDER_EXISTING_TENANCY" @@ -41,6 +45,18 @@ class WorkRequestSummary(object): #: This constant has a value of "CREATE_CHILD_TENANCY" OPERATION_TYPE_CREATE_CHILD_TENANCY = "CREATE_CHILD_TENANCY" + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "ASSIGN_DEFAULT_SUBSCRIPTION" + OPERATION_TYPE_ASSIGN_DEFAULT_SUBSCRIPTION = "ASSIGN_DEFAULT_SUBSCRIPTION" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "MANUAL_LINK_CREATION" + OPERATION_TYPE_MANUAL_LINK_CREATION = "MANUAL_LINK_CREATION" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "TERMINATE_ORGANIZATION_TENANCY" + OPERATION_TYPE_TERMINATE_ORGANIZATION_TENANCY = "TERMINATE_ORGANIZATION_TENANCY" + #: A constant which can be used with the status property of a WorkRequestSummary. #: This constant has a value of "ACCEPTED" STATUS_ACCEPTED = "ACCEPTED" @@ -72,7 +88,7 @@ def __init__(self, **kwargs): :param operation_type: The value to assign to the operation_type property of this WorkRequestSummary. - Allowed values for this property are: "CREATE_SENDER_INVITATION", "ACCEPT_RECIPIENT_INVITATION", "CANCEL_SENDER_INVITATION", "ACTIVATE_ORDER_EXISTING_TENANCY", "REGISTER_DOMAIN", "RELEASE_DOMAIN", "CREATE_CHILD_TENANCY", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "CREATE_SENDER_INVITATION", "ACCEPT_RECIPIENT_INVITATION", "CANCEL_SENDER_INVITATION", "COMPLETE_ORDER_ACTIVATION", "ACTIVATE_ORDER_EXISTING_TENANCY", "REGISTER_DOMAIN", "RELEASE_DOMAIN", "CREATE_CHILD_TENANCY", "ASSIGN_DEFAULT_SUBSCRIPTION", "MANUAL_LINK_CREATION", "TERMINATE_ORGANIZATION_TENANCY", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type operation_type: str @@ -151,7 +167,7 @@ def operation_type(self): **[Required]** Gets the operation_type of this WorkRequestSummary. Type of the work request. - Allowed values for this property are: "CREATE_SENDER_INVITATION", "ACCEPT_RECIPIENT_INVITATION", "CANCEL_SENDER_INVITATION", "ACTIVATE_ORDER_EXISTING_TENANCY", "REGISTER_DOMAIN", "RELEASE_DOMAIN", "CREATE_CHILD_TENANCY", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "CREATE_SENDER_INVITATION", "ACCEPT_RECIPIENT_INVITATION", "CANCEL_SENDER_INVITATION", "COMPLETE_ORDER_ACTIVATION", "ACTIVATE_ORDER_EXISTING_TENANCY", "REGISTER_DOMAIN", "RELEASE_DOMAIN", "CREATE_CHILD_TENANCY", "ASSIGN_DEFAULT_SUBSCRIPTION", "MANUAL_LINK_CREATION", "TERMINATE_ORGANIZATION_TENANCY", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. @@ -170,7 +186,7 @@ def operation_type(self, operation_type): :param operation_type: The operation_type of this WorkRequestSummary. :type: str """ - allowed_values = ["CREATE_SENDER_INVITATION", "ACCEPT_RECIPIENT_INVITATION", "CANCEL_SENDER_INVITATION", "ACTIVATE_ORDER_EXISTING_TENANCY", "REGISTER_DOMAIN", "RELEASE_DOMAIN", "CREATE_CHILD_TENANCY"] + allowed_values = ["CREATE_SENDER_INVITATION", "ACCEPT_RECIPIENT_INVITATION", "CANCEL_SENDER_INVITATION", "COMPLETE_ORDER_ACTIVATION", "ACTIVATE_ORDER_EXISTING_TENANCY", "REGISTER_DOMAIN", "RELEASE_DOMAIN", "CREATE_CHILD_TENANCY", "ASSIGN_DEFAULT_SUBSCRIPTION", "MANUAL_LINK_CREATION", "TERMINATE_ORGANIZATION_TENANCY"] if not value_allowed_none_or_none_sentinel(operation_type, allowed_values): operation_type = 'UNKNOWN_ENUM_VALUE' self._operation_type = operation_type diff --git a/src/oci/tenant_manager_control_plane/orders_client.py b/src/oci/tenant_manager_control_plane/orders_client.py index c967ef933e..798e9de5a7 100644 --- a/src/oci/tenant_manager_control_plane/orders_client.py +++ b/src/oci/tenant_manager_control_plane/orders_client.py @@ -98,7 +98,7 @@ def __init__(self, config, **kwargs): def activate_order(self, activate_order_details, activation_token, **kwargs): """ - Triggers an order activation workflow on behalf of the tenant given by compartment id in the body. + Triggers an order activation workflow on behalf of the tenant, given by compartment ID in the body. :param oci.tenant_manager_control_plane.models.ActivateOrderDetails activate_order_details: (required) diff --git a/src/oci/tenant_manager_control_plane/organization_client.py b/src/oci/tenant_manager_control_plane/organization_client.py new file mode 100644 index 0000000000..67160d54e4 --- /dev/null +++ b/src/oci/tenant_manager_control_plane/organization_client.py @@ -0,0 +1,928 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from __future__ import absolute_import + +from oci._vendor import requests # noqa: F401 +from oci._vendor import six + +from oci import retry, circuit_breaker # 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, get_signer_from_authentication_type, AUTHENTICATION_TYPE_FIELD_NAME +from .models import tenant_manager_control_plane_type_mapping +missing = Sentinel("Missing") + + +class OrganizationClient(object): + """ + The Organizations API allows you to consolidate multiple OCI tenancies into an organization, and centrally manage your tenancies and its resources. + """ + + 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 `__. + + :param obj circuit_breaker_strategy: (optional) + A circuit breaker strategy to apply to all calls made by this service client (i.e. at the client level). + This client will not have circuit breakers enabled by default, users can use their own circuit breaker strategy or the convenient :py:data:`~oci.circuit_breaker.DEFAULT_CIRCUIT_BREAKER_STRATEGY` provided by the SDK to enable it. + The specifics of circuit breaker strategy are described `here `__. + + :param function circuit_breaker_callback: (optional) + Callback function to receive any exceptions triggerred by the circuit breaker. + """ + validate_config(config, signer=kwargs.get('signer')) + if 'signer' in kwargs: + signer = kwargs['signer'] + + elif AUTHENTICATION_TYPE_FIELD_NAME in config: + signer = get_signer_from_authentication_type(config) + + 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'), + 'base_path': '/20200801', + 'service_endpoint_template': 'https://organizations.{region}.oci.{secondLevelDomain}', + 'skip_deserialization': kwargs.get('skip_deserialization', False), + 'circuit_breaker_strategy': kwargs.get('circuit_breaker_strategy', circuit_breaker.GLOBAL_CIRCUIT_BREAKER_STRATEGY) + } + if 'timeout' in kwargs: + base_client_init_kwargs['timeout'] = kwargs.get('timeout') + self.base_client = BaseClient("organization", config, signer, tenant_manager_control_plane_type_mapping, **base_client_init_kwargs) + self.retry_strategy = kwargs.get('retry_strategy') + self.circuit_breaker_callback = kwargs.get('circuit_breaker_callback') + + def approve_organization_tenancy_for_transfer(self, compartment_id, organization_tenancy_id, **kwargs): + """ + Approve an organization's child tenancy for transfer. + + + :param str compartment_id: (required) + The ID of the compartment in which to list resources. + + :param str organization_tenancy_id: (required) + OCID of the child tenancy. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call + for a resource, set the `if-match` parameter to the value of the + etag from a previous GET or POST response for that resource. + The resource will be updated or deleted only if the etag you + provide matches the resource's current etag value. + + :param str opc_retry_token: (optional) + A token that uniquely identifies a request, so it can be retried in case of a timeout or + server error, without risk of executing that same action again. Retry tokens expire after 24 + hours, but can be invalidated before then due to conflicting operations. For example, if a resource + has been deleted and purged from the system, then a retry of the original creation request + might be rejected. + + :param str opc_request_id: (optional) + The client request ID for tracing. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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.tenant_manager_control_plane.models.OrganizationTenancy` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use approve_organization_tenancy_for_transfer API. + """ + resource_path = "/organizationTenancies/{organizationTenancyId}/actions/approveForTransfer" + method = "POST" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "if_match", + "opc_retry_token", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "approve_organization_tenancy_for_transfer got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "organizationTenancyId": organization_tenancy_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)) + + query_params = { + "compartmentId": compartment_id + } + 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", + "if-match": kwargs.get("if_match", missing), + "opc-retry-token": kwargs.get("opc_retry_token", 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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="OrganizationTenancy") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="OrganizationTenancy") + + def create_child_tenancy(self, create_child_tenancy_details, **kwargs): + """ + Creates a child tenancy asynchronously. + + + :param oci.tenant_manager_control_plane.models.CreateChildTenancyDetails create_child_tenancy_details: (required) + Parameters to create a child tenancy. + + :param str opc_retry_token: (optional) + A token that uniquely identifies a request, so it can be retried in case of a timeout or + server error, without risk of executing that same action again. Retry tokens expire after 24 + hours, but can be invalidated before then due to conflicting operations. For example, if a resource + has been deleted and purged from the system, then a retry of the original creation request + might be rejected. + + :param str opc_request_id: (optional) + The client request ID for tracing. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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` + + :example: + Click `here `__ to see an example of how to use create_child_tenancy API. + """ + resource_path = "/childTenancies" + method = "POST" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "opc_retry_token", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "create_child_tenancy got unknown kwargs: {!r}".format(extra_kwargs)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-retry-token": kwargs.get("opc_retry_token", 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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + header_params=header_params, + body=create_child_tenancy_details) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + header_params=header_params, + body=create_child_tenancy_details) + + def delete_organization_tenancy(self, organization_tenancy_id, **kwargs): + """ + If certain validations are successful, initiate tenancy termination. + + + :param str organization_tenancy_id: (required) + OCID of the tenancy to be terminated. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call + for a resource, set the `if-match` parameter to the value of the + etag from a previous GET or POST response for that resource. + The resource will be updated or deleted only if the etag you + provide matches the resource's current etag value. + + :param str opc_request_id: (optional) + The client request ID for tracing. + + :param str opc_retry_token: (optional) + A token that uniquely identifies a request, so it can be retried in case of a timeout or + server error, without risk of executing that same action again. Retry tokens expire after 24 + hours, but can be invalidated before then due to conflicting operations. For example, if a resource + has been deleted and purged from the system, then a retry of the original creation request + might be rejected. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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` + + :example: + Click `here `__ to see an example of how to use delete_organization_tenancy API. + """ + resource_path = "/organizationTenancies/{organizationTenancyId}" + method = "DELETE" + + # 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( + "delete_organization_tenancy got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "organizationTenancyId": organization_tenancy_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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + 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_organization(self, organization_id, **kwargs): + """ + Gets information about the organization. + + + :param str organization_id: (required) + OCID of the organization to retrieve. + + :param str opc_request_id: (optional) + The client request ID for tracing. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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.tenant_manager_control_plane.models.Organization` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_organization API. + """ + resource_path = "/organizations/{organizationId}" + 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_organization got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "organizationId": organization_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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + 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="Organization") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="Organization") + + def get_organization_tenancy(self, organization_id, tenancy_id, **kwargs): + """ + Gets information about the organization's tenancy. + + + :param str organization_id: (required) + OCID of the organization. + + :param str tenancy_id: (required) + OCID of the tenancy to retrieve. + + :param str opc_request_id: (optional) + The client request ID for tracing. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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.tenant_manager_control_plane.models.OrganizationTenancy` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_organization_tenancy API. + """ + resource_path = "/organizations/{organizationId}/tenancies/{tenancyId}" + 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_organization_tenancy got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "organizationId": organization_id, + "tenancyId": tenancy_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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + 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="OrganizationTenancy") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="OrganizationTenancy") + + def list_organization_tenancies(self, organization_id, **kwargs): + """ + Gets a list of tenancies in the organization. + + + :param str organization_id: (required) + OCID of the organization. + + :param str opc_request_id: (optional) + The client request ID for tracing. + + :param str page: (optional) + The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + + :param int limit: (optional) + The maximum number of items to return. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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.tenant_manager_control_plane.models.OrganizationTenancyCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_organization_tenancies API. + """ + resource_path = "/organizations/{organizationId}/tenancies" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "opc_request_id", + "page", + "limit" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_organization_tenancies got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "organizationId": organization_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)) + + query_params = { + "page": kwargs.get("page", missing), + "limit": kwargs.get("limit", 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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="OrganizationTenancyCollection") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="OrganizationTenancyCollection") + + def list_organizations(self, compartment_id, **kwargs): + """ + Lists organizations associated with the caller. + + + :param str compartment_id: (required) + The ID of the compartment in which to list resources. + + :param str opc_request_id: (optional) + The client request ID for tracing. + + :param str page: (optional) + The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + + :param int limit: (optional) + The maximum number of items to return. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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.tenant_manager_control_plane.models.OrganizationCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_organizations API. + """ + resource_path = "/organizations" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "opc_request_id", + "page", + "limit" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_organizations got unknown kwargs: {!r}".format(extra_kwargs)) + + query_params = { + "compartmentId": compartment_id, + "page": kwargs.get("page", missing), + "limit": kwargs.get("limit", 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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + 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="OrganizationCollection") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="OrganizationCollection") + + def unapprove_organization_tenancy_for_transfer(self, compartment_id, organization_tenancy_id, **kwargs): + """ + Cancel an organization's child tenancy for transfer. + + + :param str compartment_id: (required) + The ID of the compartment in which to list resources. + + :param str organization_tenancy_id: (required) + OCID of the child tenancy. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call + for a resource, set the `if-match` parameter to the value of the + etag from a previous GET or POST response for that resource. + The resource will be updated or deleted only if the etag you + provide matches the resource's current etag value. + + :param str opc_retry_token: (optional) + A token that uniquely identifies a request, so it can be retried in case of a timeout or + server error, without risk of executing that same action again. Retry tokens expire after 24 + hours, but can be invalidated before then due to conflicting operations. For example, if a resource + has been deleted and purged from the system, then a retry of the original creation request + might be rejected. + + :param str opc_request_id: (optional) + The client request ID for tracing. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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.tenant_manager_control_plane.models.OrganizationTenancy` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use unapprove_organization_tenancy_for_transfer API. + """ + resource_path = "/organizationTenancies/{organizationTenancyId}/actions/unapproveForTransfer" + method = "POST" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "if_match", + "opc_retry_token", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "unapprove_organization_tenancy_for_transfer got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "organizationTenancyId": organization_tenancy_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)) + + query_params = { + "compartmentId": compartment_id + } + 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", + "if-match": kwargs.get("if_match", missing), + "opc-retry-token": kwargs.get("opc_retry_token", 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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="OrganizationTenancy") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="OrganizationTenancy") + + def update_organization(self, organization_id, update_organization_details, **kwargs): + """ + Assign the default subscription to the organization. + + + :param str organization_id: (required) + OCID of the organization. + + :param oci.tenant_manager_control_plane.models.UpdateOrganizationDetails update_organization_details: (required) + The information to be updated. + + :param str opc_request_id: (optional) + The client request ID for tracing. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call + for a resource, set the `if-match` parameter to the value of the + etag from a previous GET or POST response for that resource. + The resource will be updated or deleted only if the etag you + provide matches the resource's current etag value. + + :param str opc_retry_token: (optional) + A token that uniquely identifies a request, so it can be retried in case of a timeout or + server error, without risk of executing that same action again. Retry tokens expire after 24 + hours, but can be invalidated before then due to conflicting operations. For example, if a resource + has been deleted and purged from the system, then a retry of the original creation request + might be rejected. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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` + + :example: + Click `here `__ to see an example of how to use update_organization API. + """ + resource_path = "/organizations/{organizationId}" + method = "PUT" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "opc_request_id", + "if_match", + "opc_retry_token" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "update_organization got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "organizationId": organization_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), + "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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + 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_organization_details) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=update_organization_details) diff --git a/src/oci/tenant_manager_control_plane/organization_client_composite_operations.py b/src/oci/tenant_manager_control_plane/organization_client_composite_operations.py new file mode 100644 index 0000000000..85f73faef0 --- /dev/null +++ b/src/oci/tenant_manager_control_plane/organization_client_composite_operations.py @@ -0,0 +1,149 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +import oci # noqa: F401 +from oci.util import WAIT_RESOURCE_NOT_FOUND # noqa: F401 + + +class OrganizationClientCompositeOperations(object): + """ + This class provides a wrapper around :py:class:`~oci.tenant_manager_control_plane.OrganizationClient` 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 OrganizationClientCompositeOperations object + + :param OrganizationClient client: + The service client which will be wrapped by this object + """ + self.client = client + + def create_child_tenancy_and_wait_for_state(self, create_child_tenancy_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.tenant_manager_control_plane.OrganizationClient.create_child_tenancy` and waits for the :py:class:`~oci.tenant_manager_control_plane.models.WorkRequest` + to enter the given state(s). + + :param oci.tenant_manager_control_plane.models.CreateChildTenancyDetails create_child_tenancy_details: (required) + Parameters to create a child tenancy. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.tenant_manager_control_plane.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.tenant_manager_control_plane.OrganizationClient.create_child_tenancy` + + :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_child_tenancy(create_child_tenancy_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 delete_organization_tenancy_and_wait_for_state(self, organization_tenancy_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.tenant_manager_control_plane.OrganizationClient.delete_organization_tenancy` and waits for the :py:class:`~oci.tenant_manager_control_plane.models.WorkRequest` + to enter the given state(s). + + :param str organization_tenancy_id: (required) + OCID of the tenancy to be terminated. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.tenant_manager_control_plane.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.tenant_manager_control_plane.OrganizationClient.delete_organization_tenancy` + + :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_organization_tenancy(organization_tenancy_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_organization_and_wait_for_state(self, organization_id, update_organization_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.tenant_manager_control_plane.OrganizationClient.update_organization` and waits for the :py:class:`~oci.tenant_manager_control_plane.models.WorkRequest` + to enter the given state(s). + + :param str organization_id: (required) + OCID of the organization. + + :param oci.tenant_manager_control_plane.models.UpdateOrganizationDetails update_organization_details: (required) + The information to be updated. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.tenant_manager_control_plane.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.tenant_manager_control_plane.OrganizationClient.update_organization` + + :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_organization(organization_id, update_organization_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) diff --git a/src/oci/tenant_manager_control_plane/subscription_client.py b/src/oci/tenant_manager_control_plane/subscription_client.py new file mode 100644 index 0000000000..f065932b5c --- /dev/null +++ b/src/oci/tenant_manager_control_plane/subscription_client.py @@ -0,0 +1,979 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from __future__ import absolute_import + +from oci._vendor import requests # noqa: F401 +from oci._vendor import six + +from oci import retry, circuit_breaker # 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, get_signer_from_authentication_type, AUTHENTICATION_TYPE_FIELD_NAME +from .models import tenant_manager_control_plane_type_mapping +missing = Sentinel("Missing") + + +class SubscriptionClient(object): + """ + The Organizations API allows you to consolidate multiple OCI tenancies into an organization, and centrally manage your tenancies and its resources. + """ + + 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 `__. + + :param obj circuit_breaker_strategy: (optional) + A circuit breaker strategy to apply to all calls made by this service client (i.e. at the client level). + This client will not have circuit breakers enabled by default, users can use their own circuit breaker strategy or the convenient :py:data:`~oci.circuit_breaker.DEFAULT_CIRCUIT_BREAKER_STRATEGY` provided by the SDK to enable it. + The specifics of circuit breaker strategy are described `here `__. + + :param function circuit_breaker_callback: (optional) + Callback function to receive any exceptions triggerred by the circuit breaker. + """ + validate_config(config, signer=kwargs.get('signer')) + if 'signer' in kwargs: + signer = kwargs['signer'] + + elif AUTHENTICATION_TYPE_FIELD_NAME in config: + signer = get_signer_from_authentication_type(config) + + 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'), + 'base_path': '/20200801', + 'service_endpoint_template': 'https://organizations.{region}.oci.{secondLevelDomain}', + 'skip_deserialization': kwargs.get('skip_deserialization', False), + 'circuit_breaker_strategy': kwargs.get('circuit_breaker_strategy', circuit_breaker.GLOBAL_CIRCUIT_BREAKER_STRATEGY) + } + if 'timeout' in kwargs: + base_client_init_kwargs['timeout'] = kwargs.get('timeout') + self.base_client = BaseClient("subscription", config, signer, tenant_manager_control_plane_type_mapping, **base_client_init_kwargs) + self.retry_strategy = kwargs.get('retry_strategy') + self.circuit_breaker_callback = kwargs.get('circuit_breaker_callback') + + def create_subscription_mapping(self, create_subscription_mapping_details, **kwargs): + """ + Assign the tenancy record identified by the compartment ID to the given subscription ID. + + + :param oci.tenant_manager_control_plane.models.CreateSubscriptionMappingDetails create_subscription_mapping_details: (required) + Compartment ID and Subscription ID details to create a subscription mapping. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call + for a resource, set the `if-match` parameter to the value of the + etag from a previous GET or POST response for that resource. + The resource will be updated or deleted only if the etag you + provide matches the resource's current etag value. + + :param str opc_retry_token: (optional) + A token that uniquely identifies a request, so it can be retried in case of a timeout or + server error, without risk of executing that same action again. Retry tokens expire after 24 + hours, but can be invalidated before then due to conflicting operations. For example, if a resource + has been deleted and purged from the system, then a retry of the original creation request + might be rejected. + + :param str opc_request_id: (optional) + The client request ID for tracing. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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.tenant_manager_control_plane.models.SubscriptionMapping` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use create_subscription_mapping API. + """ + resource_path = "/subscriptionMappings" + method = "POST" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "if_match", + "opc_retry_token", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "create_subscription_mapping got unknown kwargs: {!r}".format(extra_kwargs)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "if-match": kwargs.get("if_match", missing), + "opc-retry-token": kwargs.get("opc_retry_token", 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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + header_params=header_params, + body=create_subscription_mapping_details, + response_type="SubscriptionMapping") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + header_params=header_params, + body=create_subscription_mapping_details, + response_type="SubscriptionMapping") + + def delete_subscription_mapping(self, subscription_mapping_id, **kwargs): + """ + Delete the subscription mapping details by subscription mapping ID. + + + :param str subscription_mapping_id: (required) + OCID of the subscription mapping ID. + + :param str opc_request_id: (optional) + The client request ID for tracing. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call + for a resource, set the `if-match` parameter to the value of the + etag from a previous GET or POST response for that resource. + The resource will be updated or deleted only if the etag you + provide matches the resource's current etag value. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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` + + :example: + Click `here `__ to see an example of how to use delete_subscription_mapping API. + """ + resource_path = "/subscriptionMappings/{subscriptionMappingId}" + method = "DELETE" + + # 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( + "delete_subscription_mapping got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "subscriptionMappingId": subscription_mapping_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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + 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_assigned_subscription(self, assigned_subscription_id, **kwargs): + """ + Get the assigned subscription details by assigned subscription ID. + + + :param str assigned_subscription_id: (required) + OCID of the assigned subscription. + + :param str opc_request_id: (optional) + The client request ID for tracing. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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.tenant_manager_control_plane.models.AssignedSubscription` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_assigned_subscription API. + """ + resource_path = "/assignedSubscriptions/{assignedSubscriptionId}" + 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_assigned_subscription got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "assignedSubscriptionId": assigned_subscription_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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + 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="AssignedSubscription") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="AssignedSubscription") + + def get_subscription(self, subscription_id, **kwargs): + """ + Gets the subscription details by subscriptionId. + + + :param str subscription_id: (required) + OCID of the subscription. + + :param str opc_request_id: (optional) + The client request ID for tracing. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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.tenant_manager_control_plane.models.Subscription` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_subscription API. + """ + resource_path = "/subscriptions/{subscriptionId}" + 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_subscription got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "subscriptionId": subscription_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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + 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="Subscription") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="Subscription") + + def get_subscription_mapping(self, subscription_mapping_id, **kwargs): + """ + Get the subscription mapping details by subscription mapping ID. + + + :param str subscription_mapping_id: (required) + OCID of the subscriptionMappingId. + + :param str opc_request_id: (optional) + The client request ID for tracing. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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.tenant_manager_control_plane.models.SubscriptionMapping` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_subscription_mapping API. + """ + resource_path = "/subscriptionMappings/{subscriptionMappingId}" + 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_subscription_mapping got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "subscriptionMappingId": subscription_mapping_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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + 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="SubscriptionMapping") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="SubscriptionMapping") + + def list_assigned_subscriptions(self, compartment_id, **kwargs): + """ + Lists subscriptions that are consumed by the compartment. Only the root compartment is allowed. + + + :param str compartment_id: (required) + The ID of the compartment in which to list resources. + + :param str subscription_id: (optional) + The ID of the subscription to which the tenancy is associated. + + :param str opc_request_id: (optional) + The client request ID for tracing. + + :param str page: (optional) + The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + + :param int limit: (optional) + The maximum number of items to return. + + :param str sort_order: (optional) + The sort order to use, whether 'asc' or 'desc'. + + Allowed values are: "ASC", "DESC" + + :param str sort_by: (optional) + The field to sort by. Only one sort order can be provided. + * The default order for timeCreated is descending. + * The default order for displayName is ascending. + * If no value is specified, timeCreated is the default. + + Allowed values are: "timeCreated", "displayName" + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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.tenant_manager_control_plane.models.AssignedSubscriptionCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_assigned_subscriptions API. + """ + resource_path = "/assignedSubscriptions" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "subscription_id", + "opc_request_id", + "page", + "limit", + "sort_order", + "sort_by" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_assigned_subscriptions got unknown kwargs: {!r}".format(extra_kwargs)) + + 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, + "subscriptionId": kwargs.get("subscription_id", missing), + "page": kwargs.get("page", missing), + "limit": kwargs.get("limit", 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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + 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="AssignedSubscriptionCollection") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="AssignedSubscriptionCollection") + + def list_available_regions(self, subscription_id, **kwargs): + """ + List the available regions based on subscription ID. + + + :param str subscription_id: (required) + The ID of the subscription to which the tenancy is associated. + + :param str opc_request_id: (optional) + The client request ID for tracing. + + :param str page: (optional) + The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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.tenant_manager_control_plane.models.AvailableRegionCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_available_regions API. + """ + resource_path = "/subscriptions/{subscriptionId}/availableRegions" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "opc_request_id", + "page" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_available_regions got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "subscriptionId": subscription_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)) + + query_params = { + "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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="AvailableRegionCollection") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="AvailableRegionCollection") + + def list_subscription_mappings(self, **kwargs): + """ + Lists the subscription mappings for all the subscriptions owned by a given compartmentId. Only the root compartment is allowed. + + + :param str subscription_id: (optional) + The ID of the subscription to which the tenancy is associated. + + :param str subscription_mapping_id: (optional) + SubscriptionMappingId is a unique ID for subscription and tenancy mapping. + + :param str compartment_id: (optional) + The ID of the compartment in which to list resources. + + :param str lifecycle_state: (optional) + The lifecycle state of the resource. + + Allowed values are: "CREATING", "ACTIVE", "INACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED" + + :param str opc_request_id: (optional) + The client request ID for tracing. + + :param str page: (optional) + The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + + :param int limit: (optional) + The maximum number of items to return. + + :param str sort_order: (optional) + The sort order to use, whether 'asc' or 'desc'. + + Allowed values are: "ASC", "DESC" + + :param str sort_by: (optional) + The field to sort by. Only one sort order can be provided. + * The default order for timeCreated is descending. + * The default order for displayName is ascending. + * If no value is specified, timeCreated is the default. + + Allowed values are: "timeCreated", "displayName" + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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.tenant_manager_control_plane.models.SubscriptionMappingCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_subscription_mappings API. + """ + resource_path = "/subscriptionMappings" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "subscription_id", + "subscription_mapping_id", + "compartment_id", + "lifecycle_state", + "opc_request_id", + "page", + "limit", + "sort_order", + "sort_by" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_subscription_mappings got unknown kwargs: {!r}".format(extra_kwargs)) + + if 'lifecycle_state' in kwargs: + lifecycle_state_allowed_values = ["CREATING", "ACTIVE", "INACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED"] + 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 = { + "subscriptionId": kwargs.get("subscription_id", missing), + "subscriptionMappingId": kwargs.get("subscription_mapping_id", missing), + "compartmentId": kwargs.get("compartment_id", missing), + "lifecycleState": kwargs.get("lifecycle_state", missing), + "page": kwargs.get("page", missing), + "limit": kwargs.get("limit", 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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + 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="SubscriptionMappingCollection") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="SubscriptionMappingCollection") + + def list_subscriptions(self, **kwargs): + """ + List the subscriptions that a compartment owns. Only the root compartment is allowed. + + + :param str compartment_id: (optional) + The ID of the compartment in which to list resources. + + :param str subscription_id: (optional) + The ID of the subscription to which the tenancy is associated. + + :param str opc_request_id: (optional) + The client request ID for tracing. + + :param str page: (optional) + The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + + :param int limit: (optional) + The maximum number of items to return. + + :param str sort_order: (optional) + The sort order to use, whether 'asc' or 'desc'. + + Allowed values are: "ASC", "DESC" + + :param str sort_by: (optional) + The field to sort by. Only one sort order can be provided. + * The default order for timeCreated is descending. + * The default order for displayName is ascending. + * If no value is specified, timeCreated is the default. + + Allowed values are: "timeCreated", "displayName" + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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.tenant_manager_control_plane.models.SubscriptionCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_subscriptions API. + """ + resource_path = "/subscriptions" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "compartment_id", + "subscription_id", + "opc_request_id", + "page", + "limit", + "sort_order", + "sort_by" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_subscriptions got unknown kwargs: {!r}".format(extra_kwargs)) + + 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": kwargs.get("compartment_id", missing), + "subscriptionId": kwargs.get("subscription_id", missing), + "page": kwargs.get("page", missing), + "limit": kwargs.get("limit", 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.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + 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="SubscriptionCollection") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="SubscriptionCollection") diff --git a/src/oci/tenant_manager_control_plane/subscription_client_composite_operations.py b/src/oci/tenant_manager_control_plane/subscription_client_composite_operations.py new file mode 100644 index 0000000000..234109344c --- /dev/null +++ b/src/oci/tenant_manager_control_plane/subscription_client_composite_operations.py @@ -0,0 +1,109 @@ +# coding: utf-8 +# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +import oci # noqa: F401 +from oci.util import WAIT_RESOURCE_NOT_FOUND # noqa: F401 + + +class SubscriptionClientCompositeOperations(object): + """ + This class provides a wrapper around :py:class:`~oci.tenant_manager_control_plane.SubscriptionClient` 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 SubscriptionClientCompositeOperations object + + :param SubscriptionClient client: + The service client which will be wrapped by this object + """ + self.client = client + + def create_subscription_mapping_and_wait_for_state(self, create_subscription_mapping_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.tenant_manager_control_plane.SubscriptionClient.create_subscription_mapping` and waits for the :py:class:`~oci.tenant_manager_control_plane.models.WorkRequest` + to enter the given state(s). + + :param oci.tenant_manager_control_plane.models.CreateSubscriptionMappingDetails create_subscription_mapping_details: (required) + Compartment ID and Subscription ID details to create a subscription mapping. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.tenant_manager_control_plane.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.tenant_manager_control_plane.SubscriptionClient.create_subscription_mapping` + + :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_subscription_mapping(create_subscription_mapping_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 delete_subscription_mapping_and_wait_for_state(self, subscription_mapping_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.tenant_manager_control_plane.SubscriptionClient.delete_subscription_mapping` and waits for the :py:class:`~oci.tenant_manager_control_plane.models.SubscriptionMapping` acted upon + to enter the given state(s). + + :param str subscription_mapping_id: (required) + OCID of the subscription mapping ID. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.tenant_manager_control_plane.models.SubscriptionMapping.lifecycle_state` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.tenant_manager_control_plane.SubscriptionClient.delete_subscription_mapping` + + :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_subscription_mapping(subscription_mapping_id) + operation_result = None + try: + operation_result = self.client.delete_subscription_mapping(subscription_mapping_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) diff --git a/src/oci/version.py b/src/oci/version.py index cbb6eb006c..e0e1e2e357 100644 --- a/src/oci/version.py +++ b/src/oci/version.py @@ -2,4 +2,4 @@ # Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. -__version__ = "2.48.0" +__version__ = "2.49.0"