diff --git a/CHANGELOG.rst b/CHANGELOG.rst index c4929018c4..1f791d24a1 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -3,6 +3,16 @@ Change Log All notable changes to this project will be documented in this file. The format is based on `Keep a Changelog `_. +==================== +2.124.2 - 2024-03-19 +==================== + +Added +----- +* Support for standalone Oracle HTTP server discovery and monitoring in the Stack Monitoring service +* Support for attribute management for traces in the Application Performance Monitoring service +* Support for async jobs and document translations in the AI language service + ==================== 2.124.1 - 2024-03-12 ==================== diff --git a/docs/api/ai_language.rst b/docs/api/ai_language.rst index 5a2ba1c5be..ca5c006668 100644 --- a/docs/api/ai_language.rst +++ b/docs/api/ai_language.rst @@ -35,14 +35,17 @@ Ai Language oci.ai_language.models.Capabilities oci.ai_language.models.Capability oci.ai_language.models.ChangeEndpointCompartmentDetails + oci.ai_language.models.ChangeJobCompartmentDetails oci.ai_language.models.ChangeModelCompartmentDetails oci.ai_language.models.ChangeProjectCompartmentDetails oci.ai_language.models.ClassMetrics oci.ai_language.models.ClassificationMultiClassModeDetails oci.ai_language.models.ClassificationMultiLabelModeDetails oci.ai_language.models.ClassificationType + oci.ai_language.models.ConfigurationDetails oci.ai_language.models.ConfusionMatrixDetails oci.ai_language.models.CreateEndpointDetails + oci.ai_language.models.CreateJobDetails oci.ai_language.models.CreateModelDetails oci.ai_language.models.CreateProjectDetails oci.ai_language.models.DataScienceLabelingDataset @@ -59,6 +62,7 @@ Ai Language oci.ai_language.models.DetectLanguageTextClassificationResult oci.ai_language.models.DetectedLanguage oci.ai_language.models.DocumentError + oci.ai_language.models.DocumentsConfiguration oci.ai_language.models.DominantLanguageDocument oci.ai_language.models.DominantLanguageDocumentResult oci.ai_language.models.Endpoint @@ -73,12 +77,18 @@ Ai Language oci.ai_language.models.EvaluationResultSummary oci.ai_language.models.EvaluationResults oci.ai_language.models.HierarchicalEntity + oci.ai_language.models.InputConfiguration + oci.ai_language.models.InputLocation + oci.ai_language.models.Job + oci.ai_language.models.JobCollection + oci.ai_language.models.JobSummary oci.ai_language.models.KeyPhrase oci.ai_language.models.KeyPhraseDocumentResult oci.ai_language.models.LocationDetails oci.ai_language.models.Model oci.ai_language.models.ModelCollection oci.ai_language.models.ModelDetails + oci.ai_language.models.ModelMetadataDetails oci.ai_language.models.ModelSummary oci.ai_language.models.ModelTypeInfo oci.ai_language.models.NamedEntityRecognitionEvaluationResult @@ -86,7 +96,10 @@ Ai Language oci.ai_language.models.NamedEntityRecognitionModelDetails oci.ai_language.models.NamedEntityRecognitionModelMetrics oci.ai_language.models.ObjectListDataset + oci.ai_language.models.ObjectPrefixOutputLocation oci.ai_language.models.ObjectStorageDataset + oci.ai_language.models.ObjectStorageFileNameLocation + oci.ai_language.models.ObjectStoragePrefixLocation oci.ai_language.models.PiiEntity oci.ai_language.models.PiiEntityDocumentResult oci.ai_language.models.PiiEntityMask @@ -120,6 +133,7 @@ Ai Language oci.ai_language.models.TextDocument oci.ai_language.models.TranslationDocumentResult oci.ai_language.models.UpdateEndpointDetails + oci.ai_language.models.UpdateJobDetails oci.ai_language.models.UpdateModelDetails oci.ai_language.models.UpdateProjectDetails oci.ai_language.models.WorkRequest diff --git a/docs/api/ai_language/models/oci.ai_language.models.ChangeJobCompartmentDetails.rst b/docs/api/ai_language/models/oci.ai_language.models.ChangeJobCompartmentDetails.rst new file mode 100644 index 0000000000..c7132986be --- /dev/null +++ b/docs/api/ai_language/models/oci.ai_language.models.ChangeJobCompartmentDetails.rst @@ -0,0 +1,11 @@ +ChangeJobCompartmentDetails +=========================== + +.. currentmodule:: oci.ai_language.models + +.. autoclass:: ChangeJobCompartmentDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_language/models/oci.ai_language.models.ConfigurationDetails.rst b/docs/api/ai_language/models/oci.ai_language.models.ConfigurationDetails.rst new file mode 100644 index 0000000000..4561769884 --- /dev/null +++ b/docs/api/ai_language/models/oci.ai_language.models.ConfigurationDetails.rst @@ -0,0 +1,11 @@ +ConfigurationDetails +==================== + +.. currentmodule:: oci.ai_language.models + +.. autoclass:: ConfigurationDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_language/models/oci.ai_language.models.CreateJobDetails.rst b/docs/api/ai_language/models/oci.ai_language.models.CreateJobDetails.rst new file mode 100644 index 0000000000..4fc3823c53 --- /dev/null +++ b/docs/api/ai_language/models/oci.ai_language.models.CreateJobDetails.rst @@ -0,0 +1,11 @@ +CreateJobDetails +================ + +.. currentmodule:: oci.ai_language.models + +.. autoclass:: CreateJobDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_language/models/oci.ai_language.models.DocumentsConfiguration.rst b/docs/api/ai_language/models/oci.ai_language.models.DocumentsConfiguration.rst new file mode 100644 index 0000000000..3247ccf1b5 --- /dev/null +++ b/docs/api/ai_language/models/oci.ai_language.models.DocumentsConfiguration.rst @@ -0,0 +1,11 @@ +DocumentsConfiguration +====================== + +.. currentmodule:: oci.ai_language.models + +.. autoclass:: DocumentsConfiguration + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_language/models/oci.ai_language.models.InputConfiguration.rst b/docs/api/ai_language/models/oci.ai_language.models.InputConfiguration.rst new file mode 100644 index 0000000000..64e85aabe9 --- /dev/null +++ b/docs/api/ai_language/models/oci.ai_language.models.InputConfiguration.rst @@ -0,0 +1,11 @@ +InputConfiguration +================== + +.. currentmodule:: oci.ai_language.models + +.. autoclass:: InputConfiguration + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_language/models/oci.ai_language.models.InputLocation.rst b/docs/api/ai_language/models/oci.ai_language.models.InputLocation.rst new file mode 100644 index 0000000000..8f5f737d09 --- /dev/null +++ b/docs/api/ai_language/models/oci.ai_language.models.InputLocation.rst @@ -0,0 +1,11 @@ +InputLocation +============= + +.. currentmodule:: oci.ai_language.models + +.. autoclass:: InputLocation + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_language/models/oci.ai_language.models.Job.rst b/docs/api/ai_language/models/oci.ai_language.models.Job.rst new file mode 100644 index 0000000000..f31c428b7b --- /dev/null +++ b/docs/api/ai_language/models/oci.ai_language.models.Job.rst @@ -0,0 +1,11 @@ +Job +=== + +.. currentmodule:: oci.ai_language.models + +.. autoclass:: Job + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_language/models/oci.ai_language.models.JobCollection.rst b/docs/api/ai_language/models/oci.ai_language.models.JobCollection.rst new file mode 100644 index 0000000000..fd284979cb --- /dev/null +++ b/docs/api/ai_language/models/oci.ai_language.models.JobCollection.rst @@ -0,0 +1,11 @@ +JobCollection +============= + +.. currentmodule:: oci.ai_language.models + +.. autoclass:: JobCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_language/models/oci.ai_language.models.JobSummary.rst b/docs/api/ai_language/models/oci.ai_language.models.JobSummary.rst new file mode 100644 index 0000000000..7e8246e600 --- /dev/null +++ b/docs/api/ai_language/models/oci.ai_language.models.JobSummary.rst @@ -0,0 +1,11 @@ +JobSummary +========== + +.. currentmodule:: oci.ai_language.models + +.. autoclass:: JobSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_language/models/oci.ai_language.models.ModelMetadataDetails.rst b/docs/api/ai_language/models/oci.ai_language.models.ModelMetadataDetails.rst new file mode 100644 index 0000000000..09cdf28dc3 --- /dev/null +++ b/docs/api/ai_language/models/oci.ai_language.models.ModelMetadataDetails.rst @@ -0,0 +1,11 @@ +ModelMetadataDetails +==================== + +.. currentmodule:: oci.ai_language.models + +.. autoclass:: ModelMetadataDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_language/models/oci.ai_language.models.ObjectPrefixOutputLocation.rst b/docs/api/ai_language/models/oci.ai_language.models.ObjectPrefixOutputLocation.rst new file mode 100644 index 0000000000..91912c8889 --- /dev/null +++ b/docs/api/ai_language/models/oci.ai_language.models.ObjectPrefixOutputLocation.rst @@ -0,0 +1,11 @@ +ObjectPrefixOutputLocation +========================== + +.. currentmodule:: oci.ai_language.models + +.. autoclass:: ObjectPrefixOutputLocation + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_language/models/oci.ai_language.models.ObjectStorageFileNameLocation.rst b/docs/api/ai_language/models/oci.ai_language.models.ObjectStorageFileNameLocation.rst new file mode 100644 index 0000000000..941b114b76 --- /dev/null +++ b/docs/api/ai_language/models/oci.ai_language.models.ObjectStorageFileNameLocation.rst @@ -0,0 +1,11 @@ +ObjectStorageFileNameLocation +============================= + +.. currentmodule:: oci.ai_language.models + +.. autoclass:: ObjectStorageFileNameLocation + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_language/models/oci.ai_language.models.ObjectStoragePrefixLocation.rst b/docs/api/ai_language/models/oci.ai_language.models.ObjectStoragePrefixLocation.rst new file mode 100644 index 0000000000..0e38524433 --- /dev/null +++ b/docs/api/ai_language/models/oci.ai_language.models.ObjectStoragePrefixLocation.rst @@ -0,0 +1,11 @@ +ObjectStoragePrefixLocation +=========================== + +.. currentmodule:: oci.ai_language.models + +.. autoclass:: ObjectStoragePrefixLocation + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_language/models/oci.ai_language.models.UpdateJobDetails.rst b/docs/api/ai_language/models/oci.ai_language.models.UpdateJobDetails.rst new file mode 100644 index 0000000000..2a312db5e2 --- /dev/null +++ b/docs/api/ai_language/models/oci.ai_language.models.UpdateJobDetails.rst @@ -0,0 +1,11 @@ +UpdateJobDetails +================ + +.. currentmodule:: oci.ai_language.models + +.. autoclass:: UpdateJobDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/apm_traces.rst b/docs/api/apm_traces.rst index 81b500d536..7a199d7a1a 100644 --- a/docs/api/apm_traces.rst +++ b/docs/api/apm_traces.rst @@ -6,8 +6,10 @@ Apm Traces :nosignatures: :template: autosummary/service_client.rst + oci.apm_traces.AttributesClient oci.apm_traces.QueryClient oci.apm_traces.TraceClient + oci.apm_traces.AttributesClientCompositeOperations oci.apm_traces.QueryClientCompositeOperations oci.apm_traces.TraceClientCompositeOperations @@ -22,13 +24,47 @@ Apm Traces oci.apm_traces.models.AggregatedSnapshot oci.apm_traces.models.AggregatedStackTrace + oci.apm_traces.models.AttributePinResponse + oci.apm_traces.models.AttributeResponse + oci.apm_traces.models.AttributeUnpinResponse + oci.apm_traces.models.AttributeUpdateNotesResponse + oci.apm_traces.models.AttributeUpdateResponse + oci.apm_traces.models.AutoActivateStatus + oci.apm_traces.models.AutoActivateToggleStatus + oci.apm_traces.models.BulkActivateAttributeDetail + oci.apm_traces.models.BulkActivateAttributeDetails + oci.apm_traces.models.BulkActivationMetadata + oci.apm_traces.models.BulkActivationStatus + oci.apm_traces.models.BulkDeActivateAttributeDetail + oci.apm_traces.models.BulkDeActivateAttributeDetails + oci.apm_traces.models.BulkDeActivationMetadata + oci.apm_traces.models.BulkDeActivationStatus + oci.apm_traces.models.BulkPinAttributeDetail + oci.apm_traces.models.BulkPinAttributeDetails + oci.apm_traces.models.BulkPinMetadata + oci.apm_traces.models.BulkPinStatus + oci.apm_traces.models.BulkUnpinAttributeDetail + oci.apm_traces.models.BulkUnpinAttributeDetails + oci.apm_traces.models.BulkUnpinMetadata + oci.apm_traces.models.BulkUnpinStatus + oci.apm_traces.models.BulkUpdateAttributeDetail + oci.apm_traces.models.BulkUpdateAttributeDetails + oci.apm_traces.models.BulkUpdateAttributeMetadata + oci.apm_traces.models.BulkUpdateAttributeNotesDetail + oci.apm_traces.models.BulkUpdateAttributeNotesDetails + oci.apm_traces.models.BulkUpdateAttributeStatus + oci.apm_traces.models.BulkUpdateNotesMetadata + oci.apm_traces.models.BulkUpdateNotesStatus oci.apm_traces.models.QueryDetails oci.apm_traces.models.QueryResultMetadataSummary oci.apm_traces.models.QueryResultResponse oci.apm_traces.models.QueryResultRow oci.apm_traces.models.QueryResultRowTypeSummary + oci.apm_traces.models.QueryResultWarning oci.apm_traces.models.QueryResultsGroupedBySummary oci.apm_traces.models.QueryResultsOrderedBySummary + oci.apm_traces.models.QueryResultsTopologyInfo + oci.apm_traces.models.QueryResultsTopologyNodeInfo oci.apm_traces.models.QuickPickSummary oci.apm_traces.models.SnapshotDetail oci.apm_traces.models.Span @@ -37,6 +73,7 @@ Apm Traces oci.apm_traces.models.SpanSnapshot oci.apm_traces.models.StackTraceElement oci.apm_traces.models.Tag + oci.apm_traces.models.TagMetadata oci.apm_traces.models.ThreadSnapshot oci.apm_traces.models.Trace oci.apm_traces.models.TraceServiceSummary diff --git a/docs/api/apm_traces/client/oci.apm_traces.AttributesClient.rst b/docs/api/apm_traces/client/oci.apm_traces.AttributesClient.rst new file mode 100644 index 0000000000..f622e1c94a --- /dev/null +++ b/docs/api/apm_traces/client/oci.apm_traces.AttributesClient.rst @@ -0,0 +1,8 @@ +AttributesClient +================ + +.. currentmodule:: oci.apm_traces + +.. autoclass:: AttributesClient + :special-members: __init__ + :members: \ No newline at end of file diff --git a/docs/api/apm_traces/client/oci.apm_traces.AttributesClientCompositeOperations.rst b/docs/api/apm_traces/client/oci.apm_traces.AttributesClientCompositeOperations.rst new file mode 100644 index 0000000000..159484f977 --- /dev/null +++ b/docs/api/apm_traces/client/oci.apm_traces.AttributesClientCompositeOperations.rst @@ -0,0 +1,8 @@ +AttributesClientCompositeOperations +=================================== + +.. currentmodule:: oci.apm_traces + +.. autoclass:: AttributesClientCompositeOperations + :special-members: __init__ + :members: \ No newline at end of file diff --git a/docs/api/apm_traces/models/oci.apm_traces.models.AttributePinResponse.rst b/docs/api/apm_traces/models/oci.apm_traces.models.AttributePinResponse.rst new file mode 100644 index 0000000000..353057bfcb --- /dev/null +++ b/docs/api/apm_traces/models/oci.apm_traces.models.AttributePinResponse.rst @@ -0,0 +1,11 @@ +AttributePinResponse +==================== + +.. currentmodule:: oci.apm_traces.models + +.. autoclass:: AttributePinResponse + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/apm_traces/models/oci.apm_traces.models.AttributeResponse.rst b/docs/api/apm_traces/models/oci.apm_traces.models.AttributeResponse.rst new file mode 100644 index 0000000000..1997e98488 --- /dev/null +++ b/docs/api/apm_traces/models/oci.apm_traces.models.AttributeResponse.rst @@ -0,0 +1,11 @@ +AttributeResponse +================= + +.. currentmodule:: oci.apm_traces.models + +.. autoclass:: AttributeResponse + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/apm_traces/models/oci.apm_traces.models.AttributeUnpinResponse.rst b/docs/api/apm_traces/models/oci.apm_traces.models.AttributeUnpinResponse.rst new file mode 100644 index 0000000000..6b33eed2fc --- /dev/null +++ b/docs/api/apm_traces/models/oci.apm_traces.models.AttributeUnpinResponse.rst @@ -0,0 +1,11 @@ +AttributeUnpinResponse +====================== + +.. currentmodule:: oci.apm_traces.models + +.. autoclass:: AttributeUnpinResponse + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/apm_traces/models/oci.apm_traces.models.AttributeUpdateNotesResponse.rst b/docs/api/apm_traces/models/oci.apm_traces.models.AttributeUpdateNotesResponse.rst new file mode 100644 index 0000000000..9965d95b9d --- /dev/null +++ b/docs/api/apm_traces/models/oci.apm_traces.models.AttributeUpdateNotesResponse.rst @@ -0,0 +1,11 @@ +AttributeUpdateNotesResponse +============================ + +.. currentmodule:: oci.apm_traces.models + +.. autoclass:: AttributeUpdateNotesResponse + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/apm_traces/models/oci.apm_traces.models.AttributeUpdateResponse.rst b/docs/api/apm_traces/models/oci.apm_traces.models.AttributeUpdateResponse.rst new file mode 100644 index 0000000000..fbae03d969 --- /dev/null +++ b/docs/api/apm_traces/models/oci.apm_traces.models.AttributeUpdateResponse.rst @@ -0,0 +1,11 @@ +AttributeUpdateResponse +======================= + +.. currentmodule:: oci.apm_traces.models + +.. autoclass:: AttributeUpdateResponse + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/apm_traces/models/oci.apm_traces.models.AutoActivateStatus.rst b/docs/api/apm_traces/models/oci.apm_traces.models.AutoActivateStatus.rst new file mode 100644 index 0000000000..1101793275 --- /dev/null +++ b/docs/api/apm_traces/models/oci.apm_traces.models.AutoActivateStatus.rst @@ -0,0 +1,11 @@ +AutoActivateStatus +================== + +.. currentmodule:: oci.apm_traces.models + +.. autoclass:: AutoActivateStatus + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/apm_traces/models/oci.apm_traces.models.AutoActivateToggleStatus.rst b/docs/api/apm_traces/models/oci.apm_traces.models.AutoActivateToggleStatus.rst new file mode 100644 index 0000000000..143f22de55 --- /dev/null +++ b/docs/api/apm_traces/models/oci.apm_traces.models.AutoActivateToggleStatus.rst @@ -0,0 +1,11 @@ +AutoActivateToggleStatus +======================== + +.. currentmodule:: oci.apm_traces.models + +.. autoclass:: AutoActivateToggleStatus + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/apm_traces/models/oci.apm_traces.models.BulkActivateAttributeDetail.rst b/docs/api/apm_traces/models/oci.apm_traces.models.BulkActivateAttributeDetail.rst new file mode 100644 index 0000000000..a2a6dca15f --- /dev/null +++ b/docs/api/apm_traces/models/oci.apm_traces.models.BulkActivateAttributeDetail.rst @@ -0,0 +1,11 @@ +BulkActivateAttributeDetail +=========================== + +.. currentmodule:: oci.apm_traces.models + +.. autoclass:: BulkActivateAttributeDetail + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/apm_traces/models/oci.apm_traces.models.BulkActivateAttributeDetails.rst b/docs/api/apm_traces/models/oci.apm_traces.models.BulkActivateAttributeDetails.rst new file mode 100644 index 0000000000..0699dd9a0e --- /dev/null +++ b/docs/api/apm_traces/models/oci.apm_traces.models.BulkActivateAttributeDetails.rst @@ -0,0 +1,11 @@ +BulkActivateAttributeDetails +============================ + +.. currentmodule:: oci.apm_traces.models + +.. autoclass:: BulkActivateAttributeDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/apm_traces/models/oci.apm_traces.models.BulkActivationMetadata.rst b/docs/api/apm_traces/models/oci.apm_traces.models.BulkActivationMetadata.rst new file mode 100644 index 0000000000..2cd7b36101 --- /dev/null +++ b/docs/api/apm_traces/models/oci.apm_traces.models.BulkActivationMetadata.rst @@ -0,0 +1,11 @@ +BulkActivationMetadata +====================== + +.. currentmodule:: oci.apm_traces.models + +.. autoclass:: BulkActivationMetadata + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/apm_traces/models/oci.apm_traces.models.BulkActivationStatus.rst b/docs/api/apm_traces/models/oci.apm_traces.models.BulkActivationStatus.rst new file mode 100644 index 0000000000..189ceed571 --- /dev/null +++ b/docs/api/apm_traces/models/oci.apm_traces.models.BulkActivationStatus.rst @@ -0,0 +1,11 @@ +BulkActivationStatus +==================== + +.. currentmodule:: oci.apm_traces.models + +.. autoclass:: BulkActivationStatus + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/apm_traces/models/oci.apm_traces.models.BulkDeActivateAttributeDetail.rst b/docs/api/apm_traces/models/oci.apm_traces.models.BulkDeActivateAttributeDetail.rst new file mode 100644 index 0000000000..4d223c43c1 --- /dev/null +++ b/docs/api/apm_traces/models/oci.apm_traces.models.BulkDeActivateAttributeDetail.rst @@ -0,0 +1,11 @@ +BulkDeActivateAttributeDetail +============================= + +.. currentmodule:: oci.apm_traces.models + +.. autoclass:: BulkDeActivateAttributeDetail + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/apm_traces/models/oci.apm_traces.models.BulkDeActivateAttributeDetails.rst b/docs/api/apm_traces/models/oci.apm_traces.models.BulkDeActivateAttributeDetails.rst new file mode 100644 index 0000000000..6ba2c852bf --- /dev/null +++ b/docs/api/apm_traces/models/oci.apm_traces.models.BulkDeActivateAttributeDetails.rst @@ -0,0 +1,11 @@ +BulkDeActivateAttributeDetails +============================== + +.. currentmodule:: oci.apm_traces.models + +.. autoclass:: BulkDeActivateAttributeDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/apm_traces/models/oci.apm_traces.models.BulkDeActivationMetadata.rst b/docs/api/apm_traces/models/oci.apm_traces.models.BulkDeActivationMetadata.rst new file mode 100644 index 0000000000..bef679bcae --- /dev/null +++ b/docs/api/apm_traces/models/oci.apm_traces.models.BulkDeActivationMetadata.rst @@ -0,0 +1,11 @@ +BulkDeActivationMetadata +======================== + +.. currentmodule:: oci.apm_traces.models + +.. autoclass:: BulkDeActivationMetadata + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/apm_traces/models/oci.apm_traces.models.BulkDeActivationStatus.rst b/docs/api/apm_traces/models/oci.apm_traces.models.BulkDeActivationStatus.rst new file mode 100644 index 0000000000..46c0b03bb0 --- /dev/null +++ b/docs/api/apm_traces/models/oci.apm_traces.models.BulkDeActivationStatus.rst @@ -0,0 +1,11 @@ +BulkDeActivationStatus +====================== + +.. currentmodule:: oci.apm_traces.models + +.. autoclass:: BulkDeActivationStatus + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/apm_traces/models/oci.apm_traces.models.BulkPinAttributeDetail.rst b/docs/api/apm_traces/models/oci.apm_traces.models.BulkPinAttributeDetail.rst new file mode 100644 index 0000000000..b397296408 --- /dev/null +++ b/docs/api/apm_traces/models/oci.apm_traces.models.BulkPinAttributeDetail.rst @@ -0,0 +1,11 @@ +BulkPinAttributeDetail +====================== + +.. currentmodule:: oci.apm_traces.models + +.. autoclass:: BulkPinAttributeDetail + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/apm_traces/models/oci.apm_traces.models.BulkPinAttributeDetails.rst b/docs/api/apm_traces/models/oci.apm_traces.models.BulkPinAttributeDetails.rst new file mode 100644 index 0000000000..1789fe643e --- /dev/null +++ b/docs/api/apm_traces/models/oci.apm_traces.models.BulkPinAttributeDetails.rst @@ -0,0 +1,11 @@ +BulkPinAttributeDetails +======================= + +.. currentmodule:: oci.apm_traces.models + +.. autoclass:: BulkPinAttributeDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/apm_traces/models/oci.apm_traces.models.BulkPinMetadata.rst b/docs/api/apm_traces/models/oci.apm_traces.models.BulkPinMetadata.rst new file mode 100644 index 0000000000..865420f106 --- /dev/null +++ b/docs/api/apm_traces/models/oci.apm_traces.models.BulkPinMetadata.rst @@ -0,0 +1,11 @@ +BulkPinMetadata +=============== + +.. currentmodule:: oci.apm_traces.models + +.. autoclass:: BulkPinMetadata + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/apm_traces/models/oci.apm_traces.models.BulkPinStatus.rst b/docs/api/apm_traces/models/oci.apm_traces.models.BulkPinStatus.rst new file mode 100644 index 0000000000..449216ca5c --- /dev/null +++ b/docs/api/apm_traces/models/oci.apm_traces.models.BulkPinStatus.rst @@ -0,0 +1,11 @@ +BulkPinStatus +============= + +.. currentmodule:: oci.apm_traces.models + +.. autoclass:: BulkPinStatus + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/apm_traces/models/oci.apm_traces.models.BulkUnpinAttributeDetail.rst b/docs/api/apm_traces/models/oci.apm_traces.models.BulkUnpinAttributeDetail.rst new file mode 100644 index 0000000000..2517bbf701 --- /dev/null +++ b/docs/api/apm_traces/models/oci.apm_traces.models.BulkUnpinAttributeDetail.rst @@ -0,0 +1,11 @@ +BulkUnpinAttributeDetail +======================== + +.. currentmodule:: oci.apm_traces.models + +.. autoclass:: BulkUnpinAttributeDetail + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/apm_traces/models/oci.apm_traces.models.BulkUnpinAttributeDetails.rst b/docs/api/apm_traces/models/oci.apm_traces.models.BulkUnpinAttributeDetails.rst new file mode 100644 index 0000000000..528986c009 --- /dev/null +++ b/docs/api/apm_traces/models/oci.apm_traces.models.BulkUnpinAttributeDetails.rst @@ -0,0 +1,11 @@ +BulkUnpinAttributeDetails +========================= + +.. currentmodule:: oci.apm_traces.models + +.. autoclass:: BulkUnpinAttributeDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/apm_traces/models/oci.apm_traces.models.BulkUnpinMetadata.rst b/docs/api/apm_traces/models/oci.apm_traces.models.BulkUnpinMetadata.rst new file mode 100644 index 0000000000..eb93254519 --- /dev/null +++ b/docs/api/apm_traces/models/oci.apm_traces.models.BulkUnpinMetadata.rst @@ -0,0 +1,11 @@ +BulkUnpinMetadata +================= + +.. currentmodule:: oci.apm_traces.models + +.. autoclass:: BulkUnpinMetadata + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/apm_traces/models/oci.apm_traces.models.BulkUnpinStatus.rst b/docs/api/apm_traces/models/oci.apm_traces.models.BulkUnpinStatus.rst new file mode 100644 index 0000000000..50d8dabd0f --- /dev/null +++ b/docs/api/apm_traces/models/oci.apm_traces.models.BulkUnpinStatus.rst @@ -0,0 +1,11 @@ +BulkUnpinStatus +=============== + +.. currentmodule:: oci.apm_traces.models + +.. autoclass:: BulkUnpinStatus + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/apm_traces/models/oci.apm_traces.models.BulkUpdateAttributeDetail.rst b/docs/api/apm_traces/models/oci.apm_traces.models.BulkUpdateAttributeDetail.rst new file mode 100644 index 0000000000..bfa3c86e9f --- /dev/null +++ b/docs/api/apm_traces/models/oci.apm_traces.models.BulkUpdateAttributeDetail.rst @@ -0,0 +1,11 @@ +BulkUpdateAttributeDetail +========================= + +.. currentmodule:: oci.apm_traces.models + +.. autoclass:: BulkUpdateAttributeDetail + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/apm_traces/models/oci.apm_traces.models.BulkUpdateAttributeDetails.rst b/docs/api/apm_traces/models/oci.apm_traces.models.BulkUpdateAttributeDetails.rst new file mode 100644 index 0000000000..25dd7b681a --- /dev/null +++ b/docs/api/apm_traces/models/oci.apm_traces.models.BulkUpdateAttributeDetails.rst @@ -0,0 +1,11 @@ +BulkUpdateAttributeDetails +========================== + +.. currentmodule:: oci.apm_traces.models + +.. autoclass:: BulkUpdateAttributeDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/apm_traces/models/oci.apm_traces.models.BulkUpdateAttributeMetadata.rst b/docs/api/apm_traces/models/oci.apm_traces.models.BulkUpdateAttributeMetadata.rst new file mode 100644 index 0000000000..076f366f3f --- /dev/null +++ b/docs/api/apm_traces/models/oci.apm_traces.models.BulkUpdateAttributeMetadata.rst @@ -0,0 +1,11 @@ +BulkUpdateAttributeMetadata +=========================== + +.. currentmodule:: oci.apm_traces.models + +.. autoclass:: BulkUpdateAttributeMetadata + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/apm_traces/models/oci.apm_traces.models.BulkUpdateAttributeNotesDetail.rst b/docs/api/apm_traces/models/oci.apm_traces.models.BulkUpdateAttributeNotesDetail.rst new file mode 100644 index 0000000000..0909c5ded9 --- /dev/null +++ b/docs/api/apm_traces/models/oci.apm_traces.models.BulkUpdateAttributeNotesDetail.rst @@ -0,0 +1,11 @@ +BulkUpdateAttributeNotesDetail +============================== + +.. currentmodule:: oci.apm_traces.models + +.. autoclass:: BulkUpdateAttributeNotesDetail + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/apm_traces/models/oci.apm_traces.models.BulkUpdateAttributeNotesDetails.rst b/docs/api/apm_traces/models/oci.apm_traces.models.BulkUpdateAttributeNotesDetails.rst new file mode 100644 index 0000000000..29c73afd62 --- /dev/null +++ b/docs/api/apm_traces/models/oci.apm_traces.models.BulkUpdateAttributeNotesDetails.rst @@ -0,0 +1,11 @@ +BulkUpdateAttributeNotesDetails +=============================== + +.. currentmodule:: oci.apm_traces.models + +.. autoclass:: BulkUpdateAttributeNotesDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/apm_traces/models/oci.apm_traces.models.BulkUpdateAttributeStatus.rst b/docs/api/apm_traces/models/oci.apm_traces.models.BulkUpdateAttributeStatus.rst new file mode 100644 index 0000000000..d58f312ba4 --- /dev/null +++ b/docs/api/apm_traces/models/oci.apm_traces.models.BulkUpdateAttributeStatus.rst @@ -0,0 +1,11 @@ +BulkUpdateAttributeStatus +========================= + +.. currentmodule:: oci.apm_traces.models + +.. autoclass:: BulkUpdateAttributeStatus + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/apm_traces/models/oci.apm_traces.models.BulkUpdateNotesMetadata.rst b/docs/api/apm_traces/models/oci.apm_traces.models.BulkUpdateNotesMetadata.rst new file mode 100644 index 0000000000..abd86f7a74 --- /dev/null +++ b/docs/api/apm_traces/models/oci.apm_traces.models.BulkUpdateNotesMetadata.rst @@ -0,0 +1,11 @@ +BulkUpdateNotesMetadata +======================= + +.. currentmodule:: oci.apm_traces.models + +.. autoclass:: BulkUpdateNotesMetadata + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/apm_traces/models/oci.apm_traces.models.BulkUpdateNotesStatus.rst b/docs/api/apm_traces/models/oci.apm_traces.models.BulkUpdateNotesStatus.rst new file mode 100644 index 0000000000..b498ff4eae --- /dev/null +++ b/docs/api/apm_traces/models/oci.apm_traces.models.BulkUpdateNotesStatus.rst @@ -0,0 +1,11 @@ +BulkUpdateNotesStatus +===================== + +.. currentmodule:: oci.apm_traces.models + +.. autoclass:: BulkUpdateNotesStatus + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/apm_traces/models/oci.apm_traces.models.QueryResultWarning.rst b/docs/api/apm_traces/models/oci.apm_traces.models.QueryResultWarning.rst new file mode 100644 index 0000000000..26d904a934 --- /dev/null +++ b/docs/api/apm_traces/models/oci.apm_traces.models.QueryResultWarning.rst @@ -0,0 +1,11 @@ +QueryResultWarning +================== + +.. currentmodule:: oci.apm_traces.models + +.. autoclass:: QueryResultWarning + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/apm_traces/models/oci.apm_traces.models.QueryResultsTopologyInfo.rst b/docs/api/apm_traces/models/oci.apm_traces.models.QueryResultsTopologyInfo.rst new file mode 100644 index 0000000000..4b4886844b --- /dev/null +++ b/docs/api/apm_traces/models/oci.apm_traces.models.QueryResultsTopologyInfo.rst @@ -0,0 +1,11 @@ +QueryResultsTopologyInfo +======================== + +.. currentmodule:: oci.apm_traces.models + +.. autoclass:: QueryResultsTopologyInfo + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/apm_traces/models/oci.apm_traces.models.QueryResultsTopologyNodeInfo.rst b/docs/api/apm_traces/models/oci.apm_traces.models.QueryResultsTopologyNodeInfo.rst new file mode 100644 index 0000000000..4880e027c6 --- /dev/null +++ b/docs/api/apm_traces/models/oci.apm_traces.models.QueryResultsTopologyNodeInfo.rst @@ -0,0 +1,11 @@ +QueryResultsTopologyNodeInfo +============================ + +.. currentmodule:: oci.apm_traces.models + +.. autoclass:: QueryResultsTopologyNodeInfo + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/apm_traces/models/oci.apm_traces.models.TagMetadata.rst b/docs/api/apm_traces/models/oci.apm_traces.models.TagMetadata.rst new file mode 100644 index 0000000000..38dd58676f --- /dev/null +++ b/docs/api/apm_traces/models/oci.apm_traces.models.TagMetadata.rst @@ -0,0 +1,11 @@ +TagMetadata +=========== + +.. currentmodule:: oci.apm_traces.models + +.. autoclass:: TagMetadata + :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 d5ae035ac2..65db7d96e5 100644 --- a/docs/api/landing.rst +++ b/docs/api/landing.rst @@ -25,6 +25,7 @@ API Reference * :doc:`Application Migration ` * :doc:`Appmgmt Control ` * :doc:`Artifacts ` +* :doc:`Attributes ` * :doc:`Audit ` * :doc:`Auto Scaling ` * :doc:`Bastion ` diff --git a/src/oci/ai_language/ai_service_language_client.py b/src/oci/ai_language/ai_service_language_client.py index 04b5f29c9f..8711ba77cc 100644 --- a/src/oci/ai_language/ai_service_language_client.py +++ b/src/oci/ai_language/ai_service_language_client.py @@ -800,6 +800,121 @@ def batch_language_translation(self, batch_language_translation_details, **kwarg api_reference_link=api_reference_link, required_arguments=required_arguments) + def cancel_job(self, job_id, **kwargs): + """ + Canceling the job cancels all the tasks under it. + + + :param str job_id: (required) + Unique Transcription Job identifier. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call + for a resource, set the `if-match` parameter to the value of the + etag from a previous GET or POST response for that resource. + The resource will be updated or deleted only if the etag you + provide matches the resource's current etag value. + + :param str opc_request_id: (optional) + The client request ID for tracing. + + :param str opc_retry_token: (optional) + A token that uniquely identifies a request so it can be retried in case of a timeout or + server error without risk of executing that same action again. Retry tokens expire after 24 + hours, but can be invalidated before then due to conflicting operations. For example, if a resource + has been deleted and purged from the system, then a retry of the original creation request + might be rejected. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :param bool allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. + By default, the response will not allow control characters in strings + + :return: A :class:`~oci.response.Response` object with data of type None + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use cancel_job API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['jobId'] + resource_path = "/jobs/{jobId}/actions/cancel" + method = "POST" + operation_name = "cancel_job" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/language/20221001/Job/CancelJob" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "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( + f"cancel_job got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "jobId": job_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(f'Parameter {k} cannot be None, whitespace or empty string') + + 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 is None: + retry_strategy = retry.DEFAULT_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, + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + def change_endpoint_compartment(self, endpoint_id, change_endpoint_compartment_details, **kwargs): """ Moves a Endpoint into a different compartment. When provided, If-Match is checked against ETag values of the resource. @@ -918,6 +1033,124 @@ def change_endpoint_compartment(self, endpoint_id, change_endpoint_compartment_d api_reference_link=api_reference_link, required_arguments=required_arguments) + def change_job_compartment(self, job_id, change_job_compartment_details, **kwargs): + """ + Moves a Job into a different compartment. When provided, If-Match is checked against ETag values of the resource. + + + :param str job_id: (required) + unique job OCID. + + :param oci.ai_language.models.ChangeJobCompartmentDetails change_job_compartment_details: (required) + + :param str opc_request_id: (optional) + Unique identifier for the request. + If you need to contact Oracle about a particular request, please provide the request ID. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + parameter to the value of the etag from a previous GET or POST response for that resource. The resource + will be updated or deleted only if the etag you provide matches the resource's current etag value. + + :param 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 uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :param bool allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. + By default, the response will not allow control characters in strings + + :return: A :class:`~oci.response.Response` object with data of type None + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use change_job_compartment API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['jobId'] + resource_path = "/jobs/{jobId}/actions/changeCompartment" + method = "POST" + operation_name = "change_job_compartment" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/language/20221001/Job/ChangeJobCompartment" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "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( + f"change_job_compartment got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "jobId": job_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(f'Parameter {k} cannot be None, whitespace or empty string') + + 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 is None: + retry_strategy = retry.DEFAULT_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_job_compartment_details, + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=change_job_compartment_details, + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + def change_model_compartment(self, model_id, change_model_compartment_details, **kwargs): """ Moves a Model into a different compartment. When provided, If-Match is checked against ETag values of the resource. @@ -1252,6 +1485,104 @@ def create_endpoint(self, create_endpoint_details, **kwargs): api_reference_link=api_reference_link, required_arguments=required_arguments) + def create_job(self, create_job_details, **kwargs): + """ + Creates a new language service async job. + + + :param oci.ai_language.models.CreateJobDetails create_job_details: (required) + Details for the new job. + + :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 uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :param bool allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. + By default, the response will not allow control characters in strings + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.ai_language.models.Job` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use create_job API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = [] + resource_path = "/jobs" + method = "POST" + operation_name = "create_job" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/language/20221001/Job/CreateJob" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "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( + f"create_job got unknown kwargs: {extra_kwargs!r}") + + 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 is None: + retry_strategy = retry.DEFAULT_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_job_details, + response_type="Job", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + header_params=header_params, + body=create_job_details, + response_type="Job", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + def create_model(self, create_model_details, **kwargs): """ Creates a new model for training and train the model with date provided. @@ -1553,6 +1884,111 @@ def delete_endpoint(self, endpoint_id, **kwargs): api_reference_link=api_reference_link, required_arguments=required_arguments) + def delete_job(self, job_id, **kwargs): + """ + Deletes the language service async Job + + + :param str job_id: (required) + Unique Transcription Job identifier. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call + for a resource, set the `if-match` parameter to the value of the + etag from a previous GET or POST response for that resource. + The resource will be updated or deleted only if the etag you + provide matches the resource's current etag value. + + :param str opc_request_id: (optional) + The client request ID for tracing. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :param bool allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. + By default, the response will not allow control characters in strings + + :return: A :class:`~oci.response.Response` object with data of type None + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use delete_job API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['jobId'] + resource_path = "/jobs/{jobId}" + method = "DELETE" + operation_name = "delete_job" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/language/20221001/Job/DeleteJob" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "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( + f"delete_job got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "jobId": job_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(f'Parameter {k} cannot be None, whitespace or empty string') + + 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 is None: + retry_strategy = retry.DEFAULT_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, + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + def delete_model(self, model_id, **kwargs): """ Deletes a provisioned model resource by identifier. This operation fails with a 409 error unless all associated resources are in a DELETED state. You must delete all associated resources before deleting a model. @@ -2253,8 +2689,106 @@ def detect_language_text_classification(self, detect_language_text_classificatio resource_path=resource_path, method=method, header_params=header_params, - body=detect_language_text_classification_details, - response_type="DetectLanguageTextClassificationResult", + body=detect_language_text_classification_details, + response_type="DetectLanguageTextClassificationResult", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + header_params=header_params, + body=detect_language_text_classification_details, + response_type="DetectLanguageTextClassificationResult", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + + def get_endpoint(self, endpoint_id, **kwargs): + """ + Gets an endpoint by identifier + + + :param str endpoint_id: (required) + The OCID of the endpoint. + + :param str opc_request_id: (optional) + The client request ID for tracing. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :param bool allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. + By default, the response will not allow control characters in strings + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.ai_language.models.Endpoint` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_endpoint API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['endpointId'] + resource_path = "/endpoints/{endpointId}" + method = "GET" + operation_name = "get_endpoint" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/language/20221001/Endpoint/GetEndpoint" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "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( + f"get_endpoint got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "endpointId": endpoint_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(f'Parameter {k} cannot be None, whitespace or empty string') + + 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 is None: + retry_strategy = retry.DEFAULT_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="Endpoint", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -2263,21 +2797,21 @@ def detect_language_text_classification(self, detect_language_text_classificatio return self.base_client.call_api( resource_path=resource_path, method=method, + path_params=path_params, header_params=header_params, - body=detect_language_text_classification_details, - response_type="DetectLanguageTextClassificationResult", + response_type="Endpoint", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def get_endpoint(self, endpoint_id, **kwargs): + def get_job(self, job_id, **kwargs): """ - Gets an endpoint by identifier + Gets a language service async job - :param str endpoint_id: (required) - The OCID of the endpoint. + :param str job_id: (required) + Unique Transcription Job identifier. :param str opc_request_id: (optional) The client request ID for tracing. @@ -2294,18 +2828,18 @@ def get_endpoint(self, endpoint_id, **kwargs): allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings - :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.ai_language.models.Endpoint` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.ai_language.models.Job` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use get_endpoint API. + Click `here `__ to see an example of how to use get_job API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['endpointId'] - resource_path = "/endpoints/{endpointId}" + required_arguments = ['jobId'] + resource_path = "/jobs/{jobId}" method = "GET" - operation_name = "get_endpoint" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/language/20221001/Endpoint/GetEndpoint" + operation_name = "get_job" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/language/20221001/Job/GetJob" # Don't accept unknown kwargs expected_kwargs = [ @@ -2316,10 +2850,10 @@ def get_endpoint(self, endpoint_id, **kwargs): extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"get_endpoint got unknown kwargs: {extra_kwargs!r}") + f"get_job got unknown kwargs: {extra_kwargs!r}") path_params = { - "endpointId": endpoint_id + "jobId": job_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -2352,7 +2886,7 @@ def get_endpoint(self, endpoint_id, **kwargs): method=method, path_params=path_params, header_params=header_params, - response_type="Endpoint", + response_type="Job", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -2363,7 +2897,7 @@ def get_endpoint(self, endpoint_id, **kwargs): method=method, path_params=path_params, header_params=header_params, - response_type="Endpoint", + response_type="Job", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -3044,6 +3578,161 @@ def list_evaluation_results(self, model_id, **kwargs): api_reference_link=api_reference_link, required_arguments=required_arguments) + def list_jobs(self, compartment_id, **kwargs): + """ + Returns a list of language service async Jobs. + + + :param str compartment_id: (required) + The ID of the compartment in which to list resources. + + :param str lifecycle_state: (optional) + A filter to return only resources whose lifecycleState matches the given lifecycleState. + + Allowed values are: "ACCEPTED", "IN_PROGRESS", "SUCCEEDED", "FAILED", "CANCELING", "CANCELED", "DELETING", "DELETED" + + :param str display_name: (optional) + A filter to return only resources that match the entire display name given. + + :param str id: (optional) + Unique identifier(OCID). + + :param int limit: (optional) + The maximum number of items to return. + + :param str page: (optional) + The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + + :param str sort_order: (optional) + The sort order to use, either 'asc' or 'desc'. + + Allowed values are: "ASC", "DESC" + + :param str sort_by: (optional) + The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + + Allowed values are: "timeCreated", "displayName" + + :param str opc_request_id: (optional) + The client request ID for tracing. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :param bool allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. + By default, the response will not allow control characters in strings + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.ai_language.models.JobCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_jobs API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['compartmentId'] + resource_path = "/jobs" + method = "GET" + operation_name = "list_jobs" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/language/20221001/Job/ListJobs" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "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( + f"list_jobs got unknown kwargs: {extra_kwargs!r}") + + if 'lifecycle_state' in kwargs: + lifecycle_state_allowed_values = ["ACCEPTED", "IN_PROGRESS", "SUCCEEDED", "FAILED", "CANCELING", "CANCELED", "DELETING", "DELETED"] + if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values: + raise ValueError( + f"Invalid value for `lifecycle_state`, must be one of { 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( + f"Invalid value for `sort_order`, must be one of { 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( + f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }" + ) + + query_params = { + "compartmentId": compartment_id, + "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), + "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 is None: + retry_strategy = retry.DEFAULT_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="JobCollection", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="JobCollection", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + def list_models(self, compartment_id, **kwargs): """ Returns a list of models. @@ -3902,6 +4591,118 @@ def update_endpoint(self, endpoint_id, update_endpoint_details, **kwargs): api_reference_link=api_reference_link, required_arguments=required_arguments) + def update_job(self, job_id, update_job_details, **kwargs): + """ + Updates the language service async Job + + + :param str job_id: (required) + Unique Transcription Job identifier. + + :param oci.ai_language.models.UpdateJobDetails update_job_details: (required) + The information to be updated. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call + for a resource, set the `if-match` parameter to the value of the + etag from a previous GET or POST response for that resource. + The resource will be updated or deleted only if the etag you + provide matches the resource's current etag value. + + :param str opc_request_id: (optional) + The client request ID for tracing. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :param bool allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. + By default, the response will not allow control characters in strings + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.ai_language.models.Job` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use update_job API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['jobId'] + resource_path = "/jobs/{jobId}" + method = "PUT" + operation_name = "update_job" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/language/20221001/Job/UpdateJob" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "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( + f"update_job got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "jobId": job_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(f'Parameter {k} cannot be None, whitespace or empty string') + + 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 is None: + retry_strategy = retry.DEFAULT_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_job_details, + response_type="Job", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=update_job_details, + response_type="Job", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + def update_model(self, model_id, update_model_details, **kwargs): """ Updates the model diff --git a/src/oci/ai_language/ai_service_language_client_composite_operations.py b/src/oci/ai_language/ai_service_language_client_composite_operations.py index 5283d9ae62..f5a9a4f134 100644 --- a/src/oci/ai_language/ai_service_language_client_composite_operations.py +++ b/src/oci/ai_language/ai_service_language_client_composite_operations.py @@ -64,6 +64,45 @@ def create_endpoint_and_wait_for_state(self, create_endpoint_details, wait_for_s except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def create_job_and_wait_for_state(self, create_job_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.ai_language.AIServiceLanguageClient.create_job` and waits for the :py:class:`~oci.ai_language.models.WorkRequest` + to enter the given state(s). + + :param oci.ai_language.models.CreateJobDetails create_job_details: (required) + Details for the new job. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.ai_language.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.ai_language.AIServiceLanguageClient.create_job` + + :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_job(create_job_details, **operation_kwargs) + if not wait_for_states: + return operation_result + lowered_wait_for_states = [w.lower() for w in wait_for_states] + if 'opc-work-request-id' not in operation_result.headers: + return operation_result + wait_for_resource_id = operation_result.headers['opc-work-request-id'] + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_work_request(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def create_model_and_wait_for_state(self, create_model_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ Calls :py:func:`~oci.ai_language.AIServiceLanguageClient.create_model` and waits for the :py:class:`~oci.ai_language.models.WorkRequest` @@ -189,6 +228,53 @@ def delete_endpoint_and_wait_for_state(self, endpoint_id, wait_for_states=[], op except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def delete_job_and_wait_for_state(self, job_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.ai_language.AIServiceLanguageClient.delete_job` and waits for the :py:class:`~oci.ai_language.models.WorkRequest` + to enter the given state(s). + + :param str job_id: (required) + Unique Transcription Job identifier. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.ai_language.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.ai_language.AIServiceLanguageClient.delete_job` + + :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_job(job_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] + if 'opc-work-request-id' not in operation_result.headers: + return operation_result + wait_for_resource_id = operation_result.headers['opc-work-request-id'] + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_work_request(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def delete_model_and_wait_for_state(self, model_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ Calls :py:func:`~oci.ai_language.AIServiceLanguageClient.delete_model` and waits for the :py:class:`~oci.ai_language.models.WorkRequest` @@ -325,6 +411,51 @@ def update_endpoint_and_wait_for_state(self, endpoint_id, update_endpoint_detail except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def update_job_and_wait_for_state(self, job_id, update_job_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.ai_language.AIServiceLanguageClient.update_job` and waits for the :py:class:`~oci.ai_language.models.Job` acted upon + to enter the given state(s). + + :param str job_id: (required) + Unique Transcription Job identifier. + + :param oci.ai_language.models.UpdateJobDetails update_job_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.ai_language.models.Job.lifecycle_state` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.ai_language.AIServiceLanguageClient.update_job` + + :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_job(job_id, update_job_details, **operation_kwargs) + if not wait_for_states: + return operation_result + lowered_wait_for_states = [w.lower() for w in wait_for_states] + job_id = operation_result.data.id + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_job(job_id), # noqa: F821 + 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 (NameError, TypeError) as e: + if not e.args: + e.args = ('',) + e.args = e.args + ('This composite operation is currently not supported in the SDK. Please use the operation from the service client and use waiters as an alternative. For more information on waiters, visit: "https://docs.oracle.com/en-us/iaas/tools/python/latest/api/waiters.html"', ) + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def update_model_and_wait_for_state(self, model_id, update_model_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ Calls :py:func:`~oci.ai_language.AIServiceLanguageClient.update_model` and waits for the :py:class:`~oci.ai_language.models.WorkRequest` diff --git a/src/oci/ai_language/models/__init__.py b/src/oci/ai_language/models/__init__.py index 2a4bec2dd1..cb818024d7 100644 --- a/src/oci/ai_language/models/__init__.py +++ b/src/oci/ai_language/models/__init__.py @@ -23,14 +23,17 @@ from .capabilities import Capabilities from .capability import Capability from .change_endpoint_compartment_details import ChangeEndpointCompartmentDetails +from .change_job_compartment_details import ChangeJobCompartmentDetails from .change_model_compartment_details import ChangeModelCompartmentDetails from .change_project_compartment_details import ChangeProjectCompartmentDetails from .class_metrics import ClassMetrics from .classification_multi_class_mode_details import ClassificationMultiClassModeDetails from .classification_multi_label_mode_details import ClassificationMultiLabelModeDetails from .classification_type import ClassificationType +from .configuration_details import ConfigurationDetails from .confusion_matrix_details import ConfusionMatrixDetails from .create_endpoint_details import CreateEndpointDetails +from .create_job_details import CreateJobDetails from .create_model_details import CreateModelDetails from .create_project_details import CreateProjectDetails from .data_science_labeling_dataset import DataScienceLabelingDataset @@ -47,6 +50,7 @@ from .detect_language_text_classification_result import DetectLanguageTextClassificationResult from .detected_language import DetectedLanguage from .document_error import DocumentError +from .documents_configuration import DocumentsConfiguration from .dominant_language_document import DominantLanguageDocument from .dominant_language_document_result import DominantLanguageDocumentResult from .endpoint import Endpoint @@ -61,12 +65,18 @@ from .evaluation_result_summary import EvaluationResultSummary from .evaluation_results import EvaluationResults from .hierarchical_entity import HierarchicalEntity +from .input_configuration import InputConfiguration +from .input_location import InputLocation +from .job import Job +from .job_collection import JobCollection +from .job_summary import JobSummary from .key_phrase import KeyPhrase from .key_phrase_document_result import KeyPhraseDocumentResult from .location_details import LocationDetails from .model import Model from .model_collection import ModelCollection from .model_details import ModelDetails +from .model_metadata_details import ModelMetadataDetails from .model_summary import ModelSummary from .model_type_info import ModelTypeInfo from .named_entity_recognition_evaluation_result import NamedEntityRecognitionEvaluationResult @@ -74,7 +84,10 @@ from .named_entity_recognition_model_details import NamedEntityRecognitionModelDetails from .named_entity_recognition_model_metrics import NamedEntityRecognitionModelMetrics from .object_list_dataset import ObjectListDataset +from .object_prefix_output_location import ObjectPrefixOutputLocation from .object_storage_dataset import ObjectStorageDataset +from .object_storage_file_name_location import ObjectStorageFileNameLocation +from .object_storage_prefix_location import ObjectStoragePrefixLocation from .pii_entity import PiiEntity from .pii_entity_document_result import PiiEntityDocumentResult from .pii_entity_mask import PiiEntityMask @@ -108,6 +121,7 @@ from .text_document import TextDocument from .translation_document_result import TranslationDocumentResult from .update_endpoint_details import UpdateEndpointDetails +from .update_job_details import UpdateJobDetails from .update_model_details import UpdateModelDetails from .update_project_details import UpdateProjectDetails from .work_request import WorkRequest @@ -138,14 +152,17 @@ "Capabilities": Capabilities, "Capability": Capability, "ChangeEndpointCompartmentDetails": ChangeEndpointCompartmentDetails, + "ChangeJobCompartmentDetails": ChangeJobCompartmentDetails, "ChangeModelCompartmentDetails": ChangeModelCompartmentDetails, "ChangeProjectCompartmentDetails": ChangeProjectCompartmentDetails, "ClassMetrics": ClassMetrics, "ClassificationMultiClassModeDetails": ClassificationMultiClassModeDetails, "ClassificationMultiLabelModeDetails": ClassificationMultiLabelModeDetails, "ClassificationType": ClassificationType, + "ConfigurationDetails": ConfigurationDetails, "ConfusionMatrixDetails": ConfusionMatrixDetails, "CreateEndpointDetails": CreateEndpointDetails, + "CreateJobDetails": CreateJobDetails, "CreateModelDetails": CreateModelDetails, "CreateProjectDetails": CreateProjectDetails, "DataScienceLabelingDataset": DataScienceLabelingDataset, @@ -162,6 +179,7 @@ "DetectLanguageTextClassificationResult": DetectLanguageTextClassificationResult, "DetectedLanguage": DetectedLanguage, "DocumentError": DocumentError, + "DocumentsConfiguration": DocumentsConfiguration, "DominantLanguageDocument": DominantLanguageDocument, "DominantLanguageDocumentResult": DominantLanguageDocumentResult, "Endpoint": Endpoint, @@ -176,12 +194,18 @@ "EvaluationResultSummary": EvaluationResultSummary, "EvaluationResults": EvaluationResults, "HierarchicalEntity": HierarchicalEntity, + "InputConfiguration": InputConfiguration, + "InputLocation": InputLocation, + "Job": Job, + "JobCollection": JobCollection, + "JobSummary": JobSummary, "KeyPhrase": KeyPhrase, "KeyPhraseDocumentResult": KeyPhraseDocumentResult, "LocationDetails": LocationDetails, "Model": Model, "ModelCollection": ModelCollection, "ModelDetails": ModelDetails, + "ModelMetadataDetails": ModelMetadataDetails, "ModelSummary": ModelSummary, "ModelTypeInfo": ModelTypeInfo, "NamedEntityRecognitionEvaluationResult": NamedEntityRecognitionEvaluationResult, @@ -189,7 +213,10 @@ "NamedEntityRecognitionModelDetails": NamedEntityRecognitionModelDetails, "NamedEntityRecognitionModelMetrics": NamedEntityRecognitionModelMetrics, "ObjectListDataset": ObjectListDataset, + "ObjectPrefixOutputLocation": ObjectPrefixOutputLocation, "ObjectStorageDataset": ObjectStorageDataset, + "ObjectStorageFileNameLocation": ObjectStorageFileNameLocation, + "ObjectStoragePrefixLocation": ObjectStoragePrefixLocation, "PiiEntity": PiiEntity, "PiiEntityDocumentResult": PiiEntityDocumentResult, "PiiEntityMask": PiiEntityMask, @@ -223,6 +250,7 @@ "TextDocument": TextDocument, "TranslationDocumentResult": TranslationDocumentResult, "UpdateEndpointDetails": UpdateEndpointDetails, + "UpdateJobDetails": UpdateJobDetails, "UpdateModelDetails": UpdateModelDetails, "UpdateProjectDetails": UpdateProjectDetails, "WorkRequest": WorkRequest, diff --git a/src/oci/ai_language/models/change_job_compartment_details.py b/src/oci/ai_language/models/change_job_compartment_details.py new file mode 100644 index 0000000000..02599bd20a --- /dev/null +++ b/src/oci/ai_language/models/change_job_compartment_details.py @@ -0,0 +1,78 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20221001 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class ChangeJobCompartmentDetails(object): + """ + Details for changing the compartment of a language job. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ChangeJobCompartmentDetails 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 ChangeJobCompartmentDetails. + :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 ChangeJobCompartmentDetails. + The `OCID`__ of the compartment + where the resource should be moved. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + + + :return: The compartment_id of this ChangeJobCompartmentDetails. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this ChangeJobCompartmentDetails. + The `OCID`__ of the compartment + where the resource should be moved. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + + + :param compartment_id: The compartment_id of this ChangeJobCompartmentDetails. + :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/ai_language/models/configuration_details.py b/src/oci/ai_language/models/configuration_details.py new file mode 100644 index 0000000000..a1f4b3151c --- /dev/null +++ b/src/oci/ai_language/models/configuration_details.py @@ -0,0 +1,132 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20221001 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class ConfigurationDetails(object): + """ + training model details + """ + + def __init__(self, **kwargs): + """ + Initializes a new ConfigurationDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param configuration_map: + The value to assign to the configuration_map property of this ConfigurationDetails. + :type configuration_map: dict(str, str) + + """ + self.swagger_types = { + 'configuration_map': 'dict(str, str)' + } + + self.attribute_map = { + 'configuration_map': 'configurationMap' + } + + self._configuration_map = None + + @property + def configuration_map(self): + """ + Gets the configuration_map of this ConfigurationDetails. + model configuration details + For PII : ConfigurationDetails will be PiiEntityMasking can be anyone of the following + ex.{ \"mode\" : \"MASK\",\"maskingCharacter\" : \"&\",\"leaveCharactersUnmasked\": 3,\"isUnmaskedFromEnd\" : true } + { \"mode\" : \"MASK\",\"replaceWith\" : \"&\" } + { \"mode\" : \"REPLACE\" } + For language translation : { \"languageCodes\" : [\"cs\", \"ar\"]} + Language code supported + Automatically detect language - auto + Arabic - ar + Brazilian Portuguese - pt-BR + Czech - cs + Danish - da + Dutch - nl + English - en + Finnish - fi + French - fr + Canadian French - fr-CA + German - de + Italian - it + Japanese - ja + Korean - ko + Norwegian - no + Polish - pl + Romanian - ro + Simplified Chinese - zh-CN + Spanish - es + Swedish - sv + Traditional Chinese - zh-TW + Turkish - tr + Greek - el + Hebrew - he + + + :return: The configuration_map of this ConfigurationDetails. + :rtype: dict(str, str) + """ + return self._configuration_map + + @configuration_map.setter + def configuration_map(self, configuration_map): + """ + Sets the configuration_map of this ConfigurationDetails. + model configuration details + For PII : ConfigurationDetails will be PiiEntityMasking can be anyone of the following + ex.{ \"mode\" : \"MASK\",\"maskingCharacter\" : \"&\",\"leaveCharactersUnmasked\": 3,\"isUnmaskedFromEnd\" : true } + { \"mode\" : \"MASK\",\"replaceWith\" : \"&\" } + { \"mode\" : \"REPLACE\" } + For language translation : { \"languageCodes\" : [\"cs\", \"ar\"]} + Language code supported + Automatically detect language - auto + Arabic - ar + Brazilian Portuguese - pt-BR + Czech - cs + Danish - da + Dutch - nl + English - en + Finnish - fi + French - fr + Canadian French - fr-CA + German - de + Italian - it + Japanese - ja + Korean - ko + Norwegian - no + Polish - pl + Romanian - ro + Simplified Chinese - zh-CN + Spanish - es + Swedish - sv + Traditional Chinese - zh-TW + Turkish - tr + Greek - el + Hebrew - he + + + :param configuration_map: The configuration_map of this ConfigurationDetails. + :type: dict(str, str) + """ + self._configuration_map = configuration_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/ai_language/models/create_job_details.py b/src/oci/ai_language/models/create_job_details.py new file mode 100644 index 0000000000..645b9042e6 --- /dev/null +++ b/src/oci/ai_language/models/create_job_details.py @@ -0,0 +1,254 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20221001 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class CreateJobDetails(object): + """ + Job creation detail which will have documents on which language services need to run prediction along with output folder + """ + + def __init__(self, **kwargs): + """ + Initializes a new CreateJobDetails 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 CreateJobDetails. + :type display_name: str + + :param description: + The value to assign to the description property of this CreateJobDetails. + :type description: str + + :param compartment_id: + The value to assign to the compartment_id property of this CreateJobDetails. + :type compartment_id: str + + :param input_location: + The value to assign to the input_location property of this CreateJobDetails. + :type input_location: oci.ai_language.models.InputLocation + + :param input_configuration: + The value to assign to the input_configuration property of this CreateJobDetails. + :type input_configuration: oci.ai_language.models.InputConfiguration + + :param model_metadata_details: + The value to assign to the model_metadata_details property of this CreateJobDetails. + :type model_metadata_details: list[oci.ai_language.models.ModelMetadataDetails] + + :param output_location: + The value to assign to the output_location property of this CreateJobDetails. + :type output_location: oci.ai_language.models.ObjectPrefixOutputLocation + + """ + self.swagger_types = { + 'display_name': 'str', + 'description': 'str', + 'compartment_id': 'str', + 'input_location': 'InputLocation', + 'input_configuration': 'InputConfiguration', + 'model_metadata_details': 'list[ModelMetadataDetails]', + 'output_location': 'ObjectPrefixOutputLocation' + } + + self.attribute_map = { + 'display_name': 'displayName', + 'description': 'description', + 'compartment_id': 'compartmentId', + 'input_location': 'inputLocation', + 'input_configuration': 'inputConfiguration', + 'model_metadata_details': 'modelMetadataDetails', + 'output_location': 'outputLocation' + } + + self._display_name = None + self._description = None + self._compartment_id = None + self._input_location = None + self._input_configuration = None + self._model_metadata_details = None + self._output_location = None + + @property + def display_name(self): + """ + Gets the display_name of this CreateJobDetails. + A user-friendly display name for the job. + + + :return: The display_name of this CreateJobDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this CreateJobDetails. + A user-friendly display name for the job. + + + :param display_name: The display_name of this CreateJobDetails. + :type: str + """ + self._display_name = display_name + + @property + def description(self): + """ + Gets the description of this CreateJobDetails. + A short description of the job. + + + :return: The description of this CreateJobDetails. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this CreateJobDetails. + A short description of the job. + + + :param description: The description of this CreateJobDetails. + :type: str + """ + self._description = description + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this CreateJobDetails. + The `OCID`__ of the compartment where you want to create the job. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The compartment_id of this CreateJobDetails. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this CreateJobDetails. + The `OCID`__ of the compartment where you want to create the job. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param compartment_id: The compartment_id of this CreateJobDetails. + :type: str + """ + self._compartment_id = compartment_id + + @property + def input_location(self): + """ + **[Required]** Gets the input_location of this CreateJobDetails. + + :return: The input_location of this CreateJobDetails. + :rtype: oci.ai_language.models.InputLocation + """ + return self._input_location + + @input_location.setter + def input_location(self, input_location): + """ + Sets the input_location of this CreateJobDetails. + + :param input_location: The input_location of this CreateJobDetails. + :type: oci.ai_language.models.InputLocation + """ + self._input_location = input_location + + @property + def input_configuration(self): + """ + Gets the input_configuration of this CreateJobDetails. + + :return: The input_configuration of this CreateJobDetails. + :rtype: oci.ai_language.models.InputConfiguration + """ + return self._input_configuration + + @input_configuration.setter + def input_configuration(self, input_configuration): + """ + Sets the input_configuration of this CreateJobDetails. + + :param input_configuration: The input_configuration of this CreateJobDetails. + :type: oci.ai_language.models.InputConfiguration + """ + self._input_configuration = input_configuration + + @property + def model_metadata_details(self): + """ + **[Required]** Gets the model_metadata_details of this CreateJobDetails. + training model details + For this release only one model is allowed to be input here. + One of the three modelType, ModelId, endpointId should be given other wise error will be thrown from API + + + :return: The model_metadata_details of this CreateJobDetails. + :rtype: list[oci.ai_language.models.ModelMetadataDetails] + """ + return self._model_metadata_details + + @model_metadata_details.setter + def model_metadata_details(self, model_metadata_details): + """ + Sets the model_metadata_details of this CreateJobDetails. + training model details + For this release only one model is allowed to be input here. + One of the three modelType, ModelId, endpointId should be given other wise error will be thrown from API + + + :param model_metadata_details: The model_metadata_details of this CreateJobDetails. + :type: list[oci.ai_language.models.ModelMetadataDetails] + """ + self._model_metadata_details = model_metadata_details + + @property + def output_location(self): + """ + **[Required]** Gets the output_location of this CreateJobDetails. + + :return: The output_location of this CreateJobDetails. + :rtype: oci.ai_language.models.ObjectPrefixOutputLocation + """ + return self._output_location + + @output_location.setter + def output_location(self, output_location): + """ + Sets the output_location of this CreateJobDetails. + + :param output_location: The output_location of this CreateJobDetails. + :type: oci.ai_language.models.ObjectPrefixOutputLocation + """ + self._output_location = output_location + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/ai_language/models/documents_configuration.py b/src/oci/ai_language/models/documents_configuration.py new file mode 100644 index 0000000000..01dac1eca7 --- /dev/null +++ b/src/oci/ai_language/models/documents_configuration.py @@ -0,0 +1,76 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20221001 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class DocumentsConfiguration(object): + """ + Input documents configuration + """ + + def __init__(self, **kwargs): + """ + Initializes a new DocumentsConfiguration object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param config: + The value to assign to the config property of this DocumentsConfiguration. + :type config: dict(str, str) + + """ + self.swagger_types = { + 'config': 'dict(str, str)' + } + + self.attribute_map = { + 'config': 'config' + } + + self._config = None + + @property + def config(self): + """ + Gets the config of this DocumentsConfiguration. + meta data about documents + For CSV valid JSON format is {\"CSV\" :{inputColumn: \"reviewDetails\", rowId: \"reviewId\", copyColumnsToOutput: [\"reviewId\" \"userId\"] , delimiter: \",\"} + Note: In future if new file types added we will update here in documentation about input file meta data + + + :return: The config of this DocumentsConfiguration. + :rtype: dict(str, str) + """ + return self._config + + @config.setter + def config(self, config): + """ + Sets the config of this DocumentsConfiguration. + meta data about documents + For CSV valid JSON format is {\"CSV\" :{inputColumn: \"reviewDetails\", rowId: \"reviewId\", copyColumnsToOutput: [\"reviewId\" \"userId\"] , delimiter: \",\"} + Note: In future if new file types added we will update here in documentation about input file meta data + + + :param config: The config of this DocumentsConfiguration. + :type: dict(str, str) + """ + self._config = config + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/ai_language/models/input_configuration.py b/src/oci/ai_language/models/input_configuration.py new file mode 100644 index 0000000000..d695d81bab --- /dev/null +++ b/src/oci/ai_language/models/input_configuration.py @@ -0,0 +1,112 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20221001 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class InputConfiguration(object): + """ + input documents configuration + by default TXT files will be processed and this behaviour will not change in future after adding new types + """ + + def __init__(self, **kwargs): + """ + Initializes a new InputConfiguration object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param document_types: + The value to assign to the document_types property of this InputConfiguration. + :type document_types: list[str] + + :param configuration: + The value to assign to the configuration property of this InputConfiguration. + :type configuration: dict(str, DocumentsConfiguration) + + """ + self.swagger_types = { + 'document_types': 'list[str]', + 'configuration': 'dict(str, DocumentsConfiguration)' + } + + self.attribute_map = { + 'document_types': 'documentTypes', + 'configuration': 'configuration' + } + + self._document_types = None + self._configuration = None + + @property + def document_types(self): + """ + Gets the document_types of this InputConfiguration. + Type of documents supported + for this release only TXT,CSV and one element is allowed here. + for future scope this is marked as list + + + :return: The document_types of this InputConfiguration. + :rtype: list[str] + """ + return self._document_types + + @document_types.setter + def document_types(self, document_types): + """ + Sets the document_types of this InputConfiguration. + Type of documents supported + for this release only TXT,CSV and one element is allowed here. + for future scope this is marked as list + + + :param document_types: The document_types of this InputConfiguration. + :type: list[str] + """ + self._document_types = document_types + + @property + def configuration(self): + """ + Gets the configuration of this InputConfiguration. + meta data about documents + For CSV valid JSON format is {\"CSV\" :{inputColumn: \"reviewDetails\", rowId: \"reviewId\", copyColumnsToOutput: [\"reviewId\" \"userId\"] , delimiter: \",\"} + Note: In future if new file types added we will update here in documentation about input file meta data + + + :return: The configuration of this InputConfiguration. + :rtype: dict(str, DocumentsConfiguration) + """ + return self._configuration + + @configuration.setter + def configuration(self, configuration): + """ + Sets the configuration of this InputConfiguration. + meta data about documents + For CSV valid JSON format is {\"CSV\" :{inputColumn: \"reviewDetails\", rowId: \"reviewId\", copyColumnsToOutput: [\"reviewId\" \"userId\"] , delimiter: \",\"} + Note: In future if new file types added we will update here in documentation about input file meta data + + + :param configuration: The configuration of this InputConfiguration. + :type: dict(str, DocumentsConfiguration) + """ + self._configuration = configuration + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/ai_language/models/input_location.py b/src/oci/ai_language/models/input_location.py new file mode 100644 index 0000000000..369c4966a4 --- /dev/null +++ b/src/oci/ai_language/models/input_location.py @@ -0,0 +1,111 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20221001 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class InputLocation(object): + """ + document location and other meta data about documents + For TXT both ObjectStoragePrefixLocation and ObjectStorageFileNameLocation supported + For CSV only ObjectStorageFileNameLocation is supported + """ + + #: A constant which can be used with the location_type property of a InputLocation. + #: This constant has a value of "OBJECT_STORAGE_PREFIX" + LOCATION_TYPE_OBJECT_STORAGE_PREFIX = "OBJECT_STORAGE_PREFIX" + + #: A constant which can be used with the location_type property of a InputLocation. + #: This constant has a value of "OBJECT_STORAGE_FILE_LIST" + LOCATION_TYPE_OBJECT_STORAGE_FILE_LIST = "OBJECT_STORAGE_FILE_LIST" + + def __init__(self, **kwargs): + """ + Initializes a new InputLocation 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.ai_language.models.ObjectStoragePrefixLocation` + * :class:`~oci.ai_language.models.ObjectStorageFileNameLocation` + + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param location_type: + The value to assign to the location_type property of this InputLocation. + Allowed values for this property are: "OBJECT_STORAGE_PREFIX", "OBJECT_STORAGE_FILE_LIST", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type location_type: str + + """ + self.swagger_types = { + 'location_type': 'str' + } + + self.attribute_map = { + 'location_type': 'locationType' + } + + self._location_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['locationType'] + + if type == 'OBJECT_STORAGE_PREFIX': + return 'ObjectStoragePrefixLocation' + + if type == 'OBJECT_STORAGE_FILE_LIST': + return 'ObjectStorageFileNameLocation' + else: + return 'InputLocation' + + @property + def location_type(self): + """ + **[Required]** Gets the location_type of this InputLocation. + locationType + + Allowed values for this property are: "OBJECT_STORAGE_PREFIX", "OBJECT_STORAGE_FILE_LIST", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The location_type of this InputLocation. + :rtype: str + """ + return self._location_type + + @location_type.setter + def location_type(self, location_type): + """ + Sets the location_type of this InputLocation. + locationType + + + :param location_type: The location_type of this InputLocation. + :type: str + """ + allowed_values = ["OBJECT_STORAGE_PREFIX", "OBJECT_STORAGE_FILE_LIST"] + if not value_allowed_none_or_none_sentinel(location_type, allowed_values): + location_type = 'UNKNOWN_ENUM_VALUE' + self._location_type = location_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/ai_language/models/job.py b/src/oci/ai_language/models/job.py new file mode 100644 index 0000000000..a618a42196 --- /dev/null +++ b/src/oci/ai_language/models/job.py @@ -0,0 +1,736 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20221001 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class Job(object): + """ + Job details which contain input document details on which prediction need to run, features (which and all language services ) need to run and where to store results + """ + + #: A constant which can be used with the lifecycle_state property of a Job. + #: This constant has a value of "ACCEPTED" + LIFECYCLE_STATE_ACCEPTED = "ACCEPTED" + + #: A constant which can be used with the lifecycle_state property of a Job. + #: 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 Job. + #: This constant has a value of "SUCCEEDED" + LIFECYCLE_STATE_SUCCEEDED = "SUCCEEDED" + + #: A constant which can be used with the lifecycle_state property of a Job. + #: This constant has a value of "FAILED" + LIFECYCLE_STATE_FAILED = "FAILED" + + #: A constant which can be used with the lifecycle_state property of a Job. + #: This constant has a value of "CANCELING" + LIFECYCLE_STATE_CANCELING = "CANCELING" + + #: A constant which can be used with the lifecycle_state property of a Job. + #: This constant has a value of "CANCELED" + LIFECYCLE_STATE_CANCELED = "CANCELED" + + #: A constant which can be used with the lifecycle_state property of a Job. + #: This constant has a value of "DELETING" + LIFECYCLE_STATE_DELETING = "DELETING" + + #: A constant which can be used with the lifecycle_state property of a Job. + #: This constant has a value of "DELETED" + LIFECYCLE_STATE_DELETED = "DELETED" + + def __init__(self, **kwargs): + """ + Initializes a new Job 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 Job. + :type id: str + + :param display_name: + The value to assign to the display_name property of this Job. + :type display_name: str + + :param description: + The value to assign to the description property of this Job. + :type description: str + + :param input_location: + The value to assign to the input_location property of this Job. + :type input_location: oci.ai_language.models.InputLocation + + :param input_configuration: + The value to assign to the input_configuration property of this Job. + :type input_configuration: oci.ai_language.models.InputConfiguration + + :param model_metadata_details: + The value to assign to the model_metadata_details property of this Job. + :type model_metadata_details: list[oci.ai_language.models.ModelMetadataDetails] + + :param compartment_id: + The value to assign to the compartment_id property of this Job. + :type compartment_id: str + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this Job. + Allowed values for this property are: "ACCEPTED", "IN_PROGRESS", "SUCCEEDED", "FAILED", "CANCELING", "CANCELED", "DELETING", "DELETED", '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 Job. + :type lifecycle_details: str + + :param percent_complete: + The value to assign to the percent_complete property of this Job. + :type percent_complete: int + + :param total_documents: + The value to assign to the total_documents property of this Job. + :type total_documents: int + + :param pending_documents: + The value to assign to the pending_documents property of this Job. + :type pending_documents: int + + :param completed_documents: + The value to assign to the completed_documents property of this Job. + :type completed_documents: int + + :param failed_documents: + The value to assign to the failed_documents property of this Job. + :type failed_documents: int + + :param warnings_count: + The value to assign to the warnings_count property of this Job. + :type warnings_count: int + + :param output_location: + The value to assign to the output_location property of this Job. + :type output_location: oci.ai_language.models.ObjectPrefixOutputLocation + + :param ttl_in_days: + The value to assign to the ttl_in_days property of this Job. + :type ttl_in_days: int + + :param created_by: + The value to assign to the created_by property of this Job. + :type created_by: str + + :param time_accepted: + The value to assign to the time_accepted property of this Job. + :type time_accepted: datetime + + :param time_started: + The value to assign to the time_started property of this Job. + :type time_started: datetime + + :param time_completed: + The value to assign to the time_completed property of this Job. + :type time_completed: datetime + + """ + self.swagger_types = { + 'id': 'str', + 'display_name': 'str', + 'description': 'str', + 'input_location': 'InputLocation', + 'input_configuration': 'InputConfiguration', + 'model_metadata_details': 'list[ModelMetadataDetails]', + 'compartment_id': 'str', + 'lifecycle_state': 'str', + 'lifecycle_details': 'str', + 'percent_complete': 'int', + 'total_documents': 'int', + 'pending_documents': 'int', + 'completed_documents': 'int', + 'failed_documents': 'int', + 'warnings_count': 'int', + 'output_location': 'ObjectPrefixOutputLocation', + 'ttl_in_days': 'int', + 'created_by': 'str', + 'time_accepted': 'datetime', + 'time_started': 'datetime', + 'time_completed': 'datetime' + } + + self.attribute_map = { + 'id': 'id', + 'display_name': 'displayName', + 'description': 'description', + 'input_location': 'inputLocation', + 'input_configuration': 'inputConfiguration', + 'model_metadata_details': 'modelMetadataDetails', + 'compartment_id': 'compartmentId', + 'lifecycle_state': 'lifecycleState', + 'lifecycle_details': 'lifecycleDetails', + 'percent_complete': 'percentComplete', + 'total_documents': 'totalDocuments', + 'pending_documents': 'pendingDocuments', + 'completed_documents': 'completedDocuments', + 'failed_documents': 'failedDocuments', + 'warnings_count': 'warningsCount', + 'output_location': 'outputLocation', + 'ttl_in_days': 'ttlInDays', + 'created_by': 'createdBy', + 'time_accepted': 'timeAccepted', + 'time_started': 'timeStarted', + 'time_completed': 'timeCompleted' + } + + self._id = None + self._display_name = None + self._description = None + self._input_location = None + self._input_configuration = None + self._model_metadata_details = None + self._compartment_id = None + self._lifecycle_state = None + self._lifecycle_details = None + self._percent_complete = None + self._total_documents = None + self._pending_documents = None + self._completed_documents = None + self._failed_documents = None + self._warnings_count = None + self._output_location = None + self._ttl_in_days = None + self._created_by = None + self._time_accepted = None + self._time_started = None + self._time_completed = None + + @property + def id(self): + """ + **[Required]** Gets the id of this Job. + The `OCID`__ of the job. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The id of this Job. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this Job. + The `OCID`__ of the job. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param id: The id of this Job. + :type: str + """ + self._id = id + + @property + def display_name(self): + """ + Gets the display_name of this Job. + A user-friendly display name for the job. + + + :return: The display_name of this Job. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this Job. + A user-friendly display name for the job. + + + :param display_name: The display_name of this Job. + :type: str + """ + self._display_name = display_name + + @property + def description(self): + """ + Gets the description of this Job. + A short description of the job. + + + :return: The description of this Job. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this Job. + A short description of the job. + + + :param description: The description of this Job. + :type: str + """ + self._description = description + + @property + def input_location(self): + """ + **[Required]** Gets the input_location of this Job. + + :return: The input_location of this Job. + :rtype: oci.ai_language.models.InputLocation + """ + return self._input_location + + @input_location.setter + def input_location(self, input_location): + """ + Sets the input_location of this Job. + + :param input_location: The input_location of this Job. + :type: oci.ai_language.models.InputLocation + """ + self._input_location = input_location + + @property + def input_configuration(self): + """ + Gets the input_configuration of this Job. + + :return: The input_configuration of this Job. + :rtype: oci.ai_language.models.InputConfiguration + """ + return self._input_configuration + + @input_configuration.setter + def input_configuration(self, input_configuration): + """ + Sets the input_configuration of this Job. + + :param input_configuration: The input_configuration of this Job. + :type: oci.ai_language.models.InputConfiguration + """ + self._input_configuration = input_configuration + + @property + def model_metadata_details(self): + """ + **[Required]** Gets the model_metadata_details of this Job. + training model details + For this release only one model is allowed to be input here. + One of the three modelType, ModelId, endpointId should be given other wise error will be thrown from API + + + :return: The model_metadata_details of this Job. + :rtype: list[oci.ai_language.models.ModelMetadataDetails] + """ + return self._model_metadata_details + + @model_metadata_details.setter + def model_metadata_details(self, model_metadata_details): + """ + Sets the model_metadata_details of this Job. + training model details + For this release only one model is allowed to be input here. + One of the three modelType, ModelId, endpointId should be given other wise error will be thrown from API + + + :param model_metadata_details: The model_metadata_details of this Job. + :type: list[oci.ai_language.models.ModelMetadataDetails] + """ + self._model_metadata_details = model_metadata_details + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this Job. + The `OCID`__ of the compartment where you want to create the job. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The compartment_id of this Job. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this Job. + The `OCID`__ of the compartment where you want to create the job. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param compartment_id: The compartment_id of this Job. + :type: str + """ + self._compartment_id = compartment_id + + @property + def lifecycle_state(self): + """ + Gets the lifecycle_state of this Job. + The current state of the Job. + + Allowed values for this property are: "ACCEPTED", "IN_PROGRESS", "SUCCEEDED", "FAILED", "CANCELING", "CANCELED", "DELETING", "DELETED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The lifecycle_state of this Job. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this Job. + The current state of the Job. + + + :param lifecycle_state: The lifecycle_state of this Job. + :type: str + """ + allowed_values = ["ACCEPTED", "IN_PROGRESS", "SUCCEEDED", "FAILED", "CANCELING", "CANCELED", "DELETING", "DELETED"] + if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values): + lifecycle_state = 'UNKNOWN_ENUM_VALUE' + self._lifecycle_state = lifecycle_state + + @property + def lifecycle_details(self): + """ + Gets the lifecycle_details of this Job. + 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 Job. + :rtype: str + """ + return self._lifecycle_details + + @lifecycle_details.setter + def lifecycle_details(self, lifecycle_details): + """ + Sets the lifecycle_details of this Job. + 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 Job. + :type: str + """ + self._lifecycle_details = lifecycle_details + + @property + def percent_complete(self): + """ + Gets the percent_complete of this Job. + How much progress the operation has made, vs the total amount of work that must be performed. + + + :return: The percent_complete of this Job. + :rtype: int + """ + return self._percent_complete + + @percent_complete.setter + def percent_complete(self, percent_complete): + """ + Sets the percent_complete of this Job. + How much progress the operation has made, vs the total amount of work that must be performed. + + + :param percent_complete: The percent_complete of this Job. + :type: int + """ + self._percent_complete = percent_complete + + @property + def total_documents(self): + """ + Gets the total_documents of this Job. + Total number of documents given as input for prediction. For CSV this signifies number of rows and for TXT this signifies number of files. + + + :return: The total_documents of this Job. + :rtype: int + """ + return self._total_documents + + @total_documents.setter + def total_documents(self, total_documents): + """ + Sets the total_documents of this Job. + Total number of documents given as input for prediction. For CSV this signifies number of rows and for TXT this signifies number of files. + + + :param total_documents: The total_documents of this Job. + :type: int + """ + self._total_documents = total_documents + + @property + def pending_documents(self): + """ + Gets the pending_documents of this Job. + Number of documents still to process. For CSV this signifies number of rows and for TXT this signifies number of files. + + + :return: The pending_documents of this Job. + :rtype: int + """ + return self._pending_documents + + @pending_documents.setter + def pending_documents(self, pending_documents): + """ + Sets the pending_documents of this Job. + Number of documents still to process. For CSV this signifies number of rows and for TXT this signifies number of files. + + + :param pending_documents: The pending_documents of this Job. + :type: int + """ + self._pending_documents = pending_documents + + @property + def completed_documents(self): + """ + Gets the completed_documents of this Job. + Number of documents processed for prediction. For CSV this signifies number of rows and for TXT this signifies number of files. + + + :return: The completed_documents of this Job. + :rtype: int + """ + return self._completed_documents + + @completed_documents.setter + def completed_documents(self, completed_documents): + """ + Sets the completed_documents of this Job. + Number of documents processed for prediction. For CSV this signifies number of rows and for TXT this signifies number of files. + + + :param completed_documents: The completed_documents of this Job. + :type: int + """ + self._completed_documents = completed_documents + + @property + def failed_documents(self): + """ + Gets the failed_documents of this Job. + Number of documents failed for prediction. For CSV this signifies number of rows and for TXT this signifies number of files. + + + :return: The failed_documents of this Job. + :rtype: int + """ + return self._failed_documents + + @failed_documents.setter + def failed_documents(self, failed_documents): + """ + Sets the failed_documents of this Job. + Number of documents failed for prediction. For CSV this signifies number of rows and for TXT this signifies number of files. + + + :param failed_documents: The failed_documents of this Job. + :type: int + """ + self._failed_documents = failed_documents + + @property + def warnings_count(self): + """ + Gets the warnings_count of this Job. + warnings count + + + :return: The warnings_count of this Job. + :rtype: int + """ + return self._warnings_count + + @warnings_count.setter + def warnings_count(self, warnings_count): + """ + Sets the warnings_count of this Job. + warnings count + + + :param warnings_count: The warnings_count of this Job. + :type: int + """ + self._warnings_count = warnings_count + + @property + def output_location(self): + """ + **[Required]** Gets the output_location of this Job. + + :return: The output_location of this Job. + :rtype: oci.ai_language.models.ObjectPrefixOutputLocation + """ + return self._output_location + + @output_location.setter + def output_location(self, output_location): + """ + Sets the output_location of this Job. + + :param output_location: The output_location of this Job. + :type: oci.ai_language.models.ObjectPrefixOutputLocation + """ + self._output_location = output_location + + @property + def ttl_in_days(self): + """ + Gets the ttl_in_days of this Job. + Time to live duration in days for Job. Job will be available till max 90 days. + + + :return: The ttl_in_days of this Job. + :rtype: int + """ + return self._ttl_in_days + + @ttl_in_days.setter + def ttl_in_days(self, ttl_in_days): + """ + Sets the ttl_in_days of this Job. + Time to live duration in days for Job. Job will be available till max 90 days. + + + :param ttl_in_days: The ttl_in_days of this Job. + :type: int + """ + self._ttl_in_days = ttl_in_days + + @property + def created_by(self): + """ + Gets the created_by of this Job. + The `OCID`__ of the user who created the job. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The created_by of this Job. + :rtype: str + """ + return self._created_by + + @created_by.setter + def created_by(self, created_by): + """ + Sets the created_by of this Job. + The `OCID`__ of the user who created the job. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param created_by: The created_by of this Job. + :type: str + """ + self._created_by = created_by + + @property + def time_accepted(self): + """ + Gets the time_accepted of this Job. + Job accepted time. + + + :return: The time_accepted of this Job. + :rtype: datetime + """ + return self._time_accepted + + @time_accepted.setter + def time_accepted(self, time_accepted): + """ + Sets the time_accepted of this Job. + Job accepted time. + + + :param time_accepted: The time_accepted of this Job. + :type: datetime + """ + self._time_accepted = time_accepted + + @property + def time_started(self): + """ + Gets the time_started of this Job. + Job started time. + + + :return: The time_started of this Job. + :rtype: datetime + """ + return self._time_started + + @time_started.setter + def time_started(self, time_started): + """ + Sets the time_started of this Job. + Job started time. + + + :param time_started: The time_started of this Job. + :type: datetime + """ + self._time_started = time_started + + @property + def time_completed(self): + """ + Gets the time_completed of this Job. + Job finished time. + + + :return: The time_completed of this Job. + :rtype: datetime + """ + return self._time_completed + + @time_completed.setter + def time_completed(self, time_completed): + """ + Sets the time_completed of this Job. + Job finished time. + + + :param time_completed: The time_completed of this Job. + :type: datetime + """ + self._time_completed = time_completed + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/ai_language/models/job_collection.py b/src/oci/ai_language/models/job_collection.py new file mode 100644 index 0000000000..ca1f2a1497 --- /dev/null +++ b/src/oci/ai_language/models/job_collection.py @@ -0,0 +1,72 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20221001 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class JobCollection(object): + """ + list of Jobs created in the compartment and/or after applying filters based on filters provided by user + """ + + def __init__(self, **kwargs): + """ + Initializes a new JobCollection 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 JobCollection. + :type items: list[oci.ai_language.models.JobSummary] + + """ + self.swagger_types = { + 'items': 'list[JobSummary]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this JobCollection. + List of jobs. + + + :return: The items of this JobCollection. + :rtype: list[oci.ai_language.models.JobSummary] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this JobCollection. + List of jobs. + + + :param items: The items of this JobCollection. + :type: list[oci.ai_language.models.JobSummary] + """ + 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/ai_language/models/job_summary.py b/src/oci/ai_language/models/job_summary.py new file mode 100644 index 0000000000..dd6ed1146f --- /dev/null +++ b/src/oci/ai_language/models/job_summary.py @@ -0,0 +1,549 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20221001 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class JobSummary(object): + """ + sub set of Job details data which need returns in list API + """ + + def __init__(self, **kwargs): + """ + Initializes a new JobSummary 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 JobSummary. + :type id: str + + :param display_name: + The value to assign to the display_name property of this JobSummary. + :type display_name: str + + :param description: + The value to assign to the description property of this JobSummary. + :type description: str + + :param compartment_id: + The value to assign to the compartment_id property of this JobSummary. + :type compartment_id: str + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this JobSummary. + :type lifecycle_state: str + + :param lifecycle_details: + The value to assign to the lifecycle_details property of this JobSummary. + :type lifecycle_details: str + + :param percent_complete: + The value to assign to the percent_complete property of this JobSummary. + :type percent_complete: int + + :param total_documents: + The value to assign to the total_documents property of this JobSummary. + :type total_documents: int + + :param pending_documents: + The value to assign to the pending_documents property of this JobSummary. + :type pending_documents: int + + :param completed_documents: + The value to assign to the completed_documents property of this JobSummary. + :type completed_documents: int + + :param failed_documents: + The value to assign to the failed_documents property of this JobSummary. + :type failed_documents: int + + :param warnings_count: + The value to assign to the warnings_count property of this JobSummary. + :type warnings_count: int + + :param created_by: + The value to assign to the created_by property of this JobSummary. + :type created_by: str + + :param time_accepted: + The value to assign to the time_accepted property of this JobSummary. + :type time_accepted: datetime + + :param time_started: + The value to assign to the time_started property of this JobSummary. + :type time_started: datetime + + :param time_completed: + The value to assign to the time_completed property of this JobSummary. + :type time_completed: datetime + + """ + self.swagger_types = { + 'id': 'str', + 'display_name': 'str', + 'description': 'str', + 'compartment_id': 'str', + 'lifecycle_state': 'str', + 'lifecycle_details': 'str', + 'percent_complete': 'int', + 'total_documents': 'int', + 'pending_documents': 'int', + 'completed_documents': 'int', + 'failed_documents': 'int', + 'warnings_count': 'int', + 'created_by': 'str', + 'time_accepted': 'datetime', + 'time_started': 'datetime', + 'time_completed': 'datetime' + } + + self.attribute_map = { + 'id': 'id', + 'display_name': 'displayName', + 'description': 'description', + 'compartment_id': 'compartmentId', + 'lifecycle_state': 'lifecycleState', + 'lifecycle_details': 'lifecycleDetails', + 'percent_complete': 'percentComplete', + 'total_documents': 'totalDocuments', + 'pending_documents': 'pendingDocuments', + 'completed_documents': 'completedDocuments', + 'failed_documents': 'failedDocuments', + 'warnings_count': 'warningsCount', + 'created_by': 'createdBy', + 'time_accepted': 'timeAccepted', + 'time_started': 'timeStarted', + 'time_completed': 'timeCompleted' + } + + self._id = None + self._display_name = None + self._description = None + self._compartment_id = None + self._lifecycle_state = None + self._lifecycle_details = None + self._percent_complete = None + self._total_documents = None + self._pending_documents = None + self._completed_documents = None + self._failed_documents = None + self._warnings_count = None + self._created_by = None + self._time_accepted = None + self._time_started = None + self._time_completed = None + + @property + def id(self): + """ + **[Required]** Gets the id of this JobSummary. + The `OCID`__ of the job. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The id of this JobSummary. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this JobSummary. + The `OCID`__ of the job. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param id: The id of this JobSummary. + :type: str + """ + self._id = id + + @property + def display_name(self): + """ + **[Required]** Gets the display_name of this JobSummary. + A user-friendly display name for the job. + + + :return: The display_name of this JobSummary. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this JobSummary. + A user-friendly display name for the job. + + + :param display_name: The display_name of this JobSummary. + :type: str + """ + self._display_name = display_name + + @property + def description(self): + """ + Gets the description of this JobSummary. + A short description of the job. + + + :return: The description of this JobSummary. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this JobSummary. + A short description of the job. + + + :param description: The description of this JobSummary. + :type: str + """ + self._description = description + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this JobSummary. + The `OCID`__ of the compartment where you want to create the job. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The compartment_id of this JobSummary. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this JobSummary. + The `OCID`__ of the compartment where you want to create the job. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param compartment_id: The compartment_id of this JobSummary. + :type: str + """ + self._compartment_id = compartment_id + + @property + def lifecycle_state(self): + """ + Gets the lifecycle_state of this JobSummary. + The current state of the Speech Job. + + + :return: The lifecycle_state of this JobSummary. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this JobSummary. + The current state of the Speech Job. + + + :param lifecycle_state: The lifecycle_state of this JobSummary. + :type: str + """ + self._lifecycle_state = lifecycle_state + + @property + def lifecycle_details(self): + """ + Gets the lifecycle_details of this JobSummary. + 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 JobSummary. + :rtype: str + """ + return self._lifecycle_details + + @lifecycle_details.setter + def lifecycle_details(self, lifecycle_details): + """ + Sets the lifecycle_details of this JobSummary. + 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 JobSummary. + :type: str + """ + self._lifecycle_details = lifecycle_details + + @property + def percent_complete(self): + """ + Gets the percent_complete of this JobSummary. + How much progress the operation has made, vs the total amount of work that must be performed. + + + :return: The percent_complete of this JobSummary. + :rtype: int + """ + return self._percent_complete + + @percent_complete.setter + def percent_complete(self, percent_complete): + """ + Sets the percent_complete of this JobSummary. + How much progress the operation has made, vs the total amount of work that must be performed. + + + :param percent_complete: The percent_complete of this JobSummary. + :type: int + """ + self._percent_complete = percent_complete + + @property + def total_documents(self): + """ + Gets the total_documents of this JobSummary. + Total number of documents given as input for prediction. For CSV this signifies number of rows and for TXT this signifies number of files. + + + :return: The total_documents of this JobSummary. + :rtype: int + """ + return self._total_documents + + @total_documents.setter + def total_documents(self, total_documents): + """ + Sets the total_documents of this JobSummary. + Total number of documents given as input for prediction. For CSV this signifies number of rows and for TXT this signifies number of files. + + + :param total_documents: The total_documents of this JobSummary. + :type: int + """ + self._total_documents = total_documents + + @property + def pending_documents(self): + """ + Gets the pending_documents of this JobSummary. + Number of documents still to process. For CSV this signifies number of rows and for TXT this signifies number of files. + + + :return: The pending_documents of this JobSummary. + :rtype: int + """ + return self._pending_documents + + @pending_documents.setter + def pending_documents(self, pending_documents): + """ + Sets the pending_documents of this JobSummary. + Number of documents still to process. For CSV this signifies number of rows and for TXT this signifies number of files. + + + :param pending_documents: The pending_documents of this JobSummary. + :type: int + """ + self._pending_documents = pending_documents + + @property + def completed_documents(self): + """ + Gets the completed_documents of this JobSummary. + Number of documents processed for prediction. For CSV this signifies number of rows and for TXT this signifies number of files. + + + :return: The completed_documents of this JobSummary. + :rtype: int + """ + return self._completed_documents + + @completed_documents.setter + def completed_documents(self, completed_documents): + """ + Sets the completed_documents of this JobSummary. + Number of documents processed for prediction. For CSV this signifies number of rows and for TXT this signifies number of files. + + + :param completed_documents: The completed_documents of this JobSummary. + :type: int + """ + self._completed_documents = completed_documents + + @property + def failed_documents(self): + """ + Gets the failed_documents of this JobSummary. + Number of documents failed for prediction. For CSV this signifies number of rows and for TXT this signifies number of files. + + + :return: The failed_documents of this JobSummary. + :rtype: int + """ + return self._failed_documents + + @failed_documents.setter + def failed_documents(self, failed_documents): + """ + Sets the failed_documents of this JobSummary. + Number of documents failed for prediction. For CSV this signifies number of rows and for TXT this signifies number of files. + + + :param failed_documents: The failed_documents of this JobSummary. + :type: int + """ + self._failed_documents = failed_documents + + @property + def warnings_count(self): + """ + Gets the warnings_count of this JobSummary. + warnings count + + + :return: The warnings_count of this JobSummary. + :rtype: int + """ + return self._warnings_count + + @warnings_count.setter + def warnings_count(self, warnings_count): + """ + Sets the warnings_count of this JobSummary. + warnings count + + + :param warnings_count: The warnings_count of this JobSummary. + :type: int + """ + self._warnings_count = warnings_count + + @property + def created_by(self): + """ + Gets the created_by of this JobSummary. + The `OCID`__ of the user who created the job. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The created_by of this JobSummary. + :rtype: str + """ + return self._created_by + + @created_by.setter + def created_by(self, created_by): + """ + Sets the created_by of this JobSummary. + The `OCID`__ of the user who created the job. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param created_by: The created_by of this JobSummary. + :type: str + """ + self._created_by = created_by + + @property + def time_accepted(self): + """ + Gets the time_accepted of this JobSummary. + Job accepted time. + + + :return: The time_accepted of this JobSummary. + :rtype: datetime + """ + return self._time_accepted + + @time_accepted.setter + def time_accepted(self, time_accepted): + """ + Sets the time_accepted of this JobSummary. + Job accepted time. + + + :param time_accepted: The time_accepted of this JobSummary. + :type: datetime + """ + self._time_accepted = time_accepted + + @property + def time_started(self): + """ + Gets the time_started of this JobSummary. + Job started time. + + + :return: The time_started of this JobSummary. + :rtype: datetime + """ + return self._time_started + + @time_started.setter + def time_started(self, time_started): + """ + Sets the time_started of this JobSummary. + Job started time. + + + :param time_started: The time_started of this JobSummary. + :type: datetime + """ + self._time_started = time_started + + @property + def time_completed(self): + """ + Gets the time_completed of this JobSummary. + Job finished time. + + + :return: The time_completed of this JobSummary. + :rtype: datetime + """ + return self._time_completed + + @time_completed.setter + def time_completed(self, time_completed): + """ + Sets the time_completed of this JobSummary. + Job finished time. + + + :param time_completed: The time_completed of this JobSummary. + :type: datetime + """ + self._time_completed = time_completed + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/ai_language/models/model_metadata_details.py b/src/oci/ai_language/models/model_metadata_details.py new file mode 100644 index 0000000000..d92d170eae --- /dev/null +++ b/src/oci/ai_language/models/model_metadata_details.py @@ -0,0 +1,266 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20221001 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class ModelMetadataDetails(object): + """ + training model details + For this release only one model is allowed to be input here. + One of the three modelType, ModelId, endpointId should be given other wise error will be thrown from API + """ + + def __init__(self, **kwargs): + """ + Initializes a new ModelMetadataDetails object with values from keyword arguments. + 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 ModelMetadataDetails. + :type model_type: str + + :param model_id: + The value to assign to the model_id property of this ModelMetadataDetails. + :type model_id: str + + :param endpoint_id: + The value to assign to the endpoint_id property of this ModelMetadataDetails. + :type endpoint_id: str + + :param language_code: + The value to assign to the language_code property of this ModelMetadataDetails. + :type language_code: str + + :param configuration: + The value to assign to the configuration property of this ModelMetadataDetails. + :type configuration: dict(str, ConfigurationDetails) + + """ + self.swagger_types = { + 'model_type': 'str', + 'model_id': 'str', + 'endpoint_id': 'str', + 'language_code': 'str', + 'configuration': 'dict(str, ConfigurationDetails)' + } + + self.attribute_map = { + 'model_type': 'modelType', + 'model_id': 'modelId', + 'endpoint_id': 'endpointId', + 'language_code': 'languageCode', + 'configuration': 'configuration' + } + + self._model_type = None + self._model_id = None + self._endpoint_id = None + self._language_code = None + self._configuration = None + + @property + def model_type(self): + """ + Gets the model_type of this ModelMetadataDetails. + model type to used for inference allowed values are + - LANGUAGE_SENTIMENT_ANALYSIS + - LANGUAGE_DETECTION + - TEXT_CLASSIFICATION + - NAMED_ENTITY_RECOGNITION + - KEY_PHRASE_EXTRACTION + - LANGUAGE_PII_ENTITIES + - LANGUAGE_TRANSLATION + + + :return: The model_type of this ModelMetadataDetails. + :rtype: str + """ + return self._model_type + + @model_type.setter + def model_type(self, model_type): + """ + Sets the model_type of this ModelMetadataDetails. + model type to used for inference allowed values are + - LANGUAGE_SENTIMENT_ANALYSIS + - LANGUAGE_DETECTION + - TEXT_CLASSIFICATION + - NAMED_ENTITY_RECOGNITION + - KEY_PHRASE_EXTRACTION + - LANGUAGE_PII_ENTITIES + - LANGUAGE_TRANSLATION + + + :param model_type: The model_type of this ModelMetadataDetails. + :type: str + """ + self._model_type = model_type + + @property + def model_id(self): + """ + Gets the model_id of this ModelMetadataDetails. + Unique identifier model OCID that should be used for inference + + + :return: The model_id of this ModelMetadataDetails. + :rtype: str + """ + return self._model_id + + @model_id.setter + def model_id(self, model_id): + """ + Sets the model_id of this ModelMetadataDetails. + Unique identifier model OCID that should be used for inference + + + :param model_id: The model_id of this ModelMetadataDetails. + :type: str + """ + self._model_id = model_id + + @property + def endpoint_id(self): + """ + Gets the endpoint_id of this ModelMetadataDetails. + Unique identifier endpoint OCID that should be used for inference + + + :return: The endpoint_id of this ModelMetadataDetails. + :rtype: str + """ + return self._endpoint_id + + @endpoint_id.setter + def endpoint_id(self, endpoint_id): + """ + Sets the endpoint_id of this ModelMetadataDetails. + Unique identifier endpoint OCID that should be used for inference + + + :param endpoint_id: The endpoint_id of this ModelMetadataDetails. + :type: str + """ + self._endpoint_id = endpoint_id + + @property + def language_code(self): + """ + Gets the language_code of this ModelMetadataDetails. + Language code supported + - auto : Automatically detect language + - ar : Arabic + - pt-BR : Brazilian Portuguese + - cs : Czech + - da : Danish + - nl : Dutch + - en : English + - fi : Finnish + - fr : French + - fr-CA : Canadian French + - de : German + - it : Italian + - ja : Japanese + - ko : Korean + - no : Norwegian + - pl : Polish + - ro : Romanian + - zh-CN : Simplified Chinese + - es : Spanish + - sv : Swedish + - zh-TW : Traditional Chinese + - tr : Turkish + - el : Greek + - he : Hebrew + + + :return: The language_code of this ModelMetadataDetails. + :rtype: str + """ + return self._language_code + + @language_code.setter + def language_code(self, language_code): + """ + Sets the language_code of this ModelMetadataDetails. + Language code supported + - auto : Automatically detect language + - ar : Arabic + - pt-BR : Brazilian Portuguese + - cs : Czech + - da : Danish + - nl : Dutch + - en : English + - fi : Finnish + - fr : French + - fr-CA : Canadian French + - de : German + - it : Italian + - ja : Japanese + - ko : Korean + - no : Norwegian + - pl : Polish + - ro : Romanian + - zh-CN : Simplified Chinese + - es : Spanish + - sv : Swedish + - zh-TW : Traditional Chinese + - tr : Turkish + - el : Greek + - he : Hebrew + + + :param language_code: The language_code of this ModelMetadataDetails. + :type: str + """ + self._language_code = language_code + + @property + def configuration(self): + """ + Gets the configuration of this ModelMetadataDetails. + model configuration details + For PII : < ENTITY_TYPE , ConfigurationDetails> + ex.\"ORACLE\":{ \"mode\" : \"MASK\",\"maskingCharacter\" : \"&\",\"leaveCharactersUnmasked\": 3,\"isUnmaskedFromEnd\" : true } + For language translation : { \"targetLanguageCodes\" : ConfigurationDetails} + + + :return: The configuration of this ModelMetadataDetails. + :rtype: dict(str, ConfigurationDetails) + """ + return self._configuration + + @configuration.setter + def configuration(self, configuration): + """ + Sets the configuration of this ModelMetadataDetails. + model configuration details + For PII : < ENTITY_TYPE , ConfigurationDetails> + ex.\"ORACLE\":{ \"mode\" : \"MASK\",\"maskingCharacter\" : \"&\",\"leaveCharactersUnmasked\": 3,\"isUnmaskedFromEnd\" : true } + For language translation : { \"targetLanguageCodes\" : ConfigurationDetails} + + + :param configuration: The configuration of this ModelMetadataDetails. + :type: dict(str, ConfigurationDetails) + """ + self._configuration = configuration + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/ai_language/models/object_prefix_output_location.py b/src/oci/ai_language/models/object_prefix_output_location.py new file mode 100644 index 0000000000..76c4a66ce7 --- /dev/null +++ b/src/oci/ai_language/models/object_prefix_output_location.py @@ -0,0 +1,134 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20221001 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class ObjectPrefixOutputLocation(object): + """ + Object storage output location to write inference results + """ + + def __init__(self, **kwargs): + """ + Initializes a new ObjectPrefixOutputLocation object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param namespace_name: + The value to assign to the namespace_name property of this ObjectPrefixOutputLocation. + :type namespace_name: str + + :param bucket_name: + The value to assign to the bucket_name property of this ObjectPrefixOutputLocation. + :type bucket_name: str + + :param prefix: + The value to assign to the prefix property of this ObjectPrefixOutputLocation. + :type prefix: str + + """ + self.swagger_types = { + 'namespace_name': 'str', + 'bucket_name': 'str', + 'prefix': 'str' + } + + self.attribute_map = { + 'namespace_name': 'namespaceName', + 'bucket_name': 'bucketName', + 'prefix': 'prefix' + } + + self._namespace_name = None + self._bucket_name = None + self._prefix = None + + @property + def namespace_name(self): + """ + **[Required]** Gets the namespace_name of this ObjectPrefixOutputLocation. + Object Storage namespace name. + + + :return: The namespace_name of this ObjectPrefixOutputLocation. + :rtype: str + """ + return self._namespace_name + + @namespace_name.setter + def namespace_name(self, namespace_name): + """ + Sets the namespace_name of this ObjectPrefixOutputLocation. + Object Storage namespace name. + + + :param namespace_name: The namespace_name of this ObjectPrefixOutputLocation. + :type: str + """ + self._namespace_name = namespace_name + + @property + def bucket_name(self): + """ + **[Required]** Gets the bucket_name of this ObjectPrefixOutputLocation. + Object Storage bucket name. + + + :return: The bucket_name of this ObjectPrefixOutputLocation. + :rtype: str + """ + return self._bucket_name + + @bucket_name.setter + def bucket_name(self, bucket_name): + """ + Sets the bucket_name of this ObjectPrefixOutputLocation. + Object Storage bucket name. + + + :param bucket_name: The bucket_name of this ObjectPrefixOutputLocation. + :type: str + """ + self._bucket_name = bucket_name + + @property + def prefix(self): + """ + Gets the prefix of this ObjectPrefixOutputLocation. + The prefix (directory) in an Object Storage bucket. + + + :return: The prefix of this ObjectPrefixOutputLocation. + :rtype: str + """ + return self._prefix + + @prefix.setter + def prefix(self, prefix): + """ + Sets the prefix of this ObjectPrefixOutputLocation. + The prefix (directory) in an Object Storage bucket. + + + :param prefix: The prefix of this ObjectPrefixOutputLocation. + :type: str + """ + self._prefix = prefix + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/ai_language/models/object_storage_file_name_location.py b/src/oci/ai_language/models/object_storage_file_name_location.py new file mode 100644 index 0000000000..0fa154f56c --- /dev/null +++ b/src/oci/ai_language/models/object_storage_file_name_location.py @@ -0,0 +1,144 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20221001 + +from .input_location import InputLocation +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class ObjectStorageFileNameLocation(InputLocation): + """ + list of text files need to be used for prediction + """ + + def __init__(self, **kwargs): + """ + Initializes a new ObjectStorageFileNameLocation object with values from keyword arguments. The default value of the :py:attr:`~oci.ai_language.models.ObjectStorageFileNameLocation.location_type` attribute + of this class is ``OBJECT_STORAGE_FILE_LIST`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param location_type: + The value to assign to the location_type property of this ObjectStorageFileNameLocation. + Allowed values for this property are: "OBJECT_STORAGE_PREFIX", "OBJECT_STORAGE_FILE_LIST" + :type location_type: str + + :param namespace_name: + The value to assign to the namespace_name property of this ObjectStorageFileNameLocation. + :type namespace_name: str + + :param bucket_name: + The value to assign to the bucket_name property of this ObjectStorageFileNameLocation. + :type bucket_name: str + + :param object_names: + The value to assign to the object_names property of this ObjectStorageFileNameLocation. + :type object_names: list[str] + + """ + self.swagger_types = { + 'location_type': 'str', + 'namespace_name': 'str', + 'bucket_name': 'str', + 'object_names': 'list[str]' + } + + self.attribute_map = { + 'location_type': 'locationType', + 'namespace_name': 'namespaceName', + 'bucket_name': 'bucketName', + 'object_names': 'objectNames' + } + + self._location_type = None + self._namespace_name = None + self._bucket_name = None + self._object_names = None + self._location_type = 'OBJECT_STORAGE_FILE_LIST' + + @property + def namespace_name(self): + """ + **[Required]** Gets the namespace_name of this ObjectStorageFileNameLocation. + Object Storage namespace name. + + + :return: The namespace_name of this ObjectStorageFileNameLocation. + :rtype: str + """ + return self._namespace_name + + @namespace_name.setter + def namespace_name(self, namespace_name): + """ + Sets the namespace_name of this ObjectStorageFileNameLocation. + Object Storage namespace name. + + + :param namespace_name: The namespace_name of this ObjectStorageFileNameLocation. + :type: str + """ + self._namespace_name = namespace_name + + @property + def bucket_name(self): + """ + **[Required]** Gets the bucket_name of this ObjectStorageFileNameLocation. + Object Storage bucket name. + + + :return: The bucket_name of this ObjectStorageFileNameLocation. + :rtype: str + """ + return self._bucket_name + + @bucket_name.setter + def bucket_name(self, bucket_name): + """ + Sets the bucket_name of this ObjectStorageFileNameLocation. + Object Storage bucket name. + + + :param bucket_name: The bucket_name of this ObjectStorageFileNameLocation. + :type: str + """ + self._bucket_name = bucket_name + + @property + def object_names(self): + """ + **[Required]** Gets the object_names of this ObjectStorageFileNameLocation. + List of objects to be processed + + + :return: The object_names of this ObjectStorageFileNameLocation. + :rtype: list[str] + """ + return self._object_names + + @object_names.setter + def object_names(self, object_names): + """ + Sets the object_names of this ObjectStorageFileNameLocation. + List of objects to be processed + + + :param object_names: The object_names of this ObjectStorageFileNameLocation. + :type: list[str] + """ + self._object_names = object_names + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/ai_language/models/object_storage_prefix_location.py b/src/oci/ai_language/models/object_storage_prefix_location.py new file mode 100644 index 0000000000..a043ccd7f3 --- /dev/null +++ b/src/oci/ai_language/models/object_storage_prefix_location.py @@ -0,0 +1,144 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20221001 + +from .input_location import InputLocation +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class ObjectStoragePrefixLocation(InputLocation): + """ + Properties specific to object storage prefix location + """ + + def __init__(self, **kwargs): + """ + Initializes a new ObjectStoragePrefixLocation object with values from keyword arguments. The default value of the :py:attr:`~oci.ai_language.models.ObjectStoragePrefixLocation.location_type` attribute + of this class is ``OBJECT_STORAGE_PREFIX`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param location_type: + The value to assign to the location_type property of this ObjectStoragePrefixLocation. + Allowed values for this property are: "OBJECT_STORAGE_PREFIX", "OBJECT_STORAGE_FILE_LIST" + :type location_type: str + + :param namespace_name: + The value to assign to the namespace_name property of this ObjectStoragePrefixLocation. + :type namespace_name: str + + :param bucket_name: + The value to assign to the bucket_name property of this ObjectStoragePrefixLocation. + :type bucket_name: str + + :param prefix: + The value to assign to the prefix property of this ObjectStoragePrefixLocation. + :type prefix: str + + """ + self.swagger_types = { + 'location_type': 'str', + 'namespace_name': 'str', + 'bucket_name': 'str', + 'prefix': 'str' + } + + self.attribute_map = { + 'location_type': 'locationType', + 'namespace_name': 'namespaceName', + 'bucket_name': 'bucketName', + 'prefix': 'prefix' + } + + self._location_type = None + self._namespace_name = None + self._bucket_name = None + self._prefix = None + self._location_type = 'OBJECT_STORAGE_PREFIX' + + @property + def namespace_name(self): + """ + **[Required]** Gets the namespace_name of this ObjectStoragePrefixLocation. + Object Storage namespace name. + + + :return: The namespace_name of this ObjectStoragePrefixLocation. + :rtype: str + """ + return self._namespace_name + + @namespace_name.setter + def namespace_name(self, namespace_name): + """ + Sets the namespace_name of this ObjectStoragePrefixLocation. + Object Storage namespace name. + + + :param namespace_name: The namespace_name of this ObjectStoragePrefixLocation. + :type: str + """ + self._namespace_name = namespace_name + + @property + def bucket_name(self): + """ + **[Required]** Gets the bucket_name of this ObjectStoragePrefixLocation. + Object Storage bucket name. + + + :return: The bucket_name of this ObjectStoragePrefixLocation. + :rtype: str + """ + return self._bucket_name + + @bucket_name.setter + def bucket_name(self, bucket_name): + """ + Sets the bucket_name of this ObjectStoragePrefixLocation. + Object Storage bucket name. + + + :param bucket_name: The bucket_name of this ObjectStoragePrefixLocation. + :type: str + """ + self._bucket_name = bucket_name + + @property + def prefix(self): + """ + Gets the prefix of this ObjectStoragePrefixLocation. + The prefix (directory) in an Object Storage bucket. + + + :return: The prefix of this ObjectStoragePrefixLocation. + :rtype: str + """ + return self._prefix + + @prefix.setter + def prefix(self, prefix): + """ + Sets the prefix of this ObjectStoragePrefixLocation. + The prefix (directory) in an Object Storage bucket. + + + :param prefix: The prefix of this ObjectStoragePrefixLocation. + :type: str + """ + self._prefix = prefix + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/ai_language/models/translation_document_result.py b/src/oci/ai_language/models/translation_document_result.py index e0c2eab12b..3f37f246ee 100644 --- a/src/oci/ai_language/models/translation_document_result.py +++ b/src/oci/ai_language/models/translation_document_result.py @@ -108,9 +108,39 @@ def translated_text(self, translated_text): def source_language_code(self): """ **[Required]** Gets the source_language_code of this TranslationDocumentResult. - Language code of the document. Please refer to respective model `API documentation`__ for supported languages. - - __ https://docs.cloud.oracle.com/iaas/language/using/overview.htm + Language code supported + Automatically detect language - auto + Arabic - ar + Brazilian Portuguese - pt-BR + Canadian French - fr-CA + Croatian - hr + Czech - cs + Danish - da + Dutch - nl + English - en + Finnish - fi + French - fr + German - de + Greek - el + Hebrew - he + Hungarian - hu + Italian - it + Japanese - ja + Korean - ko + Norwegian - no + Polish - pl + Portuguese - pt + Romanian - ro + Russian - ru + Simplified Chinese - zh-CN + Slovak - sk + Slovenian - sl + Spanish - es + Swedish - sv + Thai - th + Traditional Chinese - zh-TW + Turkish - tr + Vietnamese - vi :return: The source_language_code of this TranslationDocumentResult. @@ -122,9 +152,39 @@ def source_language_code(self): def source_language_code(self, source_language_code): """ Sets the source_language_code of this TranslationDocumentResult. - Language code of the document. Please refer to respective model `API documentation`__ for supported languages. - - __ https://docs.cloud.oracle.com/iaas/language/using/overview.htm + Language code supported + Automatically detect language - auto + Arabic - ar + Brazilian Portuguese - pt-BR + Canadian French - fr-CA + Croatian - hr + Czech - cs + Danish - da + Dutch - nl + English - en + Finnish - fi + French - fr + German - de + Greek - el + Hebrew - he + Hungarian - hu + Italian - it + Japanese - ja + Korean - ko + Norwegian - no + Polish - pl + Portuguese - pt + Romanian - ro + Russian - ru + Simplified Chinese - zh-CN + Slovak - sk + Slovenian - sl + Spanish - es + Swedish - sv + Thai - th + Traditional Chinese - zh-TW + Turkish - tr + Vietnamese - vi :param source_language_code: The source_language_code of this TranslationDocumentResult. @@ -136,9 +196,38 @@ def source_language_code(self, source_language_code): def target_language_code(self): """ **[Required]** Gets the target_language_code of this TranslationDocumentResult. - Language code of the document. Please refer to respective model `API documentation`__ for supported languages. - - __ https://docs.cloud.oracle.com/iaas/language/using/overview.htm + Language code supported + Arabic - ar + Brazilian Portuguese - pt-BR + Canadian French - fr-CA + Croatian - hr + Czech - cs + Danish - da + Dutch - nl + English - en + Finnish - fi + French - fr + German - de + Greek - el + Hebrew - he + Hungarian - hu + Italian - it + Japanese - ja + Korean - ko + Norwegian - no + Polish - pl + Portuguese - pt + Romanian - ro + Russian - ru + Simplified Chinese - zh-CN + Slovak - sk + Slovenian - sl + Spanish - es + Swedish - sv + Thai - th + Traditional Chinese - zh-TW + Turkish - tr + Vietnamese - vi :return: The target_language_code of this TranslationDocumentResult. @@ -150,9 +239,38 @@ def target_language_code(self): def target_language_code(self, target_language_code): """ Sets the target_language_code of this TranslationDocumentResult. - Language code of the document. Please refer to respective model `API documentation`__ for supported languages. - - __ https://docs.cloud.oracle.com/iaas/language/using/overview.htm + Language code supported + Arabic - ar + Brazilian Portuguese - pt-BR + Canadian French - fr-CA + Croatian - hr + Czech - cs + Danish - da + Dutch - nl + English - en + Finnish - fi + French - fr + German - de + Greek - el + Hebrew - he + Hungarian - hu + Italian - it + Japanese - ja + Korean - ko + Norwegian - no + Polish - pl + Portuguese - pt + Romanian - ro + Russian - ru + Simplified Chinese - zh-CN + Slovak - sk + Slovenian - sl + Spanish - es + Swedish - sv + Thai - th + Traditional Chinese - zh-TW + Turkish - tr + Vietnamese - vi :param target_language_code: The target_language_code of this TranslationDocumentResult. diff --git a/src/oci/ai_language/models/update_job_details.py b/src/oci/ai_language/models/update_job_details.py new file mode 100644 index 0000000000..f0fdd342de --- /dev/null +++ b/src/oci/ai_language/models/update_job_details.py @@ -0,0 +1,103 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20221001 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class UpdateJobDetails(object): + """ + The information to be updated. + """ + + def __init__(self, **kwargs): + """ + Initializes a new UpdateJobDetails 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 UpdateJobDetails. + :type display_name: str + + :param description: + The value to assign to the description property of this UpdateJobDetails. + :type description: str + + """ + self.swagger_types = { + 'display_name': 'str', + 'description': 'str' + } + + self.attribute_map = { + 'display_name': 'displayName', + 'description': 'description' + } + + self._display_name = None + self._description = None + + @property + def display_name(self): + """ + Gets the display_name of this UpdateJobDetails. + A user-friendly display name for the job. + + + :return: The display_name of this UpdateJobDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this UpdateJobDetails. + A user-friendly display name for the job. + + + :param display_name: The display_name of this UpdateJobDetails. + :type: str + """ + self._display_name = display_name + + @property + def description(self): + """ + Gets the description of this UpdateJobDetails. + A short description of the job. + + + :return: The description of this UpdateJobDetails. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this UpdateJobDetails. + A short description of the job. + + + :param description: The description of this UpdateJobDetails. + :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/apm_traces/__init__.py b/src/oci/apm_traces/__init__.py index 4d7b34709c..900bc5fd09 100644 --- a/src/oci/apm_traces/__init__.py +++ b/src/oci/apm_traces/__init__.py @@ -7,10 +7,12 @@ from __future__ import absolute_import +from .attributes_client import AttributesClient +from .attributes_client_composite_operations import AttributesClientCompositeOperations from .query_client import QueryClient from .query_client_composite_operations import QueryClientCompositeOperations from .trace_client import TraceClient from .trace_client_composite_operations import TraceClientCompositeOperations from . import models -__all__ = ["QueryClient", "QueryClientCompositeOperations", "TraceClient", "TraceClientCompositeOperations", "models"] +__all__ = ["AttributesClient", "AttributesClientCompositeOperations", "QueryClient", "QueryClientCompositeOperations", "TraceClient", "TraceClientCompositeOperations", "models"] diff --git a/src/oci/apm_traces/attributes_client.py b/src/oci/apm_traces/attributes_client.py new file mode 100644 index 0000000000..d5371b1e68 --- /dev/null +++ b/src/oci/apm_traces/attributes_client.py @@ -0,0 +1,927 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20200630 + +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 oci.exceptions import InvalidAlloyConfig +from oci.alloy import OCI_SDK_ENABLED_SERVICES_SET +from .models import apm_traces_type_mapping +missing = Sentinel("Missing") + + +class AttributesClient(object): + """ + Use the Application Performance Monitoring Trace Explorer API to query traces and associated spans in Trace Explorer. For more information, see [Application Performance Monitoring](https://docs.oracle.com/iaas/application-performance-monitoring/index.html). + """ + + 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 uses :py:data:`~oci.circuit_breaker.DEFAULT_CIRCUIT_BREAKER_STRATEGY` as default if no circuit breaker strategy is provided. + The specifics of circuit breaker strategy are described `here `__. + + :param function circuit_breaker_callback: (optional) + Callback function to receive any exceptions triggerred by the circuit breaker. + + :param bool client_level_realm_specific_endpoint_template_enabled: (optional) + A boolean flag to indicate whether or not this client should be created with realm specific endpoint template enabled or disable. By default, this will be set as None. + + :param allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this client should allow control characters in the response object. By default, the client will not + allow control characters to be in the response object. + """ + if not OCI_SDK_ENABLED_SERVICES_SET.is_service_enabled("apm_traces"): + raise InvalidAlloyConfig("The Alloy configuration has disabled this service, this behavior is controlled by OCI_SDK_ENABLED_SERVICES_SET variable. Please check if your local alloy-config file configured the service you're targeting or contact the cloud provider on the availability of this service") + + 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': '/20200630', + 'service_endpoint_template': 'https://apm-trace.{region}.oci.{secondLevelDomain}', + 'service_endpoint_template_per_realm': { }, # noqa: E201 E202 + 'skip_deserialization': kwargs.get('skip_deserialization', False), + 'circuit_breaker_strategy': kwargs.get('circuit_breaker_strategy', circuit_breaker.GLOBAL_CIRCUIT_BREAKER_STRATEGY), + 'client_level_realm_specific_endpoint_template_enabled': kwargs.get('client_level_realm_specific_endpoint_template_enabled') + } + if 'timeout' in kwargs: + base_client_init_kwargs['timeout'] = kwargs.get('timeout') + if base_client_init_kwargs.get('circuit_breaker_strategy') is None: + base_client_init_kwargs['circuit_breaker_strategy'] = circuit_breaker.DEFAULT_CIRCUIT_BREAKER_STRATEGY + if 'allow_control_chars' in kwargs: + base_client_init_kwargs['allow_control_chars'] = kwargs.get('allow_control_chars') + self.base_client = BaseClient("attributes", config, signer, apm_traces_type_mapping, **base_client_init_kwargs) + self.retry_strategy = kwargs.get('retry_strategy') + self.circuit_breaker_callback = kwargs.get('circuit_breaker_callback') + + def bulk_activate_attribute(self, apm_domain_id, bulk_activate_attribute_details, **kwargs): + """ + Activates a set of attributes for the given APM Domain. The API is not case-sensitive. Any duplicates present in the bulk activation + request are deduplicated and only unique attributes are activated. A maximum number of 700 string attributes and 100 numeric attributes + can be activated in an APM Domain subject to the available string and numeric slots. Once an attribute has been activated, it may take sometime + for it to be appear in searches as ingest might not have picked up the changes or any associated caches might not have refreshed. The + bulk activation operation is atomic, and the operation succeeds only if all the attributes in the request have been processed successfully and they + get a success status back. If the processing of any attribute results in a processing or validation error, then none of the attributes in the bulk + request are activated. Attributes that are activated are unpinned by default if they are pinned. + + + :param str apm_domain_id: (required) + The APM Domain ID for the intended request. + + :param oci.apm_traces.models.BulkActivateAttributeDetails bulk_activate_attribute_details: (required) + Request body containing the details about the set of attributes to be activated. + + :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`. + + :param bool allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. + By default, the response will not allow control characters in strings + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.apm_traces.models.BulkActivationStatus` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use bulk_activate_attribute API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['apmDomainId'] + resource_path = "/attributes/actions/activateAttributes" + method = "POST" + operation_name = "bulk_activate_attribute" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/apm-trace-explorer/20200630/BulkActivationStatus/BulkActivateAttribute" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "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( + f"bulk_activate_attribute got unknown kwargs: {extra_kwargs!r}") + + query_params = { + "apmDomainId": apm_domain_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) + } + 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, + body=bulk_activate_attribute_details, + response_type="BulkActivationStatus", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + body=bulk_activate_attribute_details, + response_type="BulkActivationStatus", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + + def bulk_de_activate_attribute(self, apm_domain_id, bulk_de_activate_attribute_details, **kwargs): + """ + Deactivates a set of attributes for the given APM Domain. The API is case in-sensitive. Any duplicates present in the bulk deactivation + request are deduplicated and only unique attributes are deactivated. A maximum number of 700 string attributes and 100 numeric attributes + can be deactivated in an APM Domain subject to the available string and numeric slots. Out of box attributes (Trace and Span) cannot be + deactivated, and will result in a processing error. Once an attribute has been deactivated, it may take sometime for it to disappear in + searches as ingest might not have picked up the changes or any associated caches might not have refreshed. The bulk deactivation + operation is atomic, and the operation succeeds only if all the attributes in the request have been processed successfully and they get a success + status back. If the processing of any attribute results in a processing or validation error, then none of the attributes in the bulk request + are deactivated. + + + :param str apm_domain_id: (required) + The APM Domain ID for the intended request. + + :param oci.apm_traces.models.BulkDeActivateAttributeDetails bulk_de_activate_attribute_details: (required) + Request body containing the details about the set of attributes to be deactivated. + + :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`. + + :param bool allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. + By default, the response will not allow control characters in strings + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.apm_traces.models.BulkDeActivationStatus` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use bulk_de_activate_attribute API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['apmDomainId'] + resource_path = "/attributes/actions/deActivateAttributes" + method = "POST" + operation_name = "bulk_de_activate_attribute" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/apm-trace-explorer/20200630/BulkDeActivationStatus/BulkDeActivateAttribute" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "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( + f"bulk_de_activate_attribute got unknown kwargs: {extra_kwargs!r}") + + query_params = { + "apmDomainId": apm_domain_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) + } + 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, + body=bulk_de_activate_attribute_details, + response_type="BulkDeActivationStatus", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + body=bulk_de_activate_attribute_details, + response_type="BulkDeActivationStatus", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + + def bulk_pin_attribute(self, apm_domain_id, bulk_pin_attribute_details, **kwargs): + """ + Pin a set of attributes in the APM Domain. Attributes that are marked pinned are not autoactivated by ingest. + Attributes that are deactivated are pinned by default. + + + :param str apm_domain_id: (required) + The APM Domain ID for the intended request. + + :param oci.apm_traces.models.BulkPinAttributeDetails bulk_pin_attribute_details: (required) + Request body containing the details about the set of attributes to be pinned. + + :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`. + + :param bool allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. + By default, the response will not allow control characters in strings + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.apm_traces.models.BulkPinStatus` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use bulk_pin_attribute API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['apmDomainId'] + resource_path = "/attributes/actions/pinAttributes" + method = "POST" + operation_name = "bulk_pin_attribute" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/apm-trace-explorer/20200630/BulkPinStatus/BulkPinAttribute" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "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( + f"bulk_pin_attribute got unknown kwargs: {extra_kwargs!r}") + + query_params = { + "apmDomainId": apm_domain_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) + } + 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, + body=bulk_pin_attribute_details, + response_type="BulkPinStatus", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + body=bulk_pin_attribute_details, + response_type="BulkPinStatus", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + + def bulk_unpin_attribute(self, apm_domain_id, bulk_unpin_attribute_details, **kwargs): + """ + Unpin a set of attributes in the APM Domain. + + + :param str apm_domain_id: (required) + The APM Domain ID for the intended request. + + :param oci.apm_traces.models.BulkUnpinAttributeDetails bulk_unpin_attribute_details: (required) + Request body containing the details about the set of attributes to be unpinned. + + :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`. + + :param bool allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. + By default, the response will not allow control characters in strings + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.apm_traces.models.BulkUnpinStatus` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use bulk_unpin_attribute API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['apmDomainId'] + resource_path = "/attributes/actions/unPinAttributes" + method = "POST" + operation_name = "bulk_unpin_attribute" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/apm-trace-explorer/20200630/BulkUnpinStatus/BulkUnpinAttribute" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "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( + f"bulk_unpin_attribute got unknown kwargs: {extra_kwargs!r}") + + query_params = { + "apmDomainId": apm_domain_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) + } + 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, + body=bulk_unpin_attribute_details, + response_type="BulkUnpinStatus", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + body=bulk_unpin_attribute_details, + response_type="BulkUnpinStatus", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + + def bulk_update_attribute(self, apm_domain_id, bulk_update_attribute_details, **kwargs): + """ + Update a set of attribute properties in the APM Domain. + + + :param str apm_domain_id: (required) + The APM Domain ID for the intended request. + + :param oci.apm_traces.models.BulkUpdateAttributeDetails bulk_update_attribute_details: (required) + Request body containing the details about the set of attributes for which properties are to be updated. + + :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`. + + :param bool allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. + By default, the response will not allow control characters in strings + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.apm_traces.models.BulkUpdateAttributeStatus` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use bulk_update_attribute API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['apmDomainId'] + resource_path = "/attributes/actions/updateAttributes" + method = "POST" + operation_name = "bulk_update_attribute" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/apm-trace-explorer/20200630/BulkUpdateAttributeStatus/BulkUpdateAttribute" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "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( + f"bulk_update_attribute got unknown kwargs: {extra_kwargs!r}") + + query_params = { + "apmDomainId": apm_domain_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) + } + 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, + body=bulk_update_attribute_details, + response_type="BulkUpdateAttributeStatus", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + body=bulk_update_attribute_details, + response_type="BulkUpdateAttributeStatus", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + + def bulk_update_attribute_notes(self, apm_domain_id, bulk_update_attribute_notes_details, **kwargs): + """ + Add or edit notes to a set of attributes in the APM Domain. Notes can be added to either an active or an inactive attribute. The + notes will be preserved even if the attribute changes state (when an active attribute is deactivated or when an inactive attribute + is activated). + + + :param str apm_domain_id: (required) + The APM Domain ID for the intended request. + + :param oci.apm_traces.models.BulkUpdateAttributeNotesDetails bulk_update_attribute_notes_details: (required) + Request body containing the details about the set of attributes for which notes are to be updated. + + :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`. + + :param bool allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. + By default, the response will not allow control characters in strings + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.apm_traces.models.BulkUpdateNotesStatus` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use bulk_update_attribute_notes API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['apmDomainId'] + resource_path = "/attributes/actions/updateNotes" + method = "POST" + operation_name = "bulk_update_attribute_notes" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/apm-trace-explorer/20200630/BulkUpdateNotesStatus/BulkUpdateAttributeNotes" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "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( + f"bulk_update_attribute_notes got unknown kwargs: {extra_kwargs!r}") + + query_params = { + "apmDomainId": apm_domain_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) + } + 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, + body=bulk_update_attribute_notes_details, + response_type="BulkUpdateNotesStatus", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + body=bulk_update_attribute_notes_details, + response_type="BulkUpdateNotesStatus", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + + def get_status_auto_activate(self, apm_domain_id, data_key_type, **kwargs): + """ + Get autoactivation status for a private data key or public data key in the APM Domain. + + + :param str apm_domain_id: (required) + The APM Domain ID for the intended request. + + :param str data_key_type: (required) + Data key type for which auto-activate needs to be turned on or off. + + Allowed values are: "PRIVATE_DATA_KEY", "PUBLIC_DATA_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`. + + :param bool allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. + By default, the response will not allow control characters in strings + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.apm_traces.models.AutoActivateStatus` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_status_auto_activate API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['apmDomainId', 'dataKeyType'] + resource_path = "/attributes/autoActivateStatus" + method = "GET" + operation_name = "get_status_auto_activate" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/apm-trace-explorer/20200630/AutoActivateStatus/GetStatusAutoActivate" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "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( + f"get_status_auto_activate got unknown kwargs: {extra_kwargs!r}") + + data_key_type_allowed_values = ["PRIVATE_DATA_KEY", "PUBLIC_DATA_KEY"] + if data_key_type not in data_key_type_allowed_values: + raise ValueError( + f"Invalid value for `data_key_type`, must be one of { data_key_type_allowed_values }" + ) + + query_params = { + "apmDomainId": apm_domain_id, + "dataKeyType": data_key_type + } + 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="AutoActivateStatus", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="AutoActivateStatus", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + + def put_toggle_auto_activate(self, apm_domain_id, is_auto_activate_on, data_key_type, **kwargs): + """ + Turn on or off autoactivate for private data key or public data key traffic a given APM Domain. + + + :param str apm_domain_id: (required) + The APM Domain ID for the intended request. + + :param bool is_auto_activate_on: (required) + Autoactivate toggle switch. Set to true to turn on auto-activate. Set to false to turn off auto-activate. + + :param str data_key_type: (required) + Data key type for which auto-activate needs to be turned on or off. + + Allowed values are: "PRIVATE_DATA_KEY", "PUBLIC_DATA_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`. + + :param bool allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. + By default, the response will not allow control characters in strings + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.apm_traces.models.AutoActivateToggleStatus` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use put_toggle_auto_activate API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['apmDomainId', 'isAutoActivateOn', 'dataKeyType'] + resource_path = "/attributes/actions/autoActivate" + method = "POST" + operation_name = "put_toggle_auto_activate" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/apm-trace-explorer/20200630/AutoActivateToggleStatus/PutToggleAutoActivate" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "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( + f"put_toggle_auto_activate got unknown kwargs: {extra_kwargs!r}") + + data_key_type_allowed_values = ["PRIVATE_DATA_KEY", "PUBLIC_DATA_KEY"] + if data_key_type not in data_key_type_allowed_values: + raise ValueError( + f"Invalid value for `data_key_type`, must be one of { data_key_type_allowed_values }" + ) + + query_params = { + "apmDomainId": apm_domain_id, + "isAutoActivateOn": is_auto_activate_on, + "dataKeyType": data_key_type + } + 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="AutoActivateToggleStatus", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="AutoActivateToggleStatus", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) diff --git a/src/oci/apm_traces/attributes_client_composite_operations.py b/src/oci/apm_traces/attributes_client_composite_operations.py new file mode 100644 index 0000000000..6b1fe35e6b --- /dev/null +++ b/src/oci/apm_traces/attributes_client_composite_operations.py @@ -0,0 +1,26 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20200630 + +import oci # noqa: F401 +from oci.util import WAIT_RESOURCE_NOT_FOUND # noqa: F401 + + +class AttributesClientCompositeOperations(object): + """ + This class provides a wrapper around :py:class:`~oci.apm_traces.AttributesClient` 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 AttributesClientCompositeOperations object + + :param AttributesClient client: + The service client which will be wrapped by this object + """ + self.client = client diff --git a/src/oci/apm_traces/models/__init__.py b/src/oci/apm_traces/models/__init__.py index 45b4bc1d66..afd34abd28 100644 --- a/src/oci/apm_traces/models/__init__.py +++ b/src/oci/apm_traces/models/__init__.py @@ -8,13 +8,47 @@ from .aggregated_snapshot import AggregatedSnapshot from .aggregated_stack_trace import AggregatedStackTrace +from .attribute_pin_response import AttributePinResponse +from .attribute_response import AttributeResponse +from .attribute_unpin_response import AttributeUnpinResponse +from .attribute_update_notes_response import AttributeUpdateNotesResponse +from .attribute_update_response import AttributeUpdateResponse +from .auto_activate_status import AutoActivateStatus +from .auto_activate_toggle_status import AutoActivateToggleStatus +from .bulk_activate_attribute_detail import BulkActivateAttributeDetail +from .bulk_activate_attribute_details import BulkActivateAttributeDetails +from .bulk_activation_metadata import BulkActivationMetadata +from .bulk_activation_status import BulkActivationStatus +from .bulk_de_activate_attribute_detail import BulkDeActivateAttributeDetail +from .bulk_de_activate_attribute_details import BulkDeActivateAttributeDetails +from .bulk_de_activation_metadata import BulkDeActivationMetadata +from .bulk_de_activation_status import BulkDeActivationStatus +from .bulk_pin_attribute_detail import BulkPinAttributeDetail +from .bulk_pin_attribute_details import BulkPinAttributeDetails +from .bulk_pin_metadata import BulkPinMetadata +from .bulk_pin_status import BulkPinStatus +from .bulk_unpin_attribute_detail import BulkUnpinAttributeDetail +from .bulk_unpin_attribute_details import BulkUnpinAttributeDetails +from .bulk_unpin_metadata import BulkUnpinMetadata +from .bulk_unpin_status import BulkUnpinStatus +from .bulk_update_attribute_detail import BulkUpdateAttributeDetail +from .bulk_update_attribute_details import BulkUpdateAttributeDetails +from .bulk_update_attribute_metadata import BulkUpdateAttributeMetadata +from .bulk_update_attribute_notes_detail import BulkUpdateAttributeNotesDetail +from .bulk_update_attribute_notes_details import BulkUpdateAttributeNotesDetails +from .bulk_update_attribute_status import BulkUpdateAttributeStatus +from .bulk_update_notes_metadata import BulkUpdateNotesMetadata +from .bulk_update_notes_status import BulkUpdateNotesStatus from .query_details import QueryDetails from .query_result_metadata_summary import QueryResultMetadataSummary from .query_result_response import QueryResultResponse from .query_result_row import QueryResultRow from .query_result_row_type_summary import QueryResultRowTypeSummary +from .query_result_warning import QueryResultWarning from .query_results_grouped_by_summary import QueryResultsGroupedBySummary from .query_results_ordered_by_summary import QueryResultsOrderedBySummary +from .query_results_topology_info import QueryResultsTopologyInfo +from .query_results_topology_node_info import QueryResultsTopologyNodeInfo from .quick_pick_summary import QuickPickSummary from .snapshot_detail import SnapshotDetail from .span import Span @@ -23,6 +57,7 @@ from .span_snapshot import SpanSnapshot from .stack_trace_element import StackTraceElement from .tag import Tag +from .tag_metadata import TagMetadata from .thread_snapshot import ThreadSnapshot from .trace import Trace from .trace_service_summary import TraceServiceSummary @@ -33,13 +68,47 @@ apm_traces_type_mapping = { "AggregatedSnapshot": AggregatedSnapshot, "AggregatedStackTrace": AggregatedStackTrace, + "AttributePinResponse": AttributePinResponse, + "AttributeResponse": AttributeResponse, + "AttributeUnpinResponse": AttributeUnpinResponse, + "AttributeUpdateNotesResponse": AttributeUpdateNotesResponse, + "AttributeUpdateResponse": AttributeUpdateResponse, + "AutoActivateStatus": AutoActivateStatus, + "AutoActivateToggleStatus": AutoActivateToggleStatus, + "BulkActivateAttributeDetail": BulkActivateAttributeDetail, + "BulkActivateAttributeDetails": BulkActivateAttributeDetails, + "BulkActivationMetadata": BulkActivationMetadata, + "BulkActivationStatus": BulkActivationStatus, + "BulkDeActivateAttributeDetail": BulkDeActivateAttributeDetail, + "BulkDeActivateAttributeDetails": BulkDeActivateAttributeDetails, + "BulkDeActivationMetadata": BulkDeActivationMetadata, + "BulkDeActivationStatus": BulkDeActivationStatus, + "BulkPinAttributeDetail": BulkPinAttributeDetail, + "BulkPinAttributeDetails": BulkPinAttributeDetails, + "BulkPinMetadata": BulkPinMetadata, + "BulkPinStatus": BulkPinStatus, + "BulkUnpinAttributeDetail": BulkUnpinAttributeDetail, + "BulkUnpinAttributeDetails": BulkUnpinAttributeDetails, + "BulkUnpinMetadata": BulkUnpinMetadata, + "BulkUnpinStatus": BulkUnpinStatus, + "BulkUpdateAttributeDetail": BulkUpdateAttributeDetail, + "BulkUpdateAttributeDetails": BulkUpdateAttributeDetails, + "BulkUpdateAttributeMetadata": BulkUpdateAttributeMetadata, + "BulkUpdateAttributeNotesDetail": BulkUpdateAttributeNotesDetail, + "BulkUpdateAttributeNotesDetails": BulkUpdateAttributeNotesDetails, + "BulkUpdateAttributeStatus": BulkUpdateAttributeStatus, + "BulkUpdateNotesMetadata": BulkUpdateNotesMetadata, + "BulkUpdateNotesStatus": BulkUpdateNotesStatus, "QueryDetails": QueryDetails, "QueryResultMetadataSummary": QueryResultMetadataSummary, "QueryResultResponse": QueryResultResponse, "QueryResultRow": QueryResultRow, "QueryResultRowTypeSummary": QueryResultRowTypeSummary, + "QueryResultWarning": QueryResultWarning, "QueryResultsGroupedBySummary": QueryResultsGroupedBySummary, "QueryResultsOrderedBySummary": QueryResultsOrderedBySummary, + "QueryResultsTopologyInfo": QueryResultsTopologyInfo, + "QueryResultsTopologyNodeInfo": QueryResultsTopologyNodeInfo, "QuickPickSummary": QuickPickSummary, "SnapshotDetail": SnapshotDetail, "Span": Span, @@ -48,6 +117,7 @@ "SpanSnapshot": SpanSnapshot, "StackTraceElement": StackTraceElement, "Tag": Tag, + "TagMetadata": TagMetadata, "ThreadSnapshot": ThreadSnapshot, "Trace": Trace, "TraceServiceSummary": TraceServiceSummary, diff --git a/src/oci/apm_traces/models/attribute_pin_response.py b/src/oci/apm_traces/models/attribute_pin_response.py new file mode 100644 index 0000000000..6e67910d84 --- /dev/null +++ b/src/oci/apm_traces/models/attribute_pin_response.py @@ -0,0 +1,311 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20200630 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class AttributePinResponse(object): + """ + Response of an individual attribute item in the bulk pin operation. + """ + + #: A constant which can be used with the operation_type property of a AttributePinResponse. + #: This constant has a value of "PIN" + OPERATION_TYPE_PIN = "PIN" + + #: A constant which can be used with the attribute_name_space property of a AttributePinResponse. + #: This constant has a value of "TRACES" + ATTRIBUTE_NAME_SPACE_TRACES = "TRACES" + + #: A constant which can be used with the attribute_name_space property of a AttributePinResponse. + #: This constant has a value of "SYNTHETIC" + ATTRIBUTE_NAME_SPACE_SYNTHETIC = "SYNTHETIC" + + #: A constant which can be used with the attribute_status property of a AttributePinResponse. + #: This constant has a value of "ATTRIBUTE_ALREADY_PINNED" + ATTRIBUTE_STATUS_ATTRIBUTE_ALREADY_PINNED = "ATTRIBUTE_ALREADY_PINNED" + + #: A constant which can be used with the attribute_status property of a AttributePinResponse. + #: This constant has a value of "ATTRIBUTE_PINNED" + ATTRIBUTE_STATUS_ATTRIBUTE_PINNED = "ATTRIBUTE_PINNED" + + #: A constant which can be used with the attribute_status property of a AttributePinResponse. + #: This constant has a value of "PIN_NOT_ALLOWED" + ATTRIBUTE_STATUS_PIN_NOT_ALLOWED = "PIN_NOT_ALLOWED" + + #: A constant which can be used with the attribute_status property of a AttributePinResponse. + #: This constant has a value of "DUPLICATE_ATTRIBUTE" + ATTRIBUTE_STATUS_DUPLICATE_ATTRIBUTE = "DUPLICATE_ATTRIBUTE" + + #: A constant which can be used with the attribute_status property of a AttributePinResponse. + #: This constant has a value of "INVALID_ATTRIBUTE" + ATTRIBUTE_STATUS_INVALID_ATTRIBUTE = "INVALID_ATTRIBUTE" + + #: A constant which can be used with the attribute_status property of a AttributePinResponse. + #: This constant has a value of "ATTRIBUTE_NOT_PROCESSED" + ATTRIBUTE_STATUS_ATTRIBUTE_NOT_PROCESSED = "ATTRIBUTE_NOT_PROCESSED" + + def __init__(self, **kwargs): + """ + Initializes a new AttributePinResponse object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param attribute_name: + The value to assign to the attribute_name property of this AttributePinResponse. + :type attribute_name: str + + :param notes: + The value to assign to the notes property of this AttributePinResponse. + :type notes: str + + :param operation_type: + The value to assign to the operation_type property of this AttributePinResponse. + Allowed values for this property are: "PIN", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type operation_type: str + + :param attribute_name_space: + The value to assign to the attribute_name_space property of this AttributePinResponse. + Allowed values for this property are: "TRACES", "SYNTHETIC", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type attribute_name_space: str + + :param attribute_status: + The value to assign to the attribute_status property of this AttributePinResponse. + Allowed values for this property are: "ATTRIBUTE_ALREADY_PINNED", "ATTRIBUTE_PINNED", "PIN_NOT_ALLOWED", "DUPLICATE_ATTRIBUTE", "INVALID_ATTRIBUTE", "ATTRIBUTE_NOT_PROCESSED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type attribute_status: str + + :param time_updated: + The value to assign to the time_updated property of this AttributePinResponse. + :type time_updated: datetime + + """ + self.swagger_types = { + 'attribute_name': 'str', + 'notes': 'str', + 'operation_type': 'str', + 'attribute_name_space': 'str', + 'attribute_status': 'str', + 'time_updated': 'datetime' + } + + self.attribute_map = { + 'attribute_name': 'attributeName', + 'notes': 'notes', + 'operation_type': 'operationType', + 'attribute_name_space': 'attributeNameSpace', + 'attribute_status': 'attributeStatus', + 'time_updated': 'timeUpdated' + } + + self._attribute_name = None + self._notes = None + self._operation_type = None + self._attribute_name_space = None + self._attribute_status = None + self._time_updated = None + + @property + def attribute_name(self): + """ + **[Required]** Gets the attribute_name of this AttributePinResponse. + Attribute that was pinned by this bulk operation. + + + :return: The attribute_name of this AttributePinResponse. + :rtype: str + """ + return self._attribute_name + + @attribute_name.setter + def attribute_name(self, attribute_name): + """ + Sets the attribute_name of this AttributePinResponse. + Attribute that was pinned by this bulk operation. + + + :param attribute_name: The attribute_name of this AttributePinResponse. + :type: str + """ + self._attribute_name = attribute_name + + @property + def notes(self): + """ + **[Required]** Gets the notes of this AttributePinResponse. + Notes added to this attribute. + + + :return: The notes of this AttributePinResponse. + :rtype: str + """ + return self._notes + + @notes.setter + def notes(self, notes): + """ + Sets the notes of this AttributePinResponse. + Notes added to this attribute. + + + :param notes: The notes of this AttributePinResponse. + :type: str + """ + self._notes = notes + + @property + def operation_type(self): + """ + **[Required]** Gets the operation_type of this AttributePinResponse. + Type of operation - pin. + + Allowed values for this property are: "PIN", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The operation_type of this AttributePinResponse. + :rtype: str + """ + return self._operation_type + + @operation_type.setter + def operation_type(self, operation_type): + """ + Sets the operation_type of this AttributePinResponse. + Type of operation - pin. + + + :param operation_type: The operation_type of this AttributePinResponse. + :type: str + """ + allowed_values = ["PIN"] + if not value_allowed_none_or_none_sentinel(operation_type, allowed_values): + operation_type = 'UNKNOWN_ENUM_VALUE' + self._operation_type = operation_type + + @property + def attribute_name_space(self): + """ + **[Required]** Gets the attribute_name_space of this AttributePinResponse. + Namespace of the attribute whose properties were updated. The attributeNameSpace will default to TRACES if it is + not passed in. + + Allowed values for this property are: "TRACES", "SYNTHETIC", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The attribute_name_space of this AttributePinResponse. + :rtype: str + """ + return self._attribute_name_space + + @attribute_name_space.setter + def attribute_name_space(self, attribute_name_space): + """ + Sets the attribute_name_space of this AttributePinResponse. + Namespace of the attribute whose properties were updated. The attributeNameSpace will default to TRACES if it is + not passed in. + + + :param attribute_name_space: The attribute_name_space of this AttributePinResponse. + :type: str + """ + allowed_values = ["TRACES", "SYNTHETIC"] + if not value_allowed_none_or_none_sentinel(attribute_name_space, allowed_values): + attribute_name_space = 'UNKNOWN_ENUM_VALUE' + self._attribute_name_space = attribute_name_space + + @property + def attribute_status(self): + """ + **[Required]** Gets the attribute_status of this AttributePinResponse. + Status of the attribute after this operation. The attribute can have one of the following statuses after the pin operation. The attribute + can have either a success status or an error status. The status of the attribute must be correlated with the operation status property in the bulk operation metadata + object. The bulk operation will be successful only when all attributes in the bulk request are processed successfully and they get a success status back. + The following are successful status values of individual attribute items in a bulk attribute pin operation. + ATTRIBUTE_PINNED - The attribute is marked pinned and associated notes have been added. + ATTRIBUTE_ALREADY_PINNED - The caller is trying to pin an attribute that has already been pinned. + DUPLICATE_ATTRIBUTE - The attribute is a duplicate of an attribute that was present in this bulk request. Note that we deduplicate the attribute collection, process only unique attributes, + and call out duplicates. A duplicate attribute in a bulk request will not prevent the processing of further attributes in the bulk operation. + The following values are error statuses and the bulk processing is stopped when the first error is encountered. + PIN_NOT_ALLOWED - The caller has asked to pin an active attribute which is not allowed. + INVALID_ATTRIBUTE - The attribute is invalid. + ATTRIBUTE_NOT_PROCESSED - The attribute was not processed, as there was another attribute in this bulk request collection that resulted in a processing error. + + Allowed values for this property are: "ATTRIBUTE_ALREADY_PINNED", "ATTRIBUTE_PINNED", "PIN_NOT_ALLOWED", "DUPLICATE_ATTRIBUTE", "INVALID_ATTRIBUTE", "ATTRIBUTE_NOT_PROCESSED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The attribute_status of this AttributePinResponse. + :rtype: str + """ + return self._attribute_status + + @attribute_status.setter + def attribute_status(self, attribute_status): + """ + Sets the attribute_status of this AttributePinResponse. + Status of the attribute after this operation. The attribute can have one of the following statuses after the pin operation. The attribute + can have either a success status or an error status. The status of the attribute must be correlated with the operation status property in the bulk operation metadata + object. The bulk operation will be successful only when all attributes in the bulk request are processed successfully and they get a success status back. + The following are successful status values of individual attribute items in a bulk attribute pin operation. + ATTRIBUTE_PINNED - The attribute is marked pinned and associated notes have been added. + ATTRIBUTE_ALREADY_PINNED - The caller is trying to pin an attribute that has already been pinned. + DUPLICATE_ATTRIBUTE - The attribute is a duplicate of an attribute that was present in this bulk request. Note that we deduplicate the attribute collection, process only unique attributes, + and call out duplicates. A duplicate attribute in a bulk request will not prevent the processing of further attributes in the bulk operation. + The following values are error statuses and the bulk processing is stopped when the first error is encountered. + PIN_NOT_ALLOWED - The caller has asked to pin an active attribute which is not allowed. + INVALID_ATTRIBUTE - The attribute is invalid. + ATTRIBUTE_NOT_PROCESSED - The attribute was not processed, as there was another attribute in this bulk request collection that resulted in a processing error. + + + :param attribute_status: The attribute_status of this AttributePinResponse. + :type: str + """ + allowed_values = ["ATTRIBUTE_ALREADY_PINNED", "ATTRIBUTE_PINNED", "PIN_NOT_ALLOWED", "DUPLICATE_ATTRIBUTE", "INVALID_ATTRIBUTE", "ATTRIBUTE_NOT_PROCESSED"] + if not value_allowed_none_or_none_sentinel(attribute_status, allowed_values): + attribute_status = 'UNKNOWN_ENUM_VALUE' + self._attribute_status = attribute_status + + @property + def time_updated(self): + """ + **[Required]** Gets the time_updated of this AttributePinResponse. + Time when the attribute was activated or deactivated. Note that ingest might not have picked up the changes even if this time has elapsed. + + + :return: The time_updated of this AttributePinResponse. + :rtype: datetime + """ + return self._time_updated + + @time_updated.setter + def time_updated(self, time_updated): + """ + Sets the time_updated of this AttributePinResponse. + Time when the attribute was activated or deactivated. Note that ingest might not have picked up the changes even if this time has elapsed. + + + :param time_updated: The time_updated of this AttributePinResponse. + :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/apm_traces/models/attribute_response.py b/src/oci/apm_traces/models/attribute_response.py new file mode 100644 index 0000000000..b7578a738d --- /dev/null +++ b/src/oci/apm_traces/models/attribute_response.py @@ -0,0 +1,465 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20200630 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class AttributeResponse(object): + """ + Response of an individual attribute item in the bulk activate or deactivate operation. + """ + + #: A constant which can be used with the attribute_type property of a AttributeResponse. + #: This constant has a value of "NUMERIC" + ATTRIBUTE_TYPE_NUMERIC = "NUMERIC" + + #: A constant which can be used with the attribute_type property of a AttributeResponse. + #: This constant has a value of "STRING" + ATTRIBUTE_TYPE_STRING = "STRING" + + #: A constant which can be used with the unit property of a AttributeResponse. + #: This constant has a value of "NONE" + UNIT_NONE = "NONE" + + #: A constant which can be used with the unit property of a AttributeResponse. + #: This constant has a value of "EPOCH_TIME_MS" + UNIT_EPOCH_TIME_MS = "EPOCH_TIME_MS" + + #: A constant which can be used with the unit property of a AttributeResponse. + #: This constant has a value of "BYTES" + UNIT_BYTES = "BYTES" + + #: A constant which can be used with the unit property of a AttributeResponse. + #: This constant has a value of "COUNT" + UNIT_COUNT = "COUNT" + + #: A constant which can be used with the unit property of a AttributeResponse. + #: This constant has a value of "DURATION_MS" + UNIT_DURATION_MS = "DURATION_MS" + + #: A constant which can be used with the unit property of a AttributeResponse. + #: This constant has a value of "TRACE_STATUS" + UNIT_TRACE_STATUS = "TRACE_STATUS" + + #: A constant which can be used with the unit property of a AttributeResponse. + #: This constant has a value of "PERCENTAGE" + UNIT_PERCENTAGE = "PERCENTAGE" + + #: A constant which can be used with the operation_type property of a AttributeResponse. + #: This constant has a value of "ACTIVATE" + OPERATION_TYPE_ACTIVATE = "ACTIVATE" + + #: A constant which can be used with the operation_type property of a AttributeResponse. + #: This constant has a value of "DEACTIVATE" + OPERATION_TYPE_DEACTIVATE = "DEACTIVATE" + + #: A constant which can be used with the attribute_name_space property of a AttributeResponse. + #: This constant has a value of "TRACES" + ATTRIBUTE_NAME_SPACE_TRACES = "TRACES" + + #: A constant which can be used with the attribute_name_space property of a AttributeResponse. + #: This constant has a value of "SYNTHETIC" + ATTRIBUTE_NAME_SPACE_SYNTHETIC = "SYNTHETIC" + + #: A constant which can be used with the attribute_status property of a AttributeResponse. + #: This constant has a value of "ATTRIBUTE_ALREADY_ACTIVE" + ATTRIBUTE_STATUS_ATTRIBUTE_ALREADY_ACTIVE = "ATTRIBUTE_ALREADY_ACTIVE" + + #: A constant which can be used with the attribute_status property of a AttributeResponse. + #: This constant has a value of "ATTRIBUTE_ACTIVATED" + ATTRIBUTE_STATUS_ATTRIBUTE_ACTIVATED = "ATTRIBUTE_ACTIVATED" + + #: A constant which can be used with the attribute_status property of a AttributeResponse. + #: This constant has a value of "ATTRIBUTE_DEACTIVATED" + ATTRIBUTE_STATUS_ATTRIBUTE_DEACTIVATED = "ATTRIBUTE_DEACTIVATED" + + #: A constant which can be used with the attribute_status property of a AttributeResponse. + #: This constant has a value of "DEACTIVATION_NOT_ALLOWED" + ATTRIBUTE_STATUS_DEACTIVATION_NOT_ALLOWED = "DEACTIVATION_NOT_ALLOWED" + + #: A constant which can be used with the attribute_status property of a AttributeResponse. + #: This constant has a value of "ATTRIBUTE_DOES_NOT_EXIST" + ATTRIBUTE_STATUS_ATTRIBUTE_DOES_NOT_EXIST = "ATTRIBUTE_DOES_NOT_EXIST" + + #: A constant which can be used with the attribute_status property of a AttributeResponse. + #: This constant has a value of "ATTRIBUTE_ALREADY_DEACTIVATED" + ATTRIBUTE_STATUS_ATTRIBUTE_ALREADY_DEACTIVATED = "ATTRIBUTE_ALREADY_DEACTIVATED" + + #: A constant which can be used with the attribute_status property of a AttributeResponse. + #: This constant has a value of "DUPLICATE_ATTRIBUTE" + ATTRIBUTE_STATUS_DUPLICATE_ATTRIBUTE = "DUPLICATE_ATTRIBUTE" + + #: A constant which can be used with the attribute_status property of a AttributeResponse. + #: This constant has a value of "INVALID_ATTRIBUTE" + ATTRIBUTE_STATUS_INVALID_ATTRIBUTE = "INVALID_ATTRIBUTE" + + #: A constant which can be used with the attribute_status property of a AttributeResponse. + #: This constant has a value of "INVALID_ATTRIBUTE_TYPE_CONFLICT" + ATTRIBUTE_STATUS_INVALID_ATTRIBUTE_TYPE_CONFLICT = "INVALID_ATTRIBUTE_TYPE_CONFLICT" + + #: A constant which can be used with the attribute_status property of a AttributeResponse. + #: This constant has a value of "ATTRIBUTE_NOT_PROCESSED" + ATTRIBUTE_STATUS_ATTRIBUTE_NOT_PROCESSED = "ATTRIBUTE_NOT_PROCESSED" + + #: A constant which can be used with the attribute_status property of a AttributeResponse. + #: This constant has a value of "ATTRIBUTE_UPDATE_NOT_ALLOWED" + ATTRIBUTE_STATUS_ATTRIBUTE_UPDATE_NOT_ALLOWED = "ATTRIBUTE_UPDATE_NOT_ALLOWED" + + def __init__(self, **kwargs): + """ + Initializes a new AttributeResponse object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param attribute_name: + The value to assign to the attribute_name property of this AttributeResponse. + :type attribute_name: str + + :param attribute_type: + The value to assign to the attribute_type property of this AttributeResponse. + Allowed values for this property are: "NUMERIC", "STRING", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type attribute_type: str + + :param unit: + The value to assign to the unit property of this AttributeResponse. + Allowed values for this property are: "NONE", "EPOCH_TIME_MS", "BYTES", "COUNT", "DURATION_MS", "TRACE_STATUS", "PERCENTAGE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type unit: str + + :param notes: + The value to assign to the notes property of this AttributeResponse. + :type notes: str + + :param operation_type: + The value to assign to the operation_type property of this AttributeResponse. + Allowed values for this property are: "ACTIVATE", "DEACTIVATE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type operation_type: str + + :param attribute_name_space: + The value to assign to the attribute_name_space property of this AttributeResponse. + Allowed values for this property are: "TRACES", "SYNTHETIC", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type attribute_name_space: str + + :param attribute_status: + The value to assign to the attribute_status property of this AttributeResponse. + Allowed values for this property are: "ATTRIBUTE_ALREADY_ACTIVE", "ATTRIBUTE_ACTIVATED", "ATTRIBUTE_DEACTIVATED", "DEACTIVATION_NOT_ALLOWED", "ATTRIBUTE_DOES_NOT_EXIST", "ATTRIBUTE_ALREADY_DEACTIVATED", "DUPLICATE_ATTRIBUTE", "INVALID_ATTRIBUTE", "INVALID_ATTRIBUTE_TYPE_CONFLICT", "ATTRIBUTE_NOT_PROCESSED", "ATTRIBUTE_UPDATE_NOT_ALLOWED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type attribute_status: str + + :param time_updated: + The value to assign to the time_updated property of this AttributeResponse. + :type time_updated: datetime + + """ + self.swagger_types = { + 'attribute_name': 'str', + 'attribute_type': 'str', + 'unit': 'str', + 'notes': 'str', + 'operation_type': 'str', + 'attribute_name_space': 'str', + 'attribute_status': 'str', + 'time_updated': 'datetime' + } + + self.attribute_map = { + 'attribute_name': 'attributeName', + 'attribute_type': 'attributeType', + 'unit': 'unit', + 'notes': 'notes', + 'operation_type': 'operationType', + 'attribute_name_space': 'attributeNameSpace', + 'attribute_status': 'attributeStatus', + 'time_updated': 'timeUpdated' + } + + self._attribute_name = None + self._attribute_type = None + self._unit = None + self._notes = None + self._operation_type = None + self._attribute_name_space = None + self._attribute_status = None + self._time_updated = None + + @property + def attribute_name(self): + """ + **[Required]** Gets the attribute_name of this AttributeResponse. + Attribute that was activated or deactivated by this bulk operation. + + + :return: The attribute_name of this AttributeResponse. + :rtype: str + """ + return self._attribute_name + + @attribute_name.setter + def attribute_name(self, attribute_name): + """ + Sets the attribute_name of this AttributeResponse. + Attribute that was activated or deactivated by this bulk operation. + + + :param attribute_name: The attribute_name of this AttributeResponse. + :type: str + """ + self._attribute_name = attribute_name + + @property + def attribute_type(self): + """ + **[Required]** Gets the attribute_type of this AttributeResponse. + Type of the attribute. + + Allowed values for this property are: "NUMERIC", "STRING", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The attribute_type of this AttributeResponse. + :rtype: str + """ + return self._attribute_type + + @attribute_type.setter + def attribute_type(self, attribute_type): + """ + Sets the attribute_type of this AttributeResponse. + Type of the attribute. + + + :param attribute_type: The attribute_type of this AttributeResponse. + :type: str + """ + allowed_values = ["NUMERIC", "STRING"] + if not value_allowed_none_or_none_sentinel(attribute_type, allowed_values): + attribute_type = 'UNKNOWN_ENUM_VALUE' + self._attribute_type = attribute_type + + @property + def unit(self): + """ + Gets the unit of this AttributeResponse. + Unit of the attribute. + + Allowed values for this property are: "NONE", "EPOCH_TIME_MS", "BYTES", "COUNT", "DURATION_MS", "TRACE_STATUS", "PERCENTAGE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The unit of this AttributeResponse. + :rtype: str + """ + return self._unit + + @unit.setter + def unit(self, unit): + """ + Sets the unit of this AttributeResponse. + Unit of the attribute. + + + :param unit: The unit of this AttributeResponse. + :type: str + """ + allowed_values = ["NONE", "EPOCH_TIME_MS", "BYTES", "COUNT", "DURATION_MS", "TRACE_STATUS", "PERCENTAGE"] + if not value_allowed_none_or_none_sentinel(unit, allowed_values): + unit = 'UNKNOWN_ENUM_VALUE' + self._unit = unit + + @property + def notes(self): + """ + Gets the notes of this AttributeResponse. + Notes for the activated attribute. + + + :return: The notes of this AttributeResponse. + :rtype: str + """ + return self._notes + + @notes.setter + def notes(self, notes): + """ + Sets the notes of this AttributeResponse. + Notes for the activated attribute. + + + :param notes: The notes of this AttributeResponse. + :type: str + """ + self._notes = notes + + @property + def operation_type(self): + """ + **[Required]** Gets the operation_type of this AttributeResponse. + Type of operation - activate or deactivate. + + Allowed values for this property are: "ACTIVATE", "DEACTIVATE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The operation_type of this AttributeResponse. + :rtype: str + """ + return self._operation_type + + @operation_type.setter + def operation_type(self, operation_type): + """ + Sets the operation_type of this AttributeResponse. + Type of operation - activate or deactivate. + + + :param operation_type: The operation_type of this AttributeResponse. + :type: str + """ + allowed_values = ["ACTIVATE", "DEACTIVATE"] + if not value_allowed_none_or_none_sentinel(operation_type, allowed_values): + operation_type = 'UNKNOWN_ENUM_VALUE' + self._operation_type = operation_type + + @property + def attribute_name_space(self): + """ + **[Required]** Gets the attribute_name_space of this AttributeResponse. + Namespace of the attribute whose properties were updated. The attributeNamespace will default to TRACES if it is + not passed in. + + Allowed values for this property are: "TRACES", "SYNTHETIC", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The attribute_name_space of this AttributeResponse. + :rtype: str + """ + return self._attribute_name_space + + @attribute_name_space.setter + def attribute_name_space(self, attribute_name_space): + """ + Sets the attribute_name_space of this AttributeResponse. + Namespace of the attribute whose properties were updated. The attributeNamespace will default to TRACES if it is + not passed in. + + + :param attribute_name_space: The attribute_name_space of this AttributeResponse. + :type: str + """ + allowed_values = ["TRACES", "SYNTHETIC"] + if not value_allowed_none_or_none_sentinel(attribute_name_space, allowed_values): + attribute_name_space = 'UNKNOWN_ENUM_VALUE' + self._attribute_name_space = attribute_name_space + + @property + def attribute_status(self): + """ + **[Required]** Gets the attribute_status of this AttributeResponse. + Status of the attribute after this operation. The attribute can have one of the following statuses after the activate or deactivate operation. The attribute + can have either a success status or an error status. The status of the attribute must be correlated with the operation status property in the bulk operation metadata + object. The bulk operation will be successful only when all attributes in the bulk request are processed successful and they get a success status back. + The following are successful status values of individual attribute items in a bulk attribute activation operation. + ATTRIBUTE_ACTIVATED - The attribute is activated and is available to be queried. Note that ingest might still have not picked up the changes, and the + associated caches would not have refreshed yet to pick up the changes. + ATTRIBUTE_ALREADY_ACTIVE - The caller is trying to activate an attribute that is already active or in the process of getting activated. + ATTRIBUTE_DEACTIVATED - The attribute is deactivated and will not appear in searches. Ingest might not have picked up the new changes and the associated caches + might not have refreshed yet. + ATTRIBUTE_ALREADY_DEACTIVATED - The caller is trying to deactivate an attribute that has already been deactivated or in the process of deactivation. + DUPLICATE_ATTRIBUTE - The attribute is a duplicate of an attribute that was present in this bulk request. Note that we deduplicate the attribute collection, process only unique attributes, + and call out duplicates. A duplicate attribute in a bulk request will not prevent the processing of further attributes in the bulk operation. + The following values are error statuses and the bulk processing is stopped when the first error is encountered. None of the attributes in the bulk request would have been activated or + deactivated by this bulk operation. + DEACTIVATION_NOT_ALLOWED - The caller has asked for the deactivation of an out of box tag which is not permitted. + ATTRIBUTE_DOES_NOT_EXIST - The caller tries to deactivate an attribute that doesn't exist in the APM Domain. + INVALID_ATTRIBUTE - The attribute is invalid. + INVALID_ATTRIBUTE_TYPE_CONFLICT - The attribute is invalid. There were two attributes with same name but different type in the bulk request. + ATTRIBUTE_NOT_PROCESSED - The attribute was not processed, as there was another attribute in this bulk request collection that resulted in a processing error. + ATTRIBUTE_UPDATE_NOT_ALLOWED - The unit of the attribute cannot be updated as it is an in-built system attribute. + + Allowed values for this property are: "ATTRIBUTE_ALREADY_ACTIVE", "ATTRIBUTE_ACTIVATED", "ATTRIBUTE_DEACTIVATED", "DEACTIVATION_NOT_ALLOWED", "ATTRIBUTE_DOES_NOT_EXIST", "ATTRIBUTE_ALREADY_DEACTIVATED", "DUPLICATE_ATTRIBUTE", "INVALID_ATTRIBUTE", "INVALID_ATTRIBUTE_TYPE_CONFLICT", "ATTRIBUTE_NOT_PROCESSED", "ATTRIBUTE_UPDATE_NOT_ALLOWED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The attribute_status of this AttributeResponse. + :rtype: str + """ + return self._attribute_status + + @attribute_status.setter + def attribute_status(self, attribute_status): + """ + Sets the attribute_status of this AttributeResponse. + Status of the attribute after this operation. The attribute can have one of the following statuses after the activate or deactivate operation. The attribute + can have either a success status or an error status. The status of the attribute must be correlated with the operation status property in the bulk operation metadata + object. The bulk operation will be successful only when all attributes in the bulk request are processed successful and they get a success status back. + The following are successful status values of individual attribute items in a bulk attribute activation operation. + ATTRIBUTE_ACTIVATED - The attribute is activated and is available to be queried. Note that ingest might still have not picked up the changes, and the + associated caches would not have refreshed yet to pick up the changes. + ATTRIBUTE_ALREADY_ACTIVE - The caller is trying to activate an attribute that is already active or in the process of getting activated. + ATTRIBUTE_DEACTIVATED - The attribute is deactivated and will not appear in searches. Ingest might not have picked up the new changes and the associated caches + might not have refreshed yet. + ATTRIBUTE_ALREADY_DEACTIVATED - The caller is trying to deactivate an attribute that has already been deactivated or in the process of deactivation. + DUPLICATE_ATTRIBUTE - The attribute is a duplicate of an attribute that was present in this bulk request. Note that we deduplicate the attribute collection, process only unique attributes, + and call out duplicates. A duplicate attribute in a bulk request will not prevent the processing of further attributes in the bulk operation. + The following values are error statuses and the bulk processing is stopped when the first error is encountered. None of the attributes in the bulk request would have been activated or + deactivated by this bulk operation. + DEACTIVATION_NOT_ALLOWED - The caller has asked for the deactivation of an out of box tag which is not permitted. + ATTRIBUTE_DOES_NOT_EXIST - The caller tries to deactivate an attribute that doesn't exist in the APM Domain. + INVALID_ATTRIBUTE - The attribute is invalid. + INVALID_ATTRIBUTE_TYPE_CONFLICT - The attribute is invalid. There were two attributes with same name but different type in the bulk request. + ATTRIBUTE_NOT_PROCESSED - The attribute was not processed, as there was another attribute in this bulk request collection that resulted in a processing error. + ATTRIBUTE_UPDATE_NOT_ALLOWED - The unit of the attribute cannot be updated as it is an in-built system attribute. + + + :param attribute_status: The attribute_status of this AttributeResponse. + :type: str + """ + allowed_values = ["ATTRIBUTE_ALREADY_ACTIVE", "ATTRIBUTE_ACTIVATED", "ATTRIBUTE_DEACTIVATED", "DEACTIVATION_NOT_ALLOWED", "ATTRIBUTE_DOES_NOT_EXIST", "ATTRIBUTE_ALREADY_DEACTIVATED", "DUPLICATE_ATTRIBUTE", "INVALID_ATTRIBUTE", "INVALID_ATTRIBUTE_TYPE_CONFLICT", "ATTRIBUTE_NOT_PROCESSED", "ATTRIBUTE_UPDATE_NOT_ALLOWED"] + if not value_allowed_none_or_none_sentinel(attribute_status, allowed_values): + attribute_status = 'UNKNOWN_ENUM_VALUE' + self._attribute_status = attribute_status + + @property + def time_updated(self): + """ + **[Required]** Gets the time_updated of this AttributeResponse. + Time when the attribute was activated or deactivated. Note that ingest might not have picked up the changes even if this time has elapsed. + + + :return: The time_updated of this AttributeResponse. + :rtype: datetime + """ + return self._time_updated + + @time_updated.setter + def time_updated(self, time_updated): + """ + Sets the time_updated of this AttributeResponse. + Time when the attribute was activated or deactivated. Note that ingest might not have picked up the changes even if this time has elapsed. + + + :param time_updated: The time_updated of this AttributeResponse. + :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/apm_traces/models/attribute_unpin_response.py b/src/oci/apm_traces/models/attribute_unpin_response.py new file mode 100644 index 0000000000..c49b9c4c5e --- /dev/null +++ b/src/oci/apm_traces/models/attribute_unpin_response.py @@ -0,0 +1,274 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20200630 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class AttributeUnpinResponse(object): + """ + Response of an individual attribute item in the bulk unpin operation. + """ + + #: A constant which can be used with the operation_type property of a AttributeUnpinResponse. + #: This constant has a value of "UNPIN" + OPERATION_TYPE_UNPIN = "UNPIN" + + #: A constant which can be used with the attribute_name_space property of a AttributeUnpinResponse. + #: This constant has a value of "TRACES" + ATTRIBUTE_NAME_SPACE_TRACES = "TRACES" + + #: A constant which can be used with the attribute_name_space property of a AttributeUnpinResponse. + #: This constant has a value of "SYNTHETIC" + ATTRIBUTE_NAME_SPACE_SYNTHETIC = "SYNTHETIC" + + #: A constant which can be used with the attribute_status property of a AttributeUnpinResponse. + #: This constant has a value of "ATTRIBUTE_UNPINNED" + ATTRIBUTE_STATUS_ATTRIBUTE_UNPINNED = "ATTRIBUTE_UNPINNED" + + #: A constant which can be used with the attribute_status property of a AttributeUnpinResponse. + #: This constant has a value of "DUPLICATE_ATTRIBUTE" + ATTRIBUTE_STATUS_DUPLICATE_ATTRIBUTE = "DUPLICATE_ATTRIBUTE" + + #: A constant which can be used with the attribute_status property of a AttributeUnpinResponse. + #: This constant has a value of "INVALID_ATTRIBUTE" + ATTRIBUTE_STATUS_INVALID_ATTRIBUTE = "INVALID_ATTRIBUTE" + + #: A constant which can be used with the attribute_status property of a AttributeUnpinResponse. + #: This constant has a value of "ATTRIBUTE_NOT_FOUND" + ATTRIBUTE_STATUS_ATTRIBUTE_NOT_FOUND = "ATTRIBUTE_NOT_FOUND" + + #: A constant which can be used with the attribute_status property of a AttributeUnpinResponse. + #: This constant has a value of "ATTRIBUTE_NOT_PROCESSED" + ATTRIBUTE_STATUS_ATTRIBUTE_NOT_PROCESSED = "ATTRIBUTE_NOT_PROCESSED" + + def __init__(self, **kwargs): + """ + Initializes a new AttributeUnpinResponse object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param attribute_name: + The value to assign to the attribute_name property of this AttributeUnpinResponse. + :type attribute_name: str + + :param operation_type: + The value to assign to the operation_type property of this AttributeUnpinResponse. + Allowed values for this property are: "UNPIN", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type operation_type: str + + :param attribute_name_space: + The value to assign to the attribute_name_space property of this AttributeUnpinResponse. + Allowed values for this property are: "TRACES", "SYNTHETIC", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type attribute_name_space: str + + :param attribute_status: + The value to assign to the attribute_status property of this AttributeUnpinResponse. + Allowed values for this property are: "ATTRIBUTE_UNPINNED", "DUPLICATE_ATTRIBUTE", "INVALID_ATTRIBUTE", "ATTRIBUTE_NOT_FOUND", "ATTRIBUTE_NOT_PROCESSED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type attribute_status: str + + :param time_updated: + The value to assign to the time_updated property of this AttributeUnpinResponse. + :type time_updated: datetime + + """ + self.swagger_types = { + 'attribute_name': 'str', + 'operation_type': 'str', + 'attribute_name_space': 'str', + 'attribute_status': 'str', + 'time_updated': 'datetime' + } + + self.attribute_map = { + 'attribute_name': 'attributeName', + 'operation_type': 'operationType', + 'attribute_name_space': 'attributeNameSpace', + 'attribute_status': 'attributeStatus', + 'time_updated': 'timeUpdated' + } + + self._attribute_name = None + self._operation_type = None + self._attribute_name_space = None + self._attribute_status = None + self._time_updated = None + + @property + def attribute_name(self): + """ + **[Required]** Gets the attribute_name of this AttributeUnpinResponse. + Attribute that was unpinned by this bulk operation. + + + :return: The attribute_name of this AttributeUnpinResponse. + :rtype: str + """ + return self._attribute_name + + @attribute_name.setter + def attribute_name(self, attribute_name): + """ + Sets the attribute_name of this AttributeUnpinResponse. + Attribute that was unpinned by this bulk operation. + + + :param attribute_name: The attribute_name of this AttributeUnpinResponse. + :type: str + """ + self._attribute_name = attribute_name + + @property + def operation_type(self): + """ + **[Required]** Gets the operation_type of this AttributeUnpinResponse. + Type of operation - unpin. + + Allowed values for this property are: "UNPIN", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The operation_type of this AttributeUnpinResponse. + :rtype: str + """ + return self._operation_type + + @operation_type.setter + def operation_type(self, operation_type): + """ + Sets the operation_type of this AttributeUnpinResponse. + Type of operation - unpin. + + + :param operation_type: The operation_type of this AttributeUnpinResponse. + :type: str + """ + allowed_values = ["UNPIN"] + if not value_allowed_none_or_none_sentinel(operation_type, allowed_values): + operation_type = 'UNKNOWN_ENUM_VALUE' + self._operation_type = operation_type + + @property + def attribute_name_space(self): + """ + **[Required]** Gets the attribute_name_space of this AttributeUnpinResponse. + Namespace of the attribute whose properties were updated. The attributeNameSpace will default to TRACES if it is + not passed in. + + Allowed values for this property are: "TRACES", "SYNTHETIC", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The attribute_name_space of this AttributeUnpinResponse. + :rtype: str + """ + return self._attribute_name_space + + @attribute_name_space.setter + def attribute_name_space(self, attribute_name_space): + """ + Sets the attribute_name_space of this AttributeUnpinResponse. + Namespace of the attribute whose properties were updated. The attributeNameSpace will default to TRACES if it is + not passed in. + + + :param attribute_name_space: The attribute_name_space of this AttributeUnpinResponse. + :type: str + """ + allowed_values = ["TRACES", "SYNTHETIC"] + if not value_allowed_none_or_none_sentinel(attribute_name_space, allowed_values): + attribute_name_space = 'UNKNOWN_ENUM_VALUE' + self._attribute_name_space = attribute_name_space + + @property + def attribute_status(self): + """ + **[Required]** Gets the attribute_status of this AttributeUnpinResponse. + Status of the attribute after this operation. The attribute can have one of the following statuses after the unpin operation. The attribute + can have either a success status or an error status. The status of the attribute must be correlated with the operation status property in the bulk operation metadata + object. The bulk operation will be successful only when all attributes in the bulk request are processed successfully and they get a success status back. + The following are successful status values of individual attribute items in a bulk attribute unpin operation. + ATTRIBUTE_UNPINNED - The attribute is marked unpinned and associated notes have been cleared. + DUPLICATE_ATTRIBUTE - The attribute is a duplicate of an attribute that was present in this bulk request. Note that we deduplicate the attribute collection, process only unique attributes, + and call out duplicates. A duplicate attribute in a bulk request will not prevent the processing of further attributes in the bulk operation. + The following values are error statuses and the bulk processing is stopped when the first error is encountered. + INVALID_ATTRIBUTE - The attribute is invalid. The size of the attribute is more than a 1000 chars. + ATTRIBUTE_NOT_FOUND - The attribute was not found in the set of pinned attributes. + ATTRIBUTE_NOT_PROCESSED - The attribute was not processed, as there was another attribute in this bulk request collection that resulted in a processing error. + + Allowed values for this property are: "ATTRIBUTE_UNPINNED", "DUPLICATE_ATTRIBUTE", "INVALID_ATTRIBUTE", "ATTRIBUTE_NOT_FOUND", "ATTRIBUTE_NOT_PROCESSED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The attribute_status of this AttributeUnpinResponse. + :rtype: str + """ + return self._attribute_status + + @attribute_status.setter + def attribute_status(self, attribute_status): + """ + Sets the attribute_status of this AttributeUnpinResponse. + Status of the attribute after this operation. The attribute can have one of the following statuses after the unpin operation. The attribute + can have either a success status or an error status. The status of the attribute must be correlated with the operation status property in the bulk operation metadata + object. The bulk operation will be successful only when all attributes in the bulk request are processed successfully and they get a success status back. + The following are successful status values of individual attribute items in a bulk attribute unpin operation. + ATTRIBUTE_UNPINNED - The attribute is marked unpinned and associated notes have been cleared. + DUPLICATE_ATTRIBUTE - The attribute is a duplicate of an attribute that was present in this bulk request. Note that we deduplicate the attribute collection, process only unique attributes, + and call out duplicates. A duplicate attribute in a bulk request will not prevent the processing of further attributes in the bulk operation. + The following values are error statuses and the bulk processing is stopped when the first error is encountered. + INVALID_ATTRIBUTE - The attribute is invalid. The size of the attribute is more than a 1000 chars. + ATTRIBUTE_NOT_FOUND - The attribute was not found in the set of pinned attributes. + ATTRIBUTE_NOT_PROCESSED - The attribute was not processed, as there was another attribute in this bulk request collection that resulted in a processing error. + + + :param attribute_status: The attribute_status of this AttributeUnpinResponse. + :type: str + """ + allowed_values = ["ATTRIBUTE_UNPINNED", "DUPLICATE_ATTRIBUTE", "INVALID_ATTRIBUTE", "ATTRIBUTE_NOT_FOUND", "ATTRIBUTE_NOT_PROCESSED"] + if not value_allowed_none_or_none_sentinel(attribute_status, allowed_values): + attribute_status = 'UNKNOWN_ENUM_VALUE' + self._attribute_status = attribute_status + + @property + def time_updated(self): + """ + **[Required]** Gets the time_updated of this AttributeUnpinResponse. + Time when the attribute was activated or deactivated. Note that ingest might not have picked up the changes even if this time has elapsed. + + + :return: The time_updated of this AttributeUnpinResponse. + :rtype: datetime + """ + return self._time_updated + + @time_updated.setter + def time_updated(self, time_updated): + """ + Sets the time_updated of this AttributeUnpinResponse. + Time when the attribute was activated or deactivated. Note that ingest might not have picked up the changes even if this time has elapsed. + + + :param time_updated: The time_updated of this AttributeUnpinResponse. + :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/apm_traces/models/attribute_update_notes_response.py b/src/oci/apm_traces/models/attribute_update_notes_response.py new file mode 100644 index 0000000000..5a1e01921e --- /dev/null +++ b/src/oci/apm_traces/models/attribute_update_notes_response.py @@ -0,0 +1,311 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20200630 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class AttributeUpdateNotesResponse(object): + """ + Response of an individual attribute item in the bulk update notes operation. + """ + + #: A constant which can be used with the operation_type property of a AttributeUpdateNotesResponse. + #: This constant has a value of "UPDATE_NOTES" + OPERATION_TYPE_UPDATE_NOTES = "UPDATE_NOTES" + + #: A constant which can be used with the attribute_name_space property of a AttributeUpdateNotesResponse. + #: This constant has a value of "TRACES" + ATTRIBUTE_NAME_SPACE_TRACES = "TRACES" + + #: A constant which can be used with the attribute_name_space property of a AttributeUpdateNotesResponse. + #: This constant has a value of "SYNTHETIC" + ATTRIBUTE_NAME_SPACE_SYNTHETIC = "SYNTHETIC" + + #: A constant which can be used with the attribute_status property of a AttributeUpdateNotesResponse. + #: This constant has a value of "ATTRIBUTE_NOTES_UPDATED" + ATTRIBUTE_STATUS_ATTRIBUTE_NOTES_UPDATED = "ATTRIBUTE_NOTES_UPDATED" + + #: A constant which can be used with the attribute_status property of a AttributeUpdateNotesResponse. + #: This constant has a value of "DUPLICATE_ATTRIBUTE" + ATTRIBUTE_STATUS_DUPLICATE_ATTRIBUTE = "DUPLICATE_ATTRIBUTE" + + #: A constant which can be used with the attribute_status property of a AttributeUpdateNotesResponse. + #: This constant has a value of "INVALID_ATTRIBUTE" + ATTRIBUTE_STATUS_INVALID_ATTRIBUTE = "INVALID_ATTRIBUTE" + + #: A constant which can be used with the attribute_status property of a AttributeUpdateNotesResponse. + #: This constant has a value of "ATTRIBUTE_NOT_PROCESSED" + ATTRIBUTE_STATUS_ATTRIBUTE_NOT_PROCESSED = "ATTRIBUTE_NOT_PROCESSED" + + #: A constant which can be used with the attribute_status property of a AttributeUpdateNotesResponse. + #: This constant has a value of "ATTRIBUTE_DOES_NOT_EXIST" + ATTRIBUTE_STATUS_ATTRIBUTE_DOES_NOT_EXIST = "ATTRIBUTE_DOES_NOT_EXIST" + + #: A constant which can be used with the attribute_status property of a AttributeUpdateNotesResponse. + #: This constant has a value of "NOTES_TOO_LONG" + ATTRIBUTE_STATUS_NOTES_TOO_LONG = "NOTES_TOO_LONG" + + def __init__(self, **kwargs): + """ + Initializes a new AttributeUpdateNotesResponse object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param attribute_name: + The value to assign to the attribute_name property of this AttributeUpdateNotesResponse. + :type attribute_name: str + + :param notes: + The value to assign to the notes property of this AttributeUpdateNotesResponse. + :type notes: str + + :param operation_type: + The value to assign to the operation_type property of this AttributeUpdateNotesResponse. + Allowed values for this property are: "UPDATE_NOTES", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type operation_type: str + + :param attribute_name_space: + The value to assign to the attribute_name_space property of this AttributeUpdateNotesResponse. + Allowed values for this property are: "TRACES", "SYNTHETIC", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type attribute_name_space: str + + :param attribute_status: + The value to assign to the attribute_status property of this AttributeUpdateNotesResponse. + Allowed values for this property are: "ATTRIBUTE_NOTES_UPDATED", "DUPLICATE_ATTRIBUTE", "INVALID_ATTRIBUTE", "ATTRIBUTE_NOT_PROCESSED", "ATTRIBUTE_DOES_NOT_EXIST", "NOTES_TOO_LONG", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type attribute_status: str + + :param time_updated: + The value to assign to the time_updated property of this AttributeUpdateNotesResponse. + :type time_updated: datetime + + """ + self.swagger_types = { + 'attribute_name': 'str', + 'notes': 'str', + 'operation_type': 'str', + 'attribute_name_space': 'str', + 'attribute_status': 'str', + 'time_updated': 'datetime' + } + + self.attribute_map = { + 'attribute_name': 'attributeName', + 'notes': 'notes', + 'operation_type': 'operationType', + 'attribute_name_space': 'attributeNameSpace', + 'attribute_status': 'attributeStatus', + 'time_updated': 'timeUpdated' + } + + self._attribute_name = None + self._notes = None + self._operation_type = None + self._attribute_name_space = None + self._attribute_status = None + self._time_updated = None + + @property + def attribute_name(self): + """ + **[Required]** Gets the attribute_name of this AttributeUpdateNotesResponse. + Attribute for which notes were added to or edited in this bulk operation. + + + :return: The attribute_name of this AttributeUpdateNotesResponse. + :rtype: str + """ + return self._attribute_name + + @attribute_name.setter + def attribute_name(self, attribute_name): + """ + Sets the attribute_name of this AttributeUpdateNotesResponse. + Attribute for which notes were added to or edited in this bulk operation. + + + :param attribute_name: The attribute_name of this AttributeUpdateNotesResponse. + :type: str + """ + self._attribute_name = attribute_name + + @property + def notes(self): + """ + **[Required]** Gets the notes of this AttributeUpdateNotesResponse. + Notes added to or edited for this attribute. + + + :return: The notes of this AttributeUpdateNotesResponse. + :rtype: str + """ + return self._notes + + @notes.setter + def notes(self, notes): + """ + Sets the notes of this AttributeUpdateNotesResponse. + Notes added to or edited for this attribute. + + + :param notes: The notes of this AttributeUpdateNotesResponse. + :type: str + """ + self._notes = notes + + @property + def operation_type(self): + """ + **[Required]** Gets the operation_type of this AttributeUpdateNotesResponse. + Type of operation - UPDATE_NOTES. + + Allowed values for this property are: "UPDATE_NOTES", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The operation_type of this AttributeUpdateNotesResponse. + :rtype: str + """ + return self._operation_type + + @operation_type.setter + def operation_type(self, operation_type): + """ + Sets the operation_type of this AttributeUpdateNotesResponse. + Type of operation - UPDATE_NOTES. + + + :param operation_type: The operation_type of this AttributeUpdateNotesResponse. + :type: str + """ + allowed_values = ["UPDATE_NOTES"] + if not value_allowed_none_or_none_sentinel(operation_type, allowed_values): + operation_type = 'UNKNOWN_ENUM_VALUE' + self._operation_type = operation_type + + @property + def attribute_name_space(self): + """ + **[Required]** Gets the attribute_name_space of this AttributeUpdateNotesResponse. + Namespace of the attribute whose notes were updated. The attributeNameSpace will default to TRACES if it is + not passed in. + + Allowed values for this property are: "TRACES", "SYNTHETIC", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The attribute_name_space of this AttributeUpdateNotesResponse. + :rtype: str + """ + return self._attribute_name_space + + @attribute_name_space.setter + def attribute_name_space(self, attribute_name_space): + """ + Sets the attribute_name_space of this AttributeUpdateNotesResponse. + Namespace of the attribute whose notes were updated. The attributeNameSpace will default to TRACES if it is + not passed in. + + + :param attribute_name_space: The attribute_name_space of this AttributeUpdateNotesResponse. + :type: str + """ + allowed_values = ["TRACES", "SYNTHETIC"] + if not value_allowed_none_or_none_sentinel(attribute_name_space, allowed_values): + attribute_name_space = 'UNKNOWN_ENUM_VALUE' + self._attribute_name_space = attribute_name_space + + @property + def attribute_status(self): + """ + **[Required]** Gets the attribute_status of this AttributeUpdateNotesResponse. + Status of the attribute after this operation. The attribute can have one of the following statuses after the update notes operation. The attribute + can have either a success status or an error status. The status of the attribute must be correlated with the operation status property in the bulk operation metadata + object. The bulk operation will be successful only when all attributes in the bulk request are processed successfully and they get a success status back. + The following are successful status values of individual attribute items in a bulk update notes operation. + ATTRIBUTE_NOTES_UPDATED - The attribute's notes have been updated with the given notes. + DUPLICATE_ATTRIBUTE - The attribute is a duplicate of an attribute that was present in this bulk request. Note that we deduplicate the attribute collection, process only unique attributes, + and call out duplicates. A duplicate attribute in a bulk request will not prevent the processing of further attributes in the bulk operation. + The following values are error statuses and the bulk processing is stopped when the first error is encountered. + INVALID_ATTRIBUTE - The attribute is invalid. The length of the notes is more than a 1000 characters. + ATTRIBUTE_NOT_PROCESSED - The attribute was not processed, as there was another attribute in this bulk request collection that resulted in a processing error. + ATTRIBUTE_DOES_NOT_EXIST - Attribute was neither active nor pinned inactive. + NOTES_TOO_LONG - Attribute notes were too long (more than 1000 chars). + + Allowed values for this property are: "ATTRIBUTE_NOTES_UPDATED", "DUPLICATE_ATTRIBUTE", "INVALID_ATTRIBUTE", "ATTRIBUTE_NOT_PROCESSED", "ATTRIBUTE_DOES_NOT_EXIST", "NOTES_TOO_LONG", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The attribute_status of this AttributeUpdateNotesResponse. + :rtype: str + """ + return self._attribute_status + + @attribute_status.setter + def attribute_status(self, attribute_status): + """ + Sets the attribute_status of this AttributeUpdateNotesResponse. + Status of the attribute after this operation. The attribute can have one of the following statuses after the update notes operation. The attribute + can have either a success status or an error status. The status of the attribute must be correlated with the operation status property in the bulk operation metadata + object. The bulk operation will be successful only when all attributes in the bulk request are processed successfully and they get a success status back. + The following are successful status values of individual attribute items in a bulk update notes operation. + ATTRIBUTE_NOTES_UPDATED - The attribute's notes have been updated with the given notes. + DUPLICATE_ATTRIBUTE - The attribute is a duplicate of an attribute that was present in this bulk request. Note that we deduplicate the attribute collection, process only unique attributes, + and call out duplicates. A duplicate attribute in a bulk request will not prevent the processing of further attributes in the bulk operation. + The following values are error statuses and the bulk processing is stopped when the first error is encountered. + INVALID_ATTRIBUTE - The attribute is invalid. The length of the notes is more than a 1000 characters. + ATTRIBUTE_NOT_PROCESSED - The attribute was not processed, as there was another attribute in this bulk request collection that resulted in a processing error. + ATTRIBUTE_DOES_NOT_EXIST - Attribute was neither active nor pinned inactive. + NOTES_TOO_LONG - Attribute notes were too long (more than 1000 chars). + + + :param attribute_status: The attribute_status of this AttributeUpdateNotesResponse. + :type: str + """ + allowed_values = ["ATTRIBUTE_NOTES_UPDATED", "DUPLICATE_ATTRIBUTE", "INVALID_ATTRIBUTE", "ATTRIBUTE_NOT_PROCESSED", "ATTRIBUTE_DOES_NOT_EXIST", "NOTES_TOO_LONG"] + if not value_allowed_none_or_none_sentinel(attribute_status, allowed_values): + attribute_status = 'UNKNOWN_ENUM_VALUE' + self._attribute_status = attribute_status + + @property + def time_updated(self): + """ + **[Required]** Gets the time_updated of this AttributeUpdateNotesResponse. + Time when the attribute's notes were updated. + + + :return: The time_updated of this AttributeUpdateNotesResponse. + :rtype: datetime + """ + return self._time_updated + + @time_updated.setter + def time_updated(self, time_updated): + """ + Sets the time_updated of this AttributeUpdateNotesResponse. + Time when the attribute's notes were updated. + + + :param time_updated: The time_updated of this AttributeUpdateNotesResponse. + :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/apm_traces/models/attribute_update_response.py b/src/oci/apm_traces/models/attribute_update_response.py new file mode 100644 index 0000000000..09757c98d0 --- /dev/null +++ b/src/oci/apm_traces/models/attribute_update_response.py @@ -0,0 +1,425 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20200630 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class AttributeUpdateResponse(object): + """ + Response of an individual attribute item in the bulk update attribute operation. + """ + + #: A constant which can be used with the attribute_type property of a AttributeUpdateResponse. + #: This constant has a value of "NUMERIC" + ATTRIBUTE_TYPE_NUMERIC = "NUMERIC" + + #: A constant which can be used with the attribute_type property of a AttributeUpdateResponse. + #: This constant has a value of "STRING" + ATTRIBUTE_TYPE_STRING = "STRING" + + #: A constant which can be used with the unit property of a AttributeUpdateResponse. + #: This constant has a value of "NONE" + UNIT_NONE = "NONE" + + #: A constant which can be used with the unit property of a AttributeUpdateResponse. + #: This constant has a value of "EPOCH_TIME_MS" + UNIT_EPOCH_TIME_MS = "EPOCH_TIME_MS" + + #: A constant which can be used with the unit property of a AttributeUpdateResponse. + #: This constant has a value of "BYTES" + UNIT_BYTES = "BYTES" + + #: A constant which can be used with the unit property of a AttributeUpdateResponse. + #: This constant has a value of "COUNT" + UNIT_COUNT = "COUNT" + + #: A constant which can be used with the unit property of a AttributeUpdateResponse. + #: This constant has a value of "DURATION_MS" + UNIT_DURATION_MS = "DURATION_MS" + + #: A constant which can be used with the unit property of a AttributeUpdateResponse. + #: This constant has a value of "TRACE_STATUS" + UNIT_TRACE_STATUS = "TRACE_STATUS" + + #: A constant which can be used with the unit property of a AttributeUpdateResponse. + #: This constant has a value of "PERCENTAGE" + UNIT_PERCENTAGE = "PERCENTAGE" + + #: A constant which can be used with the operation_type property of a AttributeUpdateResponse. + #: This constant has a value of "UPDATE_ATTRIBUTE_PROPERTIES" + OPERATION_TYPE_UPDATE_ATTRIBUTE_PROPERTIES = "UPDATE_ATTRIBUTE_PROPERTIES" + + #: A constant which can be used with the attribute_status property of a AttributeUpdateResponse. + #: This constant has a value of "ATTRIBUTE_UPDATED" + ATTRIBUTE_STATUS_ATTRIBUTE_UPDATED = "ATTRIBUTE_UPDATED" + + #: A constant which can be used with the attribute_status property of a AttributeUpdateResponse. + #: This constant has a value of "DUPLICATE_ATTRIBUTE" + ATTRIBUTE_STATUS_DUPLICATE_ATTRIBUTE = "DUPLICATE_ATTRIBUTE" + + #: A constant which can be used with the attribute_status property of a AttributeUpdateResponse. + #: This constant has a value of "INVALID_ATTRIBUTE" + ATTRIBUTE_STATUS_INVALID_ATTRIBUTE = "INVALID_ATTRIBUTE" + + #: A constant which can be used with the attribute_status property of a AttributeUpdateResponse. + #: This constant has a value of "ATTRIBUTE_NOT_PROCESSED" + ATTRIBUTE_STATUS_ATTRIBUTE_NOT_PROCESSED = "ATTRIBUTE_NOT_PROCESSED" + + #: A constant which can be used with the attribute_status property of a AttributeUpdateResponse. + #: This constant has a value of "ATTRIBUTE_DOES_NOT_EXIST" + ATTRIBUTE_STATUS_ATTRIBUTE_DOES_NOT_EXIST = "ATTRIBUTE_DOES_NOT_EXIST" + + #: A constant which can be used with the attribute_status property of a AttributeUpdateResponse. + #: This constant has a value of "ATTRIBUTE_UPDATE_NOT_ALLOWED" + ATTRIBUTE_STATUS_ATTRIBUTE_UPDATE_NOT_ALLOWED = "ATTRIBUTE_UPDATE_NOT_ALLOWED" + + #: A constant which can be used with the attribute_name_space property of a AttributeUpdateResponse. + #: This constant has a value of "TRACES" + ATTRIBUTE_NAME_SPACE_TRACES = "TRACES" + + #: A constant which can be used with the attribute_name_space property of a AttributeUpdateResponse. + #: This constant has a value of "SYNTHETIC" + ATTRIBUTE_NAME_SPACE_SYNTHETIC = "SYNTHETIC" + + def __init__(self, **kwargs): + """ + Initializes a new AttributeUpdateResponse object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param attribute_name: + The value to assign to the attribute_name property of this AttributeUpdateResponse. + :type attribute_name: str + + :param attribute_type: + The value to assign to the attribute_type property of this AttributeUpdateResponse. + Allowed values for this property are: "NUMERIC", "STRING", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type attribute_type: str + + :param unit: + The value to assign to the unit property of this AttributeUpdateResponse. + Allowed values for this property are: "NONE", "EPOCH_TIME_MS", "BYTES", "COUNT", "DURATION_MS", "TRACE_STATUS", "PERCENTAGE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type unit: str + + :param notes: + The value to assign to the notes property of this AttributeUpdateResponse. + :type notes: str + + :param operation_type: + The value to assign to the operation_type property of this AttributeUpdateResponse. + Allowed values for this property are: "UPDATE_ATTRIBUTE_PROPERTIES", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type operation_type: str + + :param attribute_status: + The value to assign to the attribute_status property of this AttributeUpdateResponse. + Allowed values for this property are: "ATTRIBUTE_UPDATED", "DUPLICATE_ATTRIBUTE", "INVALID_ATTRIBUTE", "ATTRIBUTE_NOT_PROCESSED", "ATTRIBUTE_DOES_NOT_EXIST", "ATTRIBUTE_UPDATE_NOT_ALLOWED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type attribute_status: str + + :param attribute_name_space: + The value to assign to the attribute_name_space property of this AttributeUpdateResponse. + Allowed values for this property are: "TRACES", "SYNTHETIC", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type attribute_name_space: str + + :param time_updated: + The value to assign to the time_updated property of this AttributeUpdateResponse. + :type time_updated: datetime + + """ + self.swagger_types = { + 'attribute_name': 'str', + 'attribute_type': 'str', + 'unit': 'str', + 'notes': 'str', + 'operation_type': 'str', + 'attribute_status': 'str', + 'attribute_name_space': 'str', + 'time_updated': 'datetime' + } + + self.attribute_map = { + 'attribute_name': 'attributeName', + 'attribute_type': 'attributeType', + 'unit': 'unit', + 'notes': 'notes', + 'operation_type': 'operationType', + 'attribute_status': 'attributeStatus', + 'attribute_name_space': 'attributeNameSpace', + 'time_updated': 'timeUpdated' + } + + self._attribute_name = None + self._attribute_type = None + self._unit = None + self._notes = None + self._operation_type = None + self._attribute_status = None + self._attribute_name_space = None + self._time_updated = None + + @property + def attribute_name(self): + """ + **[Required]** Gets the attribute_name of this AttributeUpdateResponse. + Attribute for which properties were updated in this bulk operation. + + + :return: The attribute_name of this AttributeUpdateResponse. + :rtype: str + """ + return self._attribute_name + + @attribute_name.setter + def attribute_name(self, attribute_name): + """ + Sets the attribute_name of this AttributeUpdateResponse. + Attribute for which properties were updated in this bulk operation. + + + :param attribute_name: The attribute_name of this AttributeUpdateResponse. + :type: str + """ + self._attribute_name = attribute_name + + @property + def attribute_type(self): + """ + Gets the attribute_type of this AttributeUpdateResponse. + Type of the attribute. + + Allowed values for this property are: "NUMERIC", "STRING", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The attribute_type of this AttributeUpdateResponse. + :rtype: str + """ + return self._attribute_type + + @attribute_type.setter + def attribute_type(self, attribute_type): + """ + Sets the attribute_type of this AttributeUpdateResponse. + Type of the attribute. + + + :param attribute_type: The attribute_type of this AttributeUpdateResponse. + :type: str + """ + allowed_values = ["NUMERIC", "STRING"] + if not value_allowed_none_or_none_sentinel(attribute_type, allowed_values): + attribute_type = 'UNKNOWN_ENUM_VALUE' + self._attribute_type = attribute_type + + @property + def unit(self): + """ + Gets the unit of this AttributeUpdateResponse. + Unit updated for this attribute. + + Allowed values for this property are: "NONE", "EPOCH_TIME_MS", "BYTES", "COUNT", "DURATION_MS", "TRACE_STATUS", "PERCENTAGE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The unit of this AttributeUpdateResponse. + :rtype: str + """ + return self._unit + + @unit.setter + def unit(self, unit): + """ + Sets the unit of this AttributeUpdateResponse. + Unit updated for this attribute. + + + :param unit: The unit of this AttributeUpdateResponse. + :type: str + """ + allowed_values = ["NONE", "EPOCH_TIME_MS", "BYTES", "COUNT", "DURATION_MS", "TRACE_STATUS", "PERCENTAGE"] + if not value_allowed_none_or_none_sentinel(unit, allowed_values): + unit = 'UNKNOWN_ENUM_VALUE' + self._unit = unit + + @property + def notes(self): + """ + Gets the notes of this AttributeUpdateResponse. + Notes for the attribute. + + + :return: The notes of this AttributeUpdateResponse. + :rtype: str + """ + return self._notes + + @notes.setter + def notes(self, notes): + """ + Sets the notes of this AttributeUpdateResponse. + Notes for the attribute. + + + :param notes: The notes of this AttributeUpdateResponse. + :type: str + """ + self._notes = notes + + @property + def operation_type(self): + """ + Gets the operation_type of this AttributeUpdateResponse. + Type of operation - UPDATE_ATTRIBUTE_PROPERTIES. + + Allowed values for this property are: "UPDATE_ATTRIBUTE_PROPERTIES", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The operation_type of this AttributeUpdateResponse. + :rtype: str + """ + return self._operation_type + + @operation_type.setter + def operation_type(self, operation_type): + """ + Sets the operation_type of this AttributeUpdateResponse. + Type of operation - UPDATE_ATTRIBUTE_PROPERTIES. + + + :param operation_type: The operation_type of this AttributeUpdateResponse. + :type: str + """ + allowed_values = ["UPDATE_ATTRIBUTE_PROPERTIES"] + if not value_allowed_none_or_none_sentinel(operation_type, allowed_values): + operation_type = 'UNKNOWN_ENUM_VALUE' + self._operation_type = operation_type + + @property + def attribute_status(self): + """ + Gets the attribute_status of this AttributeUpdateResponse. + Status of the attribute after this operation. The attribute can have one of the following statuses after the update operation. The attribute + can have either a success status or an error status. The status of the attribute must be correlated with the operation status property in the bulk operation metadata + object. The bulk operation will be successful only when all attributes in the bulk request are processed successfully and they get a success status back. + The following are successful status values of individual attribute items in a bulk update attribute operation. + ATTRIBUTE_UPDATED - The attribute's properites have been updated with the given properties. + DUPLICATE_ATTRIBUTE - The attribute is a duplicate of an attribute that was present in this bulk request. Note that we deduplicate the attribute collection, process only unique attributes, + and call out duplicates. A duplicate attribute in a bulk request will not prevent the processing of further attributes in the bulk operation. + The following values are error statuses and the bulk processing is stopped when the first error is encountered. + INVALID_ATTRIBUTE - The attribute is invalid. + ATTRIBUTE_NOT_PROCESSED - The attribute was not processed, as there was another attribute in this bulk request collection that resulted in a processing error. + ATTRIBUTE_DOES_NOT_EXIST - Attribute was neither active nor pinned inactive. + ATTRIBUTE_UPDATE_NOT_ALLOWED - Attribute update is not allowed as it is an in-built system attribute. + + Allowed values for this property are: "ATTRIBUTE_UPDATED", "DUPLICATE_ATTRIBUTE", "INVALID_ATTRIBUTE", "ATTRIBUTE_NOT_PROCESSED", "ATTRIBUTE_DOES_NOT_EXIST", "ATTRIBUTE_UPDATE_NOT_ALLOWED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The attribute_status of this AttributeUpdateResponse. + :rtype: str + """ + return self._attribute_status + + @attribute_status.setter + def attribute_status(self, attribute_status): + """ + Sets the attribute_status of this AttributeUpdateResponse. + Status of the attribute after this operation. The attribute can have one of the following statuses after the update operation. The attribute + can have either a success status or an error status. The status of the attribute must be correlated with the operation status property in the bulk operation metadata + object. The bulk operation will be successful only when all attributes in the bulk request are processed successfully and they get a success status back. + The following are successful status values of individual attribute items in a bulk update attribute operation. + ATTRIBUTE_UPDATED - The attribute's properites have been updated with the given properties. + DUPLICATE_ATTRIBUTE - The attribute is a duplicate of an attribute that was present in this bulk request. Note that we deduplicate the attribute collection, process only unique attributes, + and call out duplicates. A duplicate attribute in a bulk request will not prevent the processing of further attributes in the bulk operation. + The following values are error statuses and the bulk processing is stopped when the first error is encountered. + INVALID_ATTRIBUTE - The attribute is invalid. + ATTRIBUTE_NOT_PROCESSED - The attribute was not processed, as there was another attribute in this bulk request collection that resulted in a processing error. + ATTRIBUTE_DOES_NOT_EXIST - Attribute was neither active nor pinned inactive. + ATTRIBUTE_UPDATE_NOT_ALLOWED - Attribute update is not allowed as it is an in-built system attribute. + + + :param attribute_status: The attribute_status of this AttributeUpdateResponse. + :type: str + """ + allowed_values = ["ATTRIBUTE_UPDATED", "DUPLICATE_ATTRIBUTE", "INVALID_ATTRIBUTE", "ATTRIBUTE_NOT_PROCESSED", "ATTRIBUTE_DOES_NOT_EXIST", "ATTRIBUTE_UPDATE_NOT_ALLOWED"] + if not value_allowed_none_or_none_sentinel(attribute_status, allowed_values): + attribute_status = 'UNKNOWN_ENUM_VALUE' + self._attribute_status = attribute_status + + @property + def attribute_name_space(self): + """ + **[Required]** Gets the attribute_name_space of this AttributeUpdateResponse. + Namespace of the attribute whose properties were updated. The attributeNameSpace will default to TRACES if it is + not passed in. + + Allowed values for this property are: "TRACES", "SYNTHETIC", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The attribute_name_space of this AttributeUpdateResponse. + :rtype: str + """ + return self._attribute_name_space + + @attribute_name_space.setter + def attribute_name_space(self, attribute_name_space): + """ + Sets the attribute_name_space of this AttributeUpdateResponse. + Namespace of the attribute whose properties were updated. The attributeNameSpace will default to TRACES if it is + not passed in. + + + :param attribute_name_space: The attribute_name_space of this AttributeUpdateResponse. + :type: str + """ + allowed_values = ["TRACES", "SYNTHETIC"] + if not value_allowed_none_or_none_sentinel(attribute_name_space, allowed_values): + attribute_name_space = 'UNKNOWN_ENUM_VALUE' + self._attribute_name_space = attribute_name_space + + @property + def time_updated(self): + """ + **[Required]** Gets the time_updated of this AttributeUpdateResponse. + Time when the attribute's properties were updated. + + + :return: The time_updated of this AttributeUpdateResponse. + :rtype: datetime + """ + return self._time_updated + + @time_updated.setter + def time_updated(self, time_updated): + """ + Sets the time_updated of this AttributeUpdateResponse. + Time when the attribute's properties were updated. + + + :param time_updated: The time_updated of this AttributeUpdateResponse. + :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/apm_traces/models/auto_activate_status.py b/src/oci/apm_traces/models/auto_activate_status.py new file mode 100644 index 0000000000..155dec15d4 --- /dev/null +++ b/src/oci/apm_traces/models/auto_activate_status.py @@ -0,0 +1,119 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20200630 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class AutoActivateStatus(object): + """ + Status of autoactivation for the given data key in the APM Domain. + """ + + #: A constant which can be used with the data_key property of a AutoActivateStatus. + #: This constant has a value of "PRIVATE_DATA_KEY" + DATA_KEY_PRIVATE_DATA_KEY = "PRIVATE_DATA_KEY" + + #: A constant which can be used with the data_key property of a AutoActivateStatus. + #: This constant has a value of "PUBLIC_DATA_KEY" + DATA_KEY_PUBLIC_DATA_KEY = "PUBLIC_DATA_KEY" + + def __init__(self, **kwargs): + """ + Initializes a new AutoActivateStatus object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param state: + The value to assign to the state property of this AutoActivateStatus. + :type state: str + + :param data_key: + The value to assign to the data_key property of this AutoActivateStatus. + Allowed values for this property are: "PRIVATE_DATA_KEY", "PUBLIC_DATA_KEY", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type data_key: str + + """ + self.swagger_types = { + 'state': 'str', + 'data_key': 'str' + } + + self.attribute_map = { + 'state': 'state', + 'data_key': 'dataKey' + } + + self._state = None + self._data_key = None + + @property + def state(self): + """ + **[Required]** Gets the state of this AutoActivateStatus. + State of autoactivation in this APM Domain. If \"ON\" auto-activate is set to true, if \"OFF\" auto-activate is set to false. + + + :return: The state of this AutoActivateStatus. + :rtype: str + """ + return self._state + + @state.setter + def state(self, state): + """ + Sets the state of this AutoActivateStatus. + State of autoactivation in this APM Domain. If \"ON\" auto-activate is set to true, if \"OFF\" auto-activate is set to false. + + + :param state: The state of this AutoActivateStatus. + :type: str + """ + self._state = state + + @property + def data_key(self): + """ + **[Required]** Gets the data_key of this AutoActivateStatus. + Data key type for which auto-activate needs needs to be turned on or off. + + Allowed values for this property are: "PRIVATE_DATA_KEY", "PUBLIC_DATA_KEY", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The data_key of this AutoActivateStatus. + :rtype: str + """ + return self._data_key + + @data_key.setter + def data_key(self, data_key): + """ + Sets the data_key of this AutoActivateStatus. + Data key type for which auto-activate needs needs to be turned on or off. + + + :param data_key: The data_key of this AutoActivateStatus. + :type: str + """ + allowed_values = ["PRIVATE_DATA_KEY", "PUBLIC_DATA_KEY"] + if not value_allowed_none_or_none_sentinel(data_key, allowed_values): + data_key = 'UNKNOWN_ENUM_VALUE' + self._data_key = data_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/apm_traces/models/auto_activate_toggle_status.py b/src/oci/apm_traces/models/auto_activate_toggle_status.py new file mode 100644 index 0000000000..bdcff07831 --- /dev/null +++ b/src/oci/apm_traces/models/auto_activate_toggle_status.py @@ -0,0 +1,162 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20200630 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class AutoActivateToggleStatus(object): + """ + Response of a auto-activate toggle operation. + """ + + #: A constant which can be used with the status property of a AutoActivateToggleStatus. + #: This constant has a value of "SUCCESS" + STATUS_SUCCESS = "SUCCESS" + + #: A constant which can be used with the data_key property of a AutoActivateToggleStatus. + #: This constant has a value of "PRIVATE_DATA_KEY" + DATA_KEY_PRIVATE_DATA_KEY = "PRIVATE_DATA_KEY" + + #: A constant which can be used with the data_key property of a AutoActivateToggleStatus. + #: This constant has a value of "PUBLIC_DATA_KEY" + DATA_KEY_PUBLIC_DATA_KEY = "PUBLIC_DATA_KEY" + + def __init__(self, **kwargs): + """ + Initializes a new AutoActivateToggleStatus object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param status: + The value to assign to the status property of this AutoActivateToggleStatus. + Allowed values for this property are: "SUCCESS", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type status: str + + :param state: + The value to assign to the state property of this AutoActivateToggleStatus. + :type state: str + + :param data_key: + The value to assign to the data_key property of this AutoActivateToggleStatus. + Allowed values for this property are: "PRIVATE_DATA_KEY", "PUBLIC_DATA_KEY", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type data_key: str + + """ + self.swagger_types = { + 'status': 'str', + 'state': 'str', + 'data_key': 'str' + } + + self.attribute_map = { + 'status': 'status', + 'state': 'state', + 'data_key': 'dataKey' + } + + self._status = None + self._state = None + self._data_key = None + + @property + def status(self): + """ + **[Required]** Gets the status of this AutoActivateToggleStatus. + Status of this operation. + + Allowed values for this property are: "SUCCESS", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The status of this AutoActivateToggleStatus. + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """ + Sets the status of this AutoActivateToggleStatus. + Status of this operation. + + + :param status: The status of this AutoActivateToggleStatus. + :type: str + """ + allowed_values = ["SUCCESS"] + if not value_allowed_none_or_none_sentinel(status, allowed_values): + status = 'UNKNOWN_ENUM_VALUE' + self._status = status + + @property + def state(self): + """ + **[Required]** Gets the state of this AutoActivateToggleStatus. + State of autoactivation in this APM Domain. If \"ON\" auto-activate is set to true, if \"OFF\" auto-activate is set to false. + + + :return: The state of this AutoActivateToggleStatus. + :rtype: str + """ + return self._state + + @state.setter + def state(self, state): + """ + Sets the state of this AutoActivateToggleStatus. + State of autoactivation in this APM Domain. If \"ON\" auto-activate is set to true, if \"OFF\" auto-activate is set to false. + + + :param state: The state of this AutoActivateToggleStatus. + :type: str + """ + self._state = state + + @property + def data_key(self): + """ + **[Required]** Gets the data_key of this AutoActivateToggleStatus. + Data key type for which auto-activate needs needs to be turned on or off. + + Allowed values for this property are: "PRIVATE_DATA_KEY", "PUBLIC_DATA_KEY", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The data_key of this AutoActivateToggleStatus. + :rtype: str + """ + return self._data_key + + @data_key.setter + def data_key(self, data_key): + """ + Sets the data_key of this AutoActivateToggleStatus. + Data key type for which auto-activate needs needs to be turned on or off. + + + :param data_key: The data_key of this AutoActivateToggleStatus. + :type: str + """ + allowed_values = ["PRIVATE_DATA_KEY", "PUBLIC_DATA_KEY"] + if not value_allowed_none_or_none_sentinel(data_key, allowed_values): + data_key = 'UNKNOWN_ENUM_VALUE' + self._data_key = data_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/apm_traces/models/bulk_activate_attribute_detail.py b/src/oci/apm_traces/models/bulk_activate_attribute_detail.py new file mode 100644 index 0000000000..53c64a5601 --- /dev/null +++ b/src/oci/apm_traces/models/bulk_activate_attribute_detail.py @@ -0,0 +1,236 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20200630 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class BulkActivateAttributeDetail(object): + """ + Object that contains the details about a single attribute in the bulk request to be activated. The attributeNameSpace and + unit are optional parameters, and the attributeNameSpace will default to TRACES if it is not passed in. + """ + + #: A constant which can be used with the attribute_type property of a BulkActivateAttributeDetail. + #: This constant has a value of "NUMERIC" + ATTRIBUTE_TYPE_NUMERIC = "NUMERIC" + + #: A constant which can be used with the attribute_type property of a BulkActivateAttributeDetail. + #: This constant has a value of "STRING" + ATTRIBUTE_TYPE_STRING = "STRING" + + #: A constant which can be used with the unit property of a BulkActivateAttributeDetail. + #: This constant has a value of "NONE" + UNIT_NONE = "NONE" + + #: A constant which can be used with the unit property of a BulkActivateAttributeDetail. + #: This constant has a value of "EPOCH_TIME_MS" + UNIT_EPOCH_TIME_MS = "EPOCH_TIME_MS" + + #: A constant which can be used with the unit property of a BulkActivateAttributeDetail. + #: This constant has a value of "BYTES" + UNIT_BYTES = "BYTES" + + #: A constant which can be used with the unit property of a BulkActivateAttributeDetail. + #: This constant has a value of "COUNT" + UNIT_COUNT = "COUNT" + + #: A constant which can be used with the unit property of a BulkActivateAttributeDetail. + #: This constant has a value of "DURATION_MS" + UNIT_DURATION_MS = "DURATION_MS" + + #: A constant which can be used with the unit property of a BulkActivateAttributeDetail. + #: This constant has a value of "TRACE_STATUS" + UNIT_TRACE_STATUS = "TRACE_STATUS" + + #: A constant which can be used with the unit property of a BulkActivateAttributeDetail. + #: This constant has a value of "PERCENTAGE" + UNIT_PERCENTAGE = "PERCENTAGE" + + #: A constant which can be used with the attribute_name_space property of a BulkActivateAttributeDetail. + #: This constant has a value of "TRACES" + ATTRIBUTE_NAME_SPACE_TRACES = "TRACES" + + #: A constant which can be used with the attribute_name_space property of a BulkActivateAttributeDetail. + #: This constant has a value of "SYNTHETIC" + ATTRIBUTE_NAME_SPACE_SYNTHETIC = "SYNTHETIC" + + def __init__(self, **kwargs): + """ + Initializes a new BulkActivateAttributeDetail object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param attribute_name: + The value to assign to the attribute_name property of this BulkActivateAttributeDetail. + :type attribute_name: str + + :param attribute_type: + The value to assign to the attribute_type property of this BulkActivateAttributeDetail. + Allowed values for this property are: "NUMERIC", "STRING" + :type attribute_type: str + + :param unit: + The value to assign to the unit property of this BulkActivateAttributeDetail. + Allowed values for this property are: "NONE", "EPOCH_TIME_MS", "BYTES", "COUNT", "DURATION_MS", "TRACE_STATUS", "PERCENTAGE" + :type unit: str + + :param attribute_name_space: + The value to assign to the attribute_name_space property of this BulkActivateAttributeDetail. + Allowed values for this property are: "TRACES", "SYNTHETIC" + :type attribute_name_space: str + + """ + self.swagger_types = { + 'attribute_name': 'str', + 'attribute_type': 'str', + 'unit': 'str', + 'attribute_name_space': 'str' + } + + self.attribute_map = { + 'attribute_name': 'attributeName', + 'attribute_type': 'attributeType', + 'unit': 'unit', + 'attribute_name_space': 'attributeNameSpace' + } + + self._attribute_name = None + self._attribute_type = None + self._unit = None + self._attribute_name_space = None + + @property + def attribute_name(self): + """ + **[Required]** Gets the attribute_name of this BulkActivateAttributeDetail. + Name of the attribute to be activated. + + + :return: The attribute_name of this BulkActivateAttributeDetail. + :rtype: str + """ + return self._attribute_name + + @attribute_name.setter + def attribute_name(self, attribute_name): + """ + Sets the attribute_name of this BulkActivateAttributeDetail. + Name of the attribute to be activated. + + + :param attribute_name: The attribute_name of this BulkActivateAttributeDetail. + :type: str + """ + self._attribute_name = attribute_name + + @property + def attribute_type(self): + """ + **[Required]** Gets the attribute_type of this BulkActivateAttributeDetail. + Type of the attribute to be activated. + + Allowed values for this property are: "NUMERIC", "STRING" + + + :return: The attribute_type of this BulkActivateAttributeDetail. + :rtype: str + """ + return self._attribute_type + + @attribute_type.setter + def attribute_type(self, attribute_type): + """ + Sets the attribute_type of this BulkActivateAttributeDetail. + Type of the attribute to be activated. + + + :param attribute_type: The attribute_type of this BulkActivateAttributeDetail. + :type: str + """ + allowed_values = ["NUMERIC", "STRING"] + if not value_allowed_none_or_none_sentinel(attribute_type, allowed_values): + raise ValueError( + f"Invalid value for `attribute_type`, must be None or one of {allowed_values}" + ) + self._attribute_type = attribute_type + + @property + def unit(self): + """ + Gets the unit of this BulkActivateAttributeDetail. + Unit of the attribute to be updated. + + Allowed values for this property are: "NONE", "EPOCH_TIME_MS", "BYTES", "COUNT", "DURATION_MS", "TRACE_STATUS", "PERCENTAGE" + + + :return: The unit of this BulkActivateAttributeDetail. + :rtype: str + """ + return self._unit + + @unit.setter + def unit(self, unit): + """ + Sets the unit of this BulkActivateAttributeDetail. + Unit of the attribute to be updated. + + + :param unit: The unit of this BulkActivateAttributeDetail. + :type: str + """ + allowed_values = ["NONE", "EPOCH_TIME_MS", "BYTES", "COUNT", "DURATION_MS", "TRACE_STATUS", "PERCENTAGE"] + if not value_allowed_none_or_none_sentinel(unit, allowed_values): + raise ValueError( + f"Invalid value for `unit`, must be None or one of {allowed_values}" + ) + self._unit = unit + + @property + def attribute_name_space(self): + """ + Gets the attribute_name_space of this BulkActivateAttributeDetail. + Namespace of the attribute to be activated. The attributeNameSpace will default to TRACES if it is + not passed in. + + Allowed values for this property are: "TRACES", "SYNTHETIC" + + + :return: The attribute_name_space of this BulkActivateAttributeDetail. + :rtype: str + """ + return self._attribute_name_space + + @attribute_name_space.setter + def attribute_name_space(self, attribute_name_space): + """ + Sets the attribute_name_space of this BulkActivateAttributeDetail. + Namespace of the attribute to be activated. The attributeNameSpace will default to TRACES if it is + not passed in. + + + :param attribute_name_space: The attribute_name_space of this BulkActivateAttributeDetail. + :type: str + """ + allowed_values = ["TRACES", "SYNTHETIC"] + if not value_allowed_none_or_none_sentinel(attribute_name_space, allowed_values): + raise ValueError( + f"Invalid value for `attribute_name_space`, must be None or one of {allowed_values}" + ) + self._attribute_name_space = attribute_name_space + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/apm_traces/models/bulk_activate_attribute_details.py b/src/oci/apm_traces/models/bulk_activate_attribute_details.py new file mode 100644 index 0000000000..dec9d4791f --- /dev/null +++ b/src/oci/apm_traces/models/bulk_activate_attribute_details.py @@ -0,0 +1,72 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20200630 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class BulkActivateAttributeDetails(object): + """ + Bulk request object containing the details of the attributes to be activated. + """ + + def __init__(self, **kwargs): + """ + Initializes a new BulkActivateAttributeDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param attribute_details: + The value to assign to the attribute_details property of this BulkActivateAttributeDetails. + :type attribute_details: list[oci.apm_traces.models.BulkActivateAttributeDetail] + + """ + self.swagger_types = { + 'attribute_details': 'list[BulkActivateAttributeDetail]' + } + + self.attribute_map = { + 'attribute_details': 'attributeDetails' + } + + self._attribute_details = None + + @property + def attribute_details(self): + """ + Gets the attribute_details of this BulkActivateAttributeDetails. + Collection of objects containing the details about individual attribute to be activated. + + + :return: The attribute_details of this BulkActivateAttributeDetails. + :rtype: list[oci.apm_traces.models.BulkActivateAttributeDetail] + """ + return self._attribute_details + + @attribute_details.setter + def attribute_details(self, attribute_details): + """ + Sets the attribute_details of this BulkActivateAttributeDetails. + Collection of objects containing the details about individual attribute to be activated. + + + :param attribute_details: The attribute_details of this BulkActivateAttributeDetails. + :type: list[oci.apm_traces.models.BulkActivateAttributeDetail] + """ + self._attribute_details = attribute_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/apm_traces/models/bulk_activation_metadata.py b/src/oci/apm_traces/models/bulk_activation_metadata.py new file mode 100644 index 0000000000..94b31b27e1 --- /dev/null +++ b/src/oci/apm_traces/models/bulk_activation_metadata.py @@ -0,0 +1,431 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20200630 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class BulkActivationMetadata(object): + """ + Metadata about the bulk activation operation. The bulk activation operation is atomic and binary. If the processing of any of the attributes in the bulk + activation request results in a processing or validation error, then none of the attributes in the request are activated. The bulk activation request succeeds + only when all the attributes in the bulk activation request are processed and they get a successful attributeStatus back. + """ + + #: A constant which can be used with the operation_status property of a BulkActivationMetadata. + #: This constant has a value of "SUCCESS" + OPERATION_STATUS_SUCCESS = "SUCCESS" + + #: A constant which can be used with the operation_status property of a BulkActivationMetadata. + #: This constant has a value of "EMPTY_ATTRIBUTE_LIST" + OPERATION_STATUS_EMPTY_ATTRIBUTE_LIST = "EMPTY_ATTRIBUTE_LIST" + + #: A constant which can be used with the operation_status property of a BulkActivationMetadata. + #: This constant has a value of "NUMERIC_ATTRIBUTE_LIMIT_EXCEEDED" + OPERATION_STATUS_NUMERIC_ATTRIBUTE_LIMIT_EXCEEDED = "NUMERIC_ATTRIBUTE_LIMIT_EXCEEDED" + + #: A constant which can be used with the operation_status property of a BulkActivationMetadata. + #: This constant has a value of "STRING_ATTRIBUTE_LIMIT_EXCEEDED" + OPERATION_STATUS_STRING_ATTRIBUTE_LIMIT_EXCEEDED = "STRING_ATTRIBUTE_LIMIT_EXCEEDED" + + #: A constant which can be used with the operation_status property of a BulkActivationMetadata. + #: This constant has a value of "INSUFFICIENT_STRING_SPACE" + OPERATION_STATUS_INSUFFICIENT_STRING_SPACE = "INSUFFICIENT_STRING_SPACE" + + #: A constant which can be used with the operation_status property of a BulkActivationMetadata. + #: This constant has a value of "INSUFFICIENT_NUMERIC_SPACE" + OPERATION_STATUS_INSUFFICIENT_NUMERIC_SPACE = "INSUFFICIENT_NUMERIC_SPACE" + + #: A constant which can be used with the operation_status property of a BulkActivationMetadata. + #: This constant has a value of "INVALID_BULK_REQUEST" + OPERATION_STATUS_INVALID_BULK_REQUEST = "INVALID_BULK_REQUEST" + + #: A constant which can be used with the operation_type property of a BulkActivationMetadata. + #: This constant has a value of "ACTIVATE" + OPERATION_TYPE_ACTIVATE = "ACTIVATE" + + def __init__(self, **kwargs): + """ + Initializes a new BulkActivationMetadata object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param operation_status: + The value to assign to the operation_status property of this BulkActivationMetadata. + Allowed values for this property are: "SUCCESS", "EMPTY_ATTRIBUTE_LIST", "NUMERIC_ATTRIBUTE_LIMIT_EXCEEDED", "STRING_ATTRIBUTE_LIMIT_EXCEEDED", "INSUFFICIENT_STRING_SPACE", "INSUFFICIENT_NUMERIC_SPACE", "INVALID_BULK_REQUEST", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type operation_status: str + + :param operation_type: + The value to assign to the operation_type property of this BulkActivationMetadata. + Allowed values for this property are: "ACTIVATE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type operation_type: str + + :param string_attributes_activated: + The value to assign to the string_attributes_activated property of this BulkActivationMetadata. + :type string_attributes_activated: int + + :param numeric_attributes_activated: + The value to assign to the numeric_attributes_activated property of this BulkActivationMetadata. + :type numeric_attributes_activated: int + + :param synthetic_string_attributes_activated: + The value to assign to the synthetic_string_attributes_activated property of this BulkActivationMetadata. + :type synthetic_string_attributes_activated: int + + :param synthetic_numeric_attributes_activated: + The value to assign to the synthetic_numeric_attributes_activated property of this BulkActivationMetadata. + :type synthetic_numeric_attributes_activated: int + + :param available_string_attributes: + The value to assign to the available_string_attributes property of this BulkActivationMetadata. + :type available_string_attributes: int + + :param available_numeric_attributes: + The value to assign to the available_numeric_attributes property of this BulkActivationMetadata. + :type available_numeric_attributes: int + + :param available_synthetic_string_attributes: + The value to assign to the available_synthetic_string_attributes property of this BulkActivationMetadata. + :type available_synthetic_string_attributes: int + + :param available_synthetic_numeric_attributes: + The value to assign to the available_synthetic_numeric_attributes property of this BulkActivationMetadata. + :type available_synthetic_numeric_attributes: int + + """ + self.swagger_types = { + 'operation_status': 'str', + 'operation_type': 'str', + 'string_attributes_activated': 'int', + 'numeric_attributes_activated': 'int', + 'synthetic_string_attributes_activated': 'int', + 'synthetic_numeric_attributes_activated': 'int', + 'available_string_attributes': 'int', + 'available_numeric_attributes': 'int', + 'available_synthetic_string_attributes': 'int', + 'available_synthetic_numeric_attributes': 'int' + } + + self.attribute_map = { + 'operation_status': 'operationStatus', + 'operation_type': 'operationType', + 'string_attributes_activated': 'stringAttributesActivated', + 'numeric_attributes_activated': 'numericAttributesActivated', + 'synthetic_string_attributes_activated': 'syntheticStringAttributesActivated', + 'synthetic_numeric_attributes_activated': 'syntheticNumericAttributesActivated', + 'available_string_attributes': 'availableStringAttributes', + 'available_numeric_attributes': 'availableNumericAttributes', + 'available_synthetic_string_attributes': 'availableSyntheticStringAttributes', + 'available_synthetic_numeric_attributes': 'availableSyntheticNumericAttributes' + } + + self._operation_status = None + self._operation_type = None + self._string_attributes_activated = None + self._numeric_attributes_activated = None + self._synthetic_string_attributes_activated = None + self._synthetic_numeric_attributes_activated = None + self._available_string_attributes = None + self._available_numeric_attributes = None + self._available_synthetic_string_attributes = None + self._available_synthetic_numeric_attributes = None + + @property + def operation_status(self): + """ + **[Required]** Gets the operation_status of this BulkActivationMetadata. + Operation status of the bulk activation operation. The bulk activation operation could have either a success or an error status as defined below. + The following is a success status for the bulk activation operation. + SUCCESS - The bulk activation operation has succeeded and all the attributes in the bulk activation request have been activated by this operation or activated earlier. + The following are error statuses for the bulk activation operation. Note that none of the attributes (string or numeric) in the bulk request have been activated by this bulk + activation operation if any of the below statuses. + EMPTY_ATTRIBUTE_LIST - The bulk activation request object was empty and did not contain any attributes to be activated. + NUMERIC_ATTRIBUTE_LIMIT_EXCEEDED - The number of numeric attributes in the bulk request exceeded the maximum limit (100) of numeric attributes that could be activated in the APM Domain. + STRING_ATTRIBUTE_LIMIT_EXCEEDED - The number of string attributes in the bulk request exceeded the maximum limit (700) of string attributes that could be activated in the APM Domain. + INSUFFICIENT_STRING_SPACE - There are not enough free slots available in the APM Domain to activate the string attributes present in the bulk request. + INSUFFICIENT_NUMERIC_SPACE - There are not enough free slots available in the APM Domain to activate the numeric attributes present in the bulk request. + INVALID_BULK_REQUEST - The bulk request contains invalid attribute(s), or attribute(s) that resulted in a validation error, or an attribute that resulted + in a processing error. + + Allowed values for this property are: "SUCCESS", "EMPTY_ATTRIBUTE_LIST", "NUMERIC_ATTRIBUTE_LIMIT_EXCEEDED", "STRING_ATTRIBUTE_LIMIT_EXCEEDED", "INSUFFICIENT_STRING_SPACE", "INSUFFICIENT_NUMERIC_SPACE", "INVALID_BULK_REQUEST", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The operation_status of this BulkActivationMetadata. + :rtype: str + """ + return self._operation_status + + @operation_status.setter + def operation_status(self, operation_status): + """ + Sets the operation_status of this BulkActivationMetadata. + Operation status of the bulk activation operation. The bulk activation operation could have either a success or an error status as defined below. + The following is a success status for the bulk activation operation. + SUCCESS - The bulk activation operation has succeeded and all the attributes in the bulk activation request have been activated by this operation or activated earlier. + The following are error statuses for the bulk activation operation. Note that none of the attributes (string or numeric) in the bulk request have been activated by this bulk + activation operation if any of the below statuses. + EMPTY_ATTRIBUTE_LIST - The bulk activation request object was empty and did not contain any attributes to be activated. + NUMERIC_ATTRIBUTE_LIMIT_EXCEEDED - The number of numeric attributes in the bulk request exceeded the maximum limit (100) of numeric attributes that could be activated in the APM Domain. + STRING_ATTRIBUTE_LIMIT_EXCEEDED - The number of string attributes in the bulk request exceeded the maximum limit (700) of string attributes that could be activated in the APM Domain. + INSUFFICIENT_STRING_SPACE - There are not enough free slots available in the APM Domain to activate the string attributes present in the bulk request. + INSUFFICIENT_NUMERIC_SPACE - There are not enough free slots available in the APM Domain to activate the numeric attributes present in the bulk request. + INVALID_BULK_REQUEST - The bulk request contains invalid attribute(s), or attribute(s) that resulted in a validation error, or an attribute that resulted + in a processing error. + + + :param operation_status: The operation_status of this BulkActivationMetadata. + :type: str + """ + allowed_values = ["SUCCESS", "EMPTY_ATTRIBUTE_LIST", "NUMERIC_ATTRIBUTE_LIMIT_EXCEEDED", "STRING_ATTRIBUTE_LIMIT_EXCEEDED", "INSUFFICIENT_STRING_SPACE", "INSUFFICIENT_NUMERIC_SPACE", "INVALID_BULK_REQUEST"] + if not value_allowed_none_or_none_sentinel(operation_status, allowed_values): + operation_status = 'UNKNOWN_ENUM_VALUE' + self._operation_status = operation_status + + @property + def operation_type(self): + """ + **[Required]** Gets the operation_type of this BulkActivationMetadata. + Type of operation. + + Allowed values for this property are: "ACTIVATE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The operation_type of this BulkActivationMetadata. + :rtype: str + """ + return self._operation_type + + @operation_type.setter + def operation_type(self, operation_type): + """ + Sets the operation_type of this BulkActivationMetadata. + Type of operation. + + + :param operation_type: The operation_type of this BulkActivationMetadata. + :type: str + """ + allowed_values = ["ACTIVATE"] + if not value_allowed_none_or_none_sentinel(operation_type, allowed_values): + operation_type = 'UNKNOWN_ENUM_VALUE' + self._operation_type = operation_type + + @property + def string_attributes_activated(self): + """ + Gets the string_attributes_activated of this BulkActivationMetadata. + Total number of string attributes in TRACES namespace that were activated. + + + :return: The string_attributes_activated of this BulkActivationMetadata. + :rtype: int + """ + return self._string_attributes_activated + + @string_attributes_activated.setter + def string_attributes_activated(self, string_attributes_activated): + """ + Sets the string_attributes_activated of this BulkActivationMetadata. + Total number of string attributes in TRACES namespace that were activated. + + + :param string_attributes_activated: The string_attributes_activated of this BulkActivationMetadata. + :type: int + """ + self._string_attributes_activated = string_attributes_activated + + @property + def numeric_attributes_activated(self): + """ + Gets the numeric_attributes_activated of this BulkActivationMetadata. + Total number of numeric attributes in TRACES namespace that were activated. + + + :return: The numeric_attributes_activated of this BulkActivationMetadata. + :rtype: int + """ + return self._numeric_attributes_activated + + @numeric_attributes_activated.setter + def numeric_attributes_activated(self, numeric_attributes_activated): + """ + Sets the numeric_attributes_activated of this BulkActivationMetadata. + Total number of numeric attributes in TRACES namespace that were activated. + + + :param numeric_attributes_activated: The numeric_attributes_activated of this BulkActivationMetadata. + :type: int + """ + self._numeric_attributes_activated = numeric_attributes_activated + + @property + def synthetic_string_attributes_activated(self): + """ + Gets the synthetic_string_attributes_activated of this BulkActivationMetadata. + Total number of string attributes in SYNTHETIC namespace that were activated. + + + :return: The synthetic_string_attributes_activated of this BulkActivationMetadata. + :rtype: int + """ + return self._synthetic_string_attributes_activated + + @synthetic_string_attributes_activated.setter + def synthetic_string_attributes_activated(self, synthetic_string_attributes_activated): + """ + Sets the synthetic_string_attributes_activated of this BulkActivationMetadata. + Total number of string attributes in SYNTHETIC namespace that were activated. + + + :param synthetic_string_attributes_activated: The synthetic_string_attributes_activated of this BulkActivationMetadata. + :type: int + """ + self._synthetic_string_attributes_activated = synthetic_string_attributes_activated + + @property + def synthetic_numeric_attributes_activated(self): + """ + Gets the synthetic_numeric_attributes_activated of this BulkActivationMetadata. + Total number of numeric attributes in SYNTHETIC namespace that were activated. + + + :return: The synthetic_numeric_attributes_activated of this BulkActivationMetadata. + :rtype: int + """ + return self._synthetic_numeric_attributes_activated + + @synthetic_numeric_attributes_activated.setter + def synthetic_numeric_attributes_activated(self, synthetic_numeric_attributes_activated): + """ + Sets the synthetic_numeric_attributes_activated of this BulkActivationMetadata. + Total number of numeric attributes in SYNTHETIC namespace that were activated. + + + :param synthetic_numeric_attributes_activated: The synthetic_numeric_attributes_activated of this BulkActivationMetadata. + :type: int + """ + self._synthetic_numeric_attributes_activated = synthetic_numeric_attributes_activated + + @property + def available_string_attributes(self): + """ + Gets the available_string_attributes of this BulkActivationMetadata. + Total number of free slots available to activate string attributes in the TRACES namespace in the APM Domain. Note that if a bulk request has succeeded, this + number reflects the total number of free slots available for activation of additional string attributes in the TRACES namespace in the APM Domain. + + + :return: The available_string_attributes of this BulkActivationMetadata. + :rtype: int + """ + return self._available_string_attributes + + @available_string_attributes.setter + def available_string_attributes(self, available_string_attributes): + """ + Sets the available_string_attributes of this BulkActivationMetadata. + Total number of free slots available to activate string attributes in the TRACES namespace in the APM Domain. Note that if a bulk request has succeeded, this + number reflects the total number of free slots available for activation of additional string attributes in the TRACES namespace in the APM Domain. + + + :param available_string_attributes: The available_string_attributes of this BulkActivationMetadata. + :type: int + """ + self._available_string_attributes = available_string_attributes + + @property + def available_numeric_attributes(self): + """ + Gets the available_numeric_attributes of this BulkActivationMetadata. + Total number of free slots available to activate numeric attributes in the TRACES namespace in the APM Domain. Note that if a bulk request has succeeded, this + number reflects the total number of free slots available for activation of additional numeric attributes in the TRACES namespace in the APM Domain. + + + :return: The available_numeric_attributes of this BulkActivationMetadata. + :rtype: int + """ + return self._available_numeric_attributes + + @available_numeric_attributes.setter + def available_numeric_attributes(self, available_numeric_attributes): + """ + Sets the available_numeric_attributes of this BulkActivationMetadata. + Total number of free slots available to activate numeric attributes in the TRACES namespace in the APM Domain. Note that if a bulk request has succeeded, this + number reflects the total number of free slots available for activation of additional numeric attributes in the TRACES namespace in the APM Domain. + + + :param available_numeric_attributes: The available_numeric_attributes of this BulkActivationMetadata. + :type: int + """ + self._available_numeric_attributes = available_numeric_attributes + + @property + def available_synthetic_string_attributes(self): + """ + Gets the available_synthetic_string_attributes of this BulkActivationMetadata. + Total number of free slots available to activate string attributes in the SYNTHETIC namespace in the APM Domain. Note that if a bulk request has succeeded, this + number reflects the total number of free synthetic slots available for activation of additional string attributes in the SYNTHETIC namespace in the APM Domain. + + + :return: The available_synthetic_string_attributes of this BulkActivationMetadata. + :rtype: int + """ + return self._available_synthetic_string_attributes + + @available_synthetic_string_attributes.setter + def available_synthetic_string_attributes(self, available_synthetic_string_attributes): + """ + Sets the available_synthetic_string_attributes of this BulkActivationMetadata. + Total number of free slots available to activate string attributes in the SYNTHETIC namespace in the APM Domain. Note that if a bulk request has succeeded, this + number reflects the total number of free synthetic slots available for activation of additional string attributes in the SYNTHETIC namespace in the APM Domain. + + + :param available_synthetic_string_attributes: The available_synthetic_string_attributes of this BulkActivationMetadata. + :type: int + """ + self._available_synthetic_string_attributes = available_synthetic_string_attributes + + @property + def available_synthetic_numeric_attributes(self): + """ + Gets the available_synthetic_numeric_attributes of this BulkActivationMetadata. + Total number of free slots available to activate numeric attributes in the SYNTHETIC namespace in the APM Domain. Note that if a bulk request has succeeded, this + number reflects the total number of free synthetic slots available for activation of additional numeric attributes in the SYNTHETIC namespace in the APM Domain. + + + :return: The available_synthetic_numeric_attributes of this BulkActivationMetadata. + :rtype: int + """ + return self._available_synthetic_numeric_attributes + + @available_synthetic_numeric_attributes.setter + def available_synthetic_numeric_attributes(self, available_synthetic_numeric_attributes): + """ + Sets the available_synthetic_numeric_attributes of this BulkActivationMetadata. + Total number of free slots available to activate numeric attributes in the SYNTHETIC namespace in the APM Domain. Note that if a bulk request has succeeded, this + number reflects the total number of free synthetic slots available for activation of additional numeric attributes in the SYNTHETIC namespace in the APM Domain. + + + :param available_synthetic_numeric_attributes: The available_synthetic_numeric_attributes of this BulkActivationMetadata. + :type: int + """ + self._available_synthetic_numeric_attributes = available_synthetic_numeric_attributes + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/apm_traces/models/bulk_activation_status.py b/src/oci/apm_traces/models/bulk_activation_status.py new file mode 100644 index 0000000000..6ccf3ccb74 --- /dev/null +++ b/src/oci/apm_traces/models/bulk_activation_status.py @@ -0,0 +1,105 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20200630 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class BulkActivationStatus(object): + """ + Response of a bulk attribute activation operation. + """ + + def __init__(self, **kwargs): + """ + Initializes a new BulkActivationStatus object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param attribute_statuses: + The value to assign to the attribute_statuses property of this BulkActivationStatus. + :type attribute_statuses: list[oci.apm_traces.models.AttributeResponse] + + :param bulk_activation_metadata: + The value to assign to the bulk_activation_metadata property of this BulkActivationStatus. + :type bulk_activation_metadata: oci.apm_traces.models.BulkActivationMetadata + + """ + self.swagger_types = { + 'attribute_statuses': 'list[AttributeResponse]', + 'bulk_activation_metadata': 'BulkActivationMetadata' + } + + self.attribute_map = { + 'attribute_statuses': 'attributeStatuses', + 'bulk_activation_metadata': 'bulkActivationMetadata' + } + + self._attribute_statuses = None + self._bulk_activation_metadata = None + + @property + def attribute_statuses(self): + """ + **[Required]** Gets the attribute_statuses of this BulkActivationStatus. + We preserve the order of the attribute items from the bulk activation request in this collection. The ith object in this collection represents the + bulk activation operation status of the ith object in the BulkActivateAttributeDetails object from the Bulk Activation request. If the + bulk activation operation results in a processing error or a validation error, the operationStatus property in the BulkActivationMetadata object will + contain the appropriate bulk error status for the bulk operation. + + + :return: The attribute_statuses of this BulkActivationStatus. + :rtype: list[oci.apm_traces.models.AttributeResponse] + """ + return self._attribute_statuses + + @attribute_statuses.setter + def attribute_statuses(self, attribute_statuses): + """ + Sets the attribute_statuses of this BulkActivationStatus. + We preserve the order of the attribute items from the bulk activation request in this collection. The ith object in this collection represents the + bulk activation operation status of the ith object in the BulkActivateAttributeDetails object from the Bulk Activation request. If the + bulk activation operation results in a processing error or a validation error, the operationStatus property in the BulkActivationMetadata object will + contain the appropriate bulk error status for the bulk operation. + + + :param attribute_statuses: The attribute_statuses of this BulkActivationStatus. + :type: list[oci.apm_traces.models.AttributeResponse] + """ + self._attribute_statuses = attribute_statuses + + @property + def bulk_activation_metadata(self): + """ + **[Required]** Gets the bulk_activation_metadata of this BulkActivationStatus. + + :return: The bulk_activation_metadata of this BulkActivationStatus. + :rtype: oci.apm_traces.models.BulkActivationMetadata + """ + return self._bulk_activation_metadata + + @bulk_activation_metadata.setter + def bulk_activation_metadata(self, bulk_activation_metadata): + """ + Sets the bulk_activation_metadata of this BulkActivationStatus. + + :param bulk_activation_metadata: The bulk_activation_metadata of this BulkActivationStatus. + :type: oci.apm_traces.models.BulkActivationMetadata + """ + self._bulk_activation_metadata = bulk_activation_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/apm_traces/models/bulk_de_activate_attribute_detail.py b/src/oci/apm_traces/models/bulk_de_activate_attribute_detail.py new file mode 100644 index 0000000000..c549b5d58a --- /dev/null +++ b/src/oci/apm_traces/models/bulk_de_activate_attribute_detail.py @@ -0,0 +1,121 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20200630 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class BulkDeActivateAttributeDetail(object): + """ + Object that contains the details about a single attribute to be deactivated. + """ + + #: A constant which can be used with the attribute_name_space property of a BulkDeActivateAttributeDetail. + #: This constant has a value of "TRACES" + ATTRIBUTE_NAME_SPACE_TRACES = "TRACES" + + #: A constant which can be used with the attribute_name_space property of a BulkDeActivateAttributeDetail. + #: This constant has a value of "SYNTHETIC" + ATTRIBUTE_NAME_SPACE_SYNTHETIC = "SYNTHETIC" + + def __init__(self, **kwargs): + """ + Initializes a new BulkDeActivateAttributeDetail object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param attribute_name: + The value to assign to the attribute_name property of this BulkDeActivateAttributeDetail. + :type attribute_name: str + + :param attribute_name_space: + The value to assign to the attribute_name_space property of this BulkDeActivateAttributeDetail. + Allowed values for this property are: "TRACES", "SYNTHETIC" + :type attribute_name_space: str + + """ + self.swagger_types = { + 'attribute_name': 'str', + 'attribute_name_space': 'str' + } + + self.attribute_map = { + 'attribute_name': 'attributeName', + 'attribute_name_space': 'attributeNameSpace' + } + + self._attribute_name = None + self._attribute_name_space = None + + @property + def attribute_name(self): + """ + **[Required]** Gets the attribute_name of this BulkDeActivateAttributeDetail. + Name of the attribute to be deactivated. + + + :return: The attribute_name of this BulkDeActivateAttributeDetail. + :rtype: str + """ + return self._attribute_name + + @attribute_name.setter + def attribute_name(self, attribute_name): + """ + Sets the attribute_name of this BulkDeActivateAttributeDetail. + Name of the attribute to be deactivated. + + + :param attribute_name: The attribute_name of this BulkDeActivateAttributeDetail. + :type: str + """ + self._attribute_name = attribute_name + + @property + def attribute_name_space(self): + """ + Gets the attribute_name_space of this BulkDeActivateAttributeDetail. + Namespace of the attribute to be deactivated. The attributeNameSpace will default to TRACES if it is + not passed in. + + Allowed values for this property are: "TRACES", "SYNTHETIC" + + + :return: The attribute_name_space of this BulkDeActivateAttributeDetail. + :rtype: str + """ + return self._attribute_name_space + + @attribute_name_space.setter + def attribute_name_space(self, attribute_name_space): + """ + Sets the attribute_name_space of this BulkDeActivateAttributeDetail. + Namespace of the attribute to be deactivated. The attributeNameSpace will default to TRACES if it is + not passed in. + + + :param attribute_name_space: The attribute_name_space of this BulkDeActivateAttributeDetail. + :type: str + """ + allowed_values = ["TRACES", "SYNTHETIC"] + if not value_allowed_none_or_none_sentinel(attribute_name_space, allowed_values): + raise ValueError( + f"Invalid value for `attribute_name_space`, must be None or one of {allowed_values}" + ) + self._attribute_name_space = attribute_name_space + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/apm_traces/models/bulk_de_activate_attribute_details.py b/src/oci/apm_traces/models/bulk_de_activate_attribute_details.py new file mode 100644 index 0000000000..c93702dfe9 --- /dev/null +++ b/src/oci/apm_traces/models/bulk_de_activate_attribute_details.py @@ -0,0 +1,72 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20200630 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class BulkDeActivateAttributeDetails(object): + """ + Bulk request object containing the details of the attributes to be deactivated. + """ + + def __init__(self, **kwargs): + """ + Initializes a new BulkDeActivateAttributeDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param attribute_details: + The value to assign to the attribute_details property of this BulkDeActivateAttributeDetails. + :type attribute_details: list[oci.apm_traces.models.BulkDeActivateAttributeDetail] + + """ + self.swagger_types = { + 'attribute_details': 'list[BulkDeActivateAttributeDetail]' + } + + self.attribute_map = { + 'attribute_details': 'attributeDetails' + } + + self._attribute_details = None + + @property + def attribute_details(self): + """ + Gets the attribute_details of this BulkDeActivateAttributeDetails. + Collection of objects containing the details about individual attribute to be deactivated. + + + :return: The attribute_details of this BulkDeActivateAttributeDetails. + :rtype: list[oci.apm_traces.models.BulkDeActivateAttributeDetail] + """ + return self._attribute_details + + @attribute_details.setter + def attribute_details(self, attribute_details): + """ + Sets the attribute_details of this BulkDeActivateAttributeDetails. + Collection of objects containing the details about individual attribute to be deactivated. + + + :param attribute_details: The attribute_details of this BulkDeActivateAttributeDetails. + :type: list[oci.apm_traces.models.BulkDeActivateAttributeDetail] + """ + self._attribute_details = attribute_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/apm_traces/models/bulk_de_activation_metadata.py b/src/oci/apm_traces/models/bulk_de_activation_metadata.py new file mode 100644 index 0000000000..02ff0418e9 --- /dev/null +++ b/src/oci/apm_traces/models/bulk_de_activation_metadata.py @@ -0,0 +1,350 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20200630 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class BulkDeActivationMetadata(object): + """ + Metadata about the bulk deactivation operation. The bulk deactivation operation is atomic and binary. If the processing of any of the attributes + in the bulk deactivation request results in a processing or validation error, then none of the attributes in the request are deactivated. + The bulk deactivation request succeeds only when all the attributes in the bulk deactivation request are processed and they get a successful + attributeStatus back. + """ + + #: A constant which can be used with the operation_status property of a BulkDeActivationMetadata. + #: This constant has a value of "SUCCESS" + OPERATION_STATUS_SUCCESS = "SUCCESS" + + #: A constant which can be used with the operation_status property of a BulkDeActivationMetadata. + #: This constant has a value of "EMPTY_ATTRIBUTE_LIST" + OPERATION_STATUS_EMPTY_ATTRIBUTE_LIST = "EMPTY_ATTRIBUTE_LIST" + + #: A constant which can be used with the operation_status property of a BulkDeActivationMetadata. + #: This constant has a value of "NUMERIC_ATTRIBUTE_LIMIT_EXCEEDED" + OPERATION_STATUS_NUMERIC_ATTRIBUTE_LIMIT_EXCEEDED = "NUMERIC_ATTRIBUTE_LIMIT_EXCEEDED" + + #: A constant which can be used with the operation_status property of a BulkDeActivationMetadata. + #: This constant has a value of "STRING_ATTRIBUTE_LIMIT_EXCEEDED" + OPERATION_STATUS_STRING_ATTRIBUTE_LIMIT_EXCEEDED = "STRING_ATTRIBUTE_LIMIT_EXCEEDED" + + #: A constant which can be used with the operation_status property of a BulkDeActivationMetadata. + #: This constant has a value of "INVALID_BULK_REQUEST" + OPERATION_STATUS_INVALID_BULK_REQUEST = "INVALID_BULK_REQUEST" + + #: A constant which can be used with the operation_type property of a BulkDeActivationMetadata. + #: This constant has a value of "DEACTIVATE" + OPERATION_TYPE_DEACTIVATE = "DEACTIVATE" + + def __init__(self, **kwargs): + """ + Initializes a new BulkDeActivationMetadata object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param operation_status: + The value to assign to the operation_status property of this BulkDeActivationMetadata. + Allowed values for this property are: "SUCCESS", "EMPTY_ATTRIBUTE_LIST", "NUMERIC_ATTRIBUTE_LIMIT_EXCEEDED", "STRING_ATTRIBUTE_LIMIT_EXCEEDED", "INVALID_BULK_REQUEST", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type operation_status: str + + :param operation_type: + The value to assign to the operation_type property of this BulkDeActivationMetadata. + Allowed values for this property are: "DEACTIVATE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type operation_type: str + + :param attributes_de_activated: + The value to assign to the attributes_de_activated property of this BulkDeActivationMetadata. + :type attributes_de_activated: int + + :param synthetic_attributes_de_activated: + The value to assign to the synthetic_attributes_de_activated property of this BulkDeActivationMetadata. + :type synthetic_attributes_de_activated: int + + :param available_string_attributes: + The value to assign to the available_string_attributes property of this BulkDeActivationMetadata. + :type available_string_attributes: int + + :param available_numeric_attributes: + The value to assign to the available_numeric_attributes property of this BulkDeActivationMetadata. + :type available_numeric_attributes: int + + :param available_synthetic_string_attributes: + The value to assign to the available_synthetic_string_attributes property of this BulkDeActivationMetadata. + :type available_synthetic_string_attributes: int + + :param available_synthetic_numeric_attributes: + The value to assign to the available_synthetic_numeric_attributes property of this BulkDeActivationMetadata. + :type available_synthetic_numeric_attributes: int + + """ + self.swagger_types = { + 'operation_status': 'str', + 'operation_type': 'str', + 'attributes_de_activated': 'int', + 'synthetic_attributes_de_activated': 'int', + 'available_string_attributes': 'int', + 'available_numeric_attributes': 'int', + 'available_synthetic_string_attributes': 'int', + 'available_synthetic_numeric_attributes': 'int' + } + + self.attribute_map = { + 'operation_status': 'operationStatus', + 'operation_type': 'operationType', + 'attributes_de_activated': 'attributesDeActivated', + 'synthetic_attributes_de_activated': 'syntheticAttributesDeActivated', + 'available_string_attributes': 'availableStringAttributes', + 'available_numeric_attributes': 'availableNumericAttributes', + 'available_synthetic_string_attributes': 'availableSyntheticStringAttributes', + 'available_synthetic_numeric_attributes': 'availableSyntheticNumericAttributes' + } + + self._operation_status = None + self._operation_type = None + self._attributes_de_activated = None + self._synthetic_attributes_de_activated = None + self._available_string_attributes = None + self._available_numeric_attributes = None + self._available_synthetic_string_attributes = None + self._available_synthetic_numeric_attributes = None + + @property + def operation_status(self): + """ + **[Required]** Gets the operation_status of this BulkDeActivationMetadata. + Operation status of the bulk deactivation operation. The bulk deactivation operation could have either a success or an error status as defined below. Note that + if a bulk operation has not succeeded, we do not deactivate any tags in the request set. + SUCCESS - The bulk deactivation operation has succeeded and all the attributes in the bulk deactivation request have been deactivated by this operation or deactivated earlier. + The following are error statuses for the bulk deactivation operation. Note that none of the attributes (string or numeric) in the bulk request have been deactivated by this bulk + deactivation operation if any of the below statuses are returned. + EMPTY_ATTRIBUTE_LIST - The bulk deactivation request object was empty and did not contain any attributes to be deactivated. + NUMERIC_ATTRIBUTE_LIMIT_EXCEEDED - The number of numeric attributes in the bulk request exceeded the maximum limit (100) of numeric attributes that could be present in the APM Domain. + STRING_ATTRIBUTE_LIMIT_EXCEEDED - The number of string attributes in the bulk request exceeded the maximum limit (700) of string attributes that could be present in the APM Domain. + INVALID_BULK_REQUEST - The bulk request contains invalid attribute(s), or attribute(s) that resulted in a validation error, or an attribute that resulted + in a processing error. + + Allowed values for this property are: "SUCCESS", "EMPTY_ATTRIBUTE_LIST", "NUMERIC_ATTRIBUTE_LIMIT_EXCEEDED", "STRING_ATTRIBUTE_LIMIT_EXCEEDED", "INVALID_BULK_REQUEST", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The operation_status of this BulkDeActivationMetadata. + :rtype: str + """ + return self._operation_status + + @operation_status.setter + def operation_status(self, operation_status): + """ + Sets the operation_status of this BulkDeActivationMetadata. + Operation status of the bulk deactivation operation. The bulk deactivation operation could have either a success or an error status as defined below. Note that + if a bulk operation has not succeeded, we do not deactivate any tags in the request set. + SUCCESS - The bulk deactivation operation has succeeded and all the attributes in the bulk deactivation request have been deactivated by this operation or deactivated earlier. + The following are error statuses for the bulk deactivation operation. Note that none of the attributes (string or numeric) in the bulk request have been deactivated by this bulk + deactivation operation if any of the below statuses are returned. + EMPTY_ATTRIBUTE_LIST - The bulk deactivation request object was empty and did not contain any attributes to be deactivated. + NUMERIC_ATTRIBUTE_LIMIT_EXCEEDED - The number of numeric attributes in the bulk request exceeded the maximum limit (100) of numeric attributes that could be present in the APM Domain. + STRING_ATTRIBUTE_LIMIT_EXCEEDED - The number of string attributes in the bulk request exceeded the maximum limit (700) of string attributes that could be present in the APM Domain. + INVALID_BULK_REQUEST - The bulk request contains invalid attribute(s), or attribute(s) that resulted in a validation error, or an attribute that resulted + in a processing error. + + + :param operation_status: The operation_status of this BulkDeActivationMetadata. + :type: str + """ + allowed_values = ["SUCCESS", "EMPTY_ATTRIBUTE_LIST", "NUMERIC_ATTRIBUTE_LIMIT_EXCEEDED", "STRING_ATTRIBUTE_LIMIT_EXCEEDED", "INVALID_BULK_REQUEST"] + if not value_allowed_none_or_none_sentinel(operation_status, allowed_values): + operation_status = 'UNKNOWN_ENUM_VALUE' + self._operation_status = operation_status + + @property + def operation_type(self): + """ + **[Required]** Gets the operation_type of this BulkDeActivationMetadata. + Type of operation. + + Allowed values for this property are: "DEACTIVATE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The operation_type of this BulkDeActivationMetadata. + :rtype: str + """ + return self._operation_type + + @operation_type.setter + def operation_type(self, operation_type): + """ + Sets the operation_type of this BulkDeActivationMetadata. + Type of operation. + + + :param operation_type: The operation_type of this BulkDeActivationMetadata. + :type: str + """ + allowed_values = ["DEACTIVATE"] + if not value_allowed_none_or_none_sentinel(operation_type, allowed_values): + operation_type = 'UNKNOWN_ENUM_VALUE' + self._operation_type = operation_type + + @property + def attributes_de_activated(self): + """ + Gets the attributes_de_activated of this BulkDeActivationMetadata. + Total number attributes (both string and numeric) in TRACES namespace that were deactivated. + + + :return: The attributes_de_activated of this BulkDeActivationMetadata. + :rtype: int + """ + return self._attributes_de_activated + + @attributes_de_activated.setter + def attributes_de_activated(self, attributes_de_activated): + """ + Sets the attributes_de_activated of this BulkDeActivationMetadata. + Total number attributes (both string and numeric) in TRACES namespace that were deactivated. + + + :param attributes_de_activated: The attributes_de_activated of this BulkDeActivationMetadata. + :type: int + """ + self._attributes_de_activated = attributes_de_activated + + @property + def synthetic_attributes_de_activated(self): + """ + Gets the synthetic_attributes_de_activated of this BulkDeActivationMetadata. + Total number attributes (both string and numeric) in SYNTHETIC namespace that were deactivated. + + + :return: The synthetic_attributes_de_activated of this BulkDeActivationMetadata. + :rtype: int + """ + return self._synthetic_attributes_de_activated + + @synthetic_attributes_de_activated.setter + def synthetic_attributes_de_activated(self, synthetic_attributes_de_activated): + """ + Sets the synthetic_attributes_de_activated of this BulkDeActivationMetadata. + Total number attributes (both string and numeric) in SYNTHETIC namespace that were deactivated. + + + :param synthetic_attributes_de_activated: The synthetic_attributes_de_activated of this BulkDeActivationMetadata. + :type: int + """ + self._synthetic_attributes_de_activated = synthetic_attributes_de_activated + + @property + def available_string_attributes(self): + """ + Gets the available_string_attributes of this BulkDeActivationMetadata. + Total number of free slots available for activation of additional string attributes in TRACES namespace in the APM Domain. + + + :return: The available_string_attributes of this BulkDeActivationMetadata. + :rtype: int + """ + return self._available_string_attributes + + @available_string_attributes.setter + def available_string_attributes(self, available_string_attributes): + """ + Sets the available_string_attributes of this BulkDeActivationMetadata. + Total number of free slots available for activation of additional string attributes in TRACES namespace in the APM Domain. + + + :param available_string_attributes: The available_string_attributes of this BulkDeActivationMetadata. + :type: int + """ + self._available_string_attributes = available_string_attributes + + @property + def available_numeric_attributes(self): + """ + Gets the available_numeric_attributes of this BulkDeActivationMetadata. + Total number of free slots available for activation of additional numeric attributes in TRACES namespace in the APM Domain. + + + :return: The available_numeric_attributes of this BulkDeActivationMetadata. + :rtype: int + """ + return self._available_numeric_attributes + + @available_numeric_attributes.setter + def available_numeric_attributes(self, available_numeric_attributes): + """ + Sets the available_numeric_attributes of this BulkDeActivationMetadata. + Total number of free slots available for activation of additional numeric attributes in TRACES namespace in the APM Domain. + + + :param available_numeric_attributes: The available_numeric_attributes of this BulkDeActivationMetadata. + :type: int + """ + self._available_numeric_attributes = available_numeric_attributes + + @property + def available_synthetic_string_attributes(self): + """ + Gets the available_synthetic_string_attributes of this BulkDeActivationMetadata. + Total number of free slots available for activation of additional string attributes in SYNTHETIC namespace in the APM Domain. + + + :return: The available_synthetic_string_attributes of this BulkDeActivationMetadata. + :rtype: int + """ + return self._available_synthetic_string_attributes + + @available_synthetic_string_attributes.setter + def available_synthetic_string_attributes(self, available_synthetic_string_attributes): + """ + Sets the available_synthetic_string_attributes of this BulkDeActivationMetadata. + Total number of free slots available for activation of additional string attributes in SYNTHETIC namespace in the APM Domain. + + + :param available_synthetic_string_attributes: The available_synthetic_string_attributes of this BulkDeActivationMetadata. + :type: int + """ + self._available_synthetic_string_attributes = available_synthetic_string_attributes + + @property + def available_synthetic_numeric_attributes(self): + """ + Gets the available_synthetic_numeric_attributes of this BulkDeActivationMetadata. + Total number of free slots available for activation of additional numeric attributes in SYNTHETIC namespace in the APM Domain. + + + :return: The available_synthetic_numeric_attributes of this BulkDeActivationMetadata. + :rtype: int + """ + return self._available_synthetic_numeric_attributes + + @available_synthetic_numeric_attributes.setter + def available_synthetic_numeric_attributes(self, available_synthetic_numeric_attributes): + """ + Sets the available_synthetic_numeric_attributes of this BulkDeActivationMetadata. + Total number of free slots available for activation of additional numeric attributes in SYNTHETIC namespace in the APM Domain. + + + :param available_synthetic_numeric_attributes: The available_synthetic_numeric_attributes of this BulkDeActivationMetadata. + :type: int + """ + self._available_synthetic_numeric_attributes = available_synthetic_numeric_attributes + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/apm_traces/models/bulk_de_activation_status.py b/src/oci/apm_traces/models/bulk_de_activation_status.py new file mode 100644 index 0000000000..eed05ecf86 --- /dev/null +++ b/src/oci/apm_traces/models/bulk_de_activation_status.py @@ -0,0 +1,105 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20200630 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class BulkDeActivationStatus(object): + """ + Response of a bulk attribute deactivation operation. + """ + + def __init__(self, **kwargs): + """ + Initializes a new BulkDeActivationStatus object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param attribute_statuses: + The value to assign to the attribute_statuses property of this BulkDeActivationStatus. + :type attribute_statuses: list[oci.apm_traces.models.AttributeResponse] + + :param bulk_de_activation_metadata: + The value to assign to the bulk_de_activation_metadata property of this BulkDeActivationStatus. + :type bulk_de_activation_metadata: oci.apm_traces.models.BulkDeActivationMetadata + + """ + self.swagger_types = { + 'attribute_statuses': 'list[AttributeResponse]', + 'bulk_de_activation_metadata': 'BulkDeActivationMetadata' + } + + self.attribute_map = { + 'attribute_statuses': 'attributeStatuses', + 'bulk_de_activation_metadata': 'bulkDeActivationMetadata' + } + + self._attribute_statuses = None + self._bulk_de_activation_metadata = None + + @property + def attribute_statuses(self): + """ + **[Required]** Gets the attribute_statuses of this BulkDeActivationStatus. + We preserve the order of the attribute items from the bulk activation request in this collection. The ith object in this collection represents the + bulk activation operation status of the ith object in the BulkActivateAttributeDetails object from the Bulk Activation request. If the + bulk activation operation results in a processing error or a validation error, the operationStatus property in the BulkActivationMetadata object will + contain the appropriate bulk error status for the bulk operation. + + + :return: The attribute_statuses of this BulkDeActivationStatus. + :rtype: list[oci.apm_traces.models.AttributeResponse] + """ + return self._attribute_statuses + + @attribute_statuses.setter + def attribute_statuses(self, attribute_statuses): + """ + Sets the attribute_statuses of this BulkDeActivationStatus. + We preserve the order of the attribute items from the bulk activation request in this collection. The ith object in this collection represents the + bulk activation operation status of the ith object in the BulkActivateAttributeDetails object from the Bulk Activation request. If the + bulk activation operation results in a processing error or a validation error, the operationStatus property in the BulkActivationMetadata object will + contain the appropriate bulk error status for the bulk operation. + + + :param attribute_statuses: The attribute_statuses of this BulkDeActivationStatus. + :type: list[oci.apm_traces.models.AttributeResponse] + """ + self._attribute_statuses = attribute_statuses + + @property + def bulk_de_activation_metadata(self): + """ + **[Required]** Gets the bulk_de_activation_metadata of this BulkDeActivationStatus. + + :return: The bulk_de_activation_metadata of this BulkDeActivationStatus. + :rtype: oci.apm_traces.models.BulkDeActivationMetadata + """ + return self._bulk_de_activation_metadata + + @bulk_de_activation_metadata.setter + def bulk_de_activation_metadata(self, bulk_de_activation_metadata): + """ + Sets the bulk_de_activation_metadata of this BulkDeActivationStatus. + + :param bulk_de_activation_metadata: The bulk_de_activation_metadata of this BulkDeActivationStatus. + :type: oci.apm_traces.models.BulkDeActivationMetadata + """ + self._bulk_de_activation_metadata = bulk_de_activation_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/apm_traces/models/bulk_pin_attribute_detail.py b/src/oci/apm_traces/models/bulk_pin_attribute_detail.py new file mode 100644 index 0000000000..1539609ccf --- /dev/null +++ b/src/oci/apm_traces/models/bulk_pin_attribute_detail.py @@ -0,0 +1,121 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20200630 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class BulkPinAttributeDetail(object): + """ + Object that contains the details about a single attribute in the bulk request to be pinned. + """ + + #: A constant which can be used with the attribute_name_space property of a BulkPinAttributeDetail. + #: This constant has a value of "TRACES" + ATTRIBUTE_NAME_SPACE_TRACES = "TRACES" + + #: A constant which can be used with the attribute_name_space property of a BulkPinAttributeDetail. + #: This constant has a value of "SYNTHETIC" + ATTRIBUTE_NAME_SPACE_SYNTHETIC = "SYNTHETIC" + + def __init__(self, **kwargs): + """ + Initializes a new BulkPinAttributeDetail object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param attribute_name: + The value to assign to the attribute_name property of this BulkPinAttributeDetail. + :type attribute_name: str + + :param attribute_name_space: + The value to assign to the attribute_name_space property of this BulkPinAttributeDetail. + Allowed values for this property are: "TRACES", "SYNTHETIC" + :type attribute_name_space: str + + """ + self.swagger_types = { + 'attribute_name': 'str', + 'attribute_name_space': 'str' + } + + self.attribute_map = { + 'attribute_name': 'attributeName', + 'attribute_name_space': 'attributeNameSpace' + } + + self._attribute_name = None + self._attribute_name_space = None + + @property + def attribute_name(self): + """ + **[Required]** Gets the attribute_name of this BulkPinAttributeDetail. + Name of the attribute to be pinned. + + + :return: The attribute_name of this BulkPinAttributeDetail. + :rtype: str + """ + return self._attribute_name + + @attribute_name.setter + def attribute_name(self, attribute_name): + """ + Sets the attribute_name of this BulkPinAttributeDetail. + Name of the attribute to be pinned. + + + :param attribute_name: The attribute_name of this BulkPinAttributeDetail. + :type: str + """ + self._attribute_name = attribute_name + + @property + def attribute_name_space(self): + """ + Gets the attribute_name_space of this BulkPinAttributeDetail. + Namespace of the attribute to be pinned. The attributeNameSpace will default to TRACES if it is + not passed in. + + Allowed values for this property are: "TRACES", "SYNTHETIC" + + + :return: The attribute_name_space of this BulkPinAttributeDetail. + :rtype: str + """ + return self._attribute_name_space + + @attribute_name_space.setter + def attribute_name_space(self, attribute_name_space): + """ + Sets the attribute_name_space of this BulkPinAttributeDetail. + Namespace of the attribute to be pinned. The attributeNameSpace will default to TRACES if it is + not passed in. + + + :param attribute_name_space: The attribute_name_space of this BulkPinAttributeDetail. + :type: str + """ + allowed_values = ["TRACES", "SYNTHETIC"] + if not value_allowed_none_or_none_sentinel(attribute_name_space, allowed_values): + raise ValueError( + f"Invalid value for `attribute_name_space`, must be None or one of {allowed_values}" + ) + self._attribute_name_space = attribute_name_space + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/apm_traces/models/bulk_pin_attribute_details.py b/src/oci/apm_traces/models/bulk_pin_attribute_details.py new file mode 100644 index 0000000000..6b72cff199 --- /dev/null +++ b/src/oci/apm_traces/models/bulk_pin_attribute_details.py @@ -0,0 +1,72 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20200630 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class BulkPinAttributeDetails(object): + """ + Bulk request object containing the details of the attributes to be pinned. + """ + + def __init__(self, **kwargs): + """ + Initializes a new BulkPinAttributeDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param attribute_details: + The value to assign to the attribute_details property of this BulkPinAttributeDetails. + :type attribute_details: list[oci.apm_traces.models.BulkPinAttributeDetail] + + """ + self.swagger_types = { + 'attribute_details': 'list[BulkPinAttributeDetail]' + } + + self.attribute_map = { + 'attribute_details': 'attributeDetails' + } + + self._attribute_details = None + + @property + def attribute_details(self): + """ + Gets the attribute_details of this BulkPinAttributeDetails. + Collection of objects containing the details about individual attribute to be pinned. + + + :return: The attribute_details of this BulkPinAttributeDetails. + :rtype: list[oci.apm_traces.models.BulkPinAttributeDetail] + """ + return self._attribute_details + + @attribute_details.setter + def attribute_details(self, attribute_details): + """ + Sets the attribute_details of this BulkPinAttributeDetails. + Collection of objects containing the details about individual attribute to be pinned. + + + :param attribute_details: The attribute_details of this BulkPinAttributeDetails. + :type: list[oci.apm_traces.models.BulkPinAttributeDetail] + """ + self._attribute_details = attribute_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/apm_traces/models/bulk_pin_metadata.py b/src/oci/apm_traces/models/bulk_pin_metadata.py new file mode 100644 index 0000000000..4cc61877ae --- /dev/null +++ b/src/oci/apm_traces/models/bulk_pin_metadata.py @@ -0,0 +1,208 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20200630 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class BulkPinMetadata(object): + """ + Metadata about the bulk pin operation. The bulk pin operation is atomic and binary. If the processing of any of the attributes + in the bulk pin request results in a processing or validation error, then none of the attributes in the request are pinned. + """ + + #: A constant which can be used with the operation_status property of a BulkPinMetadata. + #: This constant has a value of "SUCCESS" + OPERATION_STATUS_SUCCESS = "SUCCESS" + + #: A constant which can be used with the operation_status property of a BulkPinMetadata. + #: This constant has a value of "EMPTY_ATTRIBUTE_LIST" + OPERATION_STATUS_EMPTY_ATTRIBUTE_LIST = "EMPTY_ATTRIBUTE_LIST" + + #: A constant which can be used with the operation_status property of a BulkPinMetadata. + #: This constant has a value of "INVALID_BULK_REQUEST" + OPERATION_STATUS_INVALID_BULK_REQUEST = "INVALID_BULK_REQUEST" + + #: A constant which can be used with the operation_type property of a BulkPinMetadata. + #: This constant has a value of "PIN" + OPERATION_TYPE_PIN = "PIN" + + def __init__(self, **kwargs): + """ + Initializes a new BulkPinMetadata object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param operation_status: + The value to assign to the operation_status property of this BulkPinMetadata. + Allowed values for this property are: "SUCCESS", "EMPTY_ATTRIBUTE_LIST", "INVALID_BULK_REQUEST", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type operation_status: str + + :param operation_type: + The value to assign to the operation_type property of this BulkPinMetadata. + Allowed values for this property are: "PIN", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type operation_type: str + + :param attributes_pinned: + The value to assign to the attributes_pinned property of this BulkPinMetadata. + :type attributes_pinned: int + + :param synthetic_attributes_pinned: + The value to assign to the synthetic_attributes_pinned property of this BulkPinMetadata. + :type synthetic_attributes_pinned: int + + """ + self.swagger_types = { + 'operation_status': 'str', + 'operation_type': 'str', + 'attributes_pinned': 'int', + 'synthetic_attributes_pinned': 'int' + } + + self.attribute_map = { + 'operation_status': 'operationStatus', + 'operation_type': 'operationType', + 'attributes_pinned': 'attributesPinned', + 'synthetic_attributes_pinned': 'syntheticAttributesPinned' + } + + self._operation_status = None + self._operation_type = None + self._attributes_pinned = None + self._synthetic_attributes_pinned = None + + @property + def operation_status(self): + """ + **[Required]** Gets the operation_status of this BulkPinMetadata. + Operation status of the bulk pin operation. + SUCCESS - The bulk pin operation has succeeded and all the attributes in the bulk pin request have been pinned by this operation or pinned earlier. + The following are error statuses for the bulk pin operation. + EMPTY_ATTRIBUTE_LIST - The bulk pin request object was empty and did not contain any attributes to be pinned. + INVALID_BULK_REQUEST - The bulk request contains invalid attribute(s), or attribute(s) that resulted in a validation error, or an attribute that resulted + in a processing error. + + Allowed values for this property are: "SUCCESS", "EMPTY_ATTRIBUTE_LIST", "INVALID_BULK_REQUEST", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The operation_status of this BulkPinMetadata. + :rtype: str + """ + return self._operation_status + + @operation_status.setter + def operation_status(self, operation_status): + """ + Sets the operation_status of this BulkPinMetadata. + Operation status of the bulk pin operation. + SUCCESS - The bulk pin operation has succeeded and all the attributes in the bulk pin request have been pinned by this operation or pinned earlier. + The following are error statuses for the bulk pin operation. + EMPTY_ATTRIBUTE_LIST - The bulk pin request object was empty and did not contain any attributes to be pinned. + INVALID_BULK_REQUEST - The bulk request contains invalid attribute(s), or attribute(s) that resulted in a validation error, or an attribute that resulted + in a processing error. + + + :param operation_status: The operation_status of this BulkPinMetadata. + :type: str + """ + allowed_values = ["SUCCESS", "EMPTY_ATTRIBUTE_LIST", "INVALID_BULK_REQUEST"] + if not value_allowed_none_or_none_sentinel(operation_status, allowed_values): + operation_status = 'UNKNOWN_ENUM_VALUE' + self._operation_status = operation_status + + @property + def operation_type(self): + """ + **[Required]** Gets the operation_type of this BulkPinMetadata. + Type of operation. + + Allowed values for this property are: "PIN", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The operation_type of this BulkPinMetadata. + :rtype: str + """ + return self._operation_type + + @operation_type.setter + def operation_type(self, operation_type): + """ + Sets the operation_type of this BulkPinMetadata. + Type of operation. + + + :param operation_type: The operation_type of this BulkPinMetadata. + :type: str + """ + allowed_values = ["PIN"] + if not value_allowed_none_or_none_sentinel(operation_type, allowed_values): + operation_type = 'UNKNOWN_ENUM_VALUE' + self._operation_type = operation_type + + @property + def attributes_pinned(self): + """ + **[Required]** Gets the attributes_pinned of this BulkPinMetadata. + Total number attributes (both string and numeric) in TRACES namespace that were pinned. + + + :return: The attributes_pinned of this BulkPinMetadata. + :rtype: int + """ + return self._attributes_pinned + + @attributes_pinned.setter + def attributes_pinned(self, attributes_pinned): + """ + Sets the attributes_pinned of this BulkPinMetadata. + Total number attributes (both string and numeric) in TRACES namespace that were pinned. + + + :param attributes_pinned: The attributes_pinned of this BulkPinMetadata. + :type: int + """ + self._attributes_pinned = attributes_pinned + + @property + def synthetic_attributes_pinned(self): + """ + Gets the synthetic_attributes_pinned of this BulkPinMetadata. + Total number attributes (both string and numeric) in SYNTHETIC namespace that were pinned. + + + :return: The synthetic_attributes_pinned of this BulkPinMetadata. + :rtype: int + """ + return self._synthetic_attributes_pinned + + @synthetic_attributes_pinned.setter + def synthetic_attributes_pinned(self, synthetic_attributes_pinned): + """ + Sets the synthetic_attributes_pinned of this BulkPinMetadata. + Total number attributes (both string and numeric) in SYNTHETIC namespace that were pinned. + + + :param synthetic_attributes_pinned: The synthetic_attributes_pinned of this BulkPinMetadata. + :type: int + """ + self._synthetic_attributes_pinned = synthetic_attributes_pinned + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/apm_traces/models/bulk_pin_status.py b/src/oci/apm_traces/models/bulk_pin_status.py new file mode 100644 index 0000000000..1af5fe15aa --- /dev/null +++ b/src/oci/apm_traces/models/bulk_pin_status.py @@ -0,0 +1,105 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20200630 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class BulkPinStatus(object): + """ + Response of a bulk attribute pin operation. + """ + + def __init__(self, **kwargs): + """ + Initializes a new BulkPinStatus object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param attribute_statuses: + The value to assign to the attribute_statuses property of this BulkPinStatus. + :type attribute_statuses: list[oci.apm_traces.models.AttributePinResponse] + + :param bulk_pin_metadata: + The value to assign to the bulk_pin_metadata property of this BulkPinStatus. + :type bulk_pin_metadata: oci.apm_traces.models.BulkPinMetadata + + """ + self.swagger_types = { + 'attribute_statuses': 'list[AttributePinResponse]', + 'bulk_pin_metadata': 'BulkPinMetadata' + } + + self.attribute_map = { + 'attribute_statuses': 'attributeStatuses', + 'bulk_pin_metadata': 'bulkPinMetadata' + } + + self._attribute_statuses = None + self._bulk_pin_metadata = None + + @property + def attribute_statuses(self): + """ + **[Required]** Gets the attribute_statuses of this BulkPinStatus. + We preserve the order of the attribute items from the bulk pin request in this collection. The ith object in this collection represents the + bulk pin operation status of the ith object in the BulkPinAttributeDetails object in the Bulk pin request. If the + bulk pin operation results in a processing error or a validation error, the operationStatus property in the BulkPinMetadata object will + contain the appropriate bulk error status for the bulk operation. + + + :return: The attribute_statuses of this BulkPinStatus. + :rtype: list[oci.apm_traces.models.AttributePinResponse] + """ + return self._attribute_statuses + + @attribute_statuses.setter + def attribute_statuses(self, attribute_statuses): + """ + Sets the attribute_statuses of this BulkPinStatus. + We preserve the order of the attribute items from the bulk pin request in this collection. The ith object in this collection represents the + bulk pin operation status of the ith object in the BulkPinAttributeDetails object in the Bulk pin request. If the + bulk pin operation results in a processing error or a validation error, the operationStatus property in the BulkPinMetadata object will + contain the appropriate bulk error status for the bulk operation. + + + :param attribute_statuses: The attribute_statuses of this BulkPinStatus. + :type: list[oci.apm_traces.models.AttributePinResponse] + """ + self._attribute_statuses = attribute_statuses + + @property + def bulk_pin_metadata(self): + """ + **[Required]** Gets the bulk_pin_metadata of this BulkPinStatus. + + :return: The bulk_pin_metadata of this BulkPinStatus. + :rtype: oci.apm_traces.models.BulkPinMetadata + """ + return self._bulk_pin_metadata + + @bulk_pin_metadata.setter + def bulk_pin_metadata(self, bulk_pin_metadata): + """ + Sets the bulk_pin_metadata of this BulkPinStatus. + + :param bulk_pin_metadata: The bulk_pin_metadata of this BulkPinStatus. + :type: oci.apm_traces.models.BulkPinMetadata + """ + self._bulk_pin_metadata = bulk_pin_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/apm_traces/models/bulk_unpin_attribute_detail.py b/src/oci/apm_traces/models/bulk_unpin_attribute_detail.py new file mode 100644 index 0000000000..d1889c5ecb --- /dev/null +++ b/src/oci/apm_traces/models/bulk_unpin_attribute_detail.py @@ -0,0 +1,121 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20200630 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class BulkUnpinAttributeDetail(object): + """ + Object that contains the details about a single attribute in the bulk request to be unpinned. + """ + + #: A constant which can be used with the attribute_name_space property of a BulkUnpinAttributeDetail. + #: This constant has a value of "TRACES" + ATTRIBUTE_NAME_SPACE_TRACES = "TRACES" + + #: A constant which can be used with the attribute_name_space property of a BulkUnpinAttributeDetail. + #: This constant has a value of "SYNTHETIC" + ATTRIBUTE_NAME_SPACE_SYNTHETIC = "SYNTHETIC" + + def __init__(self, **kwargs): + """ + Initializes a new BulkUnpinAttributeDetail object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param attribute_name: + The value to assign to the attribute_name property of this BulkUnpinAttributeDetail. + :type attribute_name: str + + :param attribute_name_space: + The value to assign to the attribute_name_space property of this BulkUnpinAttributeDetail. + Allowed values for this property are: "TRACES", "SYNTHETIC" + :type attribute_name_space: str + + """ + self.swagger_types = { + 'attribute_name': 'str', + 'attribute_name_space': 'str' + } + + self.attribute_map = { + 'attribute_name': 'attributeName', + 'attribute_name_space': 'attributeNameSpace' + } + + self._attribute_name = None + self._attribute_name_space = None + + @property + def attribute_name(self): + """ + **[Required]** Gets the attribute_name of this BulkUnpinAttributeDetail. + Name of the attribute to be unpinned. + + + :return: The attribute_name of this BulkUnpinAttributeDetail. + :rtype: str + """ + return self._attribute_name + + @attribute_name.setter + def attribute_name(self, attribute_name): + """ + Sets the attribute_name of this BulkUnpinAttributeDetail. + Name of the attribute to be unpinned. + + + :param attribute_name: The attribute_name of this BulkUnpinAttributeDetail. + :type: str + """ + self._attribute_name = attribute_name + + @property + def attribute_name_space(self): + """ + Gets the attribute_name_space of this BulkUnpinAttributeDetail. + Namespace of the attribute to be unpinned. The attributeNameSpace will default to TRACES if it is + not passed in. + + Allowed values for this property are: "TRACES", "SYNTHETIC" + + + :return: The attribute_name_space of this BulkUnpinAttributeDetail. + :rtype: str + """ + return self._attribute_name_space + + @attribute_name_space.setter + def attribute_name_space(self, attribute_name_space): + """ + Sets the attribute_name_space of this BulkUnpinAttributeDetail. + Namespace of the attribute to be unpinned. The attributeNameSpace will default to TRACES if it is + not passed in. + + + :param attribute_name_space: The attribute_name_space of this BulkUnpinAttributeDetail. + :type: str + """ + allowed_values = ["TRACES", "SYNTHETIC"] + if not value_allowed_none_or_none_sentinel(attribute_name_space, allowed_values): + raise ValueError( + f"Invalid value for `attribute_name_space`, must be None or one of {allowed_values}" + ) + self._attribute_name_space = attribute_name_space + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/apm_traces/models/bulk_unpin_attribute_details.py b/src/oci/apm_traces/models/bulk_unpin_attribute_details.py new file mode 100644 index 0000000000..0e8a41f878 --- /dev/null +++ b/src/oci/apm_traces/models/bulk_unpin_attribute_details.py @@ -0,0 +1,72 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20200630 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class BulkUnpinAttributeDetails(object): + """ + Bulk request object containing the details of the attributes to be unpinned. + """ + + def __init__(self, **kwargs): + """ + Initializes a new BulkUnpinAttributeDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param attribute_details: + The value to assign to the attribute_details property of this BulkUnpinAttributeDetails. + :type attribute_details: list[oci.apm_traces.models.BulkUnpinAttributeDetail] + + """ + self.swagger_types = { + 'attribute_details': 'list[BulkUnpinAttributeDetail]' + } + + self.attribute_map = { + 'attribute_details': 'attributeDetails' + } + + self._attribute_details = None + + @property + def attribute_details(self): + """ + Gets the attribute_details of this BulkUnpinAttributeDetails. + Collection of objects containing the details about individual attribute to be unpinned. + + + :return: The attribute_details of this BulkUnpinAttributeDetails. + :rtype: list[oci.apm_traces.models.BulkUnpinAttributeDetail] + """ + return self._attribute_details + + @attribute_details.setter + def attribute_details(self, attribute_details): + """ + Sets the attribute_details of this BulkUnpinAttributeDetails. + Collection of objects containing the details about individual attribute to be unpinned. + + + :param attribute_details: The attribute_details of this BulkUnpinAttributeDetails. + :type: list[oci.apm_traces.models.BulkUnpinAttributeDetail] + """ + self._attribute_details = attribute_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/apm_traces/models/bulk_unpin_metadata.py b/src/oci/apm_traces/models/bulk_unpin_metadata.py new file mode 100644 index 0000000000..1917407a87 --- /dev/null +++ b/src/oci/apm_traces/models/bulk_unpin_metadata.py @@ -0,0 +1,208 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20200630 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class BulkUnpinMetadata(object): + """ + Metadata about the bulk unpin operation. The bulk unpin operation is atomic and binary. If the processing of any of the attributes + in the bulk unpin request results in a processing or validation error, then none of the attributes in the request are unpinned. + """ + + #: A constant which can be used with the operation_status property of a BulkUnpinMetadata. + #: This constant has a value of "SUCCESS" + OPERATION_STATUS_SUCCESS = "SUCCESS" + + #: A constant which can be used with the operation_status property of a BulkUnpinMetadata. + #: This constant has a value of "EMPTY_ATTRIBUTE_LIST" + OPERATION_STATUS_EMPTY_ATTRIBUTE_LIST = "EMPTY_ATTRIBUTE_LIST" + + #: A constant which can be used with the operation_status property of a BulkUnpinMetadata. + #: This constant has a value of "INVALID_BULK_REQUEST" + OPERATION_STATUS_INVALID_BULK_REQUEST = "INVALID_BULK_REQUEST" + + #: A constant which can be used with the operation_type property of a BulkUnpinMetadata. + #: This constant has a value of "UNPIN" + OPERATION_TYPE_UNPIN = "UNPIN" + + def __init__(self, **kwargs): + """ + Initializes a new BulkUnpinMetadata object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param operation_status: + The value to assign to the operation_status property of this BulkUnpinMetadata. + Allowed values for this property are: "SUCCESS", "EMPTY_ATTRIBUTE_LIST", "INVALID_BULK_REQUEST", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type operation_status: str + + :param operation_type: + The value to assign to the operation_type property of this BulkUnpinMetadata. + Allowed values for this property are: "UNPIN", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type operation_type: str + + :param attributes_unpinned: + The value to assign to the attributes_unpinned property of this BulkUnpinMetadata. + :type attributes_unpinned: int + + :param synthetic_attributes_unpinned: + The value to assign to the synthetic_attributes_unpinned property of this BulkUnpinMetadata. + :type synthetic_attributes_unpinned: int + + """ + self.swagger_types = { + 'operation_status': 'str', + 'operation_type': 'str', + 'attributes_unpinned': 'int', + 'synthetic_attributes_unpinned': 'int' + } + + self.attribute_map = { + 'operation_status': 'operationStatus', + 'operation_type': 'operationType', + 'attributes_unpinned': 'attributesUnpinned', + 'synthetic_attributes_unpinned': 'syntheticAttributesUnpinned' + } + + self._operation_status = None + self._operation_type = None + self._attributes_unpinned = None + self._synthetic_attributes_unpinned = None + + @property + def operation_status(self): + """ + **[Required]** Gets the operation_status of this BulkUnpinMetadata. + Operation status of the bulk unpin operation. + SUCCESS - The bulk unpin operation has succeeded and all the attributes in the bulk unpin request have been unpinned by this operation. + The following are error statuses for the bulk unpin operation. + EMPTY_ATTRIBUTE_LIST - The bulk unpin request object was empty and did not contain any attributes to be unpinned. + INVALID_BULK_REQUEST - The bulk request contains invalid attribute(s), or attribute(s) that resulted in a validation error, or an attribute that resulted + in a processing error. + + Allowed values for this property are: "SUCCESS", "EMPTY_ATTRIBUTE_LIST", "INVALID_BULK_REQUEST", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The operation_status of this BulkUnpinMetadata. + :rtype: str + """ + return self._operation_status + + @operation_status.setter + def operation_status(self, operation_status): + """ + Sets the operation_status of this BulkUnpinMetadata. + Operation status of the bulk unpin operation. + SUCCESS - The bulk unpin operation has succeeded and all the attributes in the bulk unpin request have been unpinned by this operation. + The following are error statuses for the bulk unpin operation. + EMPTY_ATTRIBUTE_LIST - The bulk unpin request object was empty and did not contain any attributes to be unpinned. + INVALID_BULK_REQUEST - The bulk request contains invalid attribute(s), or attribute(s) that resulted in a validation error, or an attribute that resulted + in a processing error. + + + :param operation_status: The operation_status of this BulkUnpinMetadata. + :type: str + """ + allowed_values = ["SUCCESS", "EMPTY_ATTRIBUTE_LIST", "INVALID_BULK_REQUEST"] + if not value_allowed_none_or_none_sentinel(operation_status, allowed_values): + operation_status = 'UNKNOWN_ENUM_VALUE' + self._operation_status = operation_status + + @property + def operation_type(self): + """ + **[Required]** Gets the operation_type of this BulkUnpinMetadata. + Type of operation. + + Allowed values for this property are: "UNPIN", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The operation_type of this BulkUnpinMetadata. + :rtype: str + """ + return self._operation_type + + @operation_type.setter + def operation_type(self, operation_type): + """ + Sets the operation_type of this BulkUnpinMetadata. + Type of operation. + + + :param operation_type: The operation_type of this BulkUnpinMetadata. + :type: str + """ + allowed_values = ["UNPIN"] + if not value_allowed_none_or_none_sentinel(operation_type, allowed_values): + operation_type = 'UNKNOWN_ENUM_VALUE' + self._operation_type = operation_type + + @property + def attributes_unpinned(self): + """ + **[Required]** Gets the attributes_unpinned of this BulkUnpinMetadata. + Total number attributes (both string and numeric) in TRACES namespace that were unpinned. + + + :return: The attributes_unpinned of this BulkUnpinMetadata. + :rtype: int + """ + return self._attributes_unpinned + + @attributes_unpinned.setter + def attributes_unpinned(self, attributes_unpinned): + """ + Sets the attributes_unpinned of this BulkUnpinMetadata. + Total number attributes (both string and numeric) in TRACES namespace that were unpinned. + + + :param attributes_unpinned: The attributes_unpinned of this BulkUnpinMetadata. + :type: int + """ + self._attributes_unpinned = attributes_unpinned + + @property + def synthetic_attributes_unpinned(self): + """ + Gets the synthetic_attributes_unpinned of this BulkUnpinMetadata. + Total number attributes (both string and numeric) in SYNTHETIC namespace that were unpinned. + + + :return: The synthetic_attributes_unpinned of this BulkUnpinMetadata. + :rtype: int + """ + return self._synthetic_attributes_unpinned + + @synthetic_attributes_unpinned.setter + def synthetic_attributes_unpinned(self, synthetic_attributes_unpinned): + """ + Sets the synthetic_attributes_unpinned of this BulkUnpinMetadata. + Total number attributes (both string and numeric) in SYNTHETIC namespace that were unpinned. + + + :param synthetic_attributes_unpinned: The synthetic_attributes_unpinned of this BulkUnpinMetadata. + :type: int + """ + self._synthetic_attributes_unpinned = synthetic_attributes_unpinned + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/apm_traces/models/bulk_unpin_status.py b/src/oci/apm_traces/models/bulk_unpin_status.py new file mode 100644 index 0000000000..1e5e428866 --- /dev/null +++ b/src/oci/apm_traces/models/bulk_unpin_status.py @@ -0,0 +1,105 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20200630 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class BulkUnpinStatus(object): + """ + Response of a bulk attribute unpin operation. + """ + + def __init__(self, **kwargs): + """ + Initializes a new BulkUnpinStatus object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param attribute_statuses: + The value to assign to the attribute_statuses property of this BulkUnpinStatus. + :type attribute_statuses: list[oci.apm_traces.models.AttributeUnpinResponse] + + :param bulk_unpin_metadata: + The value to assign to the bulk_unpin_metadata property of this BulkUnpinStatus. + :type bulk_unpin_metadata: oci.apm_traces.models.BulkUnpinMetadata + + """ + self.swagger_types = { + 'attribute_statuses': 'list[AttributeUnpinResponse]', + 'bulk_unpin_metadata': 'BulkUnpinMetadata' + } + + self.attribute_map = { + 'attribute_statuses': 'attributeStatuses', + 'bulk_unpin_metadata': 'bulkUnpinMetadata' + } + + self._attribute_statuses = None + self._bulk_unpin_metadata = None + + @property + def attribute_statuses(self): + """ + **[Required]** Gets the attribute_statuses of this BulkUnpinStatus. + We preserve the order of the attribute items from the bulk unpin request in this collection. The ith object in this collection represents the + bulk unpin operation status of the ith object in the BulkUnpinAttributeDetails object in the Bulk unpin request. If the + bulk unpin operation results in a processing error or a validation error, the operationStatus property in the BulkUnpinMetadata object will + contain the appropriate bulk error status for the bulk operation. + + + :return: The attribute_statuses of this BulkUnpinStatus. + :rtype: list[oci.apm_traces.models.AttributeUnpinResponse] + """ + return self._attribute_statuses + + @attribute_statuses.setter + def attribute_statuses(self, attribute_statuses): + """ + Sets the attribute_statuses of this BulkUnpinStatus. + We preserve the order of the attribute items from the bulk unpin request in this collection. The ith object in this collection represents the + bulk unpin operation status of the ith object in the BulkUnpinAttributeDetails object in the Bulk unpin request. If the + bulk unpin operation results in a processing error or a validation error, the operationStatus property in the BulkUnpinMetadata object will + contain the appropriate bulk error status for the bulk operation. + + + :param attribute_statuses: The attribute_statuses of this BulkUnpinStatus. + :type: list[oci.apm_traces.models.AttributeUnpinResponse] + """ + self._attribute_statuses = attribute_statuses + + @property + def bulk_unpin_metadata(self): + """ + **[Required]** Gets the bulk_unpin_metadata of this BulkUnpinStatus. + + :return: The bulk_unpin_metadata of this BulkUnpinStatus. + :rtype: oci.apm_traces.models.BulkUnpinMetadata + """ + return self._bulk_unpin_metadata + + @bulk_unpin_metadata.setter + def bulk_unpin_metadata(self, bulk_unpin_metadata): + """ + Sets the bulk_unpin_metadata of this BulkUnpinStatus. + + :param bulk_unpin_metadata: The bulk_unpin_metadata of this BulkUnpinStatus. + :type: oci.apm_traces.models.BulkUnpinMetadata + """ + self._bulk_unpin_metadata = bulk_unpin_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/apm_traces/models/bulk_update_attribute_detail.py b/src/oci/apm_traces/models/bulk_update_attribute_detail.py new file mode 100644 index 0000000000..ccae842e22 --- /dev/null +++ b/src/oci/apm_traces/models/bulk_update_attribute_detail.py @@ -0,0 +1,186 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20200630 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class BulkUpdateAttributeDetail(object): + """ + Object that contains the details about a single attribute in the bulk request for which properties are to be updated. + """ + + #: A constant which can be used with the unit property of a BulkUpdateAttributeDetail. + #: This constant has a value of "NONE" + UNIT_NONE = "NONE" + + #: A constant which can be used with the unit property of a BulkUpdateAttributeDetail. + #: This constant has a value of "EPOCH_TIME_MS" + UNIT_EPOCH_TIME_MS = "EPOCH_TIME_MS" + + #: A constant which can be used with the unit property of a BulkUpdateAttributeDetail. + #: This constant has a value of "BYTES" + UNIT_BYTES = "BYTES" + + #: A constant which can be used with the unit property of a BulkUpdateAttributeDetail. + #: This constant has a value of "COUNT" + UNIT_COUNT = "COUNT" + + #: A constant which can be used with the unit property of a BulkUpdateAttributeDetail. + #: This constant has a value of "DURATION_MS" + UNIT_DURATION_MS = "DURATION_MS" + + #: A constant which can be used with the unit property of a BulkUpdateAttributeDetail. + #: This constant has a value of "TRACE_STATUS" + UNIT_TRACE_STATUS = "TRACE_STATUS" + + #: A constant which can be used with the unit property of a BulkUpdateAttributeDetail. + #: This constant has a value of "PERCENTAGE" + UNIT_PERCENTAGE = "PERCENTAGE" + + #: A constant which can be used with the attribute_name_space property of a BulkUpdateAttributeDetail. + #: This constant has a value of "TRACES" + ATTRIBUTE_NAME_SPACE_TRACES = "TRACES" + + #: A constant which can be used with the attribute_name_space property of a BulkUpdateAttributeDetail. + #: This constant has a value of "SYNTHETIC" + ATTRIBUTE_NAME_SPACE_SYNTHETIC = "SYNTHETIC" + + def __init__(self, **kwargs): + """ + Initializes a new BulkUpdateAttributeDetail object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param attribute_name: + The value to assign to the attribute_name property of this BulkUpdateAttributeDetail. + :type attribute_name: str + + :param unit: + The value to assign to the unit property of this BulkUpdateAttributeDetail. + Allowed values for this property are: "NONE", "EPOCH_TIME_MS", "BYTES", "COUNT", "DURATION_MS", "TRACE_STATUS", "PERCENTAGE" + :type unit: str + + :param attribute_name_space: + The value to assign to the attribute_name_space property of this BulkUpdateAttributeDetail. + Allowed values for this property are: "TRACES", "SYNTHETIC" + :type attribute_name_space: str + + """ + self.swagger_types = { + 'attribute_name': 'str', + 'unit': 'str', + 'attribute_name_space': 'str' + } + + self.attribute_map = { + 'attribute_name': 'attributeName', + 'unit': 'unit', + 'attribute_name_space': 'attributeNameSpace' + } + + self._attribute_name = None + self._unit = None + self._attribute_name_space = None + + @property + def attribute_name(self): + """ + **[Required]** Gets the attribute_name of this BulkUpdateAttributeDetail. + Name of the attribute for which notes are to be updated. + + + :return: The attribute_name of this BulkUpdateAttributeDetail. + :rtype: str + """ + return self._attribute_name + + @attribute_name.setter + def attribute_name(self, attribute_name): + """ + Sets the attribute_name of this BulkUpdateAttributeDetail. + Name of the attribute for which notes are to be updated. + + + :param attribute_name: The attribute_name of this BulkUpdateAttributeDetail. + :type: str + """ + self._attribute_name = attribute_name + + @property + def unit(self): + """ + Gets the unit of this BulkUpdateAttributeDetail. + Unit of the attribute to be updated. + + Allowed values for this property are: "NONE", "EPOCH_TIME_MS", "BYTES", "COUNT", "DURATION_MS", "TRACE_STATUS", "PERCENTAGE" + + + :return: The unit of this BulkUpdateAttributeDetail. + :rtype: str + """ + return self._unit + + @unit.setter + def unit(self, unit): + """ + Sets the unit of this BulkUpdateAttributeDetail. + Unit of the attribute to be updated. + + + :param unit: The unit of this BulkUpdateAttributeDetail. + :type: str + """ + allowed_values = ["NONE", "EPOCH_TIME_MS", "BYTES", "COUNT", "DURATION_MS", "TRACE_STATUS", "PERCENTAGE"] + if not value_allowed_none_or_none_sentinel(unit, allowed_values): + raise ValueError( + f"Invalid value for `unit`, must be None or one of {allowed_values}" + ) + self._unit = unit + + @property + def attribute_name_space(self): + """ + Gets the attribute_name_space of this BulkUpdateAttributeDetail. + Namespace of the attribute for which the properties are to be updated. + + Allowed values for this property are: "TRACES", "SYNTHETIC" + + + :return: The attribute_name_space of this BulkUpdateAttributeDetail. + :rtype: str + """ + return self._attribute_name_space + + @attribute_name_space.setter + def attribute_name_space(self, attribute_name_space): + """ + Sets the attribute_name_space of this BulkUpdateAttributeDetail. + Namespace of the attribute for which the properties are to be updated. + + + :param attribute_name_space: The attribute_name_space of this BulkUpdateAttributeDetail. + :type: str + """ + allowed_values = ["TRACES", "SYNTHETIC"] + if not value_allowed_none_or_none_sentinel(attribute_name_space, allowed_values): + raise ValueError( + f"Invalid value for `attribute_name_space`, must be None or one of {allowed_values}" + ) + self._attribute_name_space = attribute_name_space + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/apm_traces/models/bulk_update_attribute_details.py b/src/oci/apm_traces/models/bulk_update_attribute_details.py new file mode 100644 index 0000000000..01711d173a --- /dev/null +++ b/src/oci/apm_traces/models/bulk_update_attribute_details.py @@ -0,0 +1,72 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20200630 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class BulkUpdateAttributeDetails(object): + """ + Bulk request object containing the details of the attributes for which properties are to be updated. + """ + + def __init__(self, **kwargs): + """ + Initializes a new BulkUpdateAttributeDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param attribute_details: + The value to assign to the attribute_details property of this BulkUpdateAttributeDetails. + :type attribute_details: list[oci.apm_traces.models.BulkUpdateAttributeDetail] + + """ + self.swagger_types = { + 'attribute_details': 'list[BulkUpdateAttributeDetail]' + } + + self.attribute_map = { + 'attribute_details': 'attributeDetails' + } + + self._attribute_details = None + + @property + def attribute_details(self): + """ + Gets the attribute_details of this BulkUpdateAttributeDetails. + Collection of objects containing the details about individual attribute for which properties are to be updated. + + + :return: The attribute_details of this BulkUpdateAttributeDetails. + :rtype: list[oci.apm_traces.models.BulkUpdateAttributeDetail] + """ + return self._attribute_details + + @attribute_details.setter + def attribute_details(self, attribute_details): + """ + Sets the attribute_details of this BulkUpdateAttributeDetails. + Collection of objects containing the details about individual attribute for which properties are to be updated. + + + :param attribute_details: The attribute_details of this BulkUpdateAttributeDetails. + :type: list[oci.apm_traces.models.BulkUpdateAttributeDetail] + """ + self._attribute_details = attribute_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/apm_traces/models/bulk_update_attribute_metadata.py b/src/oci/apm_traces/models/bulk_update_attribute_metadata.py new file mode 100644 index 0000000000..84e6147bbd --- /dev/null +++ b/src/oci/apm_traces/models/bulk_update_attribute_metadata.py @@ -0,0 +1,208 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20200630 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class BulkUpdateAttributeMetadata(object): + """ + Metadata about the bulk attribute update operation. The bulk attribute update operation is atomic and binary. If the processing of any of the attributes + in the bulk attribute update request results in a processing or validation error, then none of the attributes updated. + """ + + #: A constant which can be used with the operation_status property of a BulkUpdateAttributeMetadata. + #: This constant has a value of "SUCCESS" + OPERATION_STATUS_SUCCESS = "SUCCESS" + + #: A constant which can be used with the operation_status property of a BulkUpdateAttributeMetadata. + #: This constant has a value of "EMPTY_ATTRIBUTE_LIST" + OPERATION_STATUS_EMPTY_ATTRIBUTE_LIST = "EMPTY_ATTRIBUTE_LIST" + + #: A constant which can be used with the operation_status property of a BulkUpdateAttributeMetadata. + #: This constant has a value of "INVALID_BULK_REQUEST" + OPERATION_STATUS_INVALID_BULK_REQUEST = "INVALID_BULK_REQUEST" + + #: A constant which can be used with the operation_type property of a BulkUpdateAttributeMetadata. + #: This constant has a value of "UPDATE_ATTRIBUTE_PROPERTIES" + OPERATION_TYPE_UPDATE_ATTRIBUTE_PROPERTIES = "UPDATE_ATTRIBUTE_PROPERTIES" + + def __init__(self, **kwargs): + """ + Initializes a new BulkUpdateAttributeMetadata object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param operation_status: + The value to assign to the operation_status property of this BulkUpdateAttributeMetadata. + Allowed values for this property are: "SUCCESS", "EMPTY_ATTRIBUTE_LIST", "INVALID_BULK_REQUEST", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type operation_status: str + + :param operation_type: + The value to assign to the operation_type property of this BulkUpdateAttributeMetadata. + Allowed values for this property are: "UPDATE_ATTRIBUTE_PROPERTIES", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type operation_type: str + + :param attributes_updated: + The value to assign to the attributes_updated property of this BulkUpdateAttributeMetadata. + :type attributes_updated: int + + :param synthetic_attributes_updated: + The value to assign to the synthetic_attributes_updated property of this BulkUpdateAttributeMetadata. + :type synthetic_attributes_updated: int + + """ + self.swagger_types = { + 'operation_status': 'str', + 'operation_type': 'str', + 'attributes_updated': 'int', + 'synthetic_attributes_updated': 'int' + } + + self.attribute_map = { + 'operation_status': 'operationStatus', + 'operation_type': 'operationType', + 'attributes_updated': 'attributesUpdated', + 'synthetic_attributes_updated': 'syntheticAttributesUpdated' + } + + self._operation_status = None + self._operation_type = None + self._attributes_updated = None + self._synthetic_attributes_updated = None + + @property + def operation_status(self): + """ + **[Required]** Gets the operation_status of this BulkUpdateAttributeMetadata. + Operation status of the bulk update attribute operation. + SUCCESS - The bulk attribute update request has succeeded and all the attributes in the request have been updated. + The following are error statuses for the bulk update attributes operation. + EMPTY_ATTRIBUTE_LIST - The bulk update attributes request object was empty and did not contain any attributes for which properties had to be updated. + INVALID_BULK_REQUEST - The bulk request contains invalid attribute(s), or attribute(s) that resulted in a validation error, or an attribute that resulted + in a processing error. + + Allowed values for this property are: "SUCCESS", "EMPTY_ATTRIBUTE_LIST", "INVALID_BULK_REQUEST", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The operation_status of this BulkUpdateAttributeMetadata. + :rtype: str + """ + return self._operation_status + + @operation_status.setter + def operation_status(self, operation_status): + """ + Sets the operation_status of this BulkUpdateAttributeMetadata. + Operation status of the bulk update attribute operation. + SUCCESS - The bulk attribute update request has succeeded and all the attributes in the request have been updated. + The following are error statuses for the bulk update attributes operation. + EMPTY_ATTRIBUTE_LIST - The bulk update attributes request object was empty and did not contain any attributes for which properties had to be updated. + INVALID_BULK_REQUEST - The bulk request contains invalid attribute(s), or attribute(s) that resulted in a validation error, or an attribute that resulted + in a processing error. + + + :param operation_status: The operation_status of this BulkUpdateAttributeMetadata. + :type: str + """ + allowed_values = ["SUCCESS", "EMPTY_ATTRIBUTE_LIST", "INVALID_BULK_REQUEST"] + if not value_allowed_none_or_none_sentinel(operation_status, allowed_values): + operation_status = 'UNKNOWN_ENUM_VALUE' + self._operation_status = operation_status + + @property + def operation_type(self): + """ + **[Required]** Gets the operation_type of this BulkUpdateAttributeMetadata. + Type of operation. + + Allowed values for this property are: "UPDATE_ATTRIBUTE_PROPERTIES", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The operation_type of this BulkUpdateAttributeMetadata. + :rtype: str + """ + return self._operation_type + + @operation_type.setter + def operation_type(self, operation_type): + """ + Sets the operation_type of this BulkUpdateAttributeMetadata. + Type of operation. + + + :param operation_type: The operation_type of this BulkUpdateAttributeMetadata. + :type: str + """ + allowed_values = ["UPDATE_ATTRIBUTE_PROPERTIES"] + if not value_allowed_none_or_none_sentinel(operation_type, allowed_values): + operation_type = 'UNKNOWN_ENUM_VALUE' + self._operation_type = operation_type + + @property + def attributes_updated(self): + """ + **[Required]** Gets the attributes_updated of this BulkUpdateAttributeMetadata. + Total number attributes (both string and numeric) in TRACES namespace for which properties were updated. + + + :return: The attributes_updated of this BulkUpdateAttributeMetadata. + :rtype: int + """ + return self._attributes_updated + + @attributes_updated.setter + def attributes_updated(self, attributes_updated): + """ + Sets the attributes_updated of this BulkUpdateAttributeMetadata. + Total number attributes (both string and numeric) in TRACES namespace for which properties were updated. + + + :param attributes_updated: The attributes_updated of this BulkUpdateAttributeMetadata. + :type: int + """ + self._attributes_updated = attributes_updated + + @property + def synthetic_attributes_updated(self): + """ + Gets the synthetic_attributes_updated of this BulkUpdateAttributeMetadata. + Total number attributes (both string and numeric) in SYNTHETIC namespace for which properties were updated. + + + :return: The synthetic_attributes_updated of this BulkUpdateAttributeMetadata. + :rtype: int + """ + return self._synthetic_attributes_updated + + @synthetic_attributes_updated.setter + def synthetic_attributes_updated(self, synthetic_attributes_updated): + """ + Sets the synthetic_attributes_updated of this BulkUpdateAttributeMetadata. + Total number attributes (both string and numeric) in SYNTHETIC namespace for which properties were updated. + + + :param synthetic_attributes_updated: The synthetic_attributes_updated of this BulkUpdateAttributeMetadata. + :type: int + """ + self._synthetic_attributes_updated = synthetic_attributes_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/apm_traces/models/bulk_update_attribute_notes_detail.py b/src/oci/apm_traces/models/bulk_update_attribute_notes_detail.py new file mode 100644 index 0000000000..7ba13981db --- /dev/null +++ b/src/oci/apm_traces/models/bulk_update_attribute_notes_detail.py @@ -0,0 +1,152 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20200630 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class BulkUpdateAttributeNotesDetail(object): + """ + Object that contains the details about a single attribute in the bulk request for which notes are to be updated. + """ + + #: A constant which can be used with the attribute_name_space property of a BulkUpdateAttributeNotesDetail. + #: This constant has a value of "TRACES" + ATTRIBUTE_NAME_SPACE_TRACES = "TRACES" + + #: A constant which can be used with the attribute_name_space property of a BulkUpdateAttributeNotesDetail. + #: This constant has a value of "SYNTHETIC" + ATTRIBUTE_NAME_SPACE_SYNTHETIC = "SYNTHETIC" + + def __init__(self, **kwargs): + """ + Initializes a new BulkUpdateAttributeNotesDetail object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param attribute_name: + The value to assign to the attribute_name property of this BulkUpdateAttributeNotesDetail. + :type attribute_name: str + + :param notes: + The value to assign to the notes property of this BulkUpdateAttributeNotesDetail. + :type notes: str + + :param attribute_name_space: + The value to assign to the attribute_name_space property of this BulkUpdateAttributeNotesDetail. + Allowed values for this property are: "TRACES", "SYNTHETIC" + :type attribute_name_space: str + + """ + self.swagger_types = { + 'attribute_name': 'str', + 'notes': 'str', + 'attribute_name_space': 'str' + } + + self.attribute_map = { + 'attribute_name': 'attributeName', + 'notes': 'notes', + 'attribute_name_space': 'attributeNameSpace' + } + + self._attribute_name = None + self._notes = None + self._attribute_name_space = None + + @property + def attribute_name(self): + """ + **[Required]** Gets the attribute_name of this BulkUpdateAttributeNotesDetail. + Name of the attribute for which notes are to be updated. + + + :return: The attribute_name of this BulkUpdateAttributeNotesDetail. + :rtype: str + """ + return self._attribute_name + + @attribute_name.setter + def attribute_name(self, attribute_name): + """ + Sets the attribute_name of this BulkUpdateAttributeNotesDetail. + Name of the attribute for which notes are to be updated. + + + :param attribute_name: The attribute_name of this BulkUpdateAttributeNotesDetail. + :type: str + """ + self._attribute_name = attribute_name + + @property + def notes(self): + """ + **[Required]** Gets the notes of this BulkUpdateAttributeNotesDetail. + Notes to be updated. The size of notes cannot exceed 1000 chars. + + + :return: The notes of this BulkUpdateAttributeNotesDetail. + :rtype: str + """ + return self._notes + + @notes.setter + def notes(self, notes): + """ + Sets the notes of this BulkUpdateAttributeNotesDetail. + Notes to be updated. The size of notes cannot exceed 1000 chars. + + + :param notes: The notes of this BulkUpdateAttributeNotesDetail. + :type: str + """ + self._notes = notes + + @property + def attribute_name_space(self): + """ + Gets the attribute_name_space of this BulkUpdateAttributeNotesDetail. + Namespace of the attribute for which the notes are to be updated. The attributeNameSpace will default to TRACES if it is + not passed in. + + Allowed values for this property are: "TRACES", "SYNTHETIC" + + + :return: The attribute_name_space of this BulkUpdateAttributeNotesDetail. + :rtype: str + """ + return self._attribute_name_space + + @attribute_name_space.setter + def attribute_name_space(self, attribute_name_space): + """ + Sets the attribute_name_space of this BulkUpdateAttributeNotesDetail. + Namespace of the attribute for which the notes are to be updated. The attributeNameSpace will default to TRACES if it is + not passed in. + + + :param attribute_name_space: The attribute_name_space of this BulkUpdateAttributeNotesDetail. + :type: str + """ + allowed_values = ["TRACES", "SYNTHETIC"] + if not value_allowed_none_or_none_sentinel(attribute_name_space, allowed_values): + raise ValueError( + f"Invalid value for `attribute_name_space`, must be None or one of {allowed_values}" + ) + self._attribute_name_space = attribute_name_space + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/apm_traces/models/bulk_update_attribute_notes_details.py b/src/oci/apm_traces/models/bulk_update_attribute_notes_details.py new file mode 100644 index 0000000000..839a34eecb --- /dev/null +++ b/src/oci/apm_traces/models/bulk_update_attribute_notes_details.py @@ -0,0 +1,72 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20200630 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class BulkUpdateAttributeNotesDetails(object): + """ + Bulk request object containing the details of the attributes for which notes are to be updated. + """ + + def __init__(self, **kwargs): + """ + Initializes a new BulkUpdateAttributeNotesDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param attribute_details: + The value to assign to the attribute_details property of this BulkUpdateAttributeNotesDetails. + :type attribute_details: list[oci.apm_traces.models.BulkUpdateAttributeNotesDetail] + + """ + self.swagger_types = { + 'attribute_details': 'list[BulkUpdateAttributeNotesDetail]' + } + + self.attribute_map = { + 'attribute_details': 'attributeDetails' + } + + self._attribute_details = None + + @property + def attribute_details(self): + """ + Gets the attribute_details of this BulkUpdateAttributeNotesDetails. + Collection of objects containing the details about individual attribute for which notes are to be updated. + + + :return: The attribute_details of this BulkUpdateAttributeNotesDetails. + :rtype: list[oci.apm_traces.models.BulkUpdateAttributeNotesDetail] + """ + return self._attribute_details + + @attribute_details.setter + def attribute_details(self, attribute_details): + """ + Sets the attribute_details of this BulkUpdateAttributeNotesDetails. + Collection of objects containing the details about individual attribute for which notes are to be updated. + + + :param attribute_details: The attribute_details of this BulkUpdateAttributeNotesDetails. + :type: list[oci.apm_traces.models.BulkUpdateAttributeNotesDetail] + """ + self._attribute_details = attribute_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/apm_traces/models/bulk_update_attribute_status.py b/src/oci/apm_traces/models/bulk_update_attribute_status.py new file mode 100644 index 0000000000..e85c5169cb --- /dev/null +++ b/src/oci/apm_traces/models/bulk_update_attribute_status.py @@ -0,0 +1,105 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20200630 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class BulkUpdateAttributeStatus(object): + """ + Response of a bulk update attribute operation. + """ + + def __init__(self, **kwargs): + """ + Initializes a new BulkUpdateAttributeStatus object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param attribute_statuses: + The value to assign to the attribute_statuses property of this BulkUpdateAttributeStatus. + :type attribute_statuses: list[oci.apm_traces.models.AttributeUpdateResponse] + + :param bulk_update_attribute_metadata: + The value to assign to the bulk_update_attribute_metadata property of this BulkUpdateAttributeStatus. + :type bulk_update_attribute_metadata: oci.apm_traces.models.BulkUpdateAttributeMetadata + + """ + self.swagger_types = { + 'attribute_statuses': 'list[AttributeUpdateResponse]', + 'bulk_update_attribute_metadata': 'BulkUpdateAttributeMetadata' + } + + self.attribute_map = { + 'attribute_statuses': 'attributeStatuses', + 'bulk_update_attribute_metadata': 'bulkUpdateAttributeMetadata' + } + + self._attribute_statuses = None + self._bulk_update_attribute_metadata = None + + @property + def attribute_statuses(self): + """ + **[Required]** Gets the attribute_statuses of this BulkUpdateAttributeStatus. + We preserve the order of the attribute items from the bulk update attribute request in this collection. The ith object in this collection represents the + bulk update attribute operation status of the ith object in the BulkUpdateAttributeDetails object in the Bulk update attribute request. If the + bulk update attribute operation results in a processing error or a validation error, the operationStatus property in the BulkUpdateAttributeMetadata object will + contain the appropriate bulk error status for the bulk operation. + + + :return: The attribute_statuses of this BulkUpdateAttributeStatus. + :rtype: list[oci.apm_traces.models.AttributeUpdateResponse] + """ + return self._attribute_statuses + + @attribute_statuses.setter + def attribute_statuses(self, attribute_statuses): + """ + Sets the attribute_statuses of this BulkUpdateAttributeStatus. + We preserve the order of the attribute items from the bulk update attribute request in this collection. The ith object in this collection represents the + bulk update attribute operation status of the ith object in the BulkUpdateAttributeDetails object in the Bulk update attribute request. If the + bulk update attribute operation results in a processing error or a validation error, the operationStatus property in the BulkUpdateAttributeMetadata object will + contain the appropriate bulk error status for the bulk operation. + + + :param attribute_statuses: The attribute_statuses of this BulkUpdateAttributeStatus. + :type: list[oci.apm_traces.models.AttributeUpdateResponse] + """ + self._attribute_statuses = attribute_statuses + + @property + def bulk_update_attribute_metadata(self): + """ + **[Required]** Gets the bulk_update_attribute_metadata of this BulkUpdateAttributeStatus. + + :return: The bulk_update_attribute_metadata of this BulkUpdateAttributeStatus. + :rtype: oci.apm_traces.models.BulkUpdateAttributeMetadata + """ + return self._bulk_update_attribute_metadata + + @bulk_update_attribute_metadata.setter + def bulk_update_attribute_metadata(self, bulk_update_attribute_metadata): + """ + Sets the bulk_update_attribute_metadata of this BulkUpdateAttributeStatus. + + :param bulk_update_attribute_metadata: The bulk_update_attribute_metadata of this BulkUpdateAttributeStatus. + :type: oci.apm_traces.models.BulkUpdateAttributeMetadata + """ + self._bulk_update_attribute_metadata = bulk_update_attribute_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/apm_traces/models/bulk_update_notes_metadata.py b/src/oci/apm_traces/models/bulk_update_notes_metadata.py new file mode 100644 index 0000000000..7c87664107 --- /dev/null +++ b/src/oci/apm_traces/models/bulk_update_notes_metadata.py @@ -0,0 +1,208 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20200630 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class BulkUpdateNotesMetadata(object): + """ + Metadata about the bulk update notes operation. The bulk update notes operation is atomic and binary. If the processing of any of the attributes + in the bulk update notes request results in a processing or validation error, then none of the notes in the update notes request are updated. + """ + + #: A constant which can be used with the operation_status property of a BulkUpdateNotesMetadata. + #: This constant has a value of "SUCCESS" + OPERATION_STATUS_SUCCESS = "SUCCESS" + + #: A constant which can be used with the operation_status property of a BulkUpdateNotesMetadata. + #: This constant has a value of "EMPTY_ATTRIBUTE_LIST" + OPERATION_STATUS_EMPTY_ATTRIBUTE_LIST = "EMPTY_ATTRIBUTE_LIST" + + #: A constant which can be used with the operation_status property of a BulkUpdateNotesMetadata. + #: This constant has a value of "INVALID_BULK_REQUEST" + OPERATION_STATUS_INVALID_BULK_REQUEST = "INVALID_BULK_REQUEST" + + #: A constant which can be used with the operation_type property of a BulkUpdateNotesMetadata. + #: This constant has a value of "UPDATE_NOTES" + OPERATION_TYPE_UPDATE_NOTES = "UPDATE_NOTES" + + def __init__(self, **kwargs): + """ + Initializes a new BulkUpdateNotesMetadata object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param operation_status: + The value to assign to the operation_status property of this BulkUpdateNotesMetadata. + Allowed values for this property are: "SUCCESS", "EMPTY_ATTRIBUTE_LIST", "INVALID_BULK_REQUEST", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type operation_status: str + + :param operation_type: + The value to assign to the operation_type property of this BulkUpdateNotesMetadata. + Allowed values for this property are: "UPDATE_NOTES", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type operation_type: str + + :param attributes_notes_updated: + The value to assign to the attributes_notes_updated property of this BulkUpdateNotesMetadata. + :type attributes_notes_updated: int + + :param synthetic_attributes_pinned: + The value to assign to the synthetic_attributes_pinned property of this BulkUpdateNotesMetadata. + :type synthetic_attributes_pinned: int + + """ + self.swagger_types = { + 'operation_status': 'str', + 'operation_type': 'str', + 'attributes_notes_updated': 'int', + 'synthetic_attributes_pinned': 'int' + } + + self.attribute_map = { + 'operation_status': 'operationStatus', + 'operation_type': 'operationType', + 'attributes_notes_updated': 'attributesNotesUpdated', + 'synthetic_attributes_pinned': 'syntheticAttributesPinned' + } + + self._operation_status = None + self._operation_type = None + self._attributes_notes_updated = None + self._synthetic_attributes_pinned = None + + @property + def operation_status(self): + """ + **[Required]** Gets the operation_status of this BulkUpdateNotesMetadata. + Operation status of the bulk update notes operation. + SUCCESS - The bulk updates notes request has succeeded and all the attributes in the bulk update notes request have been updated with the provided notes. + The following are error statuses for the bulk update notes operation. + EMPTY_ATTRIBUTE_LIST - The bulk update notes request object was empty and did not contain any attributes for which notes had to be updated. + INVALID_BULK_REQUEST - The bulk request contains invalid attribute(s), or attribute(s) that resulted in a validation error, or an attribute that resulted + in a processing error. + + Allowed values for this property are: "SUCCESS", "EMPTY_ATTRIBUTE_LIST", "INVALID_BULK_REQUEST", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The operation_status of this BulkUpdateNotesMetadata. + :rtype: str + """ + return self._operation_status + + @operation_status.setter + def operation_status(self, operation_status): + """ + Sets the operation_status of this BulkUpdateNotesMetadata. + Operation status of the bulk update notes operation. + SUCCESS - The bulk updates notes request has succeeded and all the attributes in the bulk update notes request have been updated with the provided notes. + The following are error statuses for the bulk update notes operation. + EMPTY_ATTRIBUTE_LIST - The bulk update notes request object was empty and did not contain any attributes for which notes had to be updated. + INVALID_BULK_REQUEST - The bulk request contains invalid attribute(s), or attribute(s) that resulted in a validation error, or an attribute that resulted + in a processing error. + + + :param operation_status: The operation_status of this BulkUpdateNotesMetadata. + :type: str + """ + allowed_values = ["SUCCESS", "EMPTY_ATTRIBUTE_LIST", "INVALID_BULK_REQUEST"] + if not value_allowed_none_or_none_sentinel(operation_status, allowed_values): + operation_status = 'UNKNOWN_ENUM_VALUE' + self._operation_status = operation_status + + @property + def operation_type(self): + """ + **[Required]** Gets the operation_type of this BulkUpdateNotesMetadata. + Type of operation. + + Allowed values for this property are: "UPDATE_NOTES", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The operation_type of this BulkUpdateNotesMetadata. + :rtype: str + """ + return self._operation_type + + @operation_type.setter + def operation_type(self, operation_type): + """ + Sets the operation_type of this BulkUpdateNotesMetadata. + Type of operation. + + + :param operation_type: The operation_type of this BulkUpdateNotesMetadata. + :type: str + """ + allowed_values = ["UPDATE_NOTES"] + if not value_allowed_none_or_none_sentinel(operation_type, allowed_values): + operation_type = 'UNKNOWN_ENUM_VALUE' + self._operation_type = operation_type + + @property + def attributes_notes_updated(self): + """ + **[Required]** Gets the attributes_notes_updated of this BulkUpdateNotesMetadata. + Total number attributes (both string and numeric) in TRACES namespace for which notes were updated. + + + :return: The attributes_notes_updated of this BulkUpdateNotesMetadata. + :rtype: int + """ + return self._attributes_notes_updated + + @attributes_notes_updated.setter + def attributes_notes_updated(self, attributes_notes_updated): + """ + Sets the attributes_notes_updated of this BulkUpdateNotesMetadata. + Total number attributes (both string and numeric) in TRACES namespace for which notes were updated. + + + :param attributes_notes_updated: The attributes_notes_updated of this BulkUpdateNotesMetadata. + :type: int + """ + self._attributes_notes_updated = attributes_notes_updated + + @property + def synthetic_attributes_pinned(self): + """ + Gets the synthetic_attributes_pinned of this BulkUpdateNotesMetadata. + Total number attributes (both string and numeric) in SYNTHETIC namespace that were pinned. + + + :return: The synthetic_attributes_pinned of this BulkUpdateNotesMetadata. + :rtype: int + """ + return self._synthetic_attributes_pinned + + @synthetic_attributes_pinned.setter + def synthetic_attributes_pinned(self, synthetic_attributes_pinned): + """ + Sets the synthetic_attributes_pinned of this BulkUpdateNotesMetadata. + Total number attributes (both string and numeric) in SYNTHETIC namespace that were pinned. + + + :param synthetic_attributes_pinned: The synthetic_attributes_pinned of this BulkUpdateNotesMetadata. + :type: int + """ + self._synthetic_attributes_pinned = synthetic_attributes_pinned + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/apm_traces/models/bulk_update_notes_status.py b/src/oci/apm_traces/models/bulk_update_notes_status.py new file mode 100644 index 0000000000..e9ea56cf5b --- /dev/null +++ b/src/oci/apm_traces/models/bulk_update_notes_status.py @@ -0,0 +1,105 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20200630 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class BulkUpdateNotesStatus(object): + """ + Response of a bulk update notes operation. + """ + + def __init__(self, **kwargs): + """ + Initializes a new BulkUpdateNotesStatus object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param attribute_statuses: + The value to assign to the attribute_statuses property of this BulkUpdateNotesStatus. + :type attribute_statuses: list[oci.apm_traces.models.AttributeUpdateNotesResponse] + + :param bulk_update_notes_metadata: + The value to assign to the bulk_update_notes_metadata property of this BulkUpdateNotesStatus. + :type bulk_update_notes_metadata: oci.apm_traces.models.BulkUpdateNotesMetadata + + """ + self.swagger_types = { + 'attribute_statuses': 'list[AttributeUpdateNotesResponse]', + 'bulk_update_notes_metadata': 'BulkUpdateNotesMetadata' + } + + self.attribute_map = { + 'attribute_statuses': 'attributeStatuses', + 'bulk_update_notes_metadata': 'bulkUpdateNotesMetadata' + } + + self._attribute_statuses = None + self._bulk_update_notes_metadata = None + + @property + def attribute_statuses(self): + """ + **[Required]** Gets the attribute_statuses of this BulkUpdateNotesStatus. + We preserve the order of the attribute items from the bulk update notes request in this collection. The ith object in this collection represents the + bulk update notes operation status of the ith object in the BulkUpdateAttributeNotesDetails object in the Bulk update notes request. If the + bulk update notes operation results in a processing error or a validation error, the operationStatus property in the BulkUpdateNotesMetadata object will + contain the appropriate bulk error status for the bulk operation. + + + :return: The attribute_statuses of this BulkUpdateNotesStatus. + :rtype: list[oci.apm_traces.models.AttributeUpdateNotesResponse] + """ + return self._attribute_statuses + + @attribute_statuses.setter + def attribute_statuses(self, attribute_statuses): + """ + Sets the attribute_statuses of this BulkUpdateNotesStatus. + We preserve the order of the attribute items from the bulk update notes request in this collection. The ith object in this collection represents the + bulk update notes operation status of the ith object in the BulkUpdateAttributeNotesDetails object in the Bulk update notes request. If the + bulk update notes operation results in a processing error or a validation error, the operationStatus property in the BulkUpdateNotesMetadata object will + contain the appropriate bulk error status for the bulk operation. + + + :param attribute_statuses: The attribute_statuses of this BulkUpdateNotesStatus. + :type: list[oci.apm_traces.models.AttributeUpdateNotesResponse] + """ + self._attribute_statuses = attribute_statuses + + @property + def bulk_update_notes_metadata(self): + """ + **[Required]** Gets the bulk_update_notes_metadata of this BulkUpdateNotesStatus. + + :return: The bulk_update_notes_metadata of this BulkUpdateNotesStatus. + :rtype: oci.apm_traces.models.BulkUpdateNotesMetadata + """ + return self._bulk_update_notes_metadata + + @bulk_update_notes_metadata.setter + def bulk_update_notes_metadata(self, bulk_update_notes_metadata): + """ + Sets the bulk_update_notes_metadata of this BulkUpdateNotesStatus. + + :param bulk_update_notes_metadata: The bulk_update_notes_metadata of this BulkUpdateNotesStatus. + :type: oci.apm_traces.models.BulkUpdateNotesMetadata + """ + self._bulk_update_notes_metadata = bulk_update_notes_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/apm_traces/models/query_result_metadata_summary.py b/src/oci/apm_traces/models/query_result_metadata_summary.py index 7fed8167b6..51ab6ce352 100644 --- a/src/oci/apm_traces/models/query_result_metadata_summary.py +++ b/src/oci/apm_traces/models/query_result_metadata_summary.py @@ -36,6 +36,10 @@ def __init__(self, **kwargs): The value to assign to the query_results_ordered_by property of this QueryResultMetadataSummary. :type query_results_ordered_by: list[oci.apm_traces.models.QueryResultsOrderedBySummary] + :param query_results_topology_info: + The value to assign to the query_results_topology_info property of this QueryResultMetadataSummary. + :type query_results_topology_info: oci.apm_traces.models.QueryResultsTopologyInfo + :param time_series_interval_in_mins: The value to assign to the time_series_interval_in_mins property of this QueryResultMetadataSummary. :type time_series_interval_in_mins: int @@ -46,6 +50,7 @@ def __init__(self, **kwargs): 'source_name': 'str', 'query_results_grouped_by': 'list[QueryResultsGroupedBySummary]', 'query_results_ordered_by': 'list[QueryResultsOrderedBySummary]', + 'query_results_topology_info': 'QueryResultsTopologyInfo', 'time_series_interval_in_mins': 'int' } @@ -54,6 +59,7 @@ def __init__(self, **kwargs): 'source_name': 'sourceName', 'query_results_grouped_by': 'queryResultsGroupedBy', 'query_results_ordered_by': 'queryResultsOrderedBy', + 'query_results_topology_info': 'queryResultsTopologyInfo', 'time_series_interval_in_mins': 'timeSeriesIntervalInMins' } @@ -61,6 +67,7 @@ def __init__(self, **kwargs): self._source_name = None self._query_results_grouped_by = None self._query_results_ordered_by = None + self._query_results_topology_info = None self._time_series_interval_in_mins = None @property @@ -165,6 +172,26 @@ def query_results_ordered_by(self, query_results_ordered_by): """ self._query_results_ordered_by = query_results_ordered_by + @property + def query_results_topology_info(self): + """ + Gets the query_results_topology_info of this QueryResultMetadataSummary. + + :return: The query_results_topology_info of this QueryResultMetadataSummary. + :rtype: oci.apm_traces.models.QueryResultsTopologyInfo + """ + return self._query_results_topology_info + + @query_results_topology_info.setter + def query_results_topology_info(self, query_results_topology_info): + """ + Sets the query_results_topology_info of this QueryResultMetadataSummary. + + :param query_results_topology_info: The query_results_topology_info of this QueryResultMetadataSummary. + :type: oci.apm_traces.models.QueryResultsTopologyInfo + """ + self._query_results_topology_info = query_results_topology_info + @property def time_series_interval_in_mins(self): """ diff --git a/src/oci/apm_traces/models/query_result_response.py b/src/oci/apm_traces/models/query_result_response.py index 82ac2e0505..c5d2a16060 100644 --- a/src/oci/apm_traces/models/query_result_response.py +++ b/src/oci/apm_traces/models/query_result_response.py @@ -30,19 +30,33 @@ def __init__(self, **kwargs): The value to assign to the query_result_rows property of this QueryResultResponse. :type query_result_rows: list[oci.apm_traces.models.QueryResultRow] + :param query_result_metadata: + The value to assign to the query_result_metadata property of this QueryResultResponse. + :type query_result_metadata: dict(str, object) + + :param query_result_warnings: + The value to assign to the query_result_warnings property of this QueryResultResponse. + :type query_result_warnings: list[oci.apm_traces.models.QueryResultWarning] + """ self.swagger_types = { 'query_result_metadata_summary': 'QueryResultMetadataSummary', - 'query_result_rows': 'list[QueryResultRow]' + 'query_result_rows': 'list[QueryResultRow]', + 'query_result_metadata': 'dict(str, object)', + 'query_result_warnings': 'list[QueryResultWarning]' } self.attribute_map = { 'query_result_metadata_summary': 'queryResultMetadataSummary', - 'query_result_rows': 'queryResultRows' + 'query_result_rows': 'queryResultRows', + 'query_result_metadata': 'queryResultMetadata', + 'query_result_warnings': 'queryResultWarnings' } self._query_result_metadata_summary = None self._query_result_rows = None + self._query_result_metadata = None + self._query_result_warnings = None @property def query_result_metadata_summary(self): @@ -92,6 +106,54 @@ def query_result_rows(self, query_result_rows): """ self._query_result_rows = query_result_rows + @property + def query_result_metadata(self): + """ + Gets the query_result_metadata of this QueryResultResponse. + A map containing metadata or additional information. + + + :return: The query_result_metadata of this QueryResultResponse. + :rtype: dict(str, object) + """ + return self._query_result_metadata + + @query_result_metadata.setter + def query_result_metadata(self, query_result_metadata): + """ + Sets the query_result_metadata of this QueryResultResponse. + A map containing metadata or additional information. + + + :param query_result_metadata: The query_result_metadata of this QueryResultResponse. + :type: dict(str, object) + """ + self._query_result_metadata = query_result_metadata + + @property + def query_result_warnings(self): + """ + Gets the query_result_warnings of this QueryResultResponse. + A structure that provides warnings, if any, along with the query results. + + + :return: The query_result_warnings of this QueryResultResponse. + :rtype: list[oci.apm_traces.models.QueryResultWarning] + """ + return self._query_result_warnings + + @query_result_warnings.setter + def query_result_warnings(self, query_result_warnings): + """ + Sets the query_result_warnings of this QueryResultResponse. + A structure that provides warnings, if any, along with the query results. + + + :param query_result_warnings: The query_result_warnings of this QueryResultResponse. + :type: list[oci.apm_traces.models.QueryResultWarning] + """ + self._query_result_warnings = query_result_warnings + def __repr__(self): return formatted_flat_dict(self) diff --git a/src/oci/apm_traces/models/query_result_warning.py b/src/oci/apm_traces/models/query_result_warning.py new file mode 100644 index 0000000000..510330d916 --- /dev/null +++ b/src/oci/apm_traces/models/query_result_warning.py @@ -0,0 +1,72 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20200630 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class QueryResultWarning(object): + """ + A warning message that can be included with a query result that provides information to the user. + """ + + def __init__(self, **kwargs): + """ + Initializes a new QueryResultWarning object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param message: + The value to assign to the message property of this QueryResultWarning. + :type message: str + + """ + self.swagger_types = { + 'message': 'str' + } + + self.attribute_map = { + 'message': 'message' + } + + self._message = None + + @property + def message(self): + """ + Gets the message of this QueryResultWarning. + The text of the warning message. + + + :return: The message of this QueryResultWarning. + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """ + Sets the message of this QueryResultWarning. + The text of the warning message. + + + :param message: The message of this QueryResultWarning. + :type: str + """ + self._message = message + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/apm_traces/models/query_results_topology_info.py b/src/oci/apm_traces/models/query_results_topology_info.py new file mode 100644 index 0000000000..2c56da4644 --- /dev/null +++ b/src/oci/apm_traces/models/query_results_topology_info.py @@ -0,0 +1,72 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20200630 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class QueryResultsTopologyInfo(object): + """ + The structure that provides the metadata of a topology query. + """ + + def __init__(self, **kwargs): + """ + Initializes a new QueryResultsTopologyInfo object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param nodes: + The value to assign to the nodes property of this QueryResultsTopologyInfo. + :type nodes: list[oci.apm_traces.models.QueryResultsTopologyNodeInfo] + + """ + self.swagger_types = { + 'nodes': 'list[QueryResultsTopologyNodeInfo]' + } + + self.attribute_map = { + 'nodes': 'nodes' + } + + self._nodes = None + + @property + def nodes(self): + """ + Gets the nodes of this QueryResultsTopologyInfo. + The information about the attributes of the topology nodes. + + + :return: The nodes of this QueryResultsTopologyInfo. + :rtype: list[oci.apm_traces.models.QueryResultsTopologyNodeInfo] + """ + return self._nodes + + @nodes.setter + def nodes(self, nodes): + """ + Sets the nodes of this QueryResultsTopologyInfo. + The information about the attributes of the topology nodes. + + + :param nodes: The nodes of this QueryResultsTopologyInfo. + :type: list[oci.apm_traces.models.QueryResultsTopologyNodeInfo] + """ + self._nodes = nodes + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/apm_traces/models/query_results_topology_node_info.py b/src/oci/apm_traces/models/query_results_topology_node_info.py new file mode 100644 index 0000000000..e44a7c1e2f --- /dev/null +++ b/src/oci/apm_traces/models/query_results_topology_node_info.py @@ -0,0 +1,72 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20200630 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class QueryResultsTopologyNodeInfo(object): + """ + The information about a node attribute. + """ + + def __init__(self, **kwargs): + """ + Initializes a new QueryResultsTopologyNodeInfo object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param node_name: + The value to assign to the node_name property of this QueryResultsTopologyNodeInfo. + :type node_name: str + + """ + self.swagger_types = { + 'node_name': 'str' + } + + self.attribute_map = { + 'node_name': 'nodeName' + } + + self._node_name = None + + @property + def node_name(self): + """ + Gets the node_name of this QueryResultsTopologyNodeInfo. + The name of the node attribute. + + + :return: The node_name of this QueryResultsTopologyNodeInfo. + :rtype: str + """ + return self._node_name + + @node_name.setter + def node_name(self, node_name): + """ + Sets the node_name of this QueryResultsTopologyNodeInfo. + The name of the node attribute. + + + :param node_name: The node_name of this QueryResultsTopologyNodeInfo. + :type: str + """ + self._node_name = node_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/apm_traces/models/span.py b/src/oci/apm_traces/models/span.py index cc84c4bdae..21181576df 100644 --- a/src/oci/apm_traces/models/span.py +++ b/src/oci/apm_traces/models/span.py @@ -15,6 +15,14 @@ class Span(object): Definition of a span object. """ + #: A constant which can be used with the source_name property of a Span. + #: This constant has a value of "SPANS" + SOURCE_NAME_SPANS = "SPANS" + + #: A constant which can be used with the source_name property of a Span. + #: This constant has a value of "SYN_SPANS" + SOURCE_NAME_SYN_SPANS = "SYN_SPANS" + def __init__(self, **kwargs): """ Initializes a new Span object with values from keyword arguments. @@ -60,6 +68,10 @@ def __init__(self, **kwargs): The value to assign to the tags property of this Span. :type tags: list[oci.apm_traces.models.Tag] + :param tags_metadata: + The value to assign to the tags_metadata property of this Span. + :type tags_metadata: dict(str, TagMetadata) + :param logs: The value to assign to the logs property of this Span. :type logs: list[oci.apm_traces.models.SpanLogCollection] @@ -68,6 +80,12 @@ def __init__(self, **kwargs): The value to assign to the is_error property of this Span. :type is_error: bool + :param source_name: + The value to assign to the source_name property of this Span. + Allowed values for this property are: "SPANS", "SYN_SPANS", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type source_name: str + """ self.swagger_types = { 'key': 'str', @@ -80,8 +98,10 @@ def __init__(self, **kwargs): 'service_name': 'str', 'kind': 'str', 'tags': 'list[Tag]', + 'tags_metadata': 'dict(str, TagMetadata)', 'logs': 'list[SpanLogCollection]', - 'is_error': 'bool' + 'is_error': 'bool', + 'source_name': 'str' } self.attribute_map = { @@ -95,8 +115,10 @@ def __init__(self, **kwargs): 'service_name': 'serviceName', 'kind': 'kind', 'tags': 'tags', + 'tags_metadata': 'tagsMetadata', 'logs': 'logs', - 'is_error': 'isError' + 'is_error': 'isError', + 'source_name': 'sourceName' } self._key = None @@ -109,8 +131,10 @@ def __init__(self, **kwargs): self._service_name = None self._kind = None self._tags = None + self._tags_metadata = None self._logs = None self._is_error = None + self._source_name = None @property def key(self): @@ -356,6 +380,30 @@ def tags(self, tags): """ self._tags = tags + @property + def tags_metadata(self): + """ + Gets the tags_metadata of this Span. + Metadata about the tags in the span. + + + :return: The tags_metadata of this Span. + :rtype: dict(str, TagMetadata) + """ + return self._tags_metadata + + @tags_metadata.setter + def tags_metadata(self, tags_metadata): + """ + Sets the tags_metadata of this Span. + Metadata about the tags in the span. + + + :param tags_metadata: The tags_metadata of this Span. + :type: dict(str, TagMetadata) + """ + self._tags_metadata = tags_metadata + @property def logs(self): """ @@ -404,6 +452,36 @@ def is_error(self, is_error): """ self._is_error = is_error + @property + def source_name(self): + """ + Gets the source_name of this Span. + Source of span (spans, syn_spans). + + Allowed values for this property are: "SPANS", "SYN_SPANS", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The source_name of this Span. + :rtype: str + """ + return self._source_name + + @source_name.setter + def source_name(self, source_name): + """ + Sets the source_name of this Span. + Source of span (spans, syn_spans). + + + :param source_name: The source_name of this Span. + :type: str + """ + allowed_values = ["SPANS", "SYN_SPANS"] + if not value_allowed_none_or_none_sentinel(source_name, allowed_values): + source_name = 'UNKNOWN_ENUM_VALUE' + self._source_name = source_name + def __repr__(self): return formatted_flat_dict(self) diff --git a/src/oci/apm_traces/models/span_log_collection.py b/src/oci/apm_traces/models/span_log_collection.py index 82e988ee7b..c391b7dcfb 100644 --- a/src/oci/apm_traces/models/span_log_collection.py +++ b/src/oci/apm_traces/models/span_log_collection.py @@ -24,6 +24,10 @@ def __init__(self, **kwargs): The value to assign to the time_created property of this SpanLogCollection. :type time_created: datetime + :param event_name: + The value to assign to the event_name property of this SpanLogCollection. + :type event_name: str + :param span_logs: The value to assign to the span_logs property of this SpanLogCollection. :type span_logs: list[oci.apm_traces.models.SpanLog] @@ -31,15 +35,18 @@ def __init__(self, **kwargs): """ self.swagger_types = { 'time_created': 'datetime', + 'event_name': 'str', 'span_logs': 'list[SpanLog]' } self.attribute_map = { 'time_created': 'timeCreated', + 'event_name': 'eventName', 'span_logs': 'spanLogs' } self._time_created = None + self._event_name = None self._span_logs = None @property @@ -66,6 +73,30 @@ def time_created(self, time_created): """ self._time_created = time_created + @property + def event_name(self): + """ + Gets the event_name of this SpanLogCollection. + Name of the event for which the log is created. + + + :return: The event_name of this SpanLogCollection. + :rtype: str + """ + return self._event_name + + @event_name.setter + def event_name(self, event_name): + """ + Sets the event_name of this SpanLogCollection. + Name of the event for which the log is created. + + + :param event_name: The event_name of this SpanLogCollection. + :type: str + """ + self._event_name = event_name + @property def span_logs(self): """ diff --git a/src/oci/apm_traces/models/tag_metadata.py b/src/oci/apm_traces/models/tag_metadata.py new file mode 100644 index 0000000000..7c25dcfdfc --- /dev/null +++ b/src/oci/apm_traces/models/tag_metadata.py @@ -0,0 +1,155 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20200630 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class TagMetadata(object): + """ + Definition of the tag metadata. + """ + + #: A constant which can be used with the tag_type property of a TagMetadata. + #: This constant has a value of "STRING" + TAG_TYPE_STRING = "STRING" + + #: A constant which can be used with the tag_type property of a TagMetadata. + #: This constant has a value of "NUMERIC" + TAG_TYPE_NUMERIC = "NUMERIC" + + #: A constant which can be used with the tag_unit property of a TagMetadata. + #: This constant has a value of "EPOCH_TIME_MS" + TAG_UNIT_EPOCH_TIME_MS = "EPOCH_TIME_MS" + + #: A constant which can be used with the tag_unit property of a TagMetadata. + #: This constant has a value of "BYTES" + TAG_UNIT_BYTES = "BYTES" + + #: A constant which can be used with the tag_unit property of a TagMetadata. + #: This constant has a value of "COUNT" + TAG_UNIT_COUNT = "COUNT" + + #: A constant which can be used with the tag_unit property of a TagMetadata. + #: This constant has a value of "DURATION_MS" + TAG_UNIT_DURATION_MS = "DURATION_MS" + + #: A constant which can be used with the tag_unit property of a TagMetadata. + #: This constant has a value of "TRACE_STATUS" + TAG_UNIT_TRACE_STATUS = "TRACE_STATUS" + + #: A constant which can be used with the tag_unit property of a TagMetadata. + #: This constant has a value of "PERCENTAGE" + TAG_UNIT_PERCENTAGE = "PERCENTAGE" + + #: A constant which can be used with the tag_unit property of a TagMetadata. + #: This constant has a value of "NONE" + TAG_UNIT_NONE = "NONE" + + def __init__(self, **kwargs): + """ + Initializes a new TagMetadata object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param tag_type: + The value to assign to the tag_type property of this TagMetadata. + Allowed values for this property are: "STRING", "NUMERIC", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type tag_type: str + + :param tag_unit: + The value to assign to the tag_unit property of this TagMetadata. + Allowed values for this property are: "EPOCH_TIME_MS", "BYTES", "COUNT", "DURATION_MS", "TRACE_STATUS", "PERCENTAGE", "NONE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type tag_unit: str + + """ + self.swagger_types = { + 'tag_type': 'str', + 'tag_unit': 'str' + } + + self.attribute_map = { + 'tag_type': 'tagType', + 'tag_unit': 'tagUnit' + } + + self._tag_type = None + self._tag_unit = None + + @property + def tag_type(self): + """ + Gets the tag_type of this TagMetadata. + Type associated with the tag key. + + Allowed values for this property are: "STRING", "NUMERIC", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The tag_type of this TagMetadata. + :rtype: str + """ + return self._tag_type + + @tag_type.setter + def tag_type(self, tag_type): + """ + Sets the tag_type of this TagMetadata. + Type associated with the tag key. + + + :param tag_type: The tag_type of this TagMetadata. + :type: str + """ + allowed_values = ["STRING", "NUMERIC"] + if not value_allowed_none_or_none_sentinel(tag_type, allowed_values): + tag_type = 'UNKNOWN_ENUM_VALUE' + self._tag_type = tag_type + + @property + def tag_unit(self): + """ + Gets the tag_unit of this TagMetadata. + Unit associated with the tag key. + + Allowed values for this property are: "EPOCH_TIME_MS", "BYTES", "COUNT", "DURATION_MS", "TRACE_STATUS", "PERCENTAGE", "NONE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The tag_unit of this TagMetadata. + :rtype: str + """ + return self._tag_unit + + @tag_unit.setter + def tag_unit(self, tag_unit): + """ + Sets the tag_unit of this TagMetadata. + Unit associated with the tag key. + + + :param tag_unit: The tag_unit of this TagMetadata. + :type: str + """ + allowed_values = ["EPOCH_TIME_MS", "BYTES", "COUNT", "DURATION_MS", "TRACE_STATUS", "PERCENTAGE", "NONE"] + if not value_allowed_none_or_none_sentinel(tag_unit, allowed_values): + tag_unit = 'UNKNOWN_ENUM_VALUE' + self._tag_unit = tag_unit + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/apm_traces/models/trace.py b/src/oci/apm_traces/models/trace.py index c25445eb05..1796c0a766 100644 --- a/src/oci/apm_traces/models/trace.py +++ b/src/oci/apm_traces/models/trace.py @@ -15,6 +15,14 @@ class Trace(object): Definition of a trace object. """ + #: A constant which can be used with the source_name property of a Trace. + #: This constant has a value of "TRACES" + SOURCE_NAME_TRACES = "TRACES" + + #: A constant which can be used with the source_name property of a Trace. + #: This constant has a value of "SYN_TRACES" + SOURCE_NAME_SYN_TRACES = "SYN_TRACES" + def __init__(self, **kwargs): """ Initializes a new Trace object with values from keyword arguments. @@ -84,6 +92,12 @@ def __init__(self, **kwargs): The value to assign to the service_summaries property of this Trace. :type service_summaries: list[oci.apm_traces.models.TraceServiceSummary] + :param source_name: + The value to assign to the source_name property of this Trace. + Allowed values for this property are: "TRACES", "SYN_TRACES", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type source_name: str + :param span_summary: The value to assign to the span_summary property of this Trace. :type span_summary: oci.apm_traces.models.TraceSpanSummary @@ -110,6 +124,7 @@ def __init__(self, **kwargs): 'trace_error_type': 'str', 'trace_error_code': 'str', 'service_summaries': 'list[TraceServiceSummary]', + 'source_name': 'str', 'span_summary': 'TraceSpanSummary', 'spans': 'list[Span]' } @@ -131,6 +146,7 @@ def __init__(self, **kwargs): 'trace_error_type': 'traceErrorType', 'trace_error_code': 'traceErrorCode', 'service_summaries': 'serviceSummaries', + 'source_name': 'sourceName', 'span_summary': 'spanSummary', 'spans': 'spans' } @@ -151,6 +167,7 @@ def __init__(self, **kwargs): self._trace_error_type = None self._trace_error_code = None self._service_summaries = None + self._source_name = None self._span_summary = None self._spans = None @@ -560,6 +577,36 @@ def service_summaries(self, service_summaries): """ self._service_summaries = service_summaries + @property + def source_name(self): + """ + Gets the source_name of this Trace. + Source of trace (traces, syn_traces). + + Allowed values for this property are: "TRACES", "SYN_TRACES", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The source_name of this Trace. + :rtype: str + """ + return self._source_name + + @source_name.setter + def source_name(self, source_name): + """ + Sets the source_name of this Trace. + Source of trace (traces, syn_traces). + + + :param source_name: The source_name of this Trace. + :type: str + """ + allowed_values = ["TRACES", "SYN_TRACES"] + if not value_allowed_none_or_none_sentinel(source_name, allowed_values): + source_name = 'UNKNOWN_ENUM_VALUE' + self._source_name = source_name + @property def span_summary(self): """ diff --git a/src/oci/apm_traces/query_client.py b/src/oci/apm_traces/query_client.py index b12b0e8d60..0144f44dbc 100644 --- a/src/oci/apm_traces/query_client.py +++ b/src/oci/apm_traces/query_client.py @@ -123,7 +123,7 @@ def list_quick_picks(self, apm_domain_id, **kwargs): :param str apm_domain_id: (required) - The APM Domain ID the request is intended for. + The APM Domain ID for the intended request. :param str opc_request_id: (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a @@ -133,7 +133,7 @@ def list_quick_picks(self, apm_domain_id, **kwargs): The maximum number of items to return. :param str page: (optional) - The page token representing the page at which to start retrieving results. + The page token representing the page where to start retrieving results. This is usually retrieved from a previous response. :param obj retry_strategy: (optional) @@ -229,7 +229,7 @@ def query(self, apm_domain_id, time_span_started_greater_than_or_equal_to, time_ :param str apm_domain_id: (required) - The APM Domain ID the request is intended for. + The APM Domain ID for the intended request. :param datetime time_span_started_greater_than_or_equal_to: (required) Include spans that have a `spanStartTime` equal to or greater than this value. @@ -249,7 +249,7 @@ def query(self, apm_domain_id, time_span_started_greater_than_or_equal_to, time_ The maximum number of items to return. :param str page: (optional) - The page token representing the page at which to start retrieving results. + The page token representing the page where to start retrieving results. This is usually retrieved from a previous response. :param obj retry_strategy: (optional) diff --git a/src/oci/apm_traces/trace_client.py b/src/oci/apm_traces/trace_client.py index db71963f27..5a9e75c6e8 100644 --- a/src/oci/apm_traces/trace_client.py +++ b/src/oci/apm_traces/trace_client.py @@ -122,7 +122,7 @@ def get_aggregated_snapshot(self, apm_domain_id, trace_key, **kwargs): :param str apm_domain_id: (required) - The APM Domain ID the request is intended for. + The APM Domain ID for the intended request. :param str trace_key: (required) Unique Application Performance Monitoring trace identifier (traceId). @@ -131,6 +131,18 @@ def get_aggregated_snapshot(self, apm_domain_id, trace_key, **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 service_name: (optional) + Name associated with the service. + + :param str server_name: (optional) + Name of the server. + + :param str span_key: (optional) + Unique Application Performance Monitoring span identifier (spanId). + + :param str span_name: (optional) + Name of the span associated with the trace. + :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. @@ -160,7 +172,11 @@ def get_aggregated_snapshot(self, apm_domain_id, trace_key, **kwargs): expected_kwargs = [ "allow_control_chars", "retry_strategy", - "opc_request_id" + "opc_request_id", + "service_name", + "server_name", + "span_key", + "span_name" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: @@ -178,7 +194,11 @@ def get_aggregated_snapshot(self, apm_domain_id, trace_key, **kwargs): raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') query_params = { - "apmDomainId": apm_domain_id + "apmDomainId": apm_domain_id, + "serviceName": kwargs.get("service_name", missing), + "serverName": kwargs.get("server_name", missing), + "spanKey": kwargs.get("span_key", missing), + "spanName": kwargs.get("span_name", missing) } query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} @@ -229,7 +249,7 @@ def get_span(self, apm_domain_id, span_key, trace_key, **kwargs): :param str apm_domain_id: (required) - The APM Domain ID the request is intended for. + The APM Domain ID for the intended request. :param str span_key: (required) Unique Application Performance Monitoring span identifier (spanId). @@ -241,6 +261,17 @@ def get_span(self, apm_domain_id, span_key, trace_key, **kwargs): Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + :param datetime time_span_started_greater_than_or_equal_to: (optional) + Include spans that have a `spanStartTime` equal to or greater than this value. + + :param datetime time_span_started_less_than: (optional) + Include spans that have a `spanStartTime`less than this value. + + :param str span_namespace: (optional) + Name space from which the span details need to be retrieved. + + Allowed values are: "TRACES", "SYNTHETIC" + :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. @@ -270,7 +301,10 @@ def get_span(self, apm_domain_id, span_key, trace_key, **kwargs): expected_kwargs = [ "allow_control_chars", "retry_strategy", - "opc_request_id" + "opc_request_id", + "time_span_started_greater_than_or_equal_to", + "time_span_started_less_than", + "span_namespace" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: @@ -288,8 +322,18 @@ def get_span(self, apm_domain_id, span_key, trace_key, **kwargs): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') + if 'span_namespace' in kwargs: + span_namespace_allowed_values = ["TRACES", "SYNTHETIC"] + if kwargs['span_namespace'] not in span_namespace_allowed_values: + raise ValueError( + f"Invalid value for `span_namespace`, must be one of { span_namespace_allowed_values }" + ) + query_params = { - "apmDomainId": apm_domain_id + "apmDomainId": apm_domain_id, + "timeSpanStartedGreaterThanOrEqualTo": kwargs.get("time_span_started_greater_than_or_equal_to", missing), + "timeSpanStartedLessThan": kwargs.get("time_span_started_less_than", missing), + "spanNamespace": kwargs.get("span_namespace", missing) } query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} @@ -340,7 +384,7 @@ def get_trace(self, apm_domain_id, trace_key, **kwargs): :param str apm_domain_id: (required) - The APM Domain ID the request is intended for. + The APM Domain ID for the intended request. :param str trace_key: (required) Unique Application Performance Monitoring trace identifier (traceId). @@ -349,6 +393,17 @@ def get_trace(self, apm_domain_id, trace_key, **kwargs): Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + :param datetime time_trace_started_greater_than_or_equal_to: (optional) + Include traces that have a `minTraceStartTime` equal to or greater than this value. + + :param datetime time_trace_started_less_than: (optional) + Include traces that have a `minTraceStartTime` less than this value. + + :param str trace_namespace: (optional) + Name space from which the trace details need to be retrieved. + + Allowed values are: "TRACES", "SYNTHETIC" + :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. @@ -378,7 +433,10 @@ def get_trace(self, apm_domain_id, trace_key, **kwargs): expected_kwargs = [ "allow_control_chars", "retry_strategy", - "opc_request_id" + "opc_request_id", + "time_trace_started_greater_than_or_equal_to", + "time_trace_started_less_than", + "trace_namespace" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: @@ -395,8 +453,18 @@ def get_trace(self, apm_domain_id, trace_key, **kwargs): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') + if 'trace_namespace' in kwargs: + trace_namespace_allowed_values = ["TRACES", "SYNTHETIC"] + if kwargs['trace_namespace'] not in trace_namespace_allowed_values: + raise ValueError( + f"Invalid value for `trace_namespace`, must be one of { trace_namespace_allowed_values }" + ) + query_params = { - "apmDomainId": apm_domain_id + "apmDomainId": apm_domain_id, + "timeTraceStartedGreaterThanOrEqualTo": kwargs.get("time_trace_started_greater_than_or_equal_to", missing), + "timeTraceStartedLessThan": kwargs.get("time_trace_started_less_than", missing), + "traceNamespace": kwargs.get("trace_namespace", missing) } query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} @@ -447,7 +515,7 @@ def get_trace_snapshot(self, apm_domain_id, trace_key, **kwargs): :param str apm_domain_id: (required) - The APM Domain ID the request is intended for. + The APM Domain ID for the intended request. :param str trace_key: (required) Unique Application Performance Monitoring trace identifier (traceId). @@ -457,10 +525,10 @@ def get_trace_snapshot(self, apm_domain_id, trace_key, **kwargs): particular request, please provide the request ID. :param bool is_summarized: (optional) - If enabled, then only span level details will be sent. + If enabled, only span level details are sent. :param str thread_id: (optional) - Thread id for which snapshots needs to be retrieved. This is an identifier of a thread, and is a positive long number generated when when a thread is created. + Thread ID for which snapshots need to be retrieved. This identifier of a thread is a long positive number generated when a thread is created. :param str snapshot_time: (optional) Epoch time of snapshot. diff --git a/src/oci/regions_definitions.py b/src/oci/regions_definitions.py index a80de7c41a..db346c5390 100644 --- a/src/oci/regions_definitions.py +++ b/src/oci/regions_definitions.py @@ -62,7 +62,8 @@ 'str': 'eu-frankfurt-2', 'beg': 'eu-jovanovac-1', 'doh': 'me-dcc-doha-1', - 'avz': 'eu-dcc-zurich-1' + 'avz': 'eu-dcc-zurich-1', + 'ahu': 'me-abudhabi-3' } REGION_REALMS = { 'ap-chuncheon-1': 'oc1', @@ -135,7 +136,9 @@ 'me-dcc-doha-1': 'oc21', - 'eu-dcc-zurich-1': 'oc24' + 'eu-dcc-zurich-1': 'oc24', + + 'me-abudhabi-3': 'oc26' } REALMS = { 'oc1': 'oraclecloud.com', @@ -149,7 +152,8 @@ 'oc19': 'oraclecloud.eu', 'oc20': 'oraclecloud20.com', 'oc21': 'oraclecloud21.com', - 'oc24': 'oraclecloud24.com' + 'oc24': 'oraclecloud24.com', + 'oc26': 'oraclecloud26.com' } REGIONS = [ 'ap-chuncheon-1', @@ -211,5 +215,6 @@ 'eu-frankfurt-2', 'eu-jovanovac-1', 'me-dcc-doha-1', - 'eu-dcc-zurich-1' + 'eu-dcc-zurich-1', + 'me-abudhabi-3' ] diff --git a/src/oci/stack_monitoring/models/discovery_details.py b/src/oci/stack_monitoring/models/discovery_details.py index 6c0c6e495d..7c56518cb0 100644 --- a/src/oci/stack_monitoring/models/discovery_details.py +++ b/src/oci/stack_monitoring/models/discovery_details.py @@ -71,6 +71,10 @@ class DiscoveryDetails(object): #: This constant has a value of "CUSTOM_RESOURCE" RESOURCE_TYPE_CUSTOM_RESOURCE = "CUSTOM_RESOURCE" + #: A constant which can be used with the resource_type property of a DiscoveryDetails. + #: This constant has a value of "ORACLE_HTTP_SERVER" + RESOURCE_TYPE_ORACLE_HTTP_SERVER = "ORACLE_HTTP_SERVER" + #: A constant which can be used with the license property of a DiscoveryDetails. #: This constant has a value of "STANDARD_EDITION" LICENSE_STANDARD_EDITION = "STANDARD_EDITION" @@ -90,7 +94,7 @@ def __init__(self, **kwargs): :param resource_type: The value to assign to the resource_type property of this DiscoveryDetails. - Allowed values for this property are: "WEBLOGIC_DOMAIN", "EBS_INSTANCE", "SQL_SERVER", "APACHE_TOMCAT", "ORACLE_DATABASE", "OCI_ORACLE_DB", "OCI_ORACLE_CDB", "OCI_ORACLE_PDB", "HOST", "ORACLE_PSFT", "ORACLE_MFT", "APACHE_HTTP_SERVER", "ORACLE_GOLDENGATE", "CUSTOM_RESOURCE", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "WEBLOGIC_DOMAIN", "EBS_INSTANCE", "SQL_SERVER", "APACHE_TOMCAT", "ORACLE_DATABASE", "OCI_ORACLE_DB", "OCI_ORACLE_CDB", "OCI_ORACLE_PDB", "HOST", "ORACLE_PSFT", "ORACLE_MFT", "APACHE_HTTP_SERVER", "ORACLE_GOLDENGATE", "CUSTOM_RESOURCE", "ORACLE_HTTP_SERVER", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type resource_type: str @@ -175,7 +179,7 @@ def resource_type(self): **[Required]** Gets the resource_type of this DiscoveryDetails. Resource Type. - Allowed values for this property are: "WEBLOGIC_DOMAIN", "EBS_INSTANCE", "SQL_SERVER", "APACHE_TOMCAT", "ORACLE_DATABASE", "OCI_ORACLE_DB", "OCI_ORACLE_CDB", "OCI_ORACLE_PDB", "HOST", "ORACLE_PSFT", "ORACLE_MFT", "APACHE_HTTP_SERVER", "ORACLE_GOLDENGATE", "CUSTOM_RESOURCE", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "WEBLOGIC_DOMAIN", "EBS_INSTANCE", "SQL_SERVER", "APACHE_TOMCAT", "ORACLE_DATABASE", "OCI_ORACLE_DB", "OCI_ORACLE_CDB", "OCI_ORACLE_PDB", "HOST", "ORACLE_PSFT", "ORACLE_MFT", "APACHE_HTTP_SERVER", "ORACLE_GOLDENGATE", "CUSTOM_RESOURCE", "ORACLE_HTTP_SERVER", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. @@ -194,7 +198,7 @@ def resource_type(self, resource_type): :param resource_type: The resource_type of this DiscoveryDetails. :type: str """ - allowed_values = ["WEBLOGIC_DOMAIN", "EBS_INSTANCE", "SQL_SERVER", "APACHE_TOMCAT", "ORACLE_DATABASE", "OCI_ORACLE_DB", "OCI_ORACLE_CDB", "OCI_ORACLE_PDB", "HOST", "ORACLE_PSFT", "ORACLE_MFT", "APACHE_HTTP_SERVER", "ORACLE_GOLDENGATE", "CUSTOM_RESOURCE"] + allowed_values = ["WEBLOGIC_DOMAIN", "EBS_INSTANCE", "SQL_SERVER", "APACHE_TOMCAT", "ORACLE_DATABASE", "OCI_ORACLE_DB", "OCI_ORACLE_CDB", "OCI_ORACLE_PDB", "HOST", "ORACLE_PSFT", "ORACLE_MFT", "APACHE_HTTP_SERVER", "ORACLE_GOLDENGATE", "CUSTOM_RESOURCE", "ORACLE_HTTP_SERVER"] if not value_allowed_none_or_none_sentinel(resource_type, allowed_values): resource_type = 'UNKNOWN_ENUM_VALUE' self._resource_type = resource_type diff --git a/src/oci/stack_monitoring/models/discovery_job_summary.py b/src/oci/stack_monitoring/models/discovery_job_summary.py index 1020d8fad8..6b15ebfdf5 100644 --- a/src/oci/stack_monitoring/models/discovery_job_summary.py +++ b/src/oci/stack_monitoring/models/discovery_job_summary.py @@ -71,6 +71,10 @@ class DiscoveryJobSummary(object): #: This constant has a value of "CUSTOM_RESOURCE" RESOURCE_TYPE_CUSTOM_RESOURCE = "CUSTOM_RESOURCE" + #: A constant which can be used with the resource_type property of a DiscoveryJobSummary. + #: This constant has a value of "ORACLE_HTTP_SERVER" + RESOURCE_TYPE_ORACLE_HTTP_SERVER = "ORACLE_HTTP_SERVER" + #: A constant which can be used with the license property of a DiscoveryJobSummary. #: This constant has a value of "STANDARD_EDITION" LICENSE_STANDARD_EDITION = "STANDARD_EDITION" @@ -150,7 +154,7 @@ def __init__(self, **kwargs): :param resource_type: The value to assign to the resource_type property of this DiscoveryJobSummary. - Allowed values for this property are: "WEBLOGIC_DOMAIN", "EBS_INSTANCE", "SQL_SERVER", "APACHE_TOMCAT", "ORACLE_DATABASE", "OCI_ORACLE_DB", "OCI_ORACLE_CDB", "OCI_ORACLE_PDB", "HOST", "ORACLE_PSFT", "ORACLE_MFT", "APACHE_HTTP_SERVER", "ORACLE_GOLDENGATE", "CUSTOM_RESOURCE", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "WEBLOGIC_DOMAIN", "EBS_INSTANCE", "SQL_SERVER", "APACHE_TOMCAT", "ORACLE_DATABASE", "OCI_ORACLE_DB", "OCI_ORACLE_CDB", "OCI_ORACLE_PDB", "HOST", "ORACLE_PSFT", "ORACLE_MFT", "APACHE_HTTP_SERVER", "ORACLE_GOLDENGATE", "CUSTOM_RESOURCE", "ORACLE_HTTP_SERVER", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type resource_type: str @@ -297,7 +301,7 @@ def resource_type(self): Gets the resource_type of this DiscoveryJobSummary. Resource Type - Allowed values for this property are: "WEBLOGIC_DOMAIN", "EBS_INSTANCE", "SQL_SERVER", "APACHE_TOMCAT", "ORACLE_DATABASE", "OCI_ORACLE_DB", "OCI_ORACLE_CDB", "OCI_ORACLE_PDB", "HOST", "ORACLE_PSFT", "ORACLE_MFT", "APACHE_HTTP_SERVER", "ORACLE_GOLDENGATE", "CUSTOM_RESOURCE", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "WEBLOGIC_DOMAIN", "EBS_INSTANCE", "SQL_SERVER", "APACHE_TOMCAT", "ORACLE_DATABASE", "OCI_ORACLE_DB", "OCI_ORACLE_CDB", "OCI_ORACLE_PDB", "HOST", "ORACLE_PSFT", "ORACLE_MFT", "APACHE_HTTP_SERVER", "ORACLE_GOLDENGATE", "CUSTOM_RESOURCE", "ORACLE_HTTP_SERVER", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. @@ -316,7 +320,7 @@ def resource_type(self, resource_type): :param resource_type: The resource_type of this DiscoveryJobSummary. :type: str """ - allowed_values = ["WEBLOGIC_DOMAIN", "EBS_INSTANCE", "SQL_SERVER", "APACHE_TOMCAT", "ORACLE_DATABASE", "OCI_ORACLE_DB", "OCI_ORACLE_CDB", "OCI_ORACLE_PDB", "HOST", "ORACLE_PSFT", "ORACLE_MFT", "APACHE_HTTP_SERVER", "ORACLE_GOLDENGATE", "CUSTOM_RESOURCE"] + allowed_values = ["WEBLOGIC_DOMAIN", "EBS_INSTANCE", "SQL_SERVER", "APACHE_TOMCAT", "ORACLE_DATABASE", "OCI_ORACLE_DB", "OCI_ORACLE_CDB", "OCI_ORACLE_PDB", "HOST", "ORACLE_PSFT", "ORACLE_MFT", "APACHE_HTTP_SERVER", "ORACLE_GOLDENGATE", "CUSTOM_RESOURCE", "ORACLE_HTTP_SERVER"] if not value_allowed_none_or_none_sentinel(resource_type, allowed_values): resource_type = 'UNKNOWN_ENUM_VALUE' self._resource_type = resource_type diff --git a/src/oci/stack_monitoring/stack_monitoring_client.py b/src/oci/stack_monitoring/stack_monitoring_client.py index c29e8431da..599ddc6843 100644 --- a/src/oci/stack_monitoring/stack_monitoring_client.py +++ b/src/oci/stack_monitoring/stack_monitoring_client.py @@ -885,7 +885,7 @@ def create_baselineable_metric(self, create_baselineable_metric_details, **kwarg resource_path = "/baselineableMetrics" method = "POST" operation_name = "create_baselineable_metric" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/stack-monitoring/20210330/CreateBaselineableMetricDetails/CreateBaselineableMetric" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/stack-monitoring/20210330/BaselineableMetric/CreateBaselineableMetric" # Don't accept unknown kwargs expected_kwargs = [ @@ -2921,7 +2921,7 @@ def evaluate_baselineable_metric(self, evaluate_baselineable_metric_details, bas resource_path = "/baselineableMetrics/{baselineableMetricId}/actions/evaluate" method = "POST" operation_name = "evaluate_baselineable_metric" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/stack-monitoring/20210330/EvaluateBaselineableMetricResult/EvaluateBaselineableMetric" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/stack-monitoring/20210330/BaselineableMetric/EvaluateBaselineableMetric" # Don't accept unknown kwargs expected_kwargs = [ @@ -4091,7 +4091,7 @@ def list_baselineable_metrics(self, **kwargs): resource_path = "/baselineableMetrics" method = "GET" operation_name = "list_baselineable_metrics" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/stack-monitoring/20210330/BaselineableMetricSummary/ListBaselineableMetrics" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/stack-monitoring/20210330/BaselineableMetric/ListBaselineableMetrics" # Don't accept unknown kwargs expected_kwargs = [ @@ -7328,7 +7328,7 @@ def update_baselineable_metric(self, update_baselineable_metric_details, baselin resource_path = "/baselineableMetrics/{baselineableMetricId}" method = "PUT" operation_name = "update_baselineable_metric" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/stack-monitoring/20210330/UpdateBaselineableMetricDetails/UpdateBaselineableMetric" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/stack-monitoring/20210330/BaselineableMetric/UpdateBaselineableMetric" # Don't accept unknown kwargs expected_kwargs = [ diff --git a/src/oci/version.py b/src/oci/version.py index 46454c797f..046a2cee06 100644 --- a/src/oci/version.py +++ b/src/oci/version.py @@ -2,4 +2,4 @@ # Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.124.1" +__version__ = "2.124.2"